blob: e01e96a8cc58bc189022987a617eec1dc8e48bc3 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00003# From configure.in Revision: 1.147
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.
Vladimir Marangozov676aa882000-07-12 03:02:43 +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 Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-06-29 16:12:00 +000023 --without-gcc never use gcc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024ac_help="$ac_help
Barry Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-06-29 16:12:00 +000045 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000046ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000047 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000048ac_help="$ac_help
Barry Warsawc0d24d82000-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)
Vladimir Marangozov676aa882000-07-12 03:02:43 +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"
Vladimir Marangozov676aa882000-07-12 03:02:43 +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`
Trent Mick635f6fb2000-08-23 21:33:05 +0000617 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000618 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 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000734 Monterey*)
735 RANLIB=:
736 without_gcc=;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000737 *) without_gcc=no;;
738 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000739fi
740
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000741echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000742
Guido van Rossum95012191999-12-16 17:50:52 +0000743
744
745MAINOBJ=python.o
746echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +0000747echo "configure:748: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000748# Check whether --with-cxx or --without-cxx was given.
749if test "${with_cxx+set}" = set; then
750 withval="$with_cxx"
751
752 case $withval in
753 no) CXX=
754 with_cxx=no;;
755 *) CXX=$withval
756 MAINOBJ=ccpython.o
757 with_cxx=$withval;;
758 esac
759else
760
761 with_cxx=no
762
763fi
764
765echo "$ac_t""$with_cxx" 1>&6
766SET_CXX="CXX = $CXX"
767
768#AC_MSG_CHECKING(CCC)
769#if test -z "$CCC"
770#then
771# case $ac_sys_system in
772# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
773# Linux*) SET_CCC="CCC= g++";;
774# *) SET_CCC=""
775# esac
776#else
777# SET_CCC="CCC= ${CCC}"
778#fi
779#AC_MSG_RESULT($SET_CCC)
780
Guido van Rossum8b131c51995-03-09 14:10:13 +0000781# If the user switches compilers, we can't believe the cache
782if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
783then
784 { echo "configure: error: cached CC is different -- throw away $cache_file
785(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
786fi
787
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000788# Extract the first word of "gcc", so it can be a program name with args.
789set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000790echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +0000791echo "configure:792: checking for $ac_word" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +0000792if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000793 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794else
795 if test -n "$CC"; then
796 ac_cv_prog_CC="$CC" # Let the user override the test.
797else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000798 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
799 ac_dummy="$PATH"
800 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801 test -z "$ac_dir" && ac_dir=.
802 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000803 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000804 break
805 fi
806 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000807 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000808fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000809fi
810CC="$ac_cv_prog_CC"
811if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000812 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000813else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000814 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000816
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000817if test -z "$CC"; then
818 # Extract the first word of "cc", so it can be a program name with args.
819set dummy cc; ac_word=$2
820echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +0000821echo "configure:822: checking for $ac_word" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +0000822if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823 echo $ac_n "(cached) $ac_c" 1>&6
824else
825 if test -n "$CC"; then
826 ac_cv_prog_CC="$CC" # Let the user override the test.
827else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000828 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000829 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000830 ac_dummy="$PATH"
831 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000832 test -z "$ac_dir" && ac_dir=.
833 if test -f $ac_dir/$ac_word; then
834 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
835 ac_prog_rejected=yes
836 continue
837 fi
838 ac_cv_prog_CC="cc"
839 break
840 fi
841 done
842 IFS="$ac_save_ifs"
843if test $ac_prog_rejected = yes; then
844 # We found a bogon in the path, so make sure we never use it.
845 set dummy $ac_cv_prog_CC
846 shift
847 if test $# -gt 0; then
848 # We chose a different compiler from the bogus one.
849 # However, it has the same basename, so the bogon will be chosen
850 # first if we set CC to just the basename; use the full file name.
851 shift
852 set dummy "$ac_dir/$ac_word" "$@"
853 shift
854 ac_cv_prog_CC="$@"
855 fi
856fi
857fi
858fi
859CC="$ac_cv_prog_CC"
860if test -n "$CC"; then
861 echo "$ac_t""$CC" 1>&6
862else
863 echo "$ac_t""no" 1>&6
864fi
865
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000866 if test -z "$CC"; then
867 case "`uname -s`" in
Vladimir Marangozov676aa882000-07-12 03:02:43 +0000868 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000869 # Extract the first word of "cl", so it can be a program name with args.
870set dummy cl; ac_word=$2
871echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +0000872echo "configure:873: checking for $ac_word" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +0000873if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000874 echo $ac_n "(cached) $ac_c" 1>&6
875else
876 if test -n "$CC"; then
877 ac_cv_prog_CC="$CC" # Let the user override the test.
878else
879 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
880 ac_dummy="$PATH"
881 for ac_dir in $ac_dummy; do
882 test -z "$ac_dir" && ac_dir=.
883 if test -f $ac_dir/$ac_word; then
884 ac_cv_prog_CC="cl"
885 break
886 fi
887 done
888 IFS="$ac_save_ifs"
889fi
890fi
891CC="$ac_cv_prog_CC"
892if test -n "$CC"; then
893 echo "$ac_t""$CC" 1>&6
894else
895 echo "$ac_t""no" 1>&6
896fi
897 ;;
898 esac
899 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
901fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000902
Vladimir Marangozov676aa882000-07-12 03:02:43 +0000903echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +0000904echo "configure:905: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000905
906ac_ext=c
907# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
908ac_cpp='$CPP $CPPFLAGS'
909ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000910ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000911cross_compiling=$ac_cv_prog_cc_cross
912
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000913cat > conftest.$ac_ext << EOF
914
Trent Mick635f6fb2000-08-23 21:33:05 +0000915#line 916 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000916#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000917
Guido van Rossumf78abae1997-01-21 22:02:36 +0000918main(){return(0);}
919EOF
Trent Mick635f6fb2000-08-23 21:33:05 +0000920if { (eval echo configure:921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000921 ac_cv_prog_cc_works=yes
922 # If we can't run a trivial program, we are probably using a cross compiler.
923 if (./conftest; exit) 2>/dev/null; then
924 ac_cv_prog_cc_cross=no
925 else
926 ac_cv_prog_cc_cross=yes
927 fi
928else
929 echo "configure: failed program was:" >&5
930 cat conftest.$ac_ext >&5
931 ac_cv_prog_cc_works=no
932fi
933rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000934ac_ext=c
935# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
936ac_cpp='$CPP $CPPFLAGS'
937ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
938ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
939cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000940
941echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
942if test $ac_cv_prog_cc_works = no; then
943 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
944fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +0000945echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +0000946echo "configure:947: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000947echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
948cross_compiling=$ac_cv_prog_cc_cross
949
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000950echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +0000951echo "configure:952: checking whether we are using GNU C" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +0000952if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000953 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954else
955 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000956#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000958#endif
959EOF
Trent Mick635f6fb2000-08-23 21:33:05 +0000960if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961 ac_cv_prog_gcc=yes
962else
963 ac_cv_prog_gcc=no
964fi
965fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000967echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000968
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000969if test $ac_cv_prog_gcc = yes; then
970 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000971else
972 GCC=
973fi
974
975ac_test_CFLAGS="${CFLAGS+set}"
976ac_save_CFLAGS="$CFLAGS"
977CFLAGS=
978echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +0000979echo "configure:980: checking whether ${CC-cc} accepts -g" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +0000980if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000981 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000982else
983 echo 'void f(){}' > conftest.c
984if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000985 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000986else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000987 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000988fi
989rm -f conftest*
990
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000991fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000992
Guido van Rossumf78abae1997-01-21 22:02:36 +0000993echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000994if test "$ac_test_CFLAGS" = set; then
995 CFLAGS="$ac_save_CFLAGS"
996elif test $ac_cv_prog_cc_g = yes; then
997 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000998 CFLAGS="-g -O2"
999 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001000 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001001 fi
1002else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001003 if test "$GCC" = yes; then
1004 CFLAGS="-O2"
1005 else
1006 CFLAGS=
1007 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001008fi
1009
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001010
Guido van Rossumdd997f71998-10-07 19:58:26 +00001011case $MACHDEP in
1012bsdos*)
1013 case $CC in
1014 gcc) CC="$CC -D_HAVE_BSDI";;
1015 esac;;
1016esac
1017
Guido van Rossum24b1e751997-08-21 02:29:16 +00001018case $ac_sys_system in
1019hp*|HP*)
1020 case $CC in
1021 cc|*/cc) CC="$CC -Aa -D_HPUX_SOURCE";;
1022 esac;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001023BeOS*)
1024 case $CC in
1025 cc) CC=cc;;
1026 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001027Monterey*)
1028 case $CC in
1029 cc) CC="$CC -Wl,-Bexport";;
1030 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001031esac
1032
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001033# LDLIBRARY is the name of the library to link against (as opposed to the
1034# name of the library into which to insert object files). On systems
1035# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
1036# the Makefiles).
1037
1038
1039LDLIBRARY=''
1040
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001041# LINKCC is the command that links the python executable -- default is $(CC).
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001042# This is altered for AIX and BeOS in order to build the export list before
1043# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001044
1045echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001046echo "configure:1047: checking LINKCC" >&5
Guido van Rossum95012191999-12-16 17:50:52 +00001047if test -z "$LINKCC" -a ! -z "$CXX"
1048then
1049 LINKCC="$CXX"
1050fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001051if test -z "$LINKCC"
1052then
1053 case $ac_sys_system in
1054 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001055 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001056 BeOS*)
Guido van Rossumea516321998-12-17 18:08:55 +00001057 LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001058 LDLIBRARY='libpython$(VERSION).so';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001059 dgux*)
1060 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001061 Monterey64*)
1062 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001063 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001064 esac
1065fi
1066echo "$ac_t""$LINKCC" 1>&6
1067
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001068echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001069echo "configure:1070: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001070
1071# NeXT framework builds require that the 'ar' library be converted into
1072# a bundle using libtool.
1073if test "$with_next_framework"
1074then
1075 LDLIBRARY='libpython$(VERSION).dylib'
1076fi
1077
1078# DG/UX requires some fancy ld contortions to produce a .so from an .a
1079if test "$MACHDEP" = "dguxR4"
1080then
1081 LDLIBRARY='libpython$(VERSION).so'
1082 OPT="$OPT -pic"
1083fi
1084echo "$ac_t""$LDLIBRARY" 1>&6
1085
1086# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1087if test -z "$LDLIBRARY"
1088then
1089 LDLIBRARY='libpython$(VERSION).a'
1090 MAKE_LDLIBRARY="true"
1091else
1092 MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
1093fi
1094
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001095# Extract the first word of "ranlib", so it can be a program name with args.
1096set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001097echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001098echo "configure:1099: checking for $ac_word" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001099if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001100 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001101else
1102 if test -n "$RANLIB"; then
1103 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1104else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001105 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1106 ac_dummy="$PATH"
1107 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108 test -z "$ac_dir" && ac_dir=.
1109 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001110 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001111 break
1112 fi
1113 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001115 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001116fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001117fi
1118RANLIB="$ac_cv_prog_RANLIB"
1119if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001120 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001121else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001122 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001123fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001124
1125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126for ac_prog in ar aal
1127do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001128# Extract the first word of "$ac_prog", so it can be a program name with args.
1129set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001130echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001131echo "configure:1132: checking for $ac_word" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001132if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001133 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134else
1135 if test -n "$AR"; then
1136 ac_cv_prog_AR="$AR" # Let the user override the test.
1137else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001138 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1139 ac_dummy="$PATH"
1140 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141 test -z "$ac_dir" && ac_dir=.
1142 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001143 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144 break
1145 fi
1146 done
1147 IFS="$ac_save_ifs"
1148fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001149fi
1150AR="$ac_cv_prog_AR"
1151if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001152 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001153else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001154 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001155fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156
1157test -n "$AR" && break
1158done
1159test -n "$AR" || AR="ar"
1160
1161
Guido van Rossumda88dad1995-01-26 00:46:29 +00001162
1163
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001164# Install just never works :-(
1165if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001166then
1167 INSTALL=cp
1168 INSTALL_PROGRAM=cp
1169 INSTALL_DATA=cp
1170else
1171 INSTALL_PROGRAM="$INSTALL"
1172 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001173fi
1174
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001175# Not every filesystem supports hard links
1176
1177if test -z "$LN" ; then
1178 case $ac_sys_system in
1179 BeOS*) LN="ln -s";;
1180 *) LN=ln;;
1181 esac
1182fi
1183
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001184# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001185
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001186if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001187then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001188 case $GCC in
1189 yes)
1190 case $ac_cv_prog_cc_g in
1191 yes) OPT="-g -O2";;
1192 *) OPT="-O2";;
1193 esac
1194 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001195 *) OPT="-O";;
1196 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001197fi
1198
Trent Mick635f6fb2000-08-23 21:33:05 +00001199# The current (beta) Monterey compiler dies with optimizations
1200case $ac_sys_system in
1201Monterey*) OPT="";;
1202esac
1203
Guido van Rossum563e7081996-09-10 18:20:48 +00001204if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001205then
1206 OPT="$OPT $ac_arch_flags"
1207fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001209echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001210echo "configure:1211: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001211# On Suns, sometimes $CPP names a directory.
1212if test -n "$CPP" && test -d "$CPP"; then
1213 CPP=
1214fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215if test -z "$CPP"; then
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001216if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001217 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218else
1219 # This must be in double quotes, not single quotes, because CPP may get
1220 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001221 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222 # On the NeXT, cc -E runs the code through the compiler's parser,
1223 # not just through cpp.
1224 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001225#line 1226 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001226#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001228Syntax Error
1229EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001230ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Trent Mick635f6fb2000-08-23 21:33:05 +00001231{ (eval echo configure:1232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001232ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233if test -z "$ac_err"; then
1234 :
1235else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001236 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001237 echo "configure: failed program was:" >&5
1238 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239 rm -rf conftest*
1240 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001241 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001242#line 1243 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245Syntax Error
1246EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001247ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Trent Mick635f6fb2000-08-23 21:33:05 +00001248{ (eval echo configure:1249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001249ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1250if test -z "$ac_err"; then
1251 :
1252else
1253 echo "$ac_err" >&5
1254 echo "configure: failed program was:" >&5
1255 cat conftest.$ac_ext >&5
1256 rm -rf conftest*
1257 CPP="${CC-cc} -nologo -E"
1258 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001259#line 1260 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001260#include "confdefs.h"
1261#include <assert.h>
1262Syntax Error
1263EOF
1264ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Trent Mick635f6fb2000-08-23 21:33:05 +00001265{ (eval echo configure:1266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001266ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001268 :
1269else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001270 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001271 echo "configure: failed program was:" >&5
1272 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273 rm -rf conftest*
1274 CPP=/lib/cpp
1275fi
1276rm -f conftest*
1277fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001278rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001279fi
1280rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001281 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001282fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001283 CPP="$ac_cv_prog_CPP"
1284else
1285 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001286fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001287echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001288
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001289echo $ac_n "checking for AIX""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001290echo "configure:1291: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001291cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001292#line 1293 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001293#include "confdefs.h"
1294#ifdef _AIX
1295 yes
1296#endif
1297
1298EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001299if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1300 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001302 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001303#define _ALL_SOURCE 1
1304EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001305
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001306else
1307 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001308 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309fi
1310rm -f conftest*
1311
1312
Guido van Rossumf78abae1997-01-21 22:02:36 +00001313ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001314echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001315echo "configure:1316: checking for minix/config.h" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001316if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001317 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001318else
1319 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001320#line 1321 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001321#include "confdefs.h"
1322#include <minix/config.h>
1323EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001324ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Trent Mick635f6fb2000-08-23 21:33:05 +00001325{ (eval echo configure:1326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001326ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001327if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001328 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001329 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001331 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001332 echo "configure: failed program was:" >&5
1333 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001334 rm -rf conftest*
1335 eval "ac_cv_header_$ac_safe=no"
1336fi
1337rm -f conftest*
1338fi
1339if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001340 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001341 MINIX=yes
1342else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001343 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001344MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001345fi
1346
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001347if test "$MINIX" = yes; then
1348 cat >> confdefs.h <<\EOF
1349#define _POSIX_SOURCE 1
1350EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001351
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001352 cat >> confdefs.h <<\EOF
1353#define _POSIX_1_SOURCE 2
1354EOF
1355
1356 cat >> confdefs.h <<\EOF
1357#define _MINIX 1
1358EOF
1359
1360fi
1361
Guido van Rossumda88dad1995-01-26 00:46:29 +00001362
Guido van Rossum91922671997-10-09 20:24:13 +00001363echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001364echo "configure:1365: checking whether $CC accepts -OPT:Olimit=0" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001365if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001366 echo $ac_n "(cached) $ac_c" 1>&6
1367else
1368 ac_save_cc="$CC"
1369CC="$CC -OPT:Olimit=0"
1370if test "$cross_compiling" = yes; then
1371 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1372else
1373 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001374#line 1375 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001375#include "confdefs.h"
1376int main() { return 0; }
1377EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001378if { (eval echo configure:1379: \"$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 +00001379then
1380 ac_cv_opt_olimit_ok=yes
1381else
1382 echo "configure: failed program was:" >&5
1383 cat conftest.$ac_ext >&5
1384 rm -fr conftest*
1385 ac_cv_opt_olimit_ok=no
1386fi
1387rm -fr conftest*
1388fi
1389
1390CC="$ac_save_cc"
1391fi
1392
1393echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001394if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001395 OPT="$OPT -OPT:Olimit=0"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001396else
1397 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001398echo "configure:1399: checking whether $CC accepts -Olimit 1500" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001399 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001400 echo $ac_n "(cached) $ac_c" 1>&6
1401else
1402 ac_save_cc="$CC"
1403 CC="$CC -Olimit 1500"
1404 if test "$cross_compiling" = yes; then
1405 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1406else
1407 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001408#line 1409 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001409#include "confdefs.h"
1410int main() { return 0; }
1411EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001412if { (eval echo configure:1413: \"$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 +00001413then
1414 ac_cv_olimit_ok=yes
1415else
1416 echo "configure: failed program was:" >&5
1417 cat conftest.$ac_ext >&5
1418 rm -fr conftest*
1419 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001420fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001421rm -fr conftest*
1422fi
1423
1424 CC="$ac_save_cc"
1425fi
1426
1427 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1428 if test $ac_cv_olimit_ok = yes; then
1429 OPT="$OPT -Olimit 1500"
1430 fi
1431fi
1432
Guido van Rossum84e7b241996-08-19 21:59:00 +00001433
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001434# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001435echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001436echo "configure:1437: checking for ANSI C header files" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001437if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001438 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001439else
1440 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001441#line 1442 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001442#include "confdefs.h"
1443#include <stdlib.h>
1444#include <stdarg.h>
1445#include <string.h>
1446#include <float.h>
1447EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001448ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Trent Mick635f6fb2000-08-23 21:33:05 +00001449{ (eval echo configure:1450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001450ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001451if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001452 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001453 ac_cv_header_stdc=yes
1454else
1455 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001456 echo "configure: failed program was:" >&5
1457 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001458 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001459 ac_cv_header_stdc=no
1460fi
1461rm -f conftest*
1462
1463if test $ac_cv_header_stdc = yes; then
1464 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1465cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001466#line 1467 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001467#include "confdefs.h"
1468#include <string.h>
1469EOF
1470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1471 egrep "memchr" >/dev/null 2>&1; then
1472 :
1473else
1474 rm -rf conftest*
1475 ac_cv_header_stdc=no
1476fi
1477rm -f conftest*
1478
1479fi
1480
1481if test $ac_cv_header_stdc = yes; then
1482 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1483cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001484#line 1485 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001485#include "confdefs.h"
1486#include <stdlib.h>
1487EOF
1488if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1489 egrep "free" >/dev/null 2>&1; then
1490 :
1491else
1492 rm -rf conftest*
1493 ac_cv_header_stdc=no
1494fi
1495rm -f conftest*
1496
1497fi
1498
1499if test $ac_cv_header_stdc = yes; then
1500 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1501if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001502 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001503else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001504 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001505#line 1506 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001506#include "confdefs.h"
1507#include <ctype.h>
1508#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1509#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001510#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001511int main () { int i; for (i = 0; i < 256; i++)
1512if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1513exit (0); }
1514
1515EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001516if { (eval echo configure:1517: \"$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 +00001517then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001518 :
1519else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001520 echo "configure: failed program was:" >&5
1521 cat conftest.$ac_ext >&5
1522 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001523 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001524fi
1525rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001526fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001527
1528fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001529fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001530
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001531echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001532if test $ac_cv_header_stdc = yes; then
1533 cat >> confdefs.h <<\EOF
1534#define STDC_HEADERS 1
1535EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001536
1537fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001538
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00001539for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h poll.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001540signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001541sys/audioio.h sys/file.h sys/lock.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001542sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drake8cef4cf2000-06-28 16:40:38 +00001543sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001544do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001545ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001546echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001547echo "configure:1548: checking for $ac_hdr" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001548if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001549 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001550else
1551 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001552#line 1553 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001553#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001554#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001555EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001556ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Trent Mick635f6fb2000-08-23 21:33:05 +00001557{ (eval echo configure:1558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001558ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001559if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001560 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001561 eval "ac_cv_header_$ac_safe=yes"
1562else
1563 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001564 echo "configure: failed program was:" >&5
1565 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001566 rm -rf conftest*
1567 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001568fi
1569rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001570fi
1571if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001572 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001573 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001574 cat >> confdefs.h <<EOF
1575#define $ac_tr_hdr 1
1576EOF
1577
1578else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001579 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001580fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001581done
1582
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001583ac_header_dirent=no
1584for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1585do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001586ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001587echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001588echo "configure:1589: checking for $ac_hdr that defines DIR" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001589if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001590 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001591else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001592 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001593#line 1594 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001594#include "confdefs.h"
1595#include <sys/types.h>
1596#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001597int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001598DIR *dirp = 0;
1599; return 0; }
1600EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001601if { (eval echo configure:1602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001602 rm -rf conftest*
1603 eval "ac_cv_header_dirent_$ac_safe=yes"
1604else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001605 echo "configure: failed program was:" >&5
1606 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001607 rm -rf conftest*
1608 eval "ac_cv_header_dirent_$ac_safe=no"
1609fi
1610rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001611fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001612if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001613 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001614 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001615 cat >> confdefs.h <<EOF
1616#define $ac_tr_hdr 1
1617EOF
1618 ac_header_dirent=$ac_hdr; break
1619else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001620 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001621fi
1622done
1623# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1624if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001625echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001626echo "configure:1627: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001627ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001628if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001629 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001630else
1631 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001632LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001633cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001634#line 1635 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001635#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001636/* Override any gcc2 internal prototype to avoid an error. */
1637/* We use char because int might match the return type of a gcc2
1638 builtin and then its argument prototype would still apply. */
1639char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001640
Guido van Rossumf78abae1997-01-21 22:02:36 +00001641int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001642opendir()
1643; return 0; }
1644EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001645if { (eval echo configure:1646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001646 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001647 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001648else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001649 echo "configure: failed program was:" >&5
1650 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001651 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001652 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001653fi
1654rm -f conftest*
1655LIBS="$ac_save_LIBS"
1656
1657fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001658if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001659 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001660 LIBS="$LIBS -ldir"
1661else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001662 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001663fi
1664
1665else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001666echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001667echo "configure:1668: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001668ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001669if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001670 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001671else
1672 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001673LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001674cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001675#line 1676 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001676#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001677/* Override any gcc2 internal prototype to avoid an error. */
1678/* We use char because int might match the return type of a gcc2
1679 builtin and then its argument prototype would still apply. */
1680char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001681
Guido van Rossumf78abae1997-01-21 22:02:36 +00001682int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001683opendir()
1684; return 0; }
1685EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001686if { (eval echo configure:1687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001687 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001688 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001690 echo "configure: failed program was:" >&5
1691 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001692 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001693 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001694fi
1695rm -f conftest*
1696LIBS="$ac_save_LIBS"
1697
1698fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001699if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001700 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001701 LIBS="$LIBS -lx"
1702else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001703 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704fi
1705
1706fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001707
1708
1709# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001710was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001711echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001712echo "configure:1713: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001713cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001714#line 1715 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001715#include "confdefs.h"
1716#include <time.h>
1717EOF
1718if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1719 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001720 rm -rf conftest*
1721 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001722else
1723 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001724 cat >> confdefs.h <<\EOF
1725#define clock_t long
1726EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001727
1728fi
1729rm -f conftest*
1730
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001731echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001732
Guido van Rossum84e7b241996-08-19 21:59:00 +00001733# Add some code to confdefs.h so that the test for off_t works on SCO
1734cat >> confdefs.h <<\EOF
1735#if defined(SCO_DS)
1736#undef _OFF_T
1737#endif
1738EOF
1739
Guido van Rossumef2255b2000-03-10 22:30:29 +00001740# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001741echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001742echo "configure:1743: checking for mode_t" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001743if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001744 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001745else
1746 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001747#line 1748 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001748#include "confdefs.h"
1749#include <sys/types.h>
1750#if STDC_HEADERS
1751#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001752#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001753#endif
1754EOF
1755if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001756 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 +00001757 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001758 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001759else
1760 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001761 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001762fi
1763rm -f conftest*
1764
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001765fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001766echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1767if test $ac_cv_type_mode_t = no; then
1768 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001769#define mode_t int
1770EOF
1771
1772fi
1773
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001774echo $ac_n "checking for off_t""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001775echo "configure:1776: checking for off_t" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001776if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001777 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001778else
1779 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001780#line 1781 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001781#include "confdefs.h"
1782#include <sys/types.h>
1783#if STDC_HEADERS
1784#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001785#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001786#endif
1787EOF
1788if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001789 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 +00001790 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001791 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001792else
1793 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001794 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001795fi
1796rm -f conftest*
1797
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001798fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001799echo "$ac_t""$ac_cv_type_off_t" 1>&6
1800if test $ac_cv_type_off_t = no; then
1801 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001802#define off_t long
1803EOF
1804
1805fi
1806
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001807echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001808echo "configure:1809: checking for pid_t" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001809if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001810 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811else
1812 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001813#line 1814 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001814#include "confdefs.h"
1815#include <sys/types.h>
1816#if STDC_HEADERS
1817#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001818#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001819#endif
1820EOF
1821if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001822 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 +00001823 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001824 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001825else
1826 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001827 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001828fi
1829rm -f conftest*
1830
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001831fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001832echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1833if test $ac_cv_type_pid_t = no; then
1834 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001835#define pid_t int
1836EOF
1837
1838fi
1839
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001840echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001841echo "configure:1842: checking return type of signal handlers" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001842if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001843 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001844else
1845 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001846#line 1847 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001847#include "confdefs.h"
1848#include <sys/types.h>
1849#include <signal.h>
1850#ifdef signal
1851#undef signal
1852#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001853#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001854extern "C" void (*signal (int, void (*)(int)))(int);
1855#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001856void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001857#endif
1858
Guido van Rossumf78abae1997-01-21 22:02:36 +00001859int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001860int i;
1861; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001862EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001863if { (eval echo configure:1864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001864 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001865 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001866else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001867 echo "configure: failed program was:" >&5
1868 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001869 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001870 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001871fi
1872rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001873fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001874
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001875echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001876cat >> confdefs.h <<EOF
1877#define RETSIGTYPE $ac_cv_type_signal
1878EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001879
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001880
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001881echo $ac_n "checking for size_t""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001882echo "configure:1883: checking for size_t" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001883if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001884 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001885else
1886 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001887#line 1888 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001888#include "confdefs.h"
1889#include <sys/types.h>
1890#if STDC_HEADERS
1891#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001892#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001893#endif
1894EOF
1895if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001896 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 +00001897 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001898 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001899else
1900 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001901 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001902fi
1903rm -f conftest*
1904
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001905fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001906echo "$ac_t""$ac_cv_type_size_t" 1>&6
1907if test $ac_cv_type_size_t = no; then
1908 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001909#define size_t unsigned
1910EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001911
1912fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001913
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001914echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001915echo "configure:1916: checking for uid_t in sys/types.h" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001916if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001917 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001918else
1919 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001920#line 1921 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001921#include "confdefs.h"
1922#include <sys/types.h>
1923EOF
1924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1925 egrep "uid_t" >/dev/null 2>&1; then
1926 rm -rf conftest*
1927 ac_cv_type_uid_t=yes
1928else
1929 rm -rf conftest*
1930 ac_cv_type_uid_t=no
1931fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001932rm -f conftest*
1933
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001934fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001935
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001936echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001937if test $ac_cv_type_uid_t = no; then
1938 cat >> confdefs.h <<\EOF
1939#define uid_t int
1940EOF
1941
1942 cat >> confdefs.h <<\EOF
1943#define gid_t int
1944EOF
1945
1946fi
1947
Guido van Rossum627b2d71993-12-24 10:39:16 +00001948
Guido van Rossumef2255b2000-03-10 22:30:29 +00001949# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001950echo $ac_n "checking size of int""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001951echo "configure:1952: checking size of int" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001952if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001953 echo $ac_n "(cached) $ac_c" 1>&6
1954else
1955 if test "$cross_compiling" = yes; then
1956 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1957else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001958 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001959#line 1960 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001960#include "confdefs.h"
1961#include <stdio.h>
1962main()
1963{
1964 FILE *f=fopen("conftestval", "w");
1965 if (!f) exit(1);
1966 fprintf(f, "%d\n", sizeof(int));
1967 exit(0);
1968}
1969EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001970if { (eval echo configure:1971: \"$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 +00001971then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001972 ac_cv_sizeof_int=`cat conftestval`
1973else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001974 echo "configure: failed program was:" >&5
1975 cat conftest.$ac_ext >&5
1976 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001977 ac_cv_sizeof_int=0
1978fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001979rm -fr conftest*
1980fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001981
1982fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001983echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1984cat >> confdefs.h <<EOF
1985#define SIZEOF_INT $ac_cv_sizeof_int
1986EOF
1987
1988
1989echo $ac_n "checking size of long""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00001990echo "configure:1991: checking size of long" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001991if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001992 echo $ac_n "(cached) $ac_c" 1>&6
1993else
1994 if test "$cross_compiling" = yes; then
1995 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1996else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001997 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00001998#line 1999 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001999#include "confdefs.h"
2000#include <stdio.h>
2001main()
2002{
2003 FILE *f=fopen("conftestval", "w");
2004 if (!f) exit(1);
2005 fprintf(f, "%d\n", sizeof(long));
2006 exit(0);
2007}
2008EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002009if { (eval echo configure:2010: \"$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 +00002010then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002011 ac_cv_sizeof_long=`cat conftestval`
2012else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002013 echo "configure: failed program was:" >&5
2014 cat conftest.$ac_ext >&5
2015 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002016 ac_cv_sizeof_long=0
2017fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002018rm -fr conftest*
2019fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002020
2021fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002022echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2023cat >> confdefs.h <<EOF
2024#define SIZEOF_LONG $ac_cv_sizeof_long
2025EOF
2026
2027
Guido van Rossumad678af1998-10-02 14:42:15 +00002028echo $ac_n "checking size of void *""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002029echo "configure:2030: checking size of void *" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002030if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002031 echo $ac_n "(cached) $ac_c" 1>&6
2032else
2033 if test "$cross_compiling" = yes; then
2034 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2035else
2036 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002037#line 2038 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002038#include "confdefs.h"
2039#include <stdio.h>
2040main()
2041{
2042 FILE *f=fopen("conftestval", "w");
2043 if (!f) exit(1);
2044 fprintf(f, "%d\n", sizeof(void *));
2045 exit(0);
2046}
2047EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002048if { (eval echo configure:2049: \"$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 +00002049then
2050 ac_cv_sizeof_void_p=`cat conftestval`
2051else
2052 echo "configure: failed program was:" >&5
2053 cat conftest.$ac_ext >&5
2054 rm -fr conftest*
2055 ac_cv_sizeof_void_p=0
2056fi
2057rm -fr conftest*
2058fi
2059
2060fi
2061echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2062cat >> confdefs.h <<EOF
2063#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2064EOF
2065
2066
Guido van Rossumef2255b2000-03-10 22:30:29 +00002067echo $ac_n "checking size of char""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002068echo "configure:2069: checking size of char" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002069if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002070 echo $ac_n "(cached) $ac_c" 1>&6
2071else
2072 if test "$cross_compiling" = yes; then
2073 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2074else
2075 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002076#line 2077 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002077#include "confdefs.h"
2078#include <stdio.h>
2079main()
2080{
2081 FILE *f=fopen("conftestval", "w");
2082 if (!f) exit(1);
2083 fprintf(f, "%d\n", sizeof(char));
2084 exit(0);
2085}
2086EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002087if { (eval echo configure:2088: \"$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 +00002088then
2089 ac_cv_sizeof_char=`cat conftestval`
2090else
2091 echo "configure: failed program was:" >&5
2092 cat conftest.$ac_ext >&5
2093 rm -fr conftest*
2094 ac_cv_sizeof_char=0
2095fi
2096rm -fr conftest*
2097fi
2098
2099fi
2100echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2101cat >> confdefs.h <<EOF
2102#define SIZEOF_CHAR $ac_cv_sizeof_char
2103EOF
2104
2105
2106echo $ac_n "checking size of short""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002107echo "configure:2108: checking size of short" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002108if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002109 echo $ac_n "(cached) $ac_c" 1>&6
2110else
2111 if test "$cross_compiling" = yes; then
2112 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2113else
2114 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002115#line 2116 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002116#include "confdefs.h"
2117#include <stdio.h>
2118main()
2119{
2120 FILE *f=fopen("conftestval", "w");
2121 if (!f) exit(1);
2122 fprintf(f, "%d\n", sizeof(short));
2123 exit(0);
2124}
2125EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002126if { (eval echo configure:2127: \"$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 +00002127then
2128 ac_cv_sizeof_short=`cat conftestval`
2129else
2130 echo "configure: failed program was:" >&5
2131 cat conftest.$ac_ext >&5
2132 rm -fr conftest*
2133 ac_cv_sizeof_short=0
2134fi
2135rm -fr conftest*
2136fi
2137
2138fi
2139echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2140cat >> confdefs.h <<EOF
2141#define SIZEOF_SHORT $ac_cv_sizeof_short
2142EOF
2143
2144
2145echo $ac_n "checking size of float""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002146echo "configure:2147: checking size of float" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002147if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002148 echo $ac_n "(cached) $ac_c" 1>&6
2149else
2150 if test "$cross_compiling" = yes; then
2151 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2152else
2153 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002154#line 2155 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002155#include "confdefs.h"
2156#include <stdio.h>
2157main()
2158{
2159 FILE *f=fopen("conftestval", "w");
2160 if (!f) exit(1);
2161 fprintf(f, "%d\n", sizeof(float));
2162 exit(0);
2163}
2164EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002165if { (eval echo configure:2166: \"$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 +00002166then
2167 ac_cv_sizeof_float=`cat conftestval`
2168else
2169 echo "configure: failed program was:" >&5
2170 cat conftest.$ac_ext >&5
2171 rm -fr conftest*
2172 ac_cv_sizeof_float=0
2173fi
2174rm -fr conftest*
2175fi
2176
2177fi
2178echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2179cat >> confdefs.h <<EOF
2180#define SIZEOF_FLOAT $ac_cv_sizeof_float
2181EOF
2182
2183
2184echo $ac_n "checking size of double""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002185echo "configure:2186: checking size of double" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002186if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002187 echo $ac_n "(cached) $ac_c" 1>&6
2188else
2189 if test "$cross_compiling" = yes; then
2190 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2191else
2192 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002193#line 2194 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002194#include "confdefs.h"
2195#include <stdio.h>
2196main()
2197{
2198 FILE *f=fopen("conftestval", "w");
2199 if (!f) exit(1);
2200 fprintf(f, "%d\n", sizeof(double));
2201 exit(0);
2202}
2203EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002204if { (eval echo configure:2205: \"$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 +00002205then
2206 ac_cv_sizeof_double=`cat conftestval`
2207else
2208 echo "configure: failed program was:" >&5
2209 cat conftest.$ac_ext >&5
2210 rm -fr conftest*
2211 ac_cv_sizeof_double=0
2212fi
2213rm -fr conftest*
2214fi
2215
2216fi
2217echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2218cat >> confdefs.h <<EOF
2219#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2220EOF
2221
2222
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002223echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002224echo "configure:2225: checking size of fpos_t" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002225if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002226 echo $ac_n "(cached) $ac_c" 1>&6
2227else
2228 if test "$cross_compiling" = yes; then
2229 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2230else
2231 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002232#line 2233 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002233#include "confdefs.h"
2234#include <stdio.h>
2235main()
2236{
2237 FILE *f=fopen("conftestval", "w");
2238 if (!f) exit(1);
2239 fprintf(f, "%d\n", sizeof(fpos_t));
2240 exit(0);
2241}
2242EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002243if { (eval echo configure:2244: \"$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 +00002244then
2245 ac_cv_sizeof_fpos_t=`cat conftestval`
2246else
2247 echo "configure: failed program was:" >&5
2248 cat conftest.$ac_ext >&5
2249 rm -fr conftest*
2250 ac_cv_sizeof_fpos_t=0
2251fi
2252rm -fr conftest*
2253fi
2254
2255fi
2256echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2257cat >> confdefs.h <<EOF
2258#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2259EOF
2260
2261
Guido van Rossum0a516c91994-09-12 10:58:40 +00002262
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002263echo $ac_n "checking for long long support""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002264echo "configure:2265: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002265have_long_long=no
2266cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002267#line 2268 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002268#include "confdefs.h"
2269
2270int main() {
2271long long x; x = (long long)0;
2272; return 0; }
2273EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002274if { (eval echo configure:2275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002275 rm -rf conftest*
2276 cat >> confdefs.h <<\EOF
2277#define HAVE_LONG_LONG 1
2278EOF
2279 have_long_long=yes
2280else
2281 echo "configure: failed program was:" >&5
2282 cat conftest.$ac_ext >&5
2283fi
2284rm -f conftest*
2285echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002286if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002287echo $ac_n "checking size of long long""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002288echo "configure:2289: checking size of long long" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002289if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002290 echo $ac_n "(cached) $ac_c" 1>&6
2291else
2292 if test "$cross_compiling" = yes; then
2293 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2294else
2295 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002296#line 2297 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002297#include "confdefs.h"
2298#include <stdio.h>
2299main()
2300{
2301 FILE *f=fopen("conftestval", "w");
2302 if (!f) exit(1);
2303 fprintf(f, "%d\n", sizeof(long long));
2304 exit(0);
2305}
2306EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002307if { (eval echo configure:2308: \"$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 +00002308then
2309 ac_cv_sizeof_long_long=`cat conftestval`
2310else
2311 echo "configure: failed program was:" >&5
2312 cat conftest.$ac_ext >&5
2313 rm -fr conftest*
2314 ac_cv_sizeof_long_long=0
2315fi
2316rm -fr conftest*
2317fi
2318
2319fi
2320echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2321cat >> confdefs.h <<EOF
2322#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2323EOF
2324
2325
2326fi
2327
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002328echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002329echo "configure:2330: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002330have_uintptr_t=no
2331cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002332#line 2333 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002333#include "confdefs.h"
2334
2335int main() {
2336uintptr_t x; x = (uintptr_t)0;
2337; return 0; }
2338EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002339if { (eval echo configure:2340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002340 rm -rf conftest*
2341 cat >> confdefs.h <<\EOF
2342#define HAVE_UINTPTR_T 1
2343EOF
2344 have_uintptr_t=yes
2345else
2346 echo "configure: failed program was:" >&5
2347 cat conftest.$ac_ext >&5
2348fi
2349rm -f conftest*
2350echo "$ac_t""$have_uintptr_t" 1>&6
2351if test "$have_uintptr_t" = yes ; then
2352echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002353echo "configure:2354: checking size of uintptr_t" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002354if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
2355 echo $ac_n "(cached) $ac_c" 1>&6
2356else
2357 if test "$cross_compiling" = yes; then
2358 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2359else
2360 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002361#line 2362 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002362#include "confdefs.h"
2363#include <stdio.h>
2364main()
2365{
2366 FILE *f=fopen("conftestval", "w");
2367 if (!f) exit(1);
2368 fprintf(f, "%d\n", sizeof(uintptr_t));
2369 exit(0);
2370}
2371EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002372if { (eval echo configure:2373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002373then
2374 ac_cv_sizeof_uintptr_t=`cat conftestval`
2375else
2376 echo "configure: failed program was:" >&5
2377 cat conftest.$ac_ext >&5
2378 rm -fr conftest*
2379 ac_cv_sizeof_uintptr_t=0
2380fi
2381rm -fr conftest*
2382fi
2383
2384fi
2385echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2386cat >> confdefs.h <<EOF
2387#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2388EOF
2389
2390
2391fi
2392
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002393# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2394echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002395echo "configure:2396: checking size of off_t" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002396if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002397 echo $ac_n "(cached) $ac_c" 1>&6
2398else
2399 if test "$cross_compiling" = yes; then
2400 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2401else
2402 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002403#line 2404 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002404#include "confdefs.h"
2405#include <stdio.h>
2406#include <sys/types.h>
2407main()
2408{
2409 FILE *f=fopen("conftestval", "w");
2410 if (!f) exit(1);
2411 fprintf(f, "%d\n", sizeof(off_t));
2412 exit(0);
2413}
2414EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002415if { (eval echo configure:2416: \"$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 +00002416then
2417 ac_cv_sizeof_off_t=`cat conftestval`
2418else
2419 echo "configure: failed program was:" >&5
2420 cat conftest.$ac_ext >&5
2421 rm -fr conftest*
2422 ac_cv_sizeof_off_t=0
2423fi
2424rm -fr conftest*
2425fi
2426
2427
2428fi
2429
2430echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2431cat >> confdefs.h <<EOF
2432#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2433EOF
2434
2435
2436echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002437echo "configure:2438: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002438if test "$have_long_long" = yes -a \
2439 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2440 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002441 cat >> confdefs.h <<\EOF
2442#define HAVE_LARGEFILE_SUPPORT 1
2443EOF
2444
2445 echo "$ac_t""yes" 1>&6
2446else
2447 echo "$ac_t""no" 1>&6
2448fi
2449
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002450# AC_CHECK_SIZEOF() doesn't include <time.h>.
2451echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002452echo "configure:2453: checking size of time_t" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002453if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002454 echo $ac_n "(cached) $ac_c" 1>&6
2455else
2456 if test "$cross_compiling" = yes; then
2457 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2458else
2459 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002460#line 2461 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002461#include "confdefs.h"
2462#include <stdio.h>
2463#include <time.h>
2464main()
2465{
2466 FILE *f=fopen("conftestval", "w");
2467 if (!f) exit(1);
2468 fprintf(f, "%d\n", sizeof(time_t));
2469 exit(0);
2470}
2471EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002472if { (eval echo configure:2473: \"$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 +00002473then
2474 ac_cv_sizeof_time_t=`cat conftestval`
2475else
2476 echo "configure: failed program was:" >&5
2477 cat conftest.$ac_ext >&5
2478 rm -fr conftest*
2479 ac_cv_sizeof_time_t=0
2480fi
2481rm -fr conftest*
2482fi
2483
2484
2485fi
2486
2487echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2488cat >> confdefs.h <<EOF
2489#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2490EOF
2491
2492
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002493
Trent Mick635f6fb2000-08-23 21:33:05 +00002494# if have pthread_t then define SIZEOF_PTHREAD_T
2495echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
2496echo "configure:2497: checking for pthread_t" >&5
2497have_pthread_t=no
2498cat > conftest.$ac_ext <<EOF
2499#line 2500 "configure"
2500#include "confdefs.h"
2501#include <pthread.h>
2502int main() {
2503pthread_t x; x = (pthread_t)0;
2504; return 0; }
2505EOF
2506if { (eval echo configure:2507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2507 rm -rf conftest*
2508 have_pthread_t=yes
2509else
2510 echo "configure: failed program was:" >&5
2511 cat conftest.$ac_ext >&5
2512fi
2513rm -f conftest*
2514echo "$ac_t""$have_pthread_t" 1>&6
2515if test "$have_pthread_t" = yes ; then
2516 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2517 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
2518echo "configure:2519: checking size of pthread_t" >&5
2519 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
2520 echo $ac_n "(cached) $ac_c" 1>&6
2521else
2522 if test "$cross_compiling" = yes; then
2523 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2524else
2525 cat > conftest.$ac_ext <<EOF
2526#line 2527 "configure"
2527#include "confdefs.h"
2528#include <stdio.h>
2529 #include <pthread.h>
2530 main()
2531 {
2532 FILE *f=fopen("conftestval", "w");
2533 if (!f) exit(1);
2534 fprintf(f, "%d\n", sizeof(pthread_t));
2535 exit(0);
2536 }
2537EOF
2538if { (eval echo configure:2539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2539then
2540 ac_cv_sizeof_pthread_t=`cat conftestval`
2541else
2542 echo "configure: failed program was:" >&5
2543 cat conftest.$ac_ext >&5
2544 rm -fr conftest*
2545 ac_cv_sizeof_pthread_t=0
2546fi
2547rm -fr conftest*
2548fi
2549
2550
2551fi
2552
2553 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2554 cat >> confdefs.h <<EOF
2555#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2556EOF
2557
2558fi
2559
2560
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002561# Minor variations in building a framework between NextStep versions 4 and 5
2562
2563case $ac_sys_system/$ac_sys_release in
2564 next/4*)
2565 ns_undef_sym='__environ'
2566 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2567 next/5*)
2568 ns_undef_sym='_environ'
2569 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2570esac
2571
2572echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002573echo "configure:2574: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002574if test "$with_next_framework"
2575then
2576 OPT="$OPT -fno-common"
2577 # -U __environ is needed since bundles don't have access
2578 # to crt0 when built but will always be linked against it
2579 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2580 cat >> confdefs.h <<\EOF
2581#define WITH_NEXT_FRAMEWORK 1
2582EOF
2583
2584 echo "$ac_t""yes" 1>&6
2585else
2586 echo "$ac_t""no" 1>&6
2587fi
2588
2589echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002590echo "configure:2591: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002591if test "$with_next_framework" -o "$with_dyld"
2592then
2593 if test "$with_dyld"
2594 then
2595 echo "$ac_t""yes" 1>&6
2596 else
2597 echo "$ac_t""required for framework build" 1>&6
2598 fi
2599 cat >> confdefs.h <<\EOF
2600#define WITH_DYLD 1
2601EOF
2602
2603 ns_dyld='set'
2604else
2605 echo "$ac_t""no" 1>&6
2606fi
2607
Guido van Rossum0a516c91994-09-12 10:58:40 +00002608# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002609
2610
2611
2612
Guido van Rossum0a516c91994-09-12 10:58:40 +00002613# SO is the extension of shared libraries `(including the dot!)
2614# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002615echo $ac_n "checking SO""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002616echo "configure:2617: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002617if test -z "$SO"
2618then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002619 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002620 hp*|HP*) SO=.sl;;
2621 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002622 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002623fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002624echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002625# LDSHARED is the ld *command* used to create shared library
2626# -- "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 +00002627# (Shared libraries in this instance are shared modules to be loaded into
2628# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002629echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002630echo "configure:2631: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002631if test -z "$LDSHARED"
2632then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002633 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002634 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002635 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002636 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002637 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002638 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a662000-05-26 12:22:54 +00002639 SunOS/5*)
2640 if test "$GCC" = "yes"
2641 then LDSHARED='$(CC) -G'
2642 else LDSHARED="ld -G";
2643 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002644 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002645 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2646 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002647 next/*)
2648 if test "$ns_dyld"
2649 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2650 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2651 fi
2652 if test "$with_next_framework" ; then
2653 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2654 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002655 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002656 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002657 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossuma8acf721999-04-27 22:06:08 +00002658 FreeBSD*/[34]*) LDSHARED="gcc -shared";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002659 FreeBSD*|OpenBSD*) LDSHARED="ld -Bshareable";;
2660 NetBSD*)
2661 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2662 then
2663 LDSHARED="cc -shared"
2664 else
2665 LDSHARED="ld -Bshareable"
2666 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002667 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002668 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002669 *) LDSHARED="ld";;
2670 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002671fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002672echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002673# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002674# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002675echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002676echo "configure:2677: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002677if test -z "$CCSHARED"
2678then
Guido van Rossum07397971997-04-29 21:49:50 +00002679 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002680 hp*|HP*) if test "$GCC" = yes;
2681 then CCSHARED="-fpic";
2682 else CCSHARED="+z";
2683 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002684 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002685 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002686 FreeBSD*|OpenBSD*) CCSHARED="-fpic";;
2687 NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002688 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002689 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002690 IRIX*/6*) case $CC in
2691 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002692 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002693 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002694 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002695fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002696echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002697# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002698# the python executable -- this is only needed for a few systems
2699echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002700echo "configure:2701: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002701if test -z "$LINKFORSHARED"
2702then
Guido van Rossum07397971997-04-29 21:49:50 +00002703 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002704 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002705 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002706 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002707 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossuma8acf721999-04-27 22:06:08 +00002708 FreeBSD/[34]*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002709 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002710 # -u libsys_s pulls in all symbols in libsys
2711 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2712 # -u __dummy makes the linker aware of the objc runtime
2713 # in System.framework; otherwise, __objcInit (referenced in
2714 # crt1.o) gets erroneously defined as common, which breaks dynamic
2715 # loading of any modules which reference it in System.framework
2716 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002717 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002718 NetBSD*)
2719 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2720 then
2721 LINKFORSHARED="-Wl,--export-dynamic"
2722 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002723 SunOS/5*) case $CC in
2724 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002725 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002726 then
2727 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002728 fi;;
2729 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002730 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002731fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002732echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002733
Guido van Rossum627b2d71993-12-24 10:39:16 +00002734# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002735echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002736echo "configure:2737: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002737ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002738if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002739 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002740else
2741 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002742LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002743cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002744#line 2745 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002745#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002746/* Override any gcc2 internal prototype to avoid an error. */
2747/* We use char because int might match the return type of a gcc2
2748 builtin and then its argument prototype would still apply. */
2749char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002750
Guido van Rossumf78abae1997-01-21 22:02:36 +00002751int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002752dlopen()
2753; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002754EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002755if { (eval echo configure:2756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002756 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002757 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002758else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002759 echo "configure: failed program was:" >&5
2760 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002761 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002762 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002763fi
2764rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002765LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002766
Guido van Rossum627b2d71993-12-24 10:39:16 +00002767fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002768if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002769 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002770 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2771 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002772 cat >> confdefs.h <<EOF
2773#define $ac_tr_lib 1
2774EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002775
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002776 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002777
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002778else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002779 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002780fi
2781 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002782echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002783echo "configure:2784: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002784ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002785if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002786 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002787else
2788 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002789LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002790cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002791#line 2792 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002792#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002793/* Override any gcc2 internal prototype to avoid an error. */
2794/* We use char because int might match the return type of a gcc2
2795 builtin and then its argument prototype would still apply. */
2796char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002797
Guido van Rossumf78abae1997-01-21 22:02:36 +00002798int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002799shl_load()
2800; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002801EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002802if { (eval echo configure:2803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002803 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002804 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002805else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002806 echo "configure: failed program was:" >&5
2807 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002808 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002809 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002810fi
2811rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002812LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002813
Guido van Rossum627b2d71993-12-24 10:39:16 +00002814fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002815if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002816 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002817 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2818 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002819 cat >> confdefs.h <<EOF
2820#define $ac_tr_lib 1
2821EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002822
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002823 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002824
2825else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002826 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002827fi
2828 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002829
2830# checks for system dependent C++ extensions support
2831case "$ac_sys_system" in
2832 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002833echo "configure:2834: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002834 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002835#line 2836 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002836#include "confdefs.h"
2837#include "/usr/lpp/xlC/include/load.h"
2838int main() {
2839loadAndInit("", 0, "")
2840; return 0; }
2841EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002842if { (eval echo configure:2843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002843 rm -rf conftest*
2844 cat >> confdefs.h <<\EOF
2845#define AIX_GENUINE_CPLUSPLUS 1
2846EOF
2847
2848 echo "$ac_t""yes" 1>&6
2849else
2850 echo "configure: failed program was:" >&5
2851 cat conftest.$ac_ext >&5
2852 rm -rf conftest*
2853 echo "$ac_t""no" 1>&6
2854fi
2855rm -f conftest*;;
2856 *) ;;
2857esac
2858
Guido van Rossum70c7f481998-03-26 18:44:10 +00002859# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2860# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002861# BeOS' sockets are stashed in libnet.
2862case "$ac_sys_system" in
2863IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002864*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002865echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002866echo "configure:2867: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002867ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002868if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002869 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002870else
2871 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002872LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002873cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002874#line 2875 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002875#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002876/* Override any gcc2 internal prototype to avoid an error. */
2877/* We use char because int might match the return type of a gcc2
2878 builtin and then its argument prototype would still apply. */
2879char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002880
Guido van Rossumf78abae1997-01-21 22:02:36 +00002881int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002882t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002883; return 0; }
2884EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002885if { (eval echo configure:2886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002886 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002887 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002888else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002889 echo "configure: failed program was:" >&5
2890 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002891 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002892 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002893fi
2894rm -f conftest*
2895LIBS="$ac_save_LIBS"
2896
2897fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002898if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002899 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002900 LIBS="-lnsl $LIBS"
2901else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002902 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002903fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002904 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002905echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002906echo "configure:2907: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002907ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002908if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002909 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002910else
2911 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002912LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002913cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002914#line 2915 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002915#include "confdefs.h"
2916/* Override any gcc2 internal prototype to avoid an error. */
2917/* We use char because int might match the return type of a gcc2
2918 builtin and then its argument prototype would still apply. */
2919char socket();
2920
2921int main() {
2922socket()
2923; return 0; }
2924EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002925if { (eval echo configure:2926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002926 rm -rf conftest*
2927 eval "ac_cv_lib_$ac_lib_var=yes"
2928else
2929 echo "configure: failed program was:" >&5
2930 cat conftest.$ac_ext >&5
2931 rm -rf conftest*
2932 eval "ac_cv_lib_$ac_lib_var=no"
2933fi
2934rm -f conftest*
2935LIBS="$ac_save_LIBS"
2936
2937fi
2938if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2939 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002940 LIBS="-lsocket $LIBS"
2941else
2942 echo "$ac_t""no" 1>&6
2943fi
2944 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00002945;;
2946esac
2947case "$ac_sys_system" in
2948BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00002949echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002950echo "configure:2951: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002951ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002952if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002953 echo $ac_n "(cached) $ac_c" 1>&6
2954else
2955 ac_save_LIBS="$LIBS"
2956LIBS="-lnet $LIBS $LIBS"
2957cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002958#line 2959 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002959#include "confdefs.h"
2960/* Override any gcc2 internal prototype to avoid an error. */
2961/* We use char because int might match the return type of a gcc2
2962 builtin and then its argument prototype would still apply. */
2963char socket();
2964
2965int main() {
2966socket()
2967; return 0; }
2968EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00002969if { (eval echo configure:2970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002970 rm -rf conftest*
2971 eval "ac_cv_lib_$ac_lib_var=yes"
2972else
2973 echo "configure: failed program was:" >&5
2974 cat conftest.$ac_ext >&5
2975 rm -rf conftest*
2976 eval "ac_cv_lib_$ac_lib_var=no"
2977fi
2978rm -f conftest*
2979LIBS="$ac_save_LIBS"
2980
2981fi
2982if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2983 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002984 LIBS="-lnet $LIBS"
2985else
2986 echo "$ac_t""no" 1>&6
2987fi
2988 # BeOS
2989;;
2990esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00002991
Guido van Rossuma68acba1996-07-31 17:36:39 +00002992echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002993echo "configure:2994: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00002994# Check whether --with-libs or --without-libs was given.
2995if test "${with_libs+set}" = set; then
2996 withval="$with_libs"
2997
2998echo "$ac_t""$withval" 1>&6
2999LIBS="$withval $LIBS"
3000
3001else
3002 echo "$ac_t""no" 1>&6
3003fi
3004
Guido van Rossum7f43da71994-08-01 12:15:30 +00003005
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003006echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003007echo "configure:3008: checking for --with(out)-readline" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003008# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003009if test "${with_readline+set}" = set; then
3010 withval="$with_readline"
Guido van Rossumb06df271997-08-05 21:50:20 +00003011 echo "$ac_t""$withval" 1>&6
3012{ echo "configure: error: --with(out)-readline is obsolete" 1>&2; exit 1; }
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003013else
Guido van Rossumb06df271997-08-05 21:50:20 +00003014 echo "$ac_t""not specified." 1>&6
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003015fi
3016
Guido van Rossum7f43da71994-08-01 12:15:30 +00003017
Guido van Rossum009f7871997-12-04 00:51:42 +00003018
Barry Warsawc0d24d82000-06-29 16:12:00 +00003019USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003020
Guido van Rossumec2f0731997-01-22 20:54:01 +00003021echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003022echo "configure:3023: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003023
3024# Check whether --with-dec-threads or --without-dec-threads was given.
3025if test "${with_dec_threads+set}" = set; then
3026 withval="$with_dec_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003027
3028echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003029LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003030if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003031 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003032fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003033else
3034 echo "$ac_t""no" 1>&6
3035fi
3036
3037
3038echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003039echo "configure:3040: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003040# Check whether --with-threads or --without-threads was given.
3041if test "${with_threads+set}" = set; then
3042 withval="$with_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003043 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003044fi
3045
3046
Barry Warsawc0d24d82000-06-29 16:12:00 +00003047# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003048# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003049if test "${with_thread+set}" = set; then
3050 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003051
3052with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003053fi
Barry Warsawc0d24d82000-06-29 16:12:00 +00003054
3055
3056if test -z "$with_threads"
3057then with_threads="yes"
3058fi
3059echo "$ac_t""$with_threads" 1>&6
3060
3061if test "$with_threads" = "no"
3062then
3063 USE_THREAD_MODULE="#"
3064else
3065 if test -d "$with_threads"
3066 then LDFLAGS="$LDFLAGS -L$with_threads"
3067 fi
3068 if test -d "$withval"
3069 then LDFLAGS="$LDFLAGS -L$withval"
3070 fi
3071 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003072#define _REENTRANT 1
3073EOF
3074
Barry Warsawc0d24d82000-06-29 16:12:00 +00003075 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003076echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003077echo "configure:3078: checking for mach/cthreads.h" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003078if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003079 echo $ac_n "(cached) $ac_c" 1>&6
3080else
3081 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003082#line 3083 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003083#include "confdefs.h"
3084#include <mach/cthreads.h>
3085EOF
3086ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Trent Mick635f6fb2000-08-23 21:33:05 +00003087{ (eval echo configure:3088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003088ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003089if test -z "$ac_err"; then
3090 rm -rf conftest*
3091 eval "ac_cv_header_$ac_safe=yes"
3092else
3093 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003094 echo "configure: failed program was:" >&5
3095 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003096 rm -rf conftest*
3097 eval "ac_cv_header_$ac_safe=no"
3098fi
3099rm -f conftest*
3100fi
3101if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3102 echo "$ac_t""yes" 1>&6
3103 cat >> confdefs.h <<\EOF
3104#define WITH_THREAD 1
3105EOF
3106
Barry Warsawc0d24d82000-06-29 16:12:00 +00003107 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003108#define C_THREADS 1
3109EOF
3110
Barry Warsawc0d24d82000-06-29 16:12:00 +00003111 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003112else
3113 echo "$ac_t""no" 1>&6
3114
Barry Warsawc0d24d82000-06-29 16:12:00 +00003115 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003116echo "configure:3117: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003117ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003118if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003119 echo $ac_n "(cached) $ac_c" 1>&6
3120else
3121 ac_save_LIBS="$LIBS"
3122LIBS="-lpthread $LIBS"
3123cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003124#line 3125 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003125#include "confdefs.h"
3126/* Override any gcc2 internal prototype to avoid an error. */
3127/* We use char because int might match the return type of a gcc2
3128 builtin and then its argument prototype would still apply. */
3129char pthread_create();
3130
3131int main() {
3132pthread_create()
3133; return 0; }
3134EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003135if { (eval echo configure:3136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003136 rm -rf conftest*
3137 eval "ac_cv_lib_$ac_lib_var=yes"
3138else
3139 echo "configure: failed program was:" >&5
3140 cat conftest.$ac_ext >&5
3141 rm -rf conftest*
3142 eval "ac_cv_lib_$ac_lib_var=no"
3143fi
3144rm -f conftest*
3145LIBS="$ac_save_LIBS"
3146
3147fi
3148if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3149 echo "$ac_t""yes" 1>&6
3150 cat >> confdefs.h <<\EOF
3151#define WITH_THREAD 1
3152EOF
3153
Barry Warsawc0d24d82000-06-29 16:12:00 +00003154 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003155#define _POSIX_THREADS 1
3156EOF
3157
Barry Warsawc0d24d82000-06-29 16:12:00 +00003158 LIBS="-lpthread $LIBS"
3159 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003160else
3161 echo "$ac_t""no" 1>&6
3162
Barry Warsawc0d24d82000-06-29 16:12:00 +00003163 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003164echo "configure:3165: checking for pthread_detach" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003165if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003166 echo $ac_n "(cached) $ac_c" 1>&6
3167else
3168 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003169#line 3170 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003170#include "confdefs.h"
3171/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003172 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003173#include <assert.h>
3174/* Override any gcc2 internal prototype to avoid an error. */
3175/* We use char because int might match the return type of a gcc2
3176 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003177char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003178
3179int main() {
3180
3181/* The GNU C library defines this for functions which it implements
3182 to always fail with ENOSYS. Some functions are actually named
3183 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003184#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003185choke me
3186#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003187pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003188#endif
3189
3190; return 0; }
3191EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003192if { (eval echo configure:3193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003193 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003194 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003195else
3196 echo "configure: failed program was:" >&5
3197 cat conftest.$ac_ext >&5
3198 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003199 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003200fi
3201rm -f conftest*
3202fi
3203
Guido van Rossumea516321998-12-17 18:08:55 +00003204if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003205 echo "$ac_t""yes" 1>&6
3206 cat >> confdefs.h <<\EOF
3207#define WITH_THREAD 1
3208EOF
3209
Barry Warsawc0d24d82000-06-29 16:12:00 +00003210 cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003211#define _POSIX_THREADS 1
3212EOF
3213
Barry Warsawc0d24d82000-06-29 16:12:00 +00003214 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003215else
3216 echo "$ac_t""no" 1>&6
3217
Barry Warsawc0d24d82000-06-29 16:12:00 +00003218 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003219echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003220echo "configure:3221: checking for kernel/OS.h" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003221if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003222 echo $ac_n "(cached) $ac_c" 1>&6
3223else
3224 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003225#line 3226 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003226#include "confdefs.h"
3227#include <kernel/OS.h>
3228EOF
3229ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Trent Mick635f6fb2000-08-23 21:33:05 +00003230{ (eval echo configure:3231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003231ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003232if test -z "$ac_err"; then
3233 rm -rf conftest*
3234 eval "ac_cv_header_$ac_safe=yes"
3235else
3236 echo "$ac_err" >&5
3237 echo "configure: failed program was:" >&5
3238 cat conftest.$ac_ext >&5
3239 rm -rf conftest*
3240 eval "ac_cv_header_$ac_safe=no"
3241fi
3242rm -f conftest*
3243fi
3244if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3245 echo "$ac_t""yes" 1>&6
3246 cat >> confdefs.h <<\EOF
3247#define WITH_THREAD 1
3248EOF
3249
Barry Warsawc0d24d82000-06-29 16:12:00 +00003250 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003251#define BEOS_THREADS 1
3252EOF
3253
Barry Warsawc0d24d82000-06-29 16:12:00 +00003254 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003255else
3256 echo "$ac_t""no" 1>&6
3257
Barry Warsawc0d24d82000-06-29 16:12:00 +00003258 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003259echo "configure:3260: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003260ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003261if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003262 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003263else
3264 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003265LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003266cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003267#line 3268 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003268#include "confdefs.h"
3269/* Override any gcc2 internal prototype to avoid an error. */
3270/* We use char because int might match the return type of a gcc2
3271 builtin and then its argument prototype would still apply. */
3272char pthread_create();
3273
3274int main() {
3275pthread_create()
3276; return 0; }
3277EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003278if { (eval echo configure:3279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003279 rm -rf conftest*
3280 eval "ac_cv_lib_$ac_lib_var=yes"
3281else
3282 echo "configure: failed program was:" >&5
3283 cat conftest.$ac_ext >&5
3284 rm -rf conftest*
3285 eval "ac_cv_lib_$ac_lib_var=no"
3286fi
3287rm -f conftest*
3288LIBS="$ac_save_LIBS"
3289
3290fi
3291if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3292 echo "$ac_t""yes" 1>&6
3293 cat >> confdefs.h <<\EOF
3294#define WITH_THREAD 1
3295EOF
3296
3297 cat >> confdefs.h <<\EOF
3298#define _POSIX_THREADS 1
3299EOF
3300
3301 LIBS="$LIBS -lpthreads"
3302 LIBOBJS="$LIBOBJS thread.o"
3303else
3304 echo "$ac_t""no" 1>&6
3305
3306 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003307echo "configure:3308: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003308ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003309if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003310 echo $ac_n "(cached) $ac_c" 1>&6
3311else
3312 ac_save_LIBS="$LIBS"
3313LIBS="-lc_r $LIBS"
3314cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003315#line 3316 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003316#include "confdefs.h"
3317/* Override any gcc2 internal prototype to avoid an error. */
3318/* We use char because int might match the return type of a gcc2
3319 builtin and then its argument prototype would still apply. */
3320char pthread_create();
3321
3322int main() {
3323pthread_create()
3324; return 0; }
3325EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003326if { (eval echo configure:3327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003327 rm -rf conftest*
3328 eval "ac_cv_lib_$ac_lib_var=yes"
3329else
3330 echo "configure: failed program was:" >&5
3331 cat conftest.$ac_ext >&5
3332 rm -rf conftest*
3333 eval "ac_cv_lib_$ac_lib_var=no"
3334fi
3335rm -f conftest*
3336LIBS="$ac_save_LIBS"
3337
3338fi
3339if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3340 echo "$ac_t""yes" 1>&6
3341 cat >> confdefs.h <<\EOF
3342#define WITH_THREAD 1
3343EOF
3344
Barry Warsawc0d24d82000-06-29 16:12:00 +00003345 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003346#define _POSIX_THREADS 1
3347EOF
3348
Greg Steinadf63d62000-07-05 10:38:09 +00003349 LIBS="$LIBS -lc_r"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003350 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003351else
3352 echo "$ac_t""no" 1>&6
3353
Greg Steinadf63d62000-07-05 10:38:09 +00003354 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003355echo "configure:3356: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003356ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003357if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003358 echo $ac_n "(cached) $ac_c" 1>&6
3359else
3360 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003361LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003362cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003363#line 3364 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003364#include "confdefs.h"
3365/* Override any gcc2 internal prototype to avoid an error. */
3366/* We use char because int might match the return type of a gcc2
3367 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003368char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003369
3370int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003371__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003372; return 0; }
3373EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003374if { (eval echo configure:3375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003375 rm -rf conftest*
3376 eval "ac_cv_lib_$ac_lib_var=yes"
3377else
3378 echo "configure: failed program was:" >&5
3379 cat conftest.$ac_ext >&5
3380 rm -rf conftest*
3381 eval "ac_cv_lib_$ac_lib_var=no"
3382fi
3383rm -f conftest*
3384LIBS="$ac_save_LIBS"
3385
3386fi
3387if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3388 echo "$ac_t""yes" 1>&6
3389 cat >> confdefs.h <<\EOF
3390#define WITH_THREAD 1
3391EOF
3392
Barry Warsawc0d24d82000-06-29 16:12:00 +00003393 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003394#define _POSIX_THREADS 1
3395EOF
3396
Greg Steinadf63d62000-07-05 10:38:09 +00003397 LIBS="$LIBS -lthread"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003398 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003399else
3400 echo "$ac_t""no" 1>&6
3401
Greg Steinadf63d62000-07-05 10:38:09 +00003402 echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003403echo "configure:3404: checking for pth_init in -lpth" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003404ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003405if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00003406 echo $ac_n "(cached) $ac_c" 1>&6
3407else
3408 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003409LIBS="-lpth $LIBS"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003410cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003411#line 3412 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003412#include "confdefs.h"
3413/* Override any gcc2 internal prototype to avoid an error. */
3414/* We use char because int might match the return type of a gcc2
3415 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003416char pth_init();
Guido van Rossum0be3e491997-05-22 20:33:33 +00003417
3418int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003419pth_init()
Guido van Rossum0be3e491997-05-22 20:33:33 +00003420; return 0; }
3421EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003422if { (eval echo configure:3423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00003423 rm -rf conftest*
3424 eval "ac_cv_lib_$ac_lib_var=yes"
3425else
3426 echo "configure: failed program was:" >&5
3427 cat conftest.$ac_ext >&5
3428 rm -rf conftest*
3429 eval "ac_cv_lib_$ac_lib_var=no"
3430fi
3431rm -f conftest*
3432LIBS="$ac_save_LIBS"
3433
3434fi
3435if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3436 echo "$ac_t""yes" 1>&6
3437 cat >> confdefs.h <<\EOF
3438#define WITH_THREAD 1
3439EOF
3440
Barry Warsawc0d24d82000-06-29 16:12:00 +00003441 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003442#define _GNU_PTH 1
Guido van Rossum0be3e491997-05-22 20:33:33 +00003443EOF
3444
Greg Steinadf63d62000-07-05 10:38:09 +00003445 LIBS="-lpth $LIBS"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003446 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003447else
3448 echo "$ac_t""no" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003449
Barry Warsawc0d24d82000-06-29 16:12:00 +00003450 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003451echo "configure:3452: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003452ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003453if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003454 echo $ac_n "(cached) $ac_c" 1>&6
3455else
3456 ac_save_LIBS="$LIBS"
3457LIBS="-lcma $LIBS"
3458cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003459#line 3460 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003460#include "confdefs.h"
3461/* Override any gcc2 internal prototype to avoid an error. */
3462/* We use char because int might match the return type of a gcc2
3463 builtin and then its argument prototype would still apply. */
3464char pthread_create();
3465
3466int main() {
3467pthread_create()
3468; return 0; }
3469EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003470if { (eval echo configure:3471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003471 rm -rf conftest*
3472 eval "ac_cv_lib_$ac_lib_var=yes"
3473else
3474 echo "configure: failed program was:" >&5
3475 cat conftest.$ac_ext >&5
3476 rm -rf conftest*
3477 eval "ac_cv_lib_$ac_lib_var=no"
3478fi
3479rm -f conftest*
3480LIBS="$ac_save_LIBS"
3481
3482fi
3483if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3484 echo "$ac_t""yes" 1>&6
3485 cat >> confdefs.h <<\EOF
3486#define WITH_THREAD 1
3487EOF
3488
Barry Warsawc0d24d82000-06-29 16:12:00 +00003489 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003490#define _POSIX_THREADS 1
3491EOF
3492
Barry Warsawc0d24d82000-06-29 16:12:00 +00003493 LIBS="$LIBS -lcma"
3494 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003495else
3496 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00003497fi
3498
Barry Warsawc0d24d82000-06-29 16:12:00 +00003499
Guido van Rossum627b2d71993-12-24 10:39:16 +00003500fi
3501
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003502fi
3503
Guido van Rossum0be3e491997-05-22 20:33:33 +00003504fi
3505
Guido van Rossum49545951997-12-02 19:28:29 +00003506fi
3507
Guido van Rossumb93a8621998-05-07 13:27:32 +00003508fi
3509
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003510fi
3511
Guido van Rossumad678af1998-10-02 14:42:15 +00003512fi
3513
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003514fi
3515
Guido van Rossum0be3e491997-05-22 20:33:33 +00003516
Barry Warsawc0d24d82000-06-29 16:12:00 +00003517 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003518echo "configure:3519: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003519ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003520if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003521 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003522else
3523 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003524LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003525cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003526#line 3527 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003527#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003528/* Override any gcc2 internal prototype to avoid an error. */
3529/* We use char because int might match the return type of a gcc2
3530 builtin and then its argument prototype would still apply. */
3531char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003532
Guido van Rossumf78abae1997-01-21 22:02:36 +00003533int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003534usconfig()
3535; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003536EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003537if { (eval echo configure:3538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003538 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003539 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003540else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003541 echo "configure: failed program was:" >&5
3542 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003543 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003544 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003545fi
3546rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003547LIBS="$ac_save_LIBS"
3548
3549fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003550if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003551 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003552 cat >> confdefs.h <<\EOF
3553#define WITH_THREAD 1
3554EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003555
Barry Warsawc0d24d82000-06-29 16:12:00 +00003556 LIBS="$LIBS -lmpc"
3557 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003558else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003559 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003560fi
3561
Barry Warsawc0d24d82000-06-29 16:12:00 +00003562 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003563echo "configure:3564: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003564ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003565if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003566 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003567else
3568 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003569LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003570cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003571#line 3572 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003572#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003573/* Override any gcc2 internal prototype to avoid an error. */
3574/* We use char because int might match the return type of a gcc2
3575 builtin and then its argument prototype would still apply. */
3576char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003577
Guido van Rossumf78abae1997-01-21 22:02:36 +00003578int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003579thr_create()
3580; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003581EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003582if { (eval echo configure:3583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003583 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003584 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003585else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003586 echo "configure: failed program was:" >&5
3587 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003588 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003589 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003590fi
3591rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003592LIBS="$ac_save_LIBS"
3593
3594fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003595if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003596 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003597 cat >> confdefs.h <<\EOF
3598#define WITH_THREAD 1
3599EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003600
Barry Warsawc0d24d82000-06-29 16:12:00 +00003601 LIBS="$LIBS -lthread"
3602 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003603else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003604 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003605fi
3606
Guido van Rossum627b2d71993-12-24 10:39:16 +00003607fi
3608
Barry Warsawef82cd72000-06-30 16:21:01 +00003609# Check for GC support
3610
3611USE_GC_MODULE=""
3612echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003613echo "configure:3614: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003614# Check whether --with-cycle-gc or --without-cycle-gc was given.
3615if test "${with_cycle_gc+set}" = set; then
3616 withval="$with_cycle_gc"
3617 :
3618fi
3619
3620
3621if test -z "$with_cycle_gc"
3622then with_cycle_gc="yes"
3623fi
3624if test "$with_cycle_gc" = "no"
3625then
3626 USE_GC_MODULE="#"
3627else
3628 cat >> confdefs.h <<\EOF
3629#define WITH_CYCLE_GC 1
3630EOF
3631
3632fi
3633echo "$ac_t""$with_cycle_gc" 1>&6
3634
3635# Check for --with-wctype-functions
3636echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003637echo "configure:3638: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003638# Check whether --with-wctype-functions or --without-wctype-functions was given.
3639if test "${with_wctype_functions+set}" = set; then
3640 withval="$with_wctype_functions"
3641
3642if test "$withval" != no
3643then cat >> confdefs.h <<\EOF
3644#define WANT_WCTYPE_FUNCTIONS 1
3645EOF
3646 echo "$ac_t""yes" 1>&6
3647else echo "$ac_t""no" 1>&6
3648fi
3649else
3650 echo "$ac_t""no" 1>&6
3651fi
3652
3653
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003654# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00003655
3656DLINCLDIR=/
3657
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003658echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003659echo "configure:3660: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003660# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003661if test "${with_sgi_dl+set}" = set; then
3662 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003663
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003664echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003665cat >> confdefs.h <<\EOF
3666#define WITH_SGI_DL 1
3667EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003668
Guido van Rossume97ee181999-12-20 21:27:22 +00003669DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003670dldir=$withval
3671if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003672then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003673else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003674fi
3675DLINCLDIR=${dldir}
3676LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003677else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003678 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003679fi
3680
3681
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003682echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003683echo "configure:3684: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003684# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003685if test "${with_dl_dld+set}" = set; then
3686 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003687
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003688echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003689cat >> confdefs.h <<\EOF
3690#define WITH_DL_DLD 1
3691EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003692
Guido van Rossume97ee181999-12-20 21:27:22 +00003693DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003694dldir=`echo "$withval" | sed 's/,.*//'`
3695dlddir=`echo "$withval" | sed 's/.*,//'`
3696if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003697then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003698else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003699fi
3700DLINCLDIR=${dldir}
3701LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003702else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003703 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003704fi
3705
3706
Guido van Rossume97ee181999-12-20 21:27:22 +00003707# the dlopen() function means we might want to use dynload_shlib.o. some
3708# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00003709for ac_func in dlopen
3710do
3711echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003712echo "configure:3713: checking for $ac_func" >&5
Thomas Wouters3a584202000-08-05 23:28:51 +00003713if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003714 echo $ac_n "(cached) $ac_c" 1>&6
3715else
3716 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003717#line 3718 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00003718#include "confdefs.h"
3719/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00003720 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00003721#include <assert.h>
3722/* Override any gcc2 internal prototype to avoid an error. */
3723/* We use char because int might match the return type of a gcc2
3724 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003725char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00003726
3727int main() {
3728
3729/* The GNU C library defines this for functions which it implements
3730 to always fail with ENOSYS. Some functions are actually named
3731 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003732#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00003733choke me
3734#else
Thomas Wouters3a584202000-08-05 23:28:51 +00003735$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00003736#endif
3737
3738; return 0; }
3739EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003740if { (eval echo configure:3741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003741 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003742 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00003743else
3744 echo "configure: failed program was:" >&5
3745 cat conftest.$ac_ext >&5
3746 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003747 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00003748fi
3749rm -f conftest*
3750fi
3751
Thomas Wouters3a584202000-08-05 23:28:51 +00003752if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003753 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00003754 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3755 cat >> confdefs.h <<EOF
3756#define $ac_tr_func 1
3757EOF
3758
Guido van Rossume97ee181999-12-20 21:27:22 +00003759else
3760 echo "$ac_t""no" 1>&6
3761fi
Thomas Wouters3a584202000-08-05 23:28:51 +00003762done
Guido van Rossume97ee181999-12-20 21:27:22 +00003763
3764
3765# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3766# loading of modules.
3767
3768echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003769echo "configure:3770: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00003770if test -z "$DYNLOADFILE"
3771then
3772 case $ac_sys_system/$ac_sys_release in
3773 AIX*) DYNLOADFILE="dynload_aix.o";;
3774 BeOS*) DYNLOADFILE="dynload_beos.o";;
3775 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
3776 next/*) DYNLOADFILE="dynload_next.o";;
3777 *)
3778 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
3779 # out any dynamic loading
3780 if test "$ac_cv_func_dlopen" = yes
3781 then DYNLOADFILE="dynload_shlib.o"
3782 else DYNLOADFILE="dynload_stub.o"
3783 fi
3784 ;;
3785 esac
3786fi
3787echo "$ac_t""$DYNLOADFILE" 1>&6
3788if test "$DYNLOADFILE" != "dynload_stub.o"
3789then
3790 cat >> confdefs.h <<\EOF
3791#define HAVE_DYNAMIC_LOADING 1
3792EOF
3793
3794fi
3795
Guido van Rossum627b2d71993-12-24 10:39:16 +00003796# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00003797for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00003798 flock fork fsync fdatasync fpathconf ftime ftruncate \
Thomas Wouters3a584202000-08-05 23:28:51 +00003799 getgroups getlogin getpeername getpid getpwent getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00003800 kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00003801 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00003802 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003803 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00003804 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00003805 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00003806 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters70c21a12000-07-14 14:28:33 +00003807 truncate uname waitpid _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003808do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003809echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003810echo "configure:3811: checking for $ac_func" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003811if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003812 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003813else
3814 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003815#line 3816 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003816#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003817/* System header to define __stub macros and hopefully few prototypes,
3818 which can conflict with char $ac_func(); below. */
3819#include <assert.h>
3820/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003821/* We use char because int might match the return type of a gcc2
3822 builtin and then its argument prototype would still apply. */
3823char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003824
Guido van Rossumf78abae1997-01-21 22:02:36 +00003825int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003826
Guido van Rossum627b2d71993-12-24 10:39:16 +00003827/* The GNU C library defines this for functions which it implements
3828 to always fail with ENOSYS. Some functions are actually named
3829 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003830#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003831choke me
3832#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003833$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003834#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003835
Guido van Rossum7f43da71994-08-01 12:15:30 +00003836; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003837EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003838if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003839 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003840 eval "ac_cv_func_$ac_func=yes"
3841else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003842 echo "configure: failed program was:" >&5
3843 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003844 rm -rf conftest*
3845 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003846fi
3847rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003848fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003849
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003850if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003851 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003852 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003853 cat >> confdefs.h <<EOF
3854#define $ac_tr_func 1
3855EOF
3856
3857else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003858 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003859fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003860done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003861
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003862
Fred Drake8cef4cf2000-06-28 16:40:38 +00003863# check for openpty and forkpty
3864
3865for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003866do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003867echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003868echo "configure:3869: checking for $ac_func" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003869if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003870 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003871else
3872 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003873#line 3874 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003874#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003875/* System header to define __stub macros and hopefully few prototypes,
3876 which can conflict with char $ac_func(); below. */
3877#include <assert.h>
3878/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003879/* We use char because int might match the return type of a gcc2
3880 builtin and then its argument prototype would still apply. */
3881char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003882
Guido van Rossumf78abae1997-01-21 22:02:36 +00003883int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003884
Guido van Rossum627b2d71993-12-24 10:39:16 +00003885/* The GNU C library defines this for functions which it implements
3886 to always fail with ENOSYS. Some functions are actually named
3887 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003888#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003889choke me
3890#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003891$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003892#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003893
Guido van Rossum7f43da71994-08-01 12:15:30 +00003894; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003895EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003896if { (eval echo configure:3897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003897 rm -rf conftest*
3898 eval "ac_cv_func_$ac_func=yes"
3899else
3900 echo "configure: failed program was:" >&5
3901 cat conftest.$ac_ext >&5
3902 rm -rf conftest*
3903 eval "ac_cv_func_$ac_func=no"
3904fi
3905rm -f conftest*
3906fi
3907
3908if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3909 echo "$ac_t""yes" 1>&6
3910 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3911 cat >> confdefs.h <<EOF
3912#define $ac_tr_func 1
3913EOF
3914
3915else
3916 echo "$ac_t""no" 1>&6
3917echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003918echo "configure:3919: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00003919ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003920if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003921 echo $ac_n "(cached) $ac_c" 1>&6
3922else
3923 ac_save_LIBS="$LIBS"
3924LIBS="-lutil $LIBS"
3925cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003926#line 3927 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00003927#include "confdefs.h"
3928/* Override any gcc2 internal prototype to avoid an error. */
3929/* We use char because int might match the return type of a gcc2
3930 builtin and then its argument prototype would still apply. */
3931char openpty();
3932
3933int main() {
3934openpty()
3935; return 0; }
3936EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003937if { (eval echo configure:3938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003938 rm -rf conftest*
3939 eval "ac_cv_lib_$ac_lib_var=yes"
3940else
3941 echo "configure: failed program was:" >&5
3942 cat conftest.$ac_ext >&5
3943 rm -rf conftest*
3944 eval "ac_cv_lib_$ac_lib_var=no"
3945fi
3946rm -f conftest*
3947LIBS="$ac_save_LIBS"
3948
3949fi
3950if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3951 echo "$ac_t""yes" 1>&6
3952 cat >> confdefs.h <<\EOF
3953#define HAVE_OPENPTY 1
3954EOF
3955 LIBS="$LIBS -lutil"
3956else
3957 echo "$ac_t""no" 1>&6
3958fi
3959
3960fi
3961done
3962
3963for ac_func in forkpty
3964do
3965echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003966echo "configure:3967: checking for $ac_func" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003967if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003968 echo $ac_n "(cached) $ac_c" 1>&6
3969else
3970 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003971#line 3972 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00003972#include "confdefs.h"
3973/* System header to define __stub macros and hopefully few prototypes,
3974 which can conflict with char $ac_func(); below. */
3975#include <assert.h>
3976/* Override any gcc2 internal prototype to avoid an error. */
3977/* We use char because int might match the return type of a gcc2
3978 builtin and then its argument prototype would still apply. */
3979char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00003980
3981int main() {
3982
3983/* The GNU C library defines this for functions which it implements
3984 to always fail with ENOSYS. Some functions are actually named
3985 something starting with __ and the normal name is an alias. */
3986#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3987choke me
3988#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003989$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00003990#endif
3991
3992; return 0; }
3993EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003994if { (eval echo configure:3995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003995 rm -rf conftest*
3996 eval "ac_cv_func_$ac_func=yes"
3997else
3998 echo "configure: failed program was:" >&5
3999 cat conftest.$ac_ext >&5
4000 rm -rf conftest*
4001 eval "ac_cv_func_$ac_func=no"
4002fi
4003rm -f conftest*
4004fi
4005
4006if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4007 echo "$ac_t""yes" 1>&6
4008 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4009 cat >> confdefs.h <<EOF
4010#define $ac_tr_func 1
4011EOF
4012
4013else
4014 echo "$ac_t""no" 1>&6
4015echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004016echo "configure:4017: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004017ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004018if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004019 echo $ac_n "(cached) $ac_c" 1>&6
4020else
4021 ac_save_LIBS="$LIBS"
4022LIBS="-lutil $LIBS"
4023cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004024#line 4025 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004025#include "confdefs.h"
4026/* Override any gcc2 internal prototype to avoid an error. */
4027/* We use char because int might match the return type of a gcc2
4028 builtin and then its argument prototype would still apply. */
4029char forkpty();
4030
4031int main() {
4032forkpty()
4033; return 0; }
4034EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004035if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004036 rm -rf conftest*
4037 eval "ac_cv_lib_$ac_lib_var=yes"
4038else
4039 echo "configure: failed program was:" >&5
4040 cat conftest.$ac_ext >&5
4041 rm -rf conftest*
4042 eval "ac_cv_lib_$ac_lib_var=no"
4043fi
4044rm -f conftest*
4045LIBS="$ac_save_LIBS"
4046
4047fi
4048if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4049 echo "$ac_t""yes" 1>&6
4050 cat >> confdefs.h <<\EOF
4051#define HAVE_FORKPTY 1
4052EOF
4053 LIBS="$LIBS -lutil"
4054else
4055 echo "$ac_t""no" 1>&6
4056fi
4057
4058fi
4059done
4060
4061
4062# check for long file support functions
4063for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4064do
4065echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004066echo "configure:4067: checking for $ac_func" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004067if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004068 echo $ac_n "(cached) $ac_c" 1>&6
4069else
4070 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004071#line 4072 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004072#include "confdefs.h"
4073/* System header to define __stub macros and hopefully few prototypes,
4074 which can conflict with char $ac_func(); below. */
4075#include <assert.h>
4076/* Override any gcc2 internal prototype to avoid an error. */
4077/* We use char because int might match the return type of a gcc2
4078 builtin and then its argument prototype would still apply. */
4079char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004080
4081int main() {
4082
4083/* The GNU C library defines this for functions which it implements
4084 to always fail with ENOSYS. Some functions are actually named
4085 something starting with __ and the normal name is an alias. */
4086#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4087choke me
4088#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004089$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004090#endif
4091
4092; return 0; }
4093EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004094if { (eval echo configure:4095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004095 rm -rf conftest*
4096 eval "ac_cv_func_$ac_func=yes"
4097else
4098 echo "configure: failed program was:" >&5
4099 cat conftest.$ac_ext >&5
4100 rm -rf conftest*
4101 eval "ac_cv_func_$ac_func=no"
4102fi
4103rm -f conftest*
4104fi
4105
4106if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4107 echo "$ac_t""yes" 1>&6
4108 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4109 cat >> confdefs.h <<EOF
4110#define $ac_tr_func 1
4111EOF
4112
4113else
4114 echo "$ac_t""no" 1>&6
4115fi
4116done
4117
4118
4119for ac_func in dup2 getcwd strdup strerror memmove
4120do
4121echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004122echo "configure:4123: checking for $ac_func" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004123if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004124 echo $ac_n "(cached) $ac_c" 1>&6
4125else
4126 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004127#line 4128 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004128#include "confdefs.h"
4129/* System header to define __stub macros and hopefully few prototypes,
4130 which can conflict with char $ac_func(); below. */
4131#include <assert.h>
4132/* Override any gcc2 internal prototype to avoid an error. */
4133/* We use char because int might match the return type of a gcc2
4134 builtin and then its argument prototype would still apply. */
4135char $ac_func();
4136
4137int main() {
4138
4139/* The GNU C library defines this for functions which it implements
4140 to always fail with ENOSYS. Some functions are actually named
4141 something starting with __ and the normal name is an alias. */
4142#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4143choke me
4144#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004145$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004146#endif
4147
4148; return 0; }
4149EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004150if { (eval echo configure:4151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004151 rm -rf conftest*
4152 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004153else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004154 echo "configure: failed program was:" >&5
4155 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004156 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004157 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004158fi
4159rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004160fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004161
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004162if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004163 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004164 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4165 cat >> confdefs.h <<EOF
4166#define $ac_tr_func 1
4167EOF
4168
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004169else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004170 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004171LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004173done
4174
Guido van Rossumf78abae1997-01-21 22:02:36 +00004175
Thomas Wouters3a584202000-08-05 23:28:51 +00004176for ac_func in getpgrp
4177do
4178echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004179echo "configure:4180: checking for $ac_func" >&5
Thomas Wouters3a584202000-08-05 23:28:51 +00004180if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004181 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004182else
4183 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004184#line 4185 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004185#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004186/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004187 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004188#include <assert.h>
4189/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004190/* We use char because int might match the return type of a gcc2
4191 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004192char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004193
Guido van Rossumf78abae1997-01-21 22:02:36 +00004194int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004195
Guido van Rossum627b2d71993-12-24 10:39:16 +00004196/* The GNU C library defines this for functions which it implements
4197 to always fail with ENOSYS. Some functions are actually named
4198 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004199#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004200choke me
4201#else
Thomas Wouters3a584202000-08-05 23:28:51 +00004202$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004203#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004204
4205; return 0; }
4206EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004207if { (eval echo configure:4208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004208 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004209 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004210else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004211 echo "configure: failed program was:" >&5
4212 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004213 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004214 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004215fi
4216rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004217fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004218
Thomas Wouters3a584202000-08-05 23:28:51 +00004219if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004220 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004221 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4222 cat >> confdefs.h <<EOF
4223#define $ac_tr_func 1
4224EOF
4225 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004226#line 4227 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004227#include "confdefs.h"
4228#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004229int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004230getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004231; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004232EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004233if { (eval echo configure:4234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004234 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004235 cat >> confdefs.h <<\EOF
4236#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004237EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004238
Guido van Rossumf78abae1997-01-21 22:02:36 +00004239else
4240 echo "configure: failed program was:" >&5
4241 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004242fi
4243rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004245 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004246fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004247done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004248
Thomas Wouters3a584202000-08-05 23:28:51 +00004249for ac_func in setpgrp
4250do
4251echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004252echo "configure:4253: checking for $ac_func" >&5
Thomas Wouters3a584202000-08-05 23:28:51 +00004253if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004254 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004255else
4256 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004257#line 4258 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004258#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004259/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004260 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004261#include <assert.h>
4262/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004263/* We use char because int might match the return type of a gcc2
4264 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004265char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004266
Guido van Rossumf78abae1997-01-21 22:02:36 +00004267int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004269/* The GNU C library defines this for functions which it implements
4270 to always fail with ENOSYS. Some functions are actually named
4271 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004272#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004273choke me
4274#else
Thomas Wouters3a584202000-08-05 23:28:51 +00004275$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004276#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004277
4278; return 0; }
4279EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004280if { (eval echo configure:4281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004281 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004282 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004283else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004284 echo "configure: failed program was:" >&5
4285 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004286 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004287 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288fi
4289rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004290fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004291
Thomas Wouters3a584202000-08-05 23:28:51 +00004292if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004293 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004294 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4295 cat >> confdefs.h <<EOF
4296#define $ac_tr_func 1
4297EOF
4298 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004299#line 4300 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004300#include "confdefs.h"
4301#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004302int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004303setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004304; return 0; }
4305EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004306if { (eval echo configure:4307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004307 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004308 cat >> confdefs.h <<\EOF
4309#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004310EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004311
Guido van Rossumf78abae1997-01-21 22:02:36 +00004312else
4313 echo "configure: failed program was:" >&5
4314 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004315fi
4316rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004317else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004318 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004319fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004320done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004321
Thomas Wouters3a584202000-08-05 23:28:51 +00004322for ac_func in gettimeofday
4323do
4324echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004325echo "configure:4326: checking for $ac_func" >&5
Thomas Wouters3a584202000-08-05 23:28:51 +00004326if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004327 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004328else
4329 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004330#line 4331 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004331#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004332/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004333 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004334#include <assert.h>
4335/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004336/* We use char because int might match the return type of a gcc2
4337 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004338char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004339
Guido van Rossumf78abae1997-01-21 22:02:36 +00004340int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004341
4342/* The GNU C library defines this for functions which it implements
4343 to always fail with ENOSYS. Some functions are actually named
4344 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004345#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004346choke me
4347#else
Thomas Wouters3a584202000-08-05 23:28:51 +00004348$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004349#endif
4350
4351; return 0; }
4352EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004353if { (eval echo configure:4354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004354 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004355 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004356else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004357 echo "configure: failed program was:" >&5
4358 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004359 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004360 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004361fi
4362rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004363fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004364
Thomas Wouters3a584202000-08-05 23:28:51 +00004365if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004366 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004367 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4368 cat >> confdefs.h <<EOF
4369#define $ac_tr_func 1
4370EOF
4371 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004372#line 4373 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004373#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004374#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004375int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004376gettimeofday((struct timeval*)0,(struct timezone*)0);
4377; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004378EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004379if { (eval echo configure:4380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004380 :
4381else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004382 echo "configure: failed program was:" >&5
4383 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004384 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004385 cat >> confdefs.h <<\EOF
4386#define GETTIMEOFDAY_NO_TZ 1
4387EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004388
4389fi
4390rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004391else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004392 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004393fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004394done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004395
4396
4397# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004398echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004399echo "configure:4400: checking whether time.h and sys/time.h may both be included" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004400if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004401 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004402else
4403 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004404#line 4405 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004405#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004406#include <sys/types.h>
4407#include <sys/time.h>
4408#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004409int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004410struct tm *tp;
4411; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004412EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004413if { (eval echo configure:4414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004414 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004415 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004416else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004417 echo "configure: failed program was:" >&5
4418 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004419 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004420 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004421fi
4422rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004423fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004424
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004425echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004426if test $ac_cv_header_time = yes; then
4427 cat >> confdefs.h <<\EOF
4428#define TIME_WITH_SYS_TIME 1
4429EOF
4430
4431fi
4432
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004433echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004434echo "configure:4435: checking whether struct tm is in sys/time.h or time.h" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004435if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004436 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004437else
4438 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004439#line 4440 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004440#include "confdefs.h"
4441#include <sys/types.h>
4442#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004443int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004444struct tm *tp; tp->tm_sec;
4445; return 0; }
4446EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004447if { (eval echo configure:4448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004448 rm -rf conftest*
4449 ac_cv_struct_tm=time.h
4450else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004451 echo "configure: failed program was:" >&5
4452 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004453 rm -rf conftest*
4454 ac_cv_struct_tm=sys/time.h
4455fi
4456rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004457fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004458
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004459echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004460if test $ac_cv_struct_tm = sys/time.h; then
4461 cat >> confdefs.h <<\EOF
4462#define TM_IN_SYS_TIME 1
4463EOF
4464
4465fi
4466
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004467echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004468echo "configure:4469: checking for tm_zone in struct tm" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004469if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004470 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004471else
4472 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004473#line 4474 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004474#include "confdefs.h"
4475#include <sys/types.h>
4476#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004477int main() {
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004478struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004479; return 0; }
4480EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004481if { (eval echo configure:4482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004482 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004483 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004484else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004485 echo "configure: failed program was:" >&5
4486 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004487 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004488 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004489fi
4490rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004491fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004492
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004493echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4494if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004495 cat >> confdefs.h <<\EOF
4496#define HAVE_TM_ZONE 1
4497EOF
4498
4499else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004500 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004501echo "configure:4502: checking for tzname" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004502if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004503 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004504else
4505 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004506#line 4507 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004507#include "confdefs.h"
4508#include <time.h>
4509#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004510extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004511#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004512int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004513atoi(*tzname);
4514; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004515EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004516if { (eval echo configure:4517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004517 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004518 ac_cv_var_tzname=yes
4519else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004520 echo "configure: failed program was:" >&5
4521 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004522 rm -rf conftest*
4523 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004524fi
4525rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004526fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004527
4528echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004529 if test $ac_cv_var_tzname = yes; then
4530 cat >> confdefs.h <<\EOF
4531#define HAVE_TZNAME 1
4532EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004533
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004534 fi
4535fi
4536
4537
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004538echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004539echo "configure:4540: checking for time.h that defines altzone" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004540if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004541 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004542else
4543 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004544#line 4545 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004545#include "confdefs.h"
4546#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004547int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004548return altzone;
4549; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004550EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004551if { (eval echo configure:4552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004552 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004553 ac_cv_header_time_altzone=yes
4554else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004555 echo "configure: failed program was:" >&5
4556 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004557 rm -rf conftest*
4558 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004559fi
4560rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004561fi
4562
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004563echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004564if test $ac_cv_header_time_altzone = yes; then
4565 cat >> confdefs.h <<\EOF
4566#define HAVE_ALTZONE 1
4567EOF
4568
4569fi
4570
Guido van Rossumda88dad1995-01-26 00:46:29 +00004571was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004572echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004573echo "configure:4574: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004574cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004575#line 4576 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004576#include "confdefs.h"
4577
4578#include <sys/types.h>
4579#include <sys/select.h>
4580#include <sys/time.h>
4581
Guido van Rossumf78abae1997-01-21 22:02:36 +00004582int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004583;
4584; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004585EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004586if { (eval echo configure:4587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004587 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004588 cat >> confdefs.h <<\EOF
4589#define SYS_SELECT_WITH_SYS_TIME 1
4590EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004591 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004592else
4593 echo "configure: failed program was:" >&5
4594 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004595fi
4596rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004597echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004598
4599# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004600
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004601echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004602echo "configure:4603: checking whether char is unsigned" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004603if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004604 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004605else
4606 if test "$GCC" = yes; then
4607 # GCC predefines this symbol on systems where it applies.
4608cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004609#line 4610 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004610#include "confdefs.h"
4611#ifdef __CHAR_UNSIGNED__
4612 yes
4613#endif
4614
4615EOF
4616if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4617 egrep "yes" >/dev/null 2>&1; then
4618 rm -rf conftest*
4619 ac_cv_c_char_unsigned=yes
4620else
4621 rm -rf conftest*
4622 ac_cv_c_char_unsigned=no
4623fi
4624rm -f conftest*
4625
4626else
4627if test "$cross_compiling" = yes; then
4628 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4629else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004630 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004631#line 4632 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004632#include "confdefs.h"
4633/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004634#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00004635#define volatile
4636#endif
4637main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00004638 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004639}
4640EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004641if { (eval echo configure:4642: \"$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 +00004642then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004643 ac_cv_c_char_unsigned=yes
4644else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004645 echo "configure: failed program was:" >&5
4646 cat conftest.$ac_ext >&5
4647 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004648 ac_cv_c_char_unsigned=no
4649fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004650rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004651fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004652
4653fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004654fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004655
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004656echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004657if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
4658 cat >> confdefs.h <<\EOF
4659#define __CHAR_UNSIGNED__ 1
4660EOF
4661
4662fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004663
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004664echo $ac_n "checking for working const""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004665echo "configure:4666: checking for working const" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004666if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004667 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004668else
4669 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004670#line 4671 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004671#include "confdefs.h"
4672
Guido van Rossumf78abae1997-01-21 22:02:36 +00004673int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004674
4675/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004676typedef int charset[2]; const charset x;
4677/* SunOS 4.1.1 cc rejects this. */
4678char const *const *ccp;
4679char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004680/* NEC SVR4.0.2 mips cc rejects this. */
4681struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004682static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004683/* AIX XL C 1.02.0.0 rejects this.
4684 It does not let you subtract one const X* pointer from another in an arm
4685 of an if-expression whose if-part is not a constant expression */
4686const char *g = "string";
4687ccp = &g + (g ? g-g : 0);
4688/* HPUX 7.0 cc rejects these. */
4689++ccp;
4690p = (char**) ccp;
4691ccp = (char const *const *) p;
4692{ /* SCO 3.2v4 cc rejects this. */
4693 char *t;
4694 char const *s = 0 ? (char *) 0 : (char const *) 0;
4695
4696 *t++ = 0;
4697}
4698{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004699 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004700 const int *foo = &x[0];
4701 ++foo;
4702}
4703{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4704 typedef const int *iptr;
4705 iptr p = 0;
4706 ++p;
4707}
4708{ /* AIX XL C 1.02.0.0 rejects this saying
4709 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4710 struct s { int j; const int *ap[3]; };
4711 struct s *b; b->j = 5;
4712}
4713{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4714 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004715}
4716
4717; return 0; }
4718EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004719if { (eval echo configure:4720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004720 rm -rf conftest*
4721 ac_cv_c_const=yes
4722else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004723 echo "configure: failed program was:" >&5
4724 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004725 rm -rf conftest*
4726 ac_cv_c_const=no
4727fi
4728rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004729fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004730
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004731echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004732if test $ac_cv_c_const = no; then
4733 cat >> confdefs.h <<\EOF
4734#define const
4735EOF
4736
4737fi
4738
Guido van Rossumef2255b2000-03-10 22:30:29 +00004739echo $ac_n "checking for inline""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004740echo "configure:4741: checking for inline" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004741if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004742 echo $ac_n "(cached) $ac_c" 1>&6
4743else
4744 ac_cv_c_inline=no
4745for ac_kw in inline __inline__ __inline; do
4746 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004747#line 4748 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00004748#include "confdefs.h"
4749
4750int main() {
4751} $ac_kw foo() {
4752; return 0; }
4753EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004754if { (eval echo configure:4755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004755 rm -rf conftest*
4756 ac_cv_c_inline=$ac_kw; break
4757else
4758 echo "configure: failed program was:" >&5
4759 cat conftest.$ac_ext >&5
4760fi
4761rm -f conftest*
4762done
4763
4764fi
4765
4766echo "$ac_t""$ac_cv_c_inline" 1>&6
4767case "$ac_cv_c_inline" in
4768 inline | yes) ;;
4769 no) cat >> confdefs.h <<\EOF
4770#define inline
4771EOF
4772 ;;
4773 *) cat >> confdefs.h <<EOF
4774#define inline $ac_cv_c_inline
4775EOF
4776 ;;
4777esac
4778
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004779
Guido van Rossumda88dad1995-01-26 00:46:29 +00004780works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004781echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004782echo "configure:4783: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004783cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004784#line 4785 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004785#include "confdefs.h"
4786
Guido van Rossumf78abae1997-01-21 22:02:36 +00004787int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004788volatile int x; x = 0;
4789; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004790EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004791if { (eval echo configure:4792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004792 rm -rf conftest*
4793 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004794else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004795 echo "configure: failed program was:" >&5
4796 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004797 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004798 cat >> confdefs.h <<\EOF
4799#define volatile
4800EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004801
4802fi
4803rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004804echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004805
Guido van Rossumda88dad1995-01-26 00:46:29 +00004806works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004807echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004808echo "configure:4809: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004809cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004810#line 4811 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004811#include "confdefs.h"
4812
Guido van Rossumf78abae1997-01-21 22:02:36 +00004813int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004814signed char c;
4815; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004816EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004817if { (eval echo configure:4818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004818 rm -rf conftest*
4819 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004820else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004821 echo "configure: failed program was:" >&5
4822 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004823 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004824 cat >> confdefs.h <<\EOF
4825#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00004826EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004827
4828fi
4829rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004830echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004831
Guido van Rossumda88dad1995-01-26 00:46:29 +00004832have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004833echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004834echo "configure:4835: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004835cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004836#line 4837 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004837#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004838int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00004839int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004840return foo(10);
4841; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004842EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004843if { (eval echo configure:4844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004844 rm -rf conftest*
4845 cat >> confdefs.h <<\EOF
4846#define HAVE_PROTOTYPES 1
4847EOF
4848 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004849else
4850 echo "configure: failed program was:" >&5
4851 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004852fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004853rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004854echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004855
Guido van Rossumda88dad1995-01-26 00:46:29 +00004856works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004857echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004858echo "configure:4859: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004859cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004860#line 4861 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004861#include "confdefs.h"
4862
4863#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00004864int foo(int x, ...) {
4865 va_list va;
4866 va_start(va, x);
4867 va_arg(va, int);
4868 va_arg(va, char *);
4869 va_arg(va, double);
4870 return 0;
4871}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004872
Guido van Rossumf78abae1997-01-21 22:02:36 +00004873int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00004874return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004875; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004876EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004877if { (eval echo configure:4878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004878 rm -rf conftest*
4879 cat >> confdefs.h <<\EOF
4880#define HAVE_STDARG_PROTOTYPES 1
4881EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004882 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004883else
4884 echo "configure: failed program was:" >&5
4885 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004886fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004887rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004888echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004889
Guido van Rossumda88dad1995-01-26 00:46:29 +00004890if test "$have_prototypes" = yes; then
4891bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004892echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004893echo "configure:4894: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004894cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004895#line 4896 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004896#include "confdefs.h"
4897#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004898int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004899char **t;execve("@",t,t);
4900; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004901EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004902if { (eval echo configure:4903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004903 :
4904else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004905 echo "configure: failed program was:" >&5
4906 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004907 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004908 cat >> confdefs.h <<\EOF
4909#define BAD_EXEC_PROTOTYPES 1
4910EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004911 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004912fi
4913rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004914echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004915fi
4916
Guido van Rossumda88dad1995-01-26 00:46:29 +00004917bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004918echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004919echo "configure:4920: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004920if test "$cross_compiling" = yes; then
4921 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4922else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004923 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004924#line 4925 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004925#include "confdefs.h"
4926
4927struct s { int a; int b; };
4928static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004929int foobar() {
4930 static int random;
4931 random = (int) &foo;
4932 return random;
4933}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004934static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004935main() {
4936 exit(!((int)&foo == foobar()));
4937}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004938
4939EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004940if { (eval echo configure:4941: \"$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 +00004941then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004942 :
4943else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004944 echo "configure: failed program was:" >&5
4945 cat conftest.$ac_ext >&5
4946 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004947 cat >> confdefs.h <<\EOF
4948#define BAD_STATIC_FORWARD 1
4949EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004950 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004951fi
4952rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00004953fi
4954
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004955echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004956
Guido van Rossumda88dad1995-01-26 00:46:29 +00004957va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004958echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004959echo "configure:4960: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004960cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004961#line 4962 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004962#include "confdefs.h"
4963
4964#ifdef HAVE_STDARG_PROTOTYPES
4965#include <stdarg.h>
4966#else
4967#include <varargs.h>
4968#endif
4969
Guido van Rossumf78abae1997-01-21 22:02:36 +00004970int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004971va_list list1, list2; list1 = list2;
4972; return 0; }
4973EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004974if { (eval echo configure:4975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004975 :
4976else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004977 echo "configure: failed program was:" >&5
4978 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004979 rm -rf conftest*
4980 cat >> confdefs.h <<\EOF
4981#define VA_LIST_IS_ARRAY 1
4982EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004983 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004984fi
4985rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004986echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004987
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004988# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
4989echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00004990echo "configure:4991: checking for gethostbyname_r" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004991if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004992 echo $ac_n "(cached) $ac_c" 1>&6
4993else
4994 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00004995#line 4996 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004996#include "confdefs.h"
4997/* System header to define __stub macros and hopefully few prototypes,
4998 which can conflict with char gethostbyname_r(); below. */
4999#include <assert.h>
5000/* Override any gcc2 internal prototype to avoid an error. */
5001/* We use char because int might match the return type of a gcc2
5002 builtin and then its argument prototype would still apply. */
5003char gethostbyname_r();
5004
5005int main() {
5006
5007/* The GNU C library defines this for functions which it implements
5008 to always fail with ENOSYS. Some functions are actually named
5009 something starting with __ and the normal name is an alias. */
5010#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5011choke me
5012#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005013gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005014#endif
5015
5016; return 0; }
5017EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005018if { (eval echo configure:5019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005019 rm -rf conftest*
5020 eval "ac_cv_func_gethostbyname_r=yes"
5021else
5022 echo "configure: failed program was:" >&5
5023 cat conftest.$ac_ext >&5
5024 rm -rf conftest*
5025 eval "ac_cv_func_gethostbyname_r=no"
5026fi
5027rm -f conftest*
5028fi
5029
5030if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5031 echo "$ac_t""yes" 1>&6
5032
5033 cat >> confdefs.h <<\EOF
5034#define HAVE_GETHOSTBYNAME_R 1
5035EOF
5036
5037 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00005038echo "configure:5039: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005039 OLD_CFLAGS=$CFLAGS
5040 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
5041 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005042#line 5043 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005043#include "confdefs.h"
5044
5045# include <netdb.h>
5046
5047int main() {
5048
5049 char *name;
5050 struct hostent *he, *res;
5051 char buffer[2048];
5052 int buflen = 2048;
5053 int h_errnop;
5054
5055 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
5056
5057; return 0; }
5058EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005059if { (eval echo configure:5060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005060 rm -rf conftest*
5061
5062 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005063#define HAVE_GETHOSTBYNAME_R 1
5064EOF
5065
5066 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005067#define HAVE_GETHOSTBYNAME_R_6_ARG 1
5068EOF
5069
5070 echo "$ac_t""yes" 1>&6
5071
5072else
5073 echo "configure: failed program was:" >&5
5074 cat conftest.$ac_ext >&5
5075 rm -rf conftest*
5076
5077 echo "$ac_t""no" 1>&6
5078 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00005079echo "configure:5080: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005080 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005081#line 5082 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005082#include "confdefs.h"
5083
5084# include <netdb.h>
5085
5086int main() {
5087
5088 char *name;
5089 struct hostent *he;
5090 char buffer[2048];
5091 int buflen = 2048;
5092 int h_errnop;
5093
5094 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
5095
5096; return 0; }
5097EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005098if { (eval echo configure:5099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005099 rm -rf conftest*
5100
5101 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005102#define HAVE_GETHOSTBYNAME_R 1
5103EOF
5104
5105 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005106#define HAVE_GETHOSTBYNAME_R_5_ARG 1
5107EOF
5108
5109 echo "$ac_t""yes" 1>&6
5110
5111else
5112 echo "configure: failed program was:" >&5
5113 cat conftest.$ac_ext >&5
5114 rm -rf conftest*
5115
5116 echo "$ac_t""no" 1>&6
5117 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00005118echo "configure:5119: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005119 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005120#line 5121 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005121#include "confdefs.h"
5122
5123# include <netdb.h>
5124
5125int main() {
5126
5127 char *name;
5128 struct hostent *he;
5129 struct hostent_data data;
5130
5131 (void) gethostbyname_r(name, he, &data);
5132
5133; return 0; }
5134EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005135if { (eval echo configure:5136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005136 rm -rf conftest*
5137
5138 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005139#define HAVE_GETHOSTBYNAME_R 1
5140EOF
5141
5142 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005143#define HAVE_GETHOSTBYNAME_R_3_ARG 1
5144EOF
5145
5146 echo "$ac_t""yes" 1>&6
5147
5148else
5149 echo "configure: failed program was:" >&5
5150 cat conftest.$ac_ext >&5
5151 rm -rf conftest*
5152
5153 echo "$ac_t""no" 1>&6
5154
5155fi
5156rm -f conftest*
5157
5158fi
5159rm -f conftest*
5160
5161fi
5162rm -f conftest*
5163 CFLAGS=$OLD_CFLAGS
5164
5165else
5166 echo "$ac_t""no" 1>&6
5167
Thomas Wouters3a584202000-08-05 23:28:51 +00005168 for ac_func in gethostbyname
5169do
5170echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00005171echo "configure:5172: checking for $ac_func" >&5
Thomas Wouters3a584202000-08-05 23:28:51 +00005172if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005173 echo $ac_n "(cached) $ac_c" 1>&6
5174else
5175 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005176#line 5177 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005177#include "confdefs.h"
5178/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005179 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005180#include <assert.h>
5181/* Override any gcc2 internal prototype to avoid an error. */
5182/* We use char because int might match the return type of a gcc2
5183 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005184char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005185
5186int main() {
5187
5188/* The GNU C library defines this for functions which it implements
5189 to always fail with ENOSYS. Some functions are actually named
5190 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005191#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005192choke me
5193#else
Thomas Wouters3a584202000-08-05 23:28:51 +00005194$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005195#endif
5196
5197; return 0; }
5198EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005199if { (eval echo configure:5200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005200 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005201 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005202else
5203 echo "configure: failed program was:" >&5
5204 cat conftest.$ac_ext >&5
5205 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005206 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005207fi
5208rm -f conftest*
5209fi
5210
Thomas Wouters3a584202000-08-05 23:28:51 +00005211if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005212 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005213 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5214 cat >> confdefs.h <<EOF
5215#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005216EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00005217
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005218else
5219 echo "$ac_t""no" 1>&6
5220fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005221done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005222
5223
5224fi
5225
5226
5227
5228
5229
5230
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005231
Guido van Rossum627b2d71993-12-24 10:39:16 +00005232# checks for system services
5233# (none yet)
5234
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005235# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005236echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00005237echo "configure:5238: checking for __fpu_control" >&5
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005238if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
5239 echo $ac_n "(cached) $ac_c" 1>&6
5240else
5241 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005242#line 5243 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005243#include "confdefs.h"
5244/* System header to define __stub macros and hopefully few prototypes,
5245 which can conflict with char __fpu_control(); below. */
5246#include <assert.h>
5247/* Override any gcc2 internal prototype to avoid an error. */
5248/* We use char because int might match the return type of a gcc2
5249 builtin and then its argument prototype would still apply. */
5250char __fpu_control();
5251
5252int main() {
5253
5254/* The GNU C library defines this for functions which it implements
5255 to always fail with ENOSYS. Some functions are actually named
5256 something starting with __ and the normal name is an alias. */
5257#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5258choke me
5259#else
5260__fpu_control();
5261#endif
5262
5263; return 0; }
5264EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005265if { (eval echo configure:5266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005266 rm -rf conftest*
5267 eval "ac_cv_func___fpu_control=yes"
5268else
5269 echo "configure: failed program was:" >&5
5270 cat conftest.$ac_ext >&5
5271 rm -rf conftest*
5272 eval "ac_cv_func___fpu_control=no"
5273fi
5274rm -f conftest*
5275fi
5276
5277if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5278 echo "$ac_t""yes" 1>&6
5279 :
5280else
5281 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005282echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00005283echo "configure:5284: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005284ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005285if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005286 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005287else
5288 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005289LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005290cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005291#line 5292 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005292#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005293/* Override any gcc2 internal prototype to avoid an error. */
5294/* We use char because int might match the return type of a gcc2
5295 builtin and then its argument prototype would still apply. */
5296char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005297
Guido van Rossumf78abae1997-01-21 22:02:36 +00005298int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005299__fpu_control()
5300; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005301EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005302if { (eval echo configure:5303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005303 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005304 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005305else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005306 echo "configure: failed program was:" >&5
5307 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005308 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005309 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005310fi
5311rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005312LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005313
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005314fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005315if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005316 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005317 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5318 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005319 cat >> confdefs.h <<EOF
5320#define $ac_tr_lib 1
5321EOF
5322
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005323 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005324
5325else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005326 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005327fi
5328
5329
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005330fi
5331
5332
Guido van Rossum7f253911997-05-09 02:42:48 +00005333# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005334echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00005335echo "configure:5336: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005336# Check whether --with-fpectl or --without-fpectl was given.
5337if test "${with_fpectl+set}" = set; then
5338 withval="$with_fpectl"
5339
5340if test "$withval" != no
5341then cat >> confdefs.h <<\EOF
5342#define WANT_SIGFPE_HANDLER 1
5343EOF
5344 echo "$ac_t""yes" 1>&6
5345else echo "$ac_t""no" 1>&6
5346fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005347else
5348 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005349fi
5350
5351
Guido van Rossum7f43da71994-08-01 12:15:30 +00005352# check for --with-libm=...
5353
Guido van Rossum563e7081996-09-10 18:20:48 +00005354case $ac_sys_system in
5355next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005356BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005357*) LIBM=-lm
5358esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005359echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00005360echo "configure:5361: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005361# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005362if test "${with_libm+set}" = set; then
5363 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005364
Guido van Rossum7f253911997-05-09 02:42:48 +00005365if test "$withval" = no
5366then LIBM=
5367 echo "$ac_t""force LIBM empty" 1>&6
5368elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005369then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005370 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005371else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005372fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005373else
5374 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005375fi
5376
5377
5378# check for --with-libc=...
5379
Guido van Rossum7f253911997-05-09 02:42:48 +00005380echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00005381echo "configure:5382: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005382# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005383if test "${with_libc+set}" = set; then
5384 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005385
Guido van Rossum7f253911997-05-09 02:42:48 +00005386if test "$withval" = no
5387then LIBC=
5388 echo "$ac_t""force LIBC empty" 1>&6
5389elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005390then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005391 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005392else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005393fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005394else
5395 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005396fi
5397
5398
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005399# check for hypot() in math library
5400LIBS_SAVE=$LIBS
5401LIBS="$LIBS $LIBM"
5402for ac_func in hypot
5403do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005404echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00005405echo "configure:5406: checking for $ac_func" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005406if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005407 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005408else
5409 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005410#line 5411 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005411#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005412/* System header to define __stub macros and hopefully few prototypes,
5413 which can conflict with char $ac_func(); below. */
5414#include <assert.h>
5415/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005416/* We use char because int might match the return type of a gcc2
5417 builtin and then its argument prototype would still apply. */
5418char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005419
Guido van Rossumf78abae1997-01-21 22:02:36 +00005420int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005421
5422/* The GNU C library defines this for functions which it implements
5423 to always fail with ENOSYS. Some functions are actually named
5424 something starting with __ and the normal name is an alias. */
5425#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5426choke me
5427#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005428$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005429#endif
5430
5431; return 0; }
5432EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005433if { (eval echo configure:5434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005434 rm -rf conftest*
5435 eval "ac_cv_func_$ac_func=yes"
5436else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005437 echo "configure: failed program was:" >&5
5438 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005439 rm -rf conftest*
5440 eval "ac_cv_func_$ac_func=no"
5441fi
5442rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005443fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005444
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005445if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5446 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005447 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5448 cat >> confdefs.h <<EOF
5449#define $ac_tr_func 1
5450EOF
5451
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005452else
5453 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005454LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005455fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005456done
5457
Guido van Rossumf78abae1997-01-21 22:02:36 +00005458
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005459LIBS=$LIBS_SAVE
5460
Guido van Rossumda88dad1995-01-26 00:46:29 +00005461# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005462echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00005463echo "configure:5464: checking for genuine getopt" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005464if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005465 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005466else
5467 if test "$cross_compiling" = yes; then
5468 ac_cv_func_getopt=no
5469else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005470 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005471#line 5472 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00005472#include "confdefs.h"
5473#include <stdio.h>
5474extern int optind, opterr, getopt();
5475extern char* optarg;
5476int main() {
5477 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
5478 opterr = 0;
5479 if (getopt(3, av, "f:") == 'f') { exit(1); }
5480 exit(0);
5481}
5482EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005483if { (eval echo configure:5484: \"$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 +00005484then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005485 ac_cv_func_getopt=yes
5486else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005487 echo "configure: failed program was:" >&5
5488 cat conftest.$ac_ext >&5
5489 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00005490 ac_cv_func_getopt=no
5491fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00005492rm -fr conftest*
5493fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005494
5495fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005496echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005497test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
5498
Guido van Rossumad713701997-07-10 22:42:38 +00005499# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005500echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00005501echo "configure:5502: checking what malloc(0) returns" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005502if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005503 echo $ac_n "(cached) $ac_c" 1>&6
5504else
5505 if 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
Trent Mick635f6fb2000-08-23 21:33:05 +00005509#line 5510 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005510#include "confdefs.h"
5511#include <stdio.h>
5512#ifdef HAVE_STDLIB
5513#include <stdlib.h>
5514#else
5515char *malloc(), *realloc();
5516int *free();
5517#endif
5518main() {
5519 char *p;
5520 p = malloc(0);
5521 if (p == NULL) exit(1);
5522 p = realloc(p, 0);
5523 if (p == NULL) exit(1);
5524 free(p);
5525 exit(0);
5526}
5527EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005528if { (eval echo configure:5529: \"$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 +00005529then
5530 ac_cv_malloc_zero=nonnull
5531else
5532 echo "configure: failed program was:" >&5
5533 cat conftest.$ac_ext >&5
5534 rm -fr conftest*
5535 ac_cv_malloc_zero=null
5536fi
5537rm -fr conftest*
5538fi
5539
5540fi
5541
5542echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5543if test "$ac_cv_malloc_zero" = null
5544then
5545 cat >> confdefs.h <<\EOF
5546#define MALLOC_ZERO_RETURNS_NULL 1
5547EOF
5548
5549fi
5550
Guido van Rossumef2255b2000-03-10 22:30:29 +00005551# check for wchar.h
5552ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5553echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00005554echo "configure:5555: checking for wchar.h" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005555if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005556 echo $ac_n "(cached) $ac_c" 1>&6
5557else
5558 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005559#line 5560 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005560#include "confdefs.h"
5561#include <wchar.h>
5562EOF
5563ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Trent Mick635f6fb2000-08-23 21:33:05 +00005564{ (eval echo configure:5565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005565ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5566if test -z "$ac_err"; then
5567 rm -rf conftest*
5568 eval "ac_cv_header_$ac_safe=yes"
5569else
5570 echo "$ac_err" >&5
5571 echo "configure: failed program was:" >&5
5572 cat conftest.$ac_ext >&5
5573 rm -rf conftest*
5574 eval "ac_cv_header_$ac_safe=no"
5575fi
5576rm -f conftest*
5577fi
5578if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5579 echo "$ac_t""yes" 1>&6
5580 cat >> confdefs.h <<\EOF
5581#define HAVE_WCHAR_H 1
5582EOF
5583 wchar_h="yes"
5584else
5585 echo "$ac_t""no" 1>&6
5586wchar_h="no"
5587
5588fi
5589
5590
5591# check for usable wchar_t
5592usable_wchar_t="unkown"
5593echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00005594echo "configure:5595: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005595if test "$cross_compiling" = yes; then
5596 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5597else
5598 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005599#line 5600 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005600#include "confdefs.h"
5601
5602#include "wchar.h"
5603#include "wctype.h"
5604main() {
5605 wchar_t s;
5606 if (sizeof(s) == 2)
5607 exit(0);
5608 else
5609 exit(1);
5610}
5611
5612EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005613if { (eval echo configure:5614: \"$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 +00005614then
5615 cat >> confdefs.h <<\EOF
5616#define HAVE_USABLE_WCHAR_T 1
5617EOF
5618 usable_wchar_t="yes"
5619else
5620 echo "configure: failed program was:" >&5
5621 cat conftest.$ac_ext >&5
5622 rm -fr conftest*
5623 usable_wchar_t="no"
5624fi
5625rm -fr conftest*
5626fi
5627
5628echo "$ac_t""$usable_wchar_t" 1>&6
5629
5630# check for endianness
5631echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00005632echo "configure:5633: checking whether byte ordering is bigendian" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005633if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005634 echo $ac_n "(cached) $ac_c" 1>&6
5635else
5636 ac_cv_c_bigendian=unknown
5637# See if sys/param.h defines the BYTE_ORDER macro.
5638cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005639#line 5640 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005640#include "confdefs.h"
5641#include <sys/types.h>
5642#include <sys/param.h>
5643int main() {
5644
5645#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5646 bogus endian macros
5647#endif
5648; return 0; }
5649EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005650if { (eval echo configure:5651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005651 rm -rf conftest*
5652 # It does; now see whether it defined to BIG_ENDIAN or not.
5653cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005654#line 5655 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005655#include "confdefs.h"
5656#include <sys/types.h>
5657#include <sys/param.h>
5658int main() {
5659
5660#if BYTE_ORDER != BIG_ENDIAN
5661 not big endian
5662#endif
5663; return 0; }
5664EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005665if { (eval echo configure:5666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005666 rm -rf conftest*
5667 ac_cv_c_bigendian=yes
5668else
5669 echo "configure: failed program was:" >&5
5670 cat conftest.$ac_ext >&5
5671 rm -rf conftest*
5672 ac_cv_c_bigendian=no
5673fi
5674rm -f conftest*
5675else
5676 echo "configure: failed program was:" >&5
5677 cat conftest.$ac_ext >&5
5678fi
5679rm -f conftest*
5680if test $ac_cv_c_bigendian = unknown; then
5681if test "$cross_compiling" = yes; then
5682 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5683else
5684 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005685#line 5686 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005686#include "confdefs.h"
5687main () {
5688 /* Are we little or big endian? From Harbison&Steele. */
5689 union
5690 {
5691 long l;
5692 char c[sizeof (long)];
5693 } u;
5694 u.l = 1;
5695 exit (u.c[sizeof (long) - 1] == 1);
5696}
5697EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005698if { (eval echo configure:5699: \"$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 +00005699then
5700 ac_cv_c_bigendian=no
5701else
5702 echo "configure: failed program was:" >&5
5703 cat conftest.$ac_ext >&5
5704 rm -fr conftest*
5705 ac_cv_c_bigendian=yes
5706fi
5707rm -fr conftest*
5708fi
5709
5710fi
5711fi
5712
5713echo "$ac_t""$ac_cv_c_bigendian" 1>&6
5714if test $ac_cv_c_bigendian = yes; then
5715 cat >> confdefs.h <<\EOF
5716#define WORDS_BIGENDIAN 1
5717EOF
5718
5719fi
5720
5721
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005722# Check whether right shifting a negative integer extends the sign bit
5723# or fills with zeros (like the Cray J90, according to Tim Peters).
5724echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00005725echo "configure:5726: checking whether right shift extends the sign bit" >&5
Vladimir Marangozova6180282000-07-12 05:05:06 +00005726if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
5727 echo $ac_n "(cached) $ac_c" 1>&6
5728else
5729
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005730if test "$cross_compiling" = yes; then
5731 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5732else
5733 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005734#line 5735 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005735#include "confdefs.h"
5736
5737int main()
5738{
Vladimir Marangozova6180282000-07-12 05:05:06 +00005739 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005740}
5741
5742EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005743if { (eval echo configure:5744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Vladimir Marangozova6180282000-07-12 05:05:06 +00005744then
5745 ac_cv_rshift_extends_sign=yes
5746else
5747 echo "configure: failed program was:" >&5
5748 cat conftest.$ac_ext >&5
5749 rm -fr conftest*
5750 ac_cv_rshift_extends_sign=no
5751fi
5752rm -fr conftest*
5753fi
5754
5755fi
5756
5757echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
5758if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005759then
5760 cat >> confdefs.h <<\EOF
5761#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
5762EOF
5763
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005764fi
5765
5766
Guido van Rossum95713eb2000-05-18 20:53:31 +00005767# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
5768# Add sys/socket.h to confdefs.h
5769cat >> confdefs.h <<\EOF
5770#ifdef HAVE_SYS_SOCKET_H
5771#include <sys/socket.h>
5772#endif
5773EOF
5774echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00005775echo "configure:5776: checking for socklen_t" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005776if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00005777 echo $ac_n "(cached) $ac_c" 1>&6
5778else
5779 cat > conftest.$ac_ext <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00005780#line 5781 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005781#include "confdefs.h"
5782#include <sys/types.h>
5783#if STDC_HEADERS
5784#include <stdlib.h>
5785#include <stddef.h>
5786#endif
5787EOF
5788if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5789 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5790 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005791 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00005792else
5793 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005794 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00005795fi
5796rm -f conftest*
5797
5798fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005799echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
5800if test $ac_cv_type_socklen_t = no; then
5801 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00005802#define socklen_t int
5803EOF
5804
5805fi
5806
5807
Guido van Rossum627b2d71993-12-24 10:39:16 +00005808# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005809trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005810cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005811# This file is a shell script that caches the results of configure
5812# tests run on this system so they can be shared between configure
5813# scripts and configure runs. It is not useful on other systems.
5814# If it contains results you don't want to keep, you may remove or edit it.
5815#
5816# By default, configure uses ./config.cache as the cache file,
5817# creating it if it does not exist already. You can give configure
5818# the --cache-file=FILE option to use a different cache file; that is
5819# what configure does when it calls configure scripts in
5820# subdirectories, so they share the cache.
5821# Giving --cache-file=/dev/null disables caching, for debugging configure.
5822# config.status only pays attention to the cache file if you give it the
5823# --recheck option to rerun configure.
5824#
5825EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005826# The following way of writing the cache mishandles newlines in values,
5827# but we know of no workaround that is simple, portable, and efficient.
5828# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005829# Ultrix sh set writes to stderr and can't be redirected directly,
5830# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005831(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005832 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005833 *ac_space=\ *)
5834 # `set' does not quote correctly, so add quotes (double-quote substitution
5835 # turns \\\\ into \\, and sed turns \\ into \).
5836 sed -n \
5837 -e "s/'/'\\\\''/g" \
5838 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5839 ;;
5840 *)
5841 # `set' quotes correctly as required by POSIX, so do not add quotes.
5842 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5843 ;;
5844 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005845if cmp -s $cache_file confcache; then
5846 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005847else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005848 if test -w $cache_file; then
5849 echo "updating cache $cache_file"
5850 cat confcache > $cache_file
5851 else
5852 echo "not updating unwritable cache $cache_file"
5853 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005854fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005855rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00005856
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005857trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005858
5859test "x$prefix" = xNONE && prefix=$ac_default_prefix
5860# Let make expand exec_prefix.
5861test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00005862
Guido van Rossum7f43da71994-08-01 12:15:30 +00005863# Any assignment to VPATH causes Sun make to only execute
5864# the first set of double-colon rules, so remove it if not needed.
5865# If there is a colon in the path, we need to keep it.
5866if test "x$srcdir" = x.; then
5867 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5868fi
5869
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005870trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00005871
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005872DEFS=-DHAVE_CONFIG_H
5873
5874# Without the "./", some shells look in PATH for config.status.
5875: ${CONFIG_STATUS=./config.status}
5876
5877echo creating $CONFIG_STATUS
5878rm -f $CONFIG_STATUS
5879cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005880#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00005881# Generated automatically by configure.
5882# Run this file to recreate the current configuration.
5883# This directory was configured as follows,
5884# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5885#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005886# $0 $ac_configure_args
5887#
5888# Compiler output produced by configure, useful for debugging
5889# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00005890
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005891ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005892for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00005893do
Guido van Rossum7f43da71994-08-01 12:15:30 +00005894 case "\$ac_option" in
5895 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005896 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5897 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00005898 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005899 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005900 exit 0 ;;
5901 -help | --help | --hel | --he | --h)
5902 echo "\$ac_cs_usage"; exit 0 ;;
5903 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005904 esac
5905done
5906
Guido van Rossum7f43da71994-08-01 12:15:30 +00005907ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00005908
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005909trap 'rm -fr `echo "Makefile \
5910 Objects/Makefile \
5911 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00005912 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005913 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00005914 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00005915 Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005916EOF
5917cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005918
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005919# Protect against being on the right side of a sed subst in config.status.
5920sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5921 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005922$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00005923$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005924s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005925s%@CFLAGS@%$CFLAGS%g
5926s%@CPPFLAGS@%$CPPFLAGS%g
5927s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005928s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005929s%@DEFS@%$DEFS%g
5930s%@LDFLAGS@%$LDFLAGS%g
5931s%@LIBS@%$LIBS%g
5932s%@exec_prefix@%$exec_prefix%g
5933s%@prefix@%$prefix%g
5934s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005935s%@bindir@%$bindir%g
5936s%@sbindir@%$sbindir%g
5937s%@libexecdir@%$libexecdir%g
5938s%@datadir@%$datadir%g
5939s%@sysconfdir@%$sysconfdir%g
5940s%@sharedstatedir@%$sharedstatedir%g
5941s%@localstatedir@%$localstatedir%g
5942s%@libdir@%$libdir%g
5943s%@includedir@%$includedir%g
5944s%@oldincludedir@%$oldincludedir%g
5945s%@infodir@%$infodir%g
5946s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00005947s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005948s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00005949s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00005950s%@SET_CXX@%$SET_CXX%g
5951s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005952s%@CC@%$CC%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00005953s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
5954s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00005955s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005956s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005957s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00005958s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00005959s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5960s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005961s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00005962s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005963s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00005964s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00005965s%@SO@%$SO%g
5966s%@LDSHARED@%$LDSHARED%g
5967s%@CCSHARED@%$CCSHARED%g
5968s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00005969s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00005970s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00005971s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005972s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00005973s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005974s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005975s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
5976s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
5977s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005978s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005979s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005980s%@LIBM@%$LIBM%g
5981s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005982
5983CEOF
5984EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005985
5986cat >> $CONFIG_STATUS <<\EOF
5987
5988# Split the substitutions into bite-sized pieces for seds with
5989# small command number limits, like on Digital OSF/1 and HP-UX.
5990ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5991ac_file=1 # Number of current file.
5992ac_beg=1 # First line for current file.
5993ac_end=$ac_max_sed_cmds # Line after last line for current file.
5994ac_more_lines=:
5995ac_sed_cmds=""
5996while $ac_more_lines; do
5997 if test $ac_beg -gt 1; then
5998 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5999 else
6000 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6001 fi
6002 if test ! -s conftest.s$ac_file; then
6003 ac_more_lines=false
6004 rm -f conftest.s$ac_file
6005 else
6006 if test -z "$ac_sed_cmds"; then
6007 ac_sed_cmds="sed -f conftest.s$ac_file"
6008 else
6009 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6010 fi
6011 ac_file=`expr $ac_file + 1`
6012 ac_beg=$ac_end
6013 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6014 fi
6015done
6016if test -z "$ac_sed_cmds"; then
6017 ac_sed_cmds=cat
6018fi
6019EOF
6020
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006021cat >> $CONFIG_STATUS <<EOF
6022
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006023CONFIG_FILES=\${CONFIG_FILES-"Makefile \
6024 Objects/Makefile \
6025 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006026 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006027 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006028 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006029 Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006030EOF
6031cat >> $CONFIG_STATUS <<\EOF
6032for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006033 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006034 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006035 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006036 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6037 *) ac_file_in="${ac_file}.in" ;;
6038 esac
6039
Guido van Rossumf78abae1997-01-21 22:02:36 +00006040 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006041
6042 # 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"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006047 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006048 # A "../" for each directory in $ac_dir_suffix.
6049 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6050 else
6051 ac_dir_suffix= ac_dots=
6052 fi
6053
6054 case "$ac_given_srcdir" in
6055 .) srcdir=.
6056 if test -z "$ac_dots"; then top_srcdir=.
6057 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6058 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6059 *) # Relative path.
6060 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6061 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6062 esac
6063
Guido van Rossumf78abae1997-01-21 22:02:36 +00006064
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006065 echo creating "$ac_file"
6066 rm -f "$ac_file"
6067 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6068 case "$ac_file" in
6069 *Makefile*) ac_comsub="1i\\
6070# $configure_input" ;;
6071 *) ac_comsub= ;;
6072 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006073
6074 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 +00006075 sed -e "$ac_comsub
6076s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006077s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006078s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00006079" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00006080fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00006081rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006083# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6084# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00006085#
6086# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006087ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6088ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006089ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006090ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006091# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006092ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6093ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006094ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006095ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006096# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006097ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6098ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006099ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006100ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006101
Guido van Rossumf78abae1997-01-21 22:02:36 +00006102if test "${CONFIG_HEADERS+set}" != set; then
6103EOF
6104cat >> $CONFIG_STATUS <<EOF
6105 CONFIG_HEADERS="config.h"
6106EOF
6107cat >> $CONFIG_STATUS <<\EOF
6108fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006109for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006110 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006111 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006112 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006113 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6114 *) ac_file_in="${ac_file}.in" ;;
6115 esac
6116
Guido van Rossum7f43da71994-08-01 12:15:30 +00006117 echo creating $ac_file
6118
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006119 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006120 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6121 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006122
6123EOF
6124
6125# Transform confdefs.h into a sed script conftest.vals that substitutes
6126# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006127# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006128# Protect against being in an unquoted here document in config.status.
6129rm -f conftest.vals
6130cat > conftest.hdr <<\EOF
6131s/[\\&%]/\\&/g
6132s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006133s%#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 +00006134s%ac_d%ac_u%gp
6135s%ac_u%ac_e%gp
6136EOF
6137sed -n -f conftest.hdr confdefs.h > conftest.vals
6138rm -f conftest.hdr
6139
6140# This sed command replaces #undef with comments. This is necessary, for
6141# example, in the case of _POSIX_SOURCE, which is predefined and required
6142# on some systems where configure will not decide to define it.
6143cat >> conftest.vals <<\EOF
6144s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6145EOF
6146
6147# Break up conftest.vals because some shells have a limit on
6148# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006149
6150rm -f conftest.tail
6151while :
6152do
6153 ac_lines=`grep -c . conftest.vals`
6154 # grep -c gives empty output for an empty file on some AIX systems.
6155 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6156 # Write a limited-size here document to conftest.frag.
6157 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6158 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6159 echo 'CEOF
6160 sed -f conftest.frag conftest.in > conftest.out
6161 rm -f conftest.in
6162 mv conftest.out conftest.in
6163' >> $CONFIG_STATUS
6164 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6165 rm -f conftest.vals
6166 mv conftest.tail conftest.vals
6167done
6168rm -f conftest.vals
6169
6170cat >> $CONFIG_STATUS <<\EOF
6171 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006172 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006173 cat conftest.in >> conftest.h
6174 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006175 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006176 echo "$ac_file is unchanged"
6177 rm -f conftest.h
6178 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006179 # Remove last slash and all that follows it. Not all systems have dirname.
6180 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6181 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6182 # The file is in a subdirectory.
6183 test ! -d "$ac_dir" && mkdir "$ac_dir"
6184 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006185 rm -f $ac_file
6186 mv conftest.h $ac_file
6187 fi
6188fi; done
6189
Guido van Rossumf78abae1997-01-21 22:02:36 +00006190EOF
6191cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006192
Guido van Rossumf78abae1997-01-21 22:02:36 +00006193EOF
6194cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006195
6196exit 0
6197EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006198chmod +x $CONFIG_STATUS
6199rm -fr confdefs* $ac_clean_files
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006200test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006201