blob: 8293ee3a133e1f74848060a632b02d69677f5510 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Vladimir Marangozova6180282000-07-12 05:05:06 +00003# From configure.in Revision: 1.136
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`
617 if test "$ac_sys_system" = "AIX" ; then
618 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000619 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000620 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000621 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000622 ac_md_system=`echo $ac_sys_system |
623 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
624 ac_md_release=`echo $ac_sys_release |
625 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000626 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000627
Guido van Rossum07397971997-04-29 21:49:50 +0000628 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000629 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000630 esac
631fi
Guido van Rossum91922671997-10-09 20:24:13 +0000632
633#
634# SGI compilers allow the specification of the both the ABI and the
635# ISA on the command line. Depending on the values of these switches,
636# different and often incompatable code will be generated.
637#
638# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
639# thus supply support for various ABI/ISA combinations. The MACHDEP
640# variable is also adjusted.
641#
642
643if test ! -z "$SGI_ABI"
644then
645 CC="cc $SGI_ABI"
646 LDFLAGS="$SGI_ABI $LDFLAGS"
647 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
648fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000649echo "$ac_t""$MACHDEP" 1>&6
650
Guido van Rossum91922671997-10-09 20:24:13 +0000651#
652# CCC is the command that compiles C++ programs
653#
654# Not all make programs have this predefined.
655#
Guido van Rossum95012191999-12-16 17:50:52 +0000656#AC_SUBST(SET_CCC)
657#AC_MSG_CHECKING(CCC)
658#if test -z "$CCC"
659#then
660# case $ac_sys_system in
661# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
662# Linux*) SET_CCC="CCC= g++";;
663# *) SET_CCC=""
664# esac
665#else
666# SET_CCC="CCC= ${CCC}"
667#fi
668#AC_MSG_RESULT($SET_CCC)
Guido van Rossum91922671997-10-09 20:24:13 +0000669
670
Guido van Rossum627b2d71993-12-24 10:39:16 +0000671# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000672echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000673echo "configure:674: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000674# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000675if test "${with_gcc+set}" = set; then
676 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000677
678 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000679 no) CC=cc
680 without_gcc=yes;;
681 yes) CC=gcc
682 without_gcc=no;;
683 *) CC=$withval
684 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000685 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000686else
Guido van Rossume77438c1995-09-13 18:59:59 +0000687
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000688 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000689 OSF1) CC=cc
690 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000691 BeOS*)
692 # Dunno if it's a good idea to get this over with all at once, or
693 # to handle it in with the other goodies.
694 MACHDEP=beos
695
696 case $BE_HOST_CPU in
697 ppc)
Guido van Rossum81376801999-04-06 15:50:51 +0000698 CC="mwcc -I$PWD/BeOS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000699 without_gcc=yes
Guido van Rossum6b9da451999-03-24 17:48:12 +0000700 case `uname -r` in
701 4.0*) OPT="-DUSE_DL_EXPORT -O7 -opt schedule604 -export pragma" ;;
702 *) OPT="-DUSE_DL_EXPORT -O2 -proc 604e -export pragma" ;;
703 esac
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000704 CCSHARED=-UUSE_DL_EXPORT
705 LDFLAGS="$LDFLAGS -nodup"
706
707 AR="$PWD/BeOS/ar-fake"
708 RANLIB=:
709
710 cat >> confdefs.h <<\EOF
711#define DL_EXPORT_HEADER "dl_export.h"
712EOF
713
714 ;;
715 x86)
716 CC="gcc -I$PWD/BeOS"
717 without_gcc=no
Guido van Rossum32000e82000-05-22 21:31:50 +0000718 OPT="-DUSE_DL_EXPORT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000719 CCSHARED=-UUSE_DL_EXPORT
720
721 AR="$PWD/BeOS/ar-fake"
722 RANLIB=:
723
724 cat >> confdefs.h <<\EOF
725#define DL_EXPORT_HEADER "dl_export.h"
726EOF
727
728 ;;
729 *)
730 { echo "configure: error: Your BeOS system isn't PowerPC or x86... neat" 1>&2; exit 1; }
731 ;;
732 esac
733 ;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000734 *) without_gcc=no;;
735 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000736fi
737
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000738echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000739
Guido van Rossum95012191999-12-16 17:50:52 +0000740
741
742MAINOBJ=python.o
743echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000744echo "configure:745: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000745# Check whether --with-cxx or --without-cxx was given.
746if test "${with_cxx+set}" = set; then
747 withval="$with_cxx"
748
749 case $withval in
750 no) CXX=
751 with_cxx=no;;
752 *) CXX=$withval
753 MAINOBJ=ccpython.o
754 with_cxx=$withval;;
755 esac
756else
757
758 with_cxx=no
759
760fi
761
762echo "$ac_t""$with_cxx" 1>&6
763SET_CXX="CXX = $CXX"
764
765#AC_MSG_CHECKING(CCC)
766#if test -z "$CCC"
767#then
768# case $ac_sys_system in
769# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
770# Linux*) SET_CCC="CCC= g++";;
771# *) SET_CCC=""
772# esac
773#else
774# SET_CCC="CCC= ${CCC}"
775#fi
776#AC_MSG_RESULT($SET_CCC)
777
Guido van Rossum8b131c51995-03-09 14:10:13 +0000778# If the user switches compilers, we can't believe the cache
779if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
780then
781 { echo "configure: error: cached CC is different -- throw away $cache_file
782(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
783fi
784
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000785# Extract the first word of "gcc", so it can be a program name with args.
786set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000787echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000788echo "configure:789: checking for $ac_word" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +0000789if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000790 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000791else
792 if test -n "$CC"; then
793 ac_cv_prog_CC="$CC" # Let the user override the test.
794else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000795 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
796 ac_dummy="$PATH"
797 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798 test -z "$ac_dir" && ac_dir=.
799 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000800 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801 break
802 fi
803 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000806fi
807CC="$ac_cv_prog_CC"
808if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000809 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000810else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000811 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000812fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000813
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000814if test -z "$CC"; then
815 # Extract the first word of "cc", so it can be a program name with args.
816set dummy cc; ac_word=$2
817echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000818echo "configure:819: checking for $ac_word" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +0000819if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 echo $ac_n "(cached) $ac_c" 1>&6
821else
822 if test -n "$CC"; then
823 ac_cv_prog_CC="$CC" # Let the user override the test.
824else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000825 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000826 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000827 ac_dummy="$PATH"
828 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000829 test -z "$ac_dir" && ac_dir=.
830 if test -f $ac_dir/$ac_word; then
831 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
832 ac_prog_rejected=yes
833 continue
834 fi
835 ac_cv_prog_CC="cc"
836 break
837 fi
838 done
839 IFS="$ac_save_ifs"
840if test $ac_prog_rejected = yes; then
841 # We found a bogon in the path, so make sure we never use it.
842 set dummy $ac_cv_prog_CC
843 shift
844 if test $# -gt 0; then
845 # We chose a different compiler from the bogus one.
846 # However, it has the same basename, so the bogon will be chosen
847 # first if we set CC to just the basename; use the full file name.
848 shift
849 set dummy "$ac_dir/$ac_word" "$@"
850 shift
851 ac_cv_prog_CC="$@"
852 fi
853fi
854fi
855fi
856CC="$ac_cv_prog_CC"
857if test -n "$CC"; then
858 echo "$ac_t""$CC" 1>&6
859else
860 echo "$ac_t""no" 1>&6
861fi
862
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000863 if test -z "$CC"; then
864 case "`uname -s`" in
Vladimir Marangozov676aa882000-07-12 03:02:43 +0000865 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000866 # Extract the first word of "cl", so it can be a program name with args.
867set dummy cl; ac_word=$2
868echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000869echo "configure:870: checking for $ac_word" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +0000870if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000871 echo $ac_n "(cached) $ac_c" 1>&6
872else
873 if test -n "$CC"; then
874 ac_cv_prog_CC="$CC" # Let the user override the test.
875else
876 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
877 ac_dummy="$PATH"
878 for ac_dir in $ac_dummy; do
879 test -z "$ac_dir" && ac_dir=.
880 if test -f $ac_dir/$ac_word; then
881 ac_cv_prog_CC="cl"
882 break
883 fi
884 done
885 IFS="$ac_save_ifs"
886fi
887fi
888CC="$ac_cv_prog_CC"
889if test -n "$CC"; then
890 echo "$ac_t""$CC" 1>&6
891else
892 echo "$ac_t""no" 1>&6
893fi
894 ;;
895 esac
896 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
898fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899
Vladimir Marangozov676aa882000-07-12 03:02:43 +0000900echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
901echo "configure:902: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000902
903ac_ext=c
904# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
905ac_cpp='$CPP $CPPFLAGS'
906ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000907ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000908cross_compiling=$ac_cv_prog_cc_cross
909
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000910cat > conftest.$ac_ext << EOF
911
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000912#line 913 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000913#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000914
Guido van Rossumf78abae1997-01-21 22:02:36 +0000915main(){return(0);}
916EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000917if { (eval echo configure:918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000918 ac_cv_prog_cc_works=yes
919 # If we can't run a trivial program, we are probably using a cross compiler.
920 if (./conftest; exit) 2>/dev/null; then
921 ac_cv_prog_cc_cross=no
922 else
923 ac_cv_prog_cc_cross=yes
924 fi
925else
926 echo "configure: failed program was:" >&5
927 cat conftest.$ac_ext >&5
928 ac_cv_prog_cc_works=no
929fi
930rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000931ac_ext=c
932# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
933ac_cpp='$CPP $CPPFLAGS'
934ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
935ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
936cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000937
938echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
939if test $ac_cv_prog_cc_works = no; then
940 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
941fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +0000942echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
943echo "configure:944: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000944echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
945cross_compiling=$ac_cv_prog_cc_cross
946
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000947echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000948echo "configure:949: checking whether we are using GNU C" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +0000949if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000950 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951else
952 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000953#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000955#endif
956EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000957if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 ac_cv_prog_gcc=yes
959else
960 ac_cv_prog_gcc=no
961fi
962fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000964echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000965
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000966if test $ac_cv_prog_gcc = yes; then
967 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000968else
969 GCC=
970fi
971
972ac_test_CFLAGS="${CFLAGS+set}"
973ac_save_CFLAGS="$CFLAGS"
974CFLAGS=
975echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +0000976echo "configure:977: checking whether ${CC-cc} accepts -g" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +0000977if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000978 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000979else
980 echo 'void f(){}' > conftest.c
981if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000982 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000983else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000984 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000985fi
986rm -f conftest*
987
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000989
Guido van Rossumf78abae1997-01-21 22:02:36 +0000990echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000991if test "$ac_test_CFLAGS" = set; then
992 CFLAGS="$ac_save_CFLAGS"
993elif test $ac_cv_prog_cc_g = yes; then
994 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000995 CFLAGS="-g -O2"
996 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000997 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000998 fi
999else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001000 if test "$GCC" = yes; then
1001 CFLAGS="-O2"
1002 else
1003 CFLAGS=
1004 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001005fi
1006
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001007
Guido van Rossumdd997f71998-10-07 19:58:26 +00001008case $MACHDEP in
1009bsdos*)
1010 case $CC in
1011 gcc) CC="$CC -D_HAVE_BSDI";;
1012 esac;;
1013esac
1014
Guido van Rossum24b1e751997-08-21 02:29:16 +00001015case $ac_sys_system in
1016hp*|HP*)
1017 case $CC in
1018 cc|*/cc) CC="$CC -Aa -D_HPUX_SOURCE";;
1019 esac;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001020BeOS*)
1021 case $CC in
1022 cc) CC=cc;;
1023 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001024esac
1025
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001026# LDLIBRARY is the name of the library to link against (as opposed to the
1027# name of the library into which to insert object files). On systems
1028# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
1029# the Makefiles).
1030
1031
1032LDLIBRARY=''
1033
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001034# LINKCC is the command that links the python executable -- default is $(CC).
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001035# This is altered for AIX and BeOS in order to build the export list before
1036# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001037
1038echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001039echo "configure:1040: checking LINKCC" >&5
Guido van Rossum95012191999-12-16 17:50:52 +00001040if test -z "$LINKCC" -a ! -z "$CXX"
1041then
1042 LINKCC="$CXX"
1043fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001044if test -z "$LINKCC"
1045then
1046 case $ac_sys_system in
1047 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001048 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001049 BeOS*)
Guido van Rossumea516321998-12-17 18:08:55 +00001050 LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001051 LDLIBRARY='libpython$(VERSION).so';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001052 dgux*)
1053 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001054 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001055 esac
1056fi
1057echo "$ac_t""$LINKCC" 1>&6
1058
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001059echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001060echo "configure:1061: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001061
1062# NeXT framework builds require that the 'ar' library be converted into
1063# a bundle using libtool.
1064if test "$with_next_framework"
1065then
1066 LDLIBRARY='libpython$(VERSION).dylib'
1067fi
1068
1069# DG/UX requires some fancy ld contortions to produce a .so from an .a
1070if test "$MACHDEP" = "dguxR4"
1071then
1072 LDLIBRARY='libpython$(VERSION).so'
1073 OPT="$OPT -pic"
1074fi
1075echo "$ac_t""$LDLIBRARY" 1>&6
1076
1077# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1078if test -z "$LDLIBRARY"
1079then
1080 LDLIBRARY='libpython$(VERSION).a'
1081 MAKE_LDLIBRARY="true"
1082else
1083 MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
1084fi
1085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086# Extract the first word of "ranlib", so it can be a program name with args.
1087set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001088echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001089echo "configure:1090: checking for $ac_word" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001090if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001091 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001092else
1093 if test -n "$RANLIB"; then
1094 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1095else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001096 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1097 ac_dummy="$PATH"
1098 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 test -z "$ac_dir" && ac_dir=.
1100 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001101 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001102 break
1103 fi
1104 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001106 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001107fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001108fi
1109RANLIB="$ac_cv_prog_RANLIB"
1110if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001111 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001112else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001113 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001115
1116
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117for ac_prog in ar aal
1118do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119# Extract the first word of "$ac_prog", so it can be a program name with args.
1120set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001121echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001122echo "configure:1123: checking for $ac_word" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001123if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001124 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001125else
1126 if test -n "$AR"; then
1127 ac_cv_prog_AR="$AR" # Let the user override the test.
1128else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001129 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1130 ac_dummy="$PATH"
1131 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132 test -z "$ac_dir" && ac_dir=.
1133 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135 break
1136 fi
1137 done
1138 IFS="$ac_save_ifs"
1139fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140fi
1141AR="$ac_cv_prog_AR"
1142if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001143 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001145 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001146fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
1148test -n "$AR" && break
1149done
1150test -n "$AR" || AR="ar"
1151
1152
Guido van Rossumda88dad1995-01-26 00:46:29 +00001153
1154
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001155# Install just never works :-(
1156if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001157then
1158 INSTALL=cp
1159 INSTALL_PROGRAM=cp
1160 INSTALL_DATA=cp
1161else
1162 INSTALL_PROGRAM="$INSTALL"
1163 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001164fi
1165
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001166# Not every filesystem supports hard links
1167
1168if test -z "$LN" ; then
1169 case $ac_sys_system in
1170 BeOS*) LN="ln -s";;
1171 *) LN=ln;;
1172 esac
1173fi
1174
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001175# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001176
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001177if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001178then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001179 case $GCC in
1180 yes)
1181 case $ac_cv_prog_cc_g in
1182 yes) OPT="-g -O2";;
1183 *) OPT="-O2";;
1184 esac
1185 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001186 *) OPT="-O";;
1187 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001188fi
1189
Guido van Rossum563e7081996-09-10 18:20:48 +00001190if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001191then
1192 OPT="$OPT $ac_arch_flags"
1193fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001194# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001195echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001196echo "configure:1197: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197# On Suns, sometimes $CPP names a directory.
1198if test -n "$CPP" && test -d "$CPP"; then
1199 CPP=
1200fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001201if test -z "$CPP"; then
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001202if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001203 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204else
1205 # This must be in double quotes, not single quotes, because CPP may get
1206 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001207 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001208 # On the NeXT, cc -E runs the code through the compiler's parser,
1209 # not just through cpp.
1210 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001211#line 1212 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214Syntax Error
1215EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001216ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001217{ (eval echo configure:1218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001218ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219if test -z "$ac_err"; then
1220 :
1221else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001222 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001223 echo "configure: failed program was:" >&5
1224 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225 rm -rf conftest*
1226 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001228#line 1229 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001230#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231Syntax Error
1232EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001233ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001234{ (eval echo configure:1235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001235ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1236if test -z "$ac_err"; then
1237 :
1238else
1239 echo "$ac_err" >&5
1240 echo "configure: failed program was:" >&5
1241 cat conftest.$ac_ext >&5
1242 rm -rf conftest*
1243 CPP="${CC-cc} -nologo -E"
1244 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001245#line 1246 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001246#include "confdefs.h"
1247#include <assert.h>
1248Syntax Error
1249EOF
1250ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001251{ (eval echo configure:1252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001252ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001254 :
1255else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001256 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001257 echo "configure: failed program was:" >&5
1258 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001259 rm -rf conftest*
1260 CPP=/lib/cpp
1261fi
1262rm -f conftest*
1263fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001265fi
1266rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001267 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001269 CPP="$ac_cv_prog_CPP"
1270else
1271 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001273echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001275echo $ac_n "checking for AIX""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001276echo "configure:1277: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001277cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001278#line 1279 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279#include "confdefs.h"
1280#ifdef _AIX
1281 yes
1282#endif
1283
1284EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1286 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001288 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289#define _ALL_SOURCE 1
1290EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001291
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001292else
1293 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001294 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295fi
1296rm -f conftest*
1297
1298
Guido van Rossumf78abae1997-01-21 22:02:36 +00001299ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001300echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001301echo "configure:1302: checking for minix/config.h" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001302if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001303 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001304else
1305 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001306#line 1307 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307#include "confdefs.h"
1308#include <minix/config.h>
1309EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001310ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001311{ (eval echo configure:1312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001312ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001313if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001315 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001317 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001318 echo "configure: failed program was:" >&5
1319 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001320 rm -rf conftest*
1321 eval "ac_cv_header_$ac_safe=no"
1322fi
1323rm -f conftest*
1324fi
1325if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001326 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001327 MINIX=yes
1328else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001329 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001330MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001331fi
1332
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001333if test "$MINIX" = yes; then
1334 cat >> confdefs.h <<\EOF
1335#define _POSIX_SOURCE 1
1336EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001338 cat >> confdefs.h <<\EOF
1339#define _POSIX_1_SOURCE 2
1340EOF
1341
1342 cat >> confdefs.h <<\EOF
1343#define _MINIX 1
1344EOF
1345
1346fi
1347
Guido van Rossumda88dad1995-01-26 00:46:29 +00001348
Guido van Rossum91922671997-10-09 20:24:13 +00001349echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001350echo "configure:1351: checking whether $CC accepts -OPT:Olimit=0" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001351if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001352 echo $ac_n "(cached) $ac_c" 1>&6
1353else
1354 ac_save_cc="$CC"
1355CC="$CC -OPT:Olimit=0"
1356if test "$cross_compiling" = yes; then
1357 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1358else
1359 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001360#line 1361 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001361#include "confdefs.h"
1362int main() { return 0; }
1363EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001364if { (eval echo configure:1365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossum91922671997-10-09 20:24:13 +00001365then
1366 ac_cv_opt_olimit_ok=yes
1367else
1368 echo "configure: failed program was:" >&5
1369 cat conftest.$ac_ext >&5
1370 rm -fr conftest*
1371 ac_cv_opt_olimit_ok=no
1372fi
1373rm -fr conftest*
1374fi
1375
1376CC="$ac_save_cc"
1377fi
1378
1379echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001380if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001381 OPT="$OPT -OPT:Olimit=0"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001382else
1383 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001384echo "configure:1385: checking whether $CC accepts -Olimit 1500" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001385 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001386 echo $ac_n "(cached) $ac_c" 1>&6
1387else
1388 ac_save_cc="$CC"
1389 CC="$CC -Olimit 1500"
1390 if test "$cross_compiling" = yes; then
1391 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1392else
1393 cat > conftest.$ac_ext <<EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001394#line 1395 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001395#include "confdefs.h"
1396int main() { return 0; }
1397EOF
Jeremy Hylton2a2c2182000-06-30 04:57:55 +00001398if { (eval echo configure:1399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001399then
1400 ac_cv_olimit_ok=yes
1401else
1402 echo "configure: failed program was:" >&5
1403 cat conftest.$ac_ext >&5
1404 rm -fr conftest*
1405 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001406fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001407rm -fr conftest*
1408fi
1409
1410 CC="$ac_save_cc"
1411fi
1412
1413 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1414 if test $ac_cv_olimit_ok = yes; then
1415 OPT="$OPT -Olimit 1500"
1416 fi
1417fi
1418
Guido van Rossum84e7b241996-08-19 21:59:00 +00001419
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001420# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001421echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Fred Drakece81d592000-07-09 14:39:29 +00001422echo "configure:1423: checking for ANSI C header files" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001423if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001424 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001425else
1426 cat > conftest.$ac_ext <<EOF
Fred Drakece81d592000-07-09 14:39:29 +00001427#line 1428 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001428#include "confdefs.h"
1429#include <stdlib.h>
1430#include <stdarg.h>
1431#include <string.h>
1432#include <float.h>
1433EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001434ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drakece81d592000-07-09 14:39:29 +00001435{ (eval echo configure:1436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001436ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001437if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001438 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001439 ac_cv_header_stdc=yes
1440else
1441 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001442 echo "configure: failed program was:" >&5
1443 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001444 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001445 ac_cv_header_stdc=no
1446fi
1447rm -f conftest*
1448
1449if test $ac_cv_header_stdc = yes; then
1450 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1451cat > conftest.$ac_ext <<EOF
Fred Drakece81d592000-07-09 14:39:29 +00001452#line 1453 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001453#include "confdefs.h"
1454#include <string.h>
1455EOF
1456if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1457 egrep "memchr" >/dev/null 2>&1; then
1458 :
1459else
1460 rm -rf conftest*
1461 ac_cv_header_stdc=no
1462fi
1463rm -f conftest*
1464
1465fi
1466
1467if test $ac_cv_header_stdc = yes; then
1468 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1469cat > conftest.$ac_ext <<EOF
Fred Drakece81d592000-07-09 14:39:29 +00001470#line 1471 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001471#include "confdefs.h"
1472#include <stdlib.h>
1473EOF
1474if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1475 egrep "free" >/dev/null 2>&1; then
1476 :
1477else
1478 rm -rf conftest*
1479 ac_cv_header_stdc=no
1480fi
1481rm -f conftest*
1482
1483fi
1484
1485if test $ac_cv_header_stdc = yes; then
1486 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1487if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001488 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001489else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001490 cat > conftest.$ac_ext <<EOF
Fred Drakece81d592000-07-09 14:39:29 +00001491#line 1492 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001492#include "confdefs.h"
1493#include <ctype.h>
1494#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1495#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001496#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001497int main () { int i; for (i = 0; i < 256; i++)
1498if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1499exit (0); }
1500
1501EOF
Fred Drakece81d592000-07-09 14:39:29 +00001502if { (eval echo configure:1503: \"$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 +00001503then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001504 :
1505else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001506 echo "configure: failed program was:" >&5
1507 cat conftest.$ac_ext >&5
1508 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001509 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001510fi
1511rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001512fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001513
1514fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001515fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001516
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001517echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001518if test $ac_cv_header_stdc = yes; then
1519 cat >> confdefs.h <<\EOF
1520#define STDC_HEADERS 1
1521EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001522
1523fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001524
Guido van Rossum96013151997-10-08 22:47:52 +00001525for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001526signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001527sys/audioio.h sys/file.h sys/lock.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001528sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drake8cef4cf2000-06-28 16:40:38 +00001529sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001530do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001531ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001532echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Fred Drakece81d592000-07-09 14:39:29 +00001533echo "configure:1534: checking for $ac_hdr" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001534if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001535 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001536else
1537 cat > conftest.$ac_ext <<EOF
Fred Drakece81d592000-07-09 14:39:29 +00001538#line 1539 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001539#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001540#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001541EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001542ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drakece81d592000-07-09 14:39:29 +00001543{ (eval echo configure:1544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001544ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001545if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001546 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001547 eval "ac_cv_header_$ac_safe=yes"
1548else
1549 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001550 echo "configure: failed program was:" >&5
1551 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001552 rm -rf conftest*
1553 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001554fi
1555rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001556fi
1557if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001558 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001559 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001560 cat >> confdefs.h <<EOF
1561#define $ac_tr_hdr 1
1562EOF
1563
1564else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001565 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001566fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001567done
1568
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001569ac_header_dirent=no
1570for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1571do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001572ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001573echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Fred Drakece81d592000-07-09 14:39:29 +00001574echo "configure:1575: checking for $ac_hdr that defines DIR" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001575if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001576 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001577else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001578 cat > conftest.$ac_ext <<EOF
Fred Drakece81d592000-07-09 14:39:29 +00001579#line 1580 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001580#include "confdefs.h"
1581#include <sys/types.h>
1582#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001583int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001584DIR *dirp = 0;
1585; return 0; }
1586EOF
Fred Drakece81d592000-07-09 14:39:29 +00001587if { (eval echo configure:1588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001588 rm -rf conftest*
1589 eval "ac_cv_header_dirent_$ac_safe=yes"
1590else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001591 echo "configure: failed program was:" >&5
1592 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001593 rm -rf conftest*
1594 eval "ac_cv_header_dirent_$ac_safe=no"
1595fi
1596rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001597fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001598if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001599 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001600 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001601 cat >> confdefs.h <<EOF
1602#define $ac_tr_hdr 1
1603EOF
1604 ac_header_dirent=$ac_hdr; break
1605else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001606 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001607fi
1608done
1609# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1610if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001611echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Fred Drakece81d592000-07-09 14:39:29 +00001612echo "configure:1613: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001613ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001614if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001615 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001616else
1617 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001618LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001619cat > conftest.$ac_ext <<EOF
Fred Drakece81d592000-07-09 14:39:29 +00001620#line 1621 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001621#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001622/* Override any gcc2 internal prototype to avoid an error. */
1623/* We use char because int might match the return type of a gcc2
1624 builtin and then its argument prototype would still apply. */
1625char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001626
Guido van Rossumf78abae1997-01-21 22:02:36 +00001627int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001628opendir()
1629; return 0; }
1630EOF
Fred Drakece81d592000-07-09 14:39:29 +00001631if { (eval echo configure:1632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001632 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001633 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001634else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001635 echo "configure: failed program was:" >&5
1636 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001637 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001638 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001639fi
1640rm -f conftest*
1641LIBS="$ac_save_LIBS"
1642
1643fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001644if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001645 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001646 LIBS="$LIBS -ldir"
1647else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001648 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001649fi
1650
1651else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001652echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Fred Drakece81d592000-07-09 14:39:29 +00001653echo "configure:1654: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001654ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001655if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001656 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001657else
1658 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001659LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001660cat > conftest.$ac_ext <<EOF
Fred Drakece81d592000-07-09 14:39:29 +00001661#line 1662 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001662#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001663/* Override any gcc2 internal prototype to avoid an error. */
1664/* We use char because int might match the return type of a gcc2
1665 builtin and then its argument prototype would still apply. */
1666char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001667
Guido van Rossumf78abae1997-01-21 22:02:36 +00001668int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001669opendir()
1670; return 0; }
1671EOF
Fred Drakece81d592000-07-09 14:39:29 +00001672if { (eval echo configure:1673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001673 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001674 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001675else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001676 echo "configure: failed program was:" >&5
1677 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001678 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001679 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001680fi
1681rm -f conftest*
1682LIBS="$ac_save_LIBS"
1683
1684fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001685if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001686 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001687 LIBS="$LIBS -lx"
1688else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001689 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001690fi
1691
1692fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001693
1694
1695# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001696was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001697echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Fred Drakece81d592000-07-09 14:39:29 +00001698echo "configure:1699: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001699cat > conftest.$ac_ext <<EOF
Fred Drakece81d592000-07-09 14:39:29 +00001700#line 1701 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001701#include "confdefs.h"
1702#include <time.h>
1703EOF
1704if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1705 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001706 rm -rf conftest*
1707 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001708else
1709 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001710 cat >> confdefs.h <<\EOF
1711#define clock_t long
1712EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001713
1714fi
1715rm -f conftest*
1716
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001717echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001718
Guido van Rossum84e7b241996-08-19 21:59:00 +00001719# Add some code to confdefs.h so that the test for off_t works on SCO
1720cat >> confdefs.h <<\EOF
1721#if defined(SCO_DS)
1722#undef _OFF_T
1723#endif
1724EOF
1725
Guido van Rossumef2255b2000-03-10 22:30:29 +00001726# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001727echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Fred Drakece81d592000-07-09 14:39:29 +00001728echo "configure:1729: checking for mode_t" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001729if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001730 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001731else
1732 cat > conftest.$ac_ext <<EOF
Fred Drakece81d592000-07-09 14:39:29 +00001733#line 1734 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001734#include "confdefs.h"
1735#include <sys/types.h>
1736#if STDC_HEADERS
1737#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001738#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001739#endif
1740EOF
1741if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001742 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 +00001743 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001744 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001745else
1746 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001747 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001748fi
1749rm -f conftest*
1750
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001751fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001752echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1753if test $ac_cv_type_mode_t = no; then
1754 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001755#define mode_t int
1756EOF
1757
1758fi
1759
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001760echo $ac_n "checking for off_t""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001761echo "configure:1762: checking for off_t" >&5
1762if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001763 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001764else
1765 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001766#line 1767 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001767#include "confdefs.h"
1768#include <sys/types.h>
1769#if STDC_HEADERS
1770#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001771#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001772#endif
1773EOF
1774if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001775 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 +00001776 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001777 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001778else
1779 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001780 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001781fi
1782rm -f conftest*
1783
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001784fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001785echo "$ac_t""$ac_cv_type_off_t" 1>&6
1786if test $ac_cv_type_off_t = no; then
1787 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001788#define off_t long
1789EOF
1790
1791fi
1792
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001793echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001794echo "configure:1795: checking for pid_t" >&5
1795if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001796 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001797else
1798 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001799#line 1800 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001800#include "confdefs.h"
1801#include <sys/types.h>
1802#if STDC_HEADERS
1803#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001804#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805#endif
1806EOF
1807if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001808 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 +00001809 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001810 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001811else
1812 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001813 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001814fi
1815rm -f conftest*
1816
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001817fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001818echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1819if test $ac_cv_type_pid_t = no; then
1820 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001821#define pid_t int
1822EOF
1823
1824fi
1825
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001826echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001827echo "configure:1828: checking return type of signal handlers" >&5
1828if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001829 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001830else
1831 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001832#line 1833 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001833#include "confdefs.h"
1834#include <sys/types.h>
1835#include <signal.h>
1836#ifdef signal
1837#undef signal
1838#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001839#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001840extern "C" void (*signal (int, void (*)(int)))(int);
1841#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001842void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001843#endif
1844
Guido van Rossumf78abae1997-01-21 22:02:36 +00001845int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001846int i;
1847; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001848EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001849if { (eval echo configure:1850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001850 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001851 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001852else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001853 echo "configure: failed program was:" >&5
1854 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001855 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001856 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001857fi
1858rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001859fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001860
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001861echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001862cat >> confdefs.h <<EOF
1863#define RETSIGTYPE $ac_cv_type_signal
1864EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001865
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001866
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001867echo $ac_n "checking for size_t""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001868echo "configure:1869: checking for size_t" >&5
1869if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001870 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001871else
1872 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001873#line 1874 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001874#include "confdefs.h"
1875#include <sys/types.h>
1876#if STDC_HEADERS
1877#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001878#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001879#endif
1880EOF
1881if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001882 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 +00001883 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001884 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001885else
1886 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001887 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001888fi
1889rm -f conftest*
1890
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001891fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001892echo "$ac_t""$ac_cv_type_size_t" 1>&6
1893if test $ac_cv_type_size_t = no; then
1894 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001895#define size_t unsigned
1896EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001897
1898fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001899
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001900echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001901echo "configure:1902: checking for uid_t in sys/types.h" >&5
1902if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001903 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001904else
1905 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001906#line 1907 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001907#include "confdefs.h"
1908#include <sys/types.h>
1909EOF
1910if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1911 egrep "uid_t" >/dev/null 2>&1; then
1912 rm -rf conftest*
1913 ac_cv_type_uid_t=yes
1914else
1915 rm -rf conftest*
1916 ac_cv_type_uid_t=no
1917fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001918rm -f conftest*
1919
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001920fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001921
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001922echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001923if test $ac_cv_type_uid_t = no; then
1924 cat >> confdefs.h <<\EOF
1925#define uid_t int
1926EOF
1927
1928 cat >> confdefs.h <<\EOF
1929#define gid_t int
1930EOF
1931
1932fi
1933
Guido van Rossum627b2d71993-12-24 10:39:16 +00001934
Guido van Rossumef2255b2000-03-10 22:30:29 +00001935# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001936echo $ac_n "checking size of int""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001937echo "configure:1938: checking size of int" >&5
1938if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001939 echo $ac_n "(cached) $ac_c" 1>&6
1940else
1941 if test "$cross_compiling" = yes; then
1942 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1943else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001944 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001945#line 1946 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001946#include "confdefs.h"
1947#include <stdio.h>
1948main()
1949{
1950 FILE *f=fopen("conftestval", "w");
1951 if (!f) exit(1);
1952 fprintf(f, "%d\n", sizeof(int));
1953 exit(0);
1954}
1955EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001956if { (eval echo configure:1957: \"$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 +00001957then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001958 ac_cv_sizeof_int=`cat conftestval`
1959else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001960 echo "configure: failed program was:" >&5
1961 cat conftest.$ac_ext >&5
1962 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001963 ac_cv_sizeof_int=0
1964fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001965rm -fr conftest*
1966fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001967
1968fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001969echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1970cat >> confdefs.h <<EOF
1971#define SIZEOF_INT $ac_cv_sizeof_int
1972EOF
1973
1974
1975echo $ac_n "checking size of long""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001976echo "configure:1977: checking size of long" >&5
1977if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001978 echo $ac_n "(cached) $ac_c" 1>&6
1979else
1980 if test "$cross_compiling" = yes; then
1981 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1982else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001983 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001984#line 1985 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001985#include "confdefs.h"
1986#include <stdio.h>
1987main()
1988{
1989 FILE *f=fopen("conftestval", "w");
1990 if (!f) exit(1);
1991 fprintf(f, "%d\n", sizeof(long));
1992 exit(0);
1993}
1994EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00001995if { (eval echo configure:1996: \"$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 +00001996then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001997 ac_cv_sizeof_long=`cat conftestval`
1998else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001999 echo "configure: failed program was:" >&5
2000 cat conftest.$ac_ext >&5
2001 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002002 ac_cv_sizeof_long=0
2003fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002004rm -fr conftest*
2005fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002006
2007fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002008echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2009cat >> confdefs.h <<EOF
2010#define SIZEOF_LONG $ac_cv_sizeof_long
2011EOF
2012
2013
Guido van Rossumad678af1998-10-02 14:42:15 +00002014echo $ac_n "checking size of void *""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002015echo "configure:2016: checking size of void *" >&5
2016if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002017 echo $ac_n "(cached) $ac_c" 1>&6
2018else
2019 if test "$cross_compiling" = yes; then
2020 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2021else
2022 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002023#line 2024 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002024#include "confdefs.h"
2025#include <stdio.h>
2026main()
2027{
2028 FILE *f=fopen("conftestval", "w");
2029 if (!f) exit(1);
2030 fprintf(f, "%d\n", sizeof(void *));
2031 exit(0);
2032}
2033EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002034if { (eval echo configure:2035: \"$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 +00002035then
2036 ac_cv_sizeof_void_p=`cat conftestval`
2037else
2038 echo "configure: failed program was:" >&5
2039 cat conftest.$ac_ext >&5
2040 rm -fr conftest*
2041 ac_cv_sizeof_void_p=0
2042fi
2043rm -fr conftest*
2044fi
2045
2046fi
2047echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2048cat >> confdefs.h <<EOF
2049#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2050EOF
2051
2052
Guido van Rossumef2255b2000-03-10 22:30:29 +00002053echo $ac_n "checking size of char""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002054echo "configure:2055: checking size of char" >&5
2055if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002056 echo $ac_n "(cached) $ac_c" 1>&6
2057else
2058 if test "$cross_compiling" = yes; then
2059 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2060else
2061 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002062#line 2063 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002063#include "confdefs.h"
2064#include <stdio.h>
2065main()
2066{
2067 FILE *f=fopen("conftestval", "w");
2068 if (!f) exit(1);
2069 fprintf(f, "%d\n", sizeof(char));
2070 exit(0);
2071}
2072EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002073if { (eval echo configure:2074: \"$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 +00002074then
2075 ac_cv_sizeof_char=`cat conftestval`
2076else
2077 echo "configure: failed program was:" >&5
2078 cat conftest.$ac_ext >&5
2079 rm -fr conftest*
2080 ac_cv_sizeof_char=0
2081fi
2082rm -fr conftest*
2083fi
2084
2085fi
2086echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2087cat >> confdefs.h <<EOF
2088#define SIZEOF_CHAR $ac_cv_sizeof_char
2089EOF
2090
2091
2092echo $ac_n "checking size of short""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002093echo "configure:2094: checking size of short" >&5
2094if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002095 echo $ac_n "(cached) $ac_c" 1>&6
2096else
2097 if test "$cross_compiling" = yes; then
2098 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2099else
2100 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002101#line 2102 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002102#include "confdefs.h"
2103#include <stdio.h>
2104main()
2105{
2106 FILE *f=fopen("conftestval", "w");
2107 if (!f) exit(1);
2108 fprintf(f, "%d\n", sizeof(short));
2109 exit(0);
2110}
2111EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002112if { (eval echo configure:2113: \"$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 +00002113then
2114 ac_cv_sizeof_short=`cat conftestval`
2115else
2116 echo "configure: failed program was:" >&5
2117 cat conftest.$ac_ext >&5
2118 rm -fr conftest*
2119 ac_cv_sizeof_short=0
2120fi
2121rm -fr conftest*
2122fi
2123
2124fi
2125echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2126cat >> confdefs.h <<EOF
2127#define SIZEOF_SHORT $ac_cv_sizeof_short
2128EOF
2129
2130
2131echo $ac_n "checking size of float""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002132echo "configure:2133: checking size of float" >&5
2133if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002134 echo $ac_n "(cached) $ac_c" 1>&6
2135else
2136 if test "$cross_compiling" = yes; then
2137 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2138else
2139 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002140#line 2141 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002141#include "confdefs.h"
2142#include <stdio.h>
2143main()
2144{
2145 FILE *f=fopen("conftestval", "w");
2146 if (!f) exit(1);
2147 fprintf(f, "%d\n", sizeof(float));
2148 exit(0);
2149}
2150EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002151if { (eval echo configure:2152: \"$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 +00002152then
2153 ac_cv_sizeof_float=`cat conftestval`
2154else
2155 echo "configure: failed program was:" >&5
2156 cat conftest.$ac_ext >&5
2157 rm -fr conftest*
2158 ac_cv_sizeof_float=0
2159fi
2160rm -fr conftest*
2161fi
2162
2163fi
2164echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2165cat >> confdefs.h <<EOF
2166#define SIZEOF_FLOAT $ac_cv_sizeof_float
2167EOF
2168
2169
2170echo $ac_n "checking size of double""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002171echo "configure:2172: checking size of double" >&5
2172if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002173 echo $ac_n "(cached) $ac_c" 1>&6
2174else
2175 if test "$cross_compiling" = yes; then
2176 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2177else
2178 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002179#line 2180 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002180#include "confdefs.h"
2181#include <stdio.h>
2182main()
2183{
2184 FILE *f=fopen("conftestval", "w");
2185 if (!f) exit(1);
2186 fprintf(f, "%d\n", sizeof(double));
2187 exit(0);
2188}
2189EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002190if { (eval echo configure:2191: \"$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 +00002191then
2192 ac_cv_sizeof_double=`cat conftestval`
2193else
2194 echo "configure: failed program was:" >&5
2195 cat conftest.$ac_ext >&5
2196 rm -fr conftest*
2197 ac_cv_sizeof_double=0
2198fi
2199rm -fr conftest*
2200fi
2201
2202fi
2203echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2204cat >> confdefs.h <<EOF
2205#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2206EOF
2207
2208
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002209echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002210echo "configure:2211: checking size of fpos_t" >&5
2211if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002212 echo $ac_n "(cached) $ac_c" 1>&6
2213else
2214 if test "$cross_compiling" = yes; then
2215 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2216else
2217 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002218#line 2219 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002219#include "confdefs.h"
2220#include <stdio.h>
2221main()
2222{
2223 FILE *f=fopen("conftestval", "w");
2224 if (!f) exit(1);
2225 fprintf(f, "%d\n", sizeof(fpos_t));
2226 exit(0);
2227}
2228EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002229if { (eval echo configure:2230: \"$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 +00002230then
2231 ac_cv_sizeof_fpos_t=`cat conftestval`
2232else
2233 echo "configure: failed program was:" >&5
2234 cat conftest.$ac_ext >&5
2235 rm -fr conftest*
2236 ac_cv_sizeof_fpos_t=0
2237fi
2238rm -fr conftest*
2239fi
2240
2241fi
2242echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2243cat >> confdefs.h <<EOF
2244#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2245EOF
2246
2247
Guido van Rossum0a516c91994-09-12 10:58:40 +00002248
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002249echo $ac_n "checking for long long support""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002250echo "configure:2251: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002251have_long_long=no
2252cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002253#line 2254 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002254#include "confdefs.h"
2255
2256int main() {
2257long long x; x = (long long)0;
2258; return 0; }
2259EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002260if { (eval echo configure:2261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002261 rm -rf conftest*
2262 cat >> confdefs.h <<\EOF
2263#define HAVE_LONG_LONG 1
2264EOF
2265 have_long_long=yes
2266else
2267 echo "configure: failed program was:" >&5
2268 cat conftest.$ac_ext >&5
2269fi
2270rm -f conftest*
2271echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002272if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002273echo $ac_n "checking size of long long""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002274echo "configure:2275: checking size of long long" >&5
2275if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002276 echo $ac_n "(cached) $ac_c" 1>&6
2277else
2278 if test "$cross_compiling" = yes; then
2279 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2280else
2281 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002282#line 2283 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002283#include "confdefs.h"
2284#include <stdio.h>
2285main()
2286{
2287 FILE *f=fopen("conftestval", "w");
2288 if (!f) exit(1);
2289 fprintf(f, "%d\n", sizeof(long long));
2290 exit(0);
2291}
2292EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002293if { (eval echo configure:2294: \"$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 +00002294then
2295 ac_cv_sizeof_long_long=`cat conftestval`
2296else
2297 echo "configure: failed program was:" >&5
2298 cat conftest.$ac_ext >&5
2299 rm -fr conftest*
2300 ac_cv_sizeof_long_long=0
2301fi
2302rm -fr conftest*
2303fi
2304
2305fi
2306echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2307cat >> confdefs.h <<EOF
2308#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2309EOF
2310
2311
2312fi
2313
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002314# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2315echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002316echo "configure:2317: checking size of off_t" >&5
2317if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002318 echo $ac_n "(cached) $ac_c" 1>&6
2319else
2320 if test "$cross_compiling" = yes; then
2321 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2322else
2323 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002324#line 2325 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002325#include "confdefs.h"
2326#include <stdio.h>
2327#include <sys/types.h>
2328main()
2329{
2330 FILE *f=fopen("conftestval", "w");
2331 if (!f) exit(1);
2332 fprintf(f, "%d\n", sizeof(off_t));
2333 exit(0);
2334}
2335EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002336if { (eval echo configure:2337: \"$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 +00002337then
2338 ac_cv_sizeof_off_t=`cat conftestval`
2339else
2340 echo "configure: failed program was:" >&5
2341 cat conftest.$ac_ext >&5
2342 rm -fr conftest*
2343 ac_cv_sizeof_off_t=0
2344fi
2345rm -fr conftest*
2346fi
2347
2348
2349fi
2350
2351echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2352cat >> confdefs.h <<EOF
2353#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2354EOF
2355
2356
2357echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002358echo "configure:2359: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002359if test "$have_long_long" = yes -a \
2360 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2361 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002362 cat >> confdefs.h <<\EOF
2363#define HAVE_LARGEFILE_SUPPORT 1
2364EOF
2365
2366 echo "$ac_t""yes" 1>&6
2367else
2368 echo "$ac_t""no" 1>&6
2369fi
2370
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002371# AC_CHECK_SIZEOF() doesn't include <time.h>.
2372echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002373echo "configure:2374: checking size of time_t" >&5
2374if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002375 echo $ac_n "(cached) $ac_c" 1>&6
2376else
2377 if test "$cross_compiling" = yes; then
2378 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2379else
2380 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002381#line 2382 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002382#include "confdefs.h"
2383#include <stdio.h>
2384#include <time.h>
2385main()
2386{
2387 FILE *f=fopen("conftestval", "w");
2388 if (!f) exit(1);
2389 fprintf(f, "%d\n", sizeof(time_t));
2390 exit(0);
2391}
2392EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002393if { (eval echo configure:2394: \"$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 +00002394then
2395 ac_cv_sizeof_time_t=`cat conftestval`
2396else
2397 echo "configure: failed program was:" >&5
2398 cat conftest.$ac_ext >&5
2399 rm -fr conftest*
2400 ac_cv_sizeof_time_t=0
2401fi
2402rm -fr conftest*
2403fi
2404
2405
2406fi
2407
2408echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2409cat >> confdefs.h <<EOF
2410#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2411EOF
2412
2413
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002414
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002415# Minor variations in building a framework between NextStep versions 4 and 5
2416
2417case $ac_sys_system/$ac_sys_release in
2418 next/4*)
2419 ns_undef_sym='__environ'
2420 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2421 next/5*)
2422 ns_undef_sym='_environ'
2423 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2424esac
2425
2426echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002427echo "configure:2428: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002428if test "$with_next_framework"
2429then
2430 OPT="$OPT -fno-common"
2431 # -U __environ is needed since bundles don't have access
2432 # to crt0 when built but will always be linked against it
2433 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2434 cat >> confdefs.h <<\EOF
2435#define WITH_NEXT_FRAMEWORK 1
2436EOF
2437
2438 echo "$ac_t""yes" 1>&6
2439else
2440 echo "$ac_t""no" 1>&6
2441fi
2442
2443echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002444echo "configure:2445: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002445if test "$with_next_framework" -o "$with_dyld"
2446then
2447 if test "$with_dyld"
2448 then
2449 echo "$ac_t""yes" 1>&6
2450 else
2451 echo "$ac_t""required for framework build" 1>&6
2452 fi
2453 cat >> confdefs.h <<\EOF
2454#define WITH_DYLD 1
2455EOF
2456
2457 ns_dyld='set'
2458else
2459 echo "$ac_t""no" 1>&6
2460fi
2461
Guido van Rossum0a516c91994-09-12 10:58:40 +00002462# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002463
2464
2465
2466
Guido van Rossum0a516c91994-09-12 10:58:40 +00002467# SO is the extension of shared libraries `(including the dot!)
2468# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002469echo $ac_n "checking SO""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002470echo "configure:2471: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002471if test -z "$SO"
2472then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002473 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002474 hp*|HP*) SO=.sl;;
2475 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002476 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002477fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002478echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002479# LDSHARED is the ld *command* used to create shared library
2480# -- "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 +00002481# (Shared libraries in this instance are shared modules to be loaded into
2482# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002483echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002484echo "configure:2485: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002485if test -z "$LDSHARED"
2486then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002487 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002488 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002489 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002490 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002491 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002492 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a662000-05-26 12:22:54 +00002493 SunOS/5*)
2494 if test "$GCC" = "yes"
2495 then LDSHARED='$(CC) -G'
2496 else LDSHARED="ld -G";
2497 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002498 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002499 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2500 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002501 next/*)
2502 if test "$ns_dyld"
2503 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2504 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2505 fi
2506 if test "$with_next_framework" ; then
2507 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2508 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002509 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002510 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002511 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossuma8acf721999-04-27 22:06:08 +00002512 FreeBSD*/[34]*) LDSHARED="gcc -shared";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002513 FreeBSD*|OpenBSD*) LDSHARED="ld -Bshareable";;
2514 NetBSD*)
2515 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2516 then
2517 LDSHARED="cc -shared"
2518 else
2519 LDSHARED="ld -Bshareable"
2520 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002521 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002522 *) LDSHARED="ld";;
2523 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002524fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002525echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002526# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002527# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002528echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002529echo "configure:2530: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002530if test -z "$CCSHARED"
2531then
Guido van Rossum07397971997-04-29 21:49:50 +00002532 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002533 hp*|HP*) if test "$GCC" = yes;
2534 then CCSHARED="-fpic";
2535 else CCSHARED="+z";
2536 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002537 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002538 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002539 FreeBSD*|OpenBSD*) CCSHARED="-fpic";;
2540 NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002541 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002542 IRIX*/6*) case $CC in
2543 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002544 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002545 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002546 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002547fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002548echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002549# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002550# the python executable -- this is only needed for a few systems
2551echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002552echo "configure:2553: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002553if test -z "$LINKFORSHARED"
2554then
Guido van Rossum07397971997-04-29 21:49:50 +00002555 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002556 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002557 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002558 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002559 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossuma8acf721999-04-27 22:06:08 +00002560 FreeBSD/[34]*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002561 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002562 # -u libsys_s pulls in all symbols in libsys
2563 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2564 # -u __dummy makes the linker aware of the objc runtime
2565 # in System.framework; otherwise, __objcInit (referenced in
2566 # crt1.o) gets erroneously defined as common, which breaks dynamic
2567 # loading of any modules which reference it in System.framework
2568 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002569 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002570 NetBSD*)
2571 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2572 then
2573 LINKFORSHARED="-Wl,--export-dynamic"
2574 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002575 SunOS/5*) case $CC in
2576 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002577 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002578 then
2579 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002580 fi;;
2581 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002582 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002583fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002584echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002585
Guido van Rossum627b2d71993-12-24 10:39:16 +00002586# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002587echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002588echo "configure:2589: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002589ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002590if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002591 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002592else
2593 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002594LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002595cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002596#line 2597 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002597#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002598/* Override any gcc2 internal prototype to avoid an error. */
2599/* We use char because int might match the return type of a gcc2
2600 builtin and then its argument prototype would still apply. */
2601char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002602
Guido van Rossumf78abae1997-01-21 22:02:36 +00002603int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604dlopen()
2605; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002606EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002607if { (eval echo configure:2608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002608 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002609 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002610else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002611 echo "configure: failed program was:" >&5
2612 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002614 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002615fi
2616rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002618
Guido van Rossum627b2d71993-12-24 10:39:16 +00002619fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002620if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002621 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002622 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2623 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002624 cat >> confdefs.h <<EOF
2625#define $ac_tr_lib 1
2626EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002627
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002628 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002629
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002630else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002631 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002632fi
2633 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002634echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002635echo "configure:2636: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002636ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002637if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002638 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002639else
2640 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002641LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002642cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002643#line 2644 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002644#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002645/* Override any gcc2 internal prototype to avoid an error. */
2646/* We use char because int might match the return type of a gcc2
2647 builtin and then its argument prototype would still apply. */
2648char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002649
Guido van Rossumf78abae1997-01-21 22:02:36 +00002650int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002651shl_load()
2652; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002653EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002654if { (eval echo configure:2655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002655 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002656 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002657else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002658 echo "configure: failed program was:" >&5
2659 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002660 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002661 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002662fi
2663rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002664LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002665
Guido van Rossum627b2d71993-12-24 10:39:16 +00002666fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002667if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002668 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002669 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2670 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002671 cat >> confdefs.h <<EOF
2672#define $ac_tr_lib 1
2673EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002674
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002675 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002676
2677else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002678 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679fi
2680 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002681
2682# checks for system dependent C++ extensions support
2683case "$ac_sys_system" in
2684 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002685echo "configure:2686: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002686 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002687#line 2688 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002688#include "confdefs.h"
2689#include "/usr/lpp/xlC/include/load.h"
2690int main() {
2691loadAndInit("", 0, "")
2692; return 0; }
2693EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002694if { (eval echo configure:2695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002695 rm -rf conftest*
2696 cat >> confdefs.h <<\EOF
2697#define AIX_GENUINE_CPLUSPLUS 1
2698EOF
2699
2700 echo "$ac_t""yes" 1>&6
2701else
2702 echo "configure: failed program was:" >&5
2703 cat conftest.$ac_ext >&5
2704 rm -rf conftest*
2705 echo "$ac_t""no" 1>&6
2706fi
2707rm -f conftest*;;
2708 *) ;;
2709esac
2710
Guido van Rossum70c7f481998-03-26 18:44:10 +00002711# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2712# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002713# BeOS' sockets are stashed in libnet.
2714case "$ac_sys_system" in
2715IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002716*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002717echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002718echo "configure:2719: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002719ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002720if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002721 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002722else
2723 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002724LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002725cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002726#line 2727 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002727#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002728/* Override any gcc2 internal prototype to avoid an error. */
2729/* We use char because int might match the return type of a gcc2
2730 builtin and then its argument prototype would still apply. */
2731char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002732
Guido van Rossumf78abae1997-01-21 22:02:36 +00002733int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002734t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002735; return 0; }
2736EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002737if { (eval echo configure:2738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002738 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002739 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002740else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002741 echo "configure: failed program was:" >&5
2742 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002743 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002744 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002745fi
2746rm -f conftest*
2747LIBS="$ac_save_LIBS"
2748
2749fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002750if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002751 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002752 LIBS="-lnsl $LIBS"
2753else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002754 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002755fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002756 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002757echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002758echo "configure:2759: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002759ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002760if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002761 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002762else
2763 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002764LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002765cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002766#line 2767 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002767#include "confdefs.h"
2768/* Override any gcc2 internal prototype to avoid an error. */
2769/* We use char because int might match the return type of a gcc2
2770 builtin and then its argument prototype would still apply. */
2771char socket();
2772
2773int main() {
2774socket()
2775; return 0; }
2776EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002777if { (eval echo configure:2778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002778 rm -rf conftest*
2779 eval "ac_cv_lib_$ac_lib_var=yes"
2780else
2781 echo "configure: failed program was:" >&5
2782 cat conftest.$ac_ext >&5
2783 rm -rf conftest*
2784 eval "ac_cv_lib_$ac_lib_var=no"
2785fi
2786rm -f conftest*
2787LIBS="$ac_save_LIBS"
2788
2789fi
2790if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2791 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002792 LIBS="-lsocket $LIBS"
2793else
2794 echo "$ac_t""no" 1>&6
2795fi
2796 # SVR4 sockets
2797echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002798echo "configure:2799: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002799ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002800if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002801 echo $ac_n "(cached) $ac_c" 1>&6
2802else
2803 ac_save_LIBS="$LIBS"
2804LIBS="-lnet $LIBS $LIBS"
2805cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002806#line 2807 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002807#include "confdefs.h"
2808/* Override any gcc2 internal prototype to avoid an error. */
2809/* We use char because int might match the return type of a gcc2
2810 builtin and then its argument prototype would still apply. */
2811char socket();
2812
2813int main() {
2814socket()
2815; return 0; }
2816EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002817if { (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002818 rm -rf conftest*
2819 eval "ac_cv_lib_$ac_lib_var=yes"
2820else
2821 echo "configure: failed program was:" >&5
2822 cat conftest.$ac_ext >&5
2823 rm -rf conftest*
2824 eval "ac_cv_lib_$ac_lib_var=no"
2825fi
2826rm -f conftest*
2827LIBS="$ac_save_LIBS"
2828
2829fi
2830if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2831 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002832 LIBS="-lnet $LIBS"
2833else
2834 echo "$ac_t""no" 1>&6
2835fi
2836 # BeOS
2837;;
2838esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00002839
Guido van Rossuma68acba1996-07-31 17:36:39 +00002840echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002841echo "configure:2842: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00002842# Check whether --with-libs or --without-libs was given.
2843if test "${with_libs+set}" = set; then
2844 withval="$with_libs"
2845
2846echo "$ac_t""$withval" 1>&6
2847LIBS="$withval $LIBS"
2848
2849else
2850 echo "$ac_t""no" 1>&6
2851fi
2852
Guido van Rossum7f43da71994-08-01 12:15:30 +00002853
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002854echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002855echo "configure:2856: checking for --with(out)-readline" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002856# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002857if test "${with_readline+set}" = set; then
2858 withval="$with_readline"
Guido van Rossumb06df271997-08-05 21:50:20 +00002859 echo "$ac_t""$withval" 1>&6
2860{ echo "configure: error: --with(out)-readline is obsolete" 1>&2; exit 1; }
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002861else
Guido van Rossumb06df271997-08-05 21:50:20 +00002862 echo "$ac_t""not specified." 1>&6
Guido van Rossum3c83bb41996-12-31 22:35:16 +00002863fi
2864
Guido van Rossum7f43da71994-08-01 12:15:30 +00002865
Guido van Rossum009f7871997-12-04 00:51:42 +00002866
Barry Warsawc0d24d82000-06-29 16:12:00 +00002867USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00002868
Guido van Rossumec2f0731997-01-22 20:54:01 +00002869echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002870echo "configure:2871: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002871
2872# Check whether --with-dec-threads or --without-dec-threads was given.
2873if test "${with_dec_threads+set}" = set; then
2874 withval="$with_dec_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00002875
2876echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00002877LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00002878if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00002879 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00002880fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00002881else
2882 echo "$ac_t""no" 1>&6
2883fi
2884
2885
2886echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002887echo "configure:2888: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00002888# Check whether --with-threads or --without-threads was given.
2889if test "${with_threads+set}" = set; then
2890 withval="$with_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00002891 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00002892fi
2893
2894
Barry Warsawc0d24d82000-06-29 16:12:00 +00002895# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002896# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002897if test "${with_thread+set}" = set; then
2898 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00002899
2900with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00002901fi
Barry Warsawc0d24d82000-06-29 16:12:00 +00002902
2903
2904if test -z "$with_threads"
2905then with_threads="yes"
2906fi
2907echo "$ac_t""$with_threads" 1>&6
2908
2909if test "$with_threads" = "no"
2910then
2911 USE_THREAD_MODULE="#"
2912else
2913 if test -d "$with_threads"
2914 then LDFLAGS="$LDFLAGS -L$with_threads"
2915 fi
2916 if test -d "$withval"
2917 then LDFLAGS="$LDFLAGS -L$withval"
2918 fi
2919 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00002920#define _REENTRANT 1
2921EOF
2922
Barry Warsawc0d24d82000-06-29 16:12:00 +00002923 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002924echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002925echo "configure:2926: checking for mach/cthreads.h" >&5
2926if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002927 echo $ac_n "(cached) $ac_c" 1>&6
2928else
2929 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002930#line 2931 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002931#include "confdefs.h"
2932#include <mach/cthreads.h>
2933EOF
2934ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002935{ (eval echo configure:2936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002936ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002937if test -z "$ac_err"; then
2938 rm -rf conftest*
2939 eval "ac_cv_header_$ac_safe=yes"
2940else
2941 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002942 echo "configure: failed program was:" >&5
2943 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002944 rm -rf conftest*
2945 eval "ac_cv_header_$ac_safe=no"
2946fi
2947rm -f conftest*
2948fi
2949if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2950 echo "$ac_t""yes" 1>&6
2951 cat >> confdefs.h <<\EOF
2952#define WITH_THREAD 1
2953EOF
2954
Barry Warsawc0d24d82000-06-29 16:12:00 +00002955 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002956#define C_THREADS 1
2957EOF
2958
Barry Warsawc0d24d82000-06-29 16:12:00 +00002959 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002960else
2961 echo "$ac_t""no" 1>&6
2962
Barry Warsawc0d24d82000-06-29 16:12:00 +00002963 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002964echo "configure:2965: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00002965ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002966if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00002967 echo $ac_n "(cached) $ac_c" 1>&6
2968else
2969 ac_save_LIBS="$LIBS"
2970LIBS="-lpthread $LIBS"
2971cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002972#line 2973 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00002973#include "confdefs.h"
2974/* Override any gcc2 internal prototype to avoid an error. */
2975/* We use char because int might match the return type of a gcc2
2976 builtin and then its argument prototype would still apply. */
2977char pthread_create();
2978
2979int main() {
2980pthread_create()
2981; return 0; }
2982EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00002983if { (eval echo configure:2984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00002984 rm -rf conftest*
2985 eval "ac_cv_lib_$ac_lib_var=yes"
2986else
2987 echo "configure: failed program was:" >&5
2988 cat conftest.$ac_ext >&5
2989 rm -rf conftest*
2990 eval "ac_cv_lib_$ac_lib_var=no"
2991fi
2992rm -f conftest*
2993LIBS="$ac_save_LIBS"
2994
2995fi
2996if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2997 echo "$ac_t""yes" 1>&6
2998 cat >> confdefs.h <<\EOF
2999#define WITH_THREAD 1
3000EOF
3001
Barry Warsawc0d24d82000-06-29 16:12:00 +00003002 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003003#define _POSIX_THREADS 1
3004EOF
3005
Barry Warsawc0d24d82000-06-29 16:12:00 +00003006 LIBS="-lpthread $LIBS"
3007 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003008else
3009 echo "$ac_t""no" 1>&6
3010
Barry Warsawc0d24d82000-06-29 16:12:00 +00003011 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003012echo "configure:3013: checking for pthread_detach" >&5
3013if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003014 echo $ac_n "(cached) $ac_c" 1>&6
3015else
3016 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003017#line 3018 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003018#include "confdefs.h"
3019/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003020 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003021#include <assert.h>
3022/* Override any gcc2 internal prototype to avoid an error. */
3023/* We use char because int might match the return type of a gcc2
3024 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003025char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003026
3027int main() {
3028
3029/* The GNU C library defines this for functions which it implements
3030 to always fail with ENOSYS. Some functions are actually named
3031 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003032#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003033choke me
3034#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003035pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003036#endif
3037
3038; return 0; }
3039EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003040if { (eval echo configure:3041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003041 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003042 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003043else
3044 echo "configure: failed program was:" >&5
3045 cat conftest.$ac_ext >&5
3046 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003047 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003048fi
3049rm -f conftest*
3050fi
3051
Guido van Rossumea516321998-12-17 18:08:55 +00003052if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003053 echo "$ac_t""yes" 1>&6
3054 cat >> confdefs.h <<\EOF
3055#define WITH_THREAD 1
3056EOF
3057
Barry Warsawc0d24d82000-06-29 16:12:00 +00003058 cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003059#define _POSIX_THREADS 1
3060EOF
3061
Barry Warsawc0d24d82000-06-29 16:12:00 +00003062 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003063else
3064 echo "$ac_t""no" 1>&6
3065
Barry Warsawc0d24d82000-06-29 16:12:00 +00003066 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003067echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003068echo "configure:3069: checking for kernel/OS.h" >&5
3069if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003070 echo $ac_n "(cached) $ac_c" 1>&6
3071else
3072 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003073#line 3074 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003074#include "confdefs.h"
3075#include <kernel/OS.h>
3076EOF
3077ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003078{ (eval echo configure:3079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003079ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003080if test -z "$ac_err"; then
3081 rm -rf conftest*
3082 eval "ac_cv_header_$ac_safe=yes"
3083else
3084 echo "$ac_err" >&5
3085 echo "configure: failed program was:" >&5
3086 cat conftest.$ac_ext >&5
3087 rm -rf conftest*
3088 eval "ac_cv_header_$ac_safe=no"
3089fi
3090rm -f conftest*
3091fi
3092if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3093 echo "$ac_t""yes" 1>&6
3094 cat >> confdefs.h <<\EOF
3095#define WITH_THREAD 1
3096EOF
3097
Barry Warsawc0d24d82000-06-29 16:12:00 +00003098 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003099#define BEOS_THREADS 1
3100EOF
3101
Barry Warsawc0d24d82000-06-29 16:12:00 +00003102 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003103else
3104 echo "$ac_t""no" 1>&6
3105
Barry Warsawc0d24d82000-06-29 16:12:00 +00003106 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003107echo "configure:3108: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003108ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003109if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003110 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003111else
3112 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003113LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003114cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003115#line 3116 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003116#include "confdefs.h"
3117/* Override any gcc2 internal prototype to avoid an error. */
3118/* We use char because int might match the return type of a gcc2
3119 builtin and then its argument prototype would still apply. */
3120char pthread_create();
3121
3122int main() {
3123pthread_create()
3124; return 0; }
3125EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003126if { (eval echo configure:3127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003127 rm -rf conftest*
3128 eval "ac_cv_lib_$ac_lib_var=yes"
3129else
3130 echo "configure: failed program was:" >&5
3131 cat conftest.$ac_ext >&5
3132 rm -rf conftest*
3133 eval "ac_cv_lib_$ac_lib_var=no"
3134fi
3135rm -f conftest*
3136LIBS="$ac_save_LIBS"
3137
3138fi
3139if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3140 echo "$ac_t""yes" 1>&6
3141 cat >> confdefs.h <<\EOF
3142#define WITH_THREAD 1
3143EOF
3144
3145 cat >> confdefs.h <<\EOF
3146#define _POSIX_THREADS 1
3147EOF
3148
3149 LIBS="$LIBS -lpthreads"
3150 LIBOBJS="$LIBOBJS thread.o"
3151else
3152 echo "$ac_t""no" 1>&6
3153
3154 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003155echo "configure:3156: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003156ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003157if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003158 echo $ac_n "(cached) $ac_c" 1>&6
3159else
3160 ac_save_LIBS="$LIBS"
3161LIBS="-lc_r $LIBS"
3162cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003163#line 3164 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003164#include "confdefs.h"
3165/* Override any gcc2 internal prototype to avoid an error. */
3166/* We use char because int might match the return type of a gcc2
3167 builtin and then its argument prototype would still apply. */
3168char pthread_create();
3169
3170int main() {
3171pthread_create()
3172; return 0; }
3173EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003174if { (eval echo configure:3175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003175 rm -rf conftest*
3176 eval "ac_cv_lib_$ac_lib_var=yes"
3177else
3178 echo "configure: failed program was:" >&5
3179 cat conftest.$ac_ext >&5
3180 rm -rf conftest*
3181 eval "ac_cv_lib_$ac_lib_var=no"
3182fi
3183rm -f conftest*
3184LIBS="$ac_save_LIBS"
3185
3186fi
3187if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3188 echo "$ac_t""yes" 1>&6
3189 cat >> confdefs.h <<\EOF
3190#define WITH_THREAD 1
3191EOF
3192
Barry Warsawc0d24d82000-06-29 16:12:00 +00003193 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003194#define _POSIX_THREADS 1
3195EOF
3196
Greg Steinadf63d62000-07-05 10:38:09 +00003197 LIBS="$LIBS -lc_r"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003198 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003199else
3200 echo "$ac_t""no" 1>&6
3201
Greg Steinadf63d62000-07-05 10:38:09 +00003202 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003203echo "configure:3204: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003204ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003205if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003206 echo $ac_n "(cached) $ac_c" 1>&6
3207else
3208 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003209LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003210cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003211#line 3212 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003212#include "confdefs.h"
3213/* Override any gcc2 internal prototype to avoid an error. */
3214/* We use char because int might match the return type of a gcc2
3215 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003216char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003217
3218int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003219__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003220; return 0; }
3221EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003222if { (eval echo configure:3223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003223 rm -rf conftest*
3224 eval "ac_cv_lib_$ac_lib_var=yes"
3225else
3226 echo "configure: failed program was:" >&5
3227 cat conftest.$ac_ext >&5
3228 rm -rf conftest*
3229 eval "ac_cv_lib_$ac_lib_var=no"
3230fi
3231rm -f conftest*
3232LIBS="$ac_save_LIBS"
3233
3234fi
3235if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3236 echo "$ac_t""yes" 1>&6
3237 cat >> confdefs.h <<\EOF
3238#define WITH_THREAD 1
3239EOF
3240
Barry Warsawc0d24d82000-06-29 16:12:00 +00003241 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003242#define _POSIX_THREADS 1
3243EOF
3244
Greg Steinadf63d62000-07-05 10:38:09 +00003245 LIBS="$LIBS -lthread"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003246 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003247else
3248 echo "$ac_t""no" 1>&6
3249
Greg Steinadf63d62000-07-05 10:38:09 +00003250 echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003251echo "configure:3252: checking for pth_init in -lpth" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003252ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003253if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00003254 echo $ac_n "(cached) $ac_c" 1>&6
3255else
3256 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003257LIBS="-lpth $LIBS"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003258cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003259#line 3260 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003260#include "confdefs.h"
3261/* Override any gcc2 internal prototype to avoid an error. */
3262/* We use char because int might match the return type of a gcc2
3263 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003264char pth_init();
Guido van Rossum0be3e491997-05-22 20:33:33 +00003265
3266int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003267pth_init()
Guido van Rossum0be3e491997-05-22 20:33:33 +00003268; return 0; }
3269EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003270if { (eval echo configure:3271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00003271 rm -rf conftest*
3272 eval "ac_cv_lib_$ac_lib_var=yes"
3273else
3274 echo "configure: failed program was:" >&5
3275 cat conftest.$ac_ext >&5
3276 rm -rf conftest*
3277 eval "ac_cv_lib_$ac_lib_var=no"
3278fi
3279rm -f conftest*
3280LIBS="$ac_save_LIBS"
3281
3282fi
3283if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3284 echo "$ac_t""yes" 1>&6
3285 cat >> confdefs.h <<\EOF
3286#define WITH_THREAD 1
3287EOF
3288
Barry Warsawc0d24d82000-06-29 16:12:00 +00003289 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003290#define _GNU_PTH 1
Guido van Rossum0be3e491997-05-22 20:33:33 +00003291EOF
3292
Greg Steinadf63d62000-07-05 10:38:09 +00003293 LIBS="-lpth $LIBS"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003294 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003295else
3296 echo "$ac_t""no" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003297
Barry Warsawc0d24d82000-06-29 16:12:00 +00003298 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003299echo "configure:3300: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003300ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003301if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003302 echo $ac_n "(cached) $ac_c" 1>&6
3303else
3304 ac_save_LIBS="$LIBS"
3305LIBS="-lcma $LIBS"
3306cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003307#line 3308 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003308#include "confdefs.h"
3309/* Override any gcc2 internal prototype to avoid an error. */
3310/* We use char because int might match the return type of a gcc2
3311 builtin and then its argument prototype would still apply. */
3312char pthread_create();
3313
3314int main() {
3315pthread_create()
3316; return 0; }
3317EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003318if { (eval echo configure:3319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003319 rm -rf conftest*
3320 eval "ac_cv_lib_$ac_lib_var=yes"
3321else
3322 echo "configure: failed program was:" >&5
3323 cat conftest.$ac_ext >&5
3324 rm -rf conftest*
3325 eval "ac_cv_lib_$ac_lib_var=no"
3326fi
3327rm -f conftest*
3328LIBS="$ac_save_LIBS"
3329
3330fi
3331if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3332 echo "$ac_t""yes" 1>&6
3333 cat >> confdefs.h <<\EOF
3334#define WITH_THREAD 1
3335EOF
3336
Barry Warsawc0d24d82000-06-29 16:12:00 +00003337 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003338#define _POSIX_THREADS 1
3339EOF
3340
Barry Warsawc0d24d82000-06-29 16:12:00 +00003341 LIBS="$LIBS -lcma"
3342 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003343else
3344 echo "$ac_t""no" 1>&6
Guido van Rossum2d38f911996-06-26 19:47:01 +00003345fi
3346
Barry Warsawc0d24d82000-06-29 16:12:00 +00003347
Guido van Rossum627b2d71993-12-24 10:39:16 +00003348fi
3349
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003350fi
3351
Guido van Rossum0be3e491997-05-22 20:33:33 +00003352fi
3353
Guido van Rossum49545951997-12-02 19:28:29 +00003354fi
3355
Guido van Rossumb93a8621998-05-07 13:27:32 +00003356fi
3357
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003358fi
3359
Guido van Rossumad678af1998-10-02 14:42:15 +00003360fi
3361
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003362fi
3363
Guido van Rossum0be3e491997-05-22 20:33:33 +00003364
Barry Warsawc0d24d82000-06-29 16:12:00 +00003365 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003366echo "configure:3367: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003367ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003368if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003369 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003370else
3371 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003372LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003373cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003374#line 3375 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003375#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003376/* Override any gcc2 internal prototype to avoid an error. */
3377/* We use char because int might match the return type of a gcc2
3378 builtin and then its argument prototype would still apply. */
3379char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003380
Guido van Rossumf78abae1997-01-21 22:02:36 +00003381int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003382usconfig()
3383; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003384EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003385if { (eval echo configure:3386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003386 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003387 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003388else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003389 echo "configure: failed program was:" >&5
3390 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003391 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003392 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003393fi
3394rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003395LIBS="$ac_save_LIBS"
3396
3397fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003398if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003399 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003400 cat >> confdefs.h <<\EOF
3401#define WITH_THREAD 1
3402EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003403
Barry Warsawc0d24d82000-06-29 16:12:00 +00003404 LIBS="$LIBS -lmpc"
3405 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003406else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003407 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003408fi
3409
Barry Warsawc0d24d82000-06-29 16:12:00 +00003410 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003411echo "configure:3412: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003412ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003413if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003414 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003415else
3416 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003417LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003418cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003419#line 3420 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003420#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003421/* Override any gcc2 internal prototype to avoid an error. */
3422/* We use char because int might match the return type of a gcc2
3423 builtin and then its argument prototype would still apply. */
3424char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003425
Guido van Rossumf78abae1997-01-21 22:02:36 +00003426int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003427thr_create()
3428; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003429EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003430if { (eval echo configure:3431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003431 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003432 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003433else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003434 echo "configure: failed program was:" >&5
3435 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003436 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003437 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003438fi
3439rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003440LIBS="$ac_save_LIBS"
3441
3442fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003443if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003444 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003445 cat >> confdefs.h <<\EOF
3446#define WITH_THREAD 1
3447EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003448
Barry Warsawc0d24d82000-06-29 16:12:00 +00003449 LIBS="$LIBS -lthread"
3450 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003451else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003452 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003453fi
3454
Guido van Rossum627b2d71993-12-24 10:39:16 +00003455fi
3456
Barry Warsawef82cd72000-06-30 16:21:01 +00003457# Check for GC support
3458
3459USE_GC_MODULE=""
3460echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003461echo "configure:3462: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003462# Check whether --with-cycle-gc or --without-cycle-gc was given.
3463if test "${with_cycle_gc+set}" = set; then
3464 withval="$with_cycle_gc"
3465 :
3466fi
3467
3468
3469if test -z "$with_cycle_gc"
3470then with_cycle_gc="yes"
3471fi
3472if test "$with_cycle_gc" = "no"
3473then
3474 USE_GC_MODULE="#"
3475else
3476 cat >> confdefs.h <<\EOF
3477#define WITH_CYCLE_GC 1
3478EOF
3479
3480fi
3481echo "$ac_t""$with_cycle_gc" 1>&6
3482
3483# Check for --with-wctype-functions
3484echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003485echo "configure:3486: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003486# Check whether --with-wctype-functions or --without-wctype-functions was given.
3487if test "${with_wctype_functions+set}" = set; then
3488 withval="$with_wctype_functions"
3489
3490if test "$withval" != no
3491then cat >> confdefs.h <<\EOF
3492#define WANT_WCTYPE_FUNCTIONS 1
3493EOF
3494 echo "$ac_t""yes" 1>&6
3495else echo "$ac_t""no" 1>&6
3496fi
3497else
3498 echo "$ac_t""no" 1>&6
3499fi
3500
3501
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003502# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00003503
3504DLINCLDIR=/
3505
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003506echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003507echo "configure:3508: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003508# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003509if test "${with_sgi_dl+set}" = set; then
3510 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003511
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003512echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003513cat >> confdefs.h <<\EOF
3514#define WITH_SGI_DL 1
3515EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003516
Guido van Rossume97ee181999-12-20 21:27:22 +00003517DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003518dldir=$withval
3519if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003520then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003521else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003522fi
3523DLINCLDIR=${dldir}
3524LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003525else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003526 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003527fi
3528
3529
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003530echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003531echo "configure:3532: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003532# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003533if test "${with_dl_dld+set}" = set; then
3534 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003535
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003536echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003537cat >> confdefs.h <<\EOF
3538#define WITH_DL_DLD 1
3539EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003540
Guido van Rossume97ee181999-12-20 21:27:22 +00003541DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003542dldir=`echo "$withval" | sed 's/,.*//'`
3543dlddir=`echo "$withval" | sed 's/.*,//'`
3544if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003545then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003546else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003547fi
3548DLINCLDIR=${dldir}
3549LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003550else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003551 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003552fi
3553
3554
Guido van Rossume97ee181999-12-20 21:27:22 +00003555# the dlopen() function means we might want to use dynload_shlib.o. some
3556# platforms, such as AIX, have dlopen(), but don't want to use it.
3557echo $ac_n "checking for dlopen""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003558echo "configure:3559: checking for dlopen" >&5
3559if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003560 echo $ac_n "(cached) $ac_c" 1>&6
3561else
3562 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003563#line 3564 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00003564#include "confdefs.h"
3565/* System header to define __stub macros and hopefully few prototypes,
3566 which can conflict with char dlopen(); below. */
3567#include <assert.h>
3568/* Override any gcc2 internal prototype to avoid an error. */
3569/* We use char because int might match the return type of a gcc2
3570 builtin and then its argument prototype would still apply. */
3571char dlopen();
3572
3573int main() {
3574
3575/* The GNU C library defines this for functions which it implements
3576 to always fail with ENOSYS. Some functions are actually named
3577 something starting with __ and the normal name is an alias. */
3578#if defined (__stub_dlopen) || defined (__stub___dlopen)
3579choke me
3580#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003581dlopen();
Guido van Rossume97ee181999-12-20 21:27:22 +00003582#endif
3583
3584; return 0; }
3585EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003586if { (eval echo configure:3587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003587 rm -rf conftest*
3588 eval "ac_cv_func_dlopen=yes"
3589else
3590 echo "configure: failed program was:" >&5
3591 cat conftest.$ac_ext >&5
3592 rm -rf conftest*
3593 eval "ac_cv_func_dlopen=no"
3594fi
3595rm -f conftest*
3596fi
3597
3598if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
3599 echo "$ac_t""yes" 1>&6
3600 :
3601else
3602 echo "$ac_t""no" 1>&6
3603fi
3604
3605
3606# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3607# loading of modules.
3608
3609echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003610echo "configure:3611: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00003611if test -z "$DYNLOADFILE"
3612then
3613 case $ac_sys_system/$ac_sys_release in
3614 AIX*) DYNLOADFILE="dynload_aix.o";;
3615 BeOS*) DYNLOADFILE="dynload_beos.o";;
3616 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
3617 next/*) DYNLOADFILE="dynload_next.o";;
3618 *)
3619 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
3620 # out any dynamic loading
3621 if test "$ac_cv_func_dlopen" = yes
3622 then DYNLOADFILE="dynload_shlib.o"
3623 else DYNLOADFILE="dynload_stub.o"
3624 fi
3625 ;;
3626 esac
3627fi
3628echo "$ac_t""$DYNLOADFILE" 1>&6
3629if test "$DYNLOADFILE" != "dynload_stub.o"
3630then
3631 cat >> confdefs.h <<\EOF
3632#define HAVE_DYNAMIC_LOADING 1
3633EOF
3634
3635fi
3636
Guido van Rossum627b2d71993-12-24 10:39:16 +00003637# checks for library functions
Fred Drake35a092f1999-12-13 16:23:35 +00003638for ac_func in alarm chown clock confstr ctermid ctermid_r dlopen execv \
3639 flock fork fsync fdatasync fpathconf ftime ftruncate \
Fred Drakef581db11999-12-14 21:11:47 +00003640 getgroups getlogin getpeername getpgrp getpid getpwent gettimeofday getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00003641 kill link lstat mkfifo mktime mremap \
3642 nice pathconf pause plock pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00003643 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003644 select setegid seteuid setgid \
3645 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00003646 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00003647 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
3648 truncate uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00003649do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003650echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003651echo "configure:3652: checking for $ac_func" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003652if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003653 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003654else
3655 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003656#line 3657 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003657#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003658/* System header to define __stub macros and hopefully few prototypes,
3659 which can conflict with char $ac_func(); below. */
3660#include <assert.h>
3661/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003662/* We use char because int might match the return type of a gcc2
3663 builtin and then its argument prototype would still apply. */
3664char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003665
Guido van Rossumf78abae1997-01-21 22:02:36 +00003666int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003667
Guido van Rossum627b2d71993-12-24 10:39:16 +00003668/* The GNU C library defines this for functions which it implements
3669 to always fail with ENOSYS. Some functions are actually named
3670 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003671#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003672choke me
3673#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003674$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003675#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003676
Guido van Rossum7f43da71994-08-01 12:15:30 +00003677; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003678EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003679if { (eval echo configure:3680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003680 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003681 eval "ac_cv_func_$ac_func=yes"
3682else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003683 echo "configure: failed program was:" >&5
3684 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003685 rm -rf conftest*
3686 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003687fi
3688rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003689fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003690
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003691if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003692 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003693 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003694 cat >> confdefs.h <<EOF
3695#define $ac_tr_func 1
3696EOF
3697
3698else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003699 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003700fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003701done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003702
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003703
Fred Drake8cef4cf2000-06-28 16:40:38 +00003704# check for openpty and forkpty
3705
3706for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003707do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003708echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003709echo "configure:3710: checking for $ac_func" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003710if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003711 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003712else
3713 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003714#line 3715 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003715#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003716/* System header to define __stub macros and hopefully few prototypes,
3717 which can conflict with char $ac_func(); below. */
3718#include <assert.h>
3719/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003720/* We use char because int might match the return type of a gcc2
3721 builtin and then its argument prototype would still apply. */
3722char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003723
Guido van Rossumf78abae1997-01-21 22:02:36 +00003724int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003725
Guido van Rossum627b2d71993-12-24 10:39:16 +00003726/* The GNU C library defines this for functions which it implements
3727 to always fail with ENOSYS. Some functions are actually named
3728 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003729#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003730choke me
3731#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003732$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003733#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003734
Guido van Rossum7f43da71994-08-01 12:15:30 +00003735; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003736EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003737if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003738 rm -rf conftest*
3739 eval "ac_cv_func_$ac_func=yes"
3740else
3741 echo "configure: failed program was:" >&5
3742 cat conftest.$ac_ext >&5
3743 rm -rf conftest*
3744 eval "ac_cv_func_$ac_func=no"
3745fi
3746rm -f conftest*
3747fi
3748
3749if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3750 echo "$ac_t""yes" 1>&6
3751 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3752 cat >> confdefs.h <<EOF
3753#define $ac_tr_func 1
3754EOF
3755
3756else
3757 echo "$ac_t""no" 1>&6
3758echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003759echo "configure:3760: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00003760ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003761if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003762 echo $ac_n "(cached) $ac_c" 1>&6
3763else
3764 ac_save_LIBS="$LIBS"
3765LIBS="-lutil $LIBS"
3766cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003767#line 3768 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00003768#include "confdefs.h"
3769/* Override any gcc2 internal prototype to avoid an error. */
3770/* We use char because int might match the return type of a gcc2
3771 builtin and then its argument prototype would still apply. */
3772char openpty();
3773
3774int main() {
3775openpty()
3776; return 0; }
3777EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003778if { (eval echo configure:3779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003779 rm -rf conftest*
3780 eval "ac_cv_lib_$ac_lib_var=yes"
3781else
3782 echo "configure: failed program was:" >&5
3783 cat conftest.$ac_ext >&5
3784 rm -rf conftest*
3785 eval "ac_cv_lib_$ac_lib_var=no"
3786fi
3787rm -f conftest*
3788LIBS="$ac_save_LIBS"
3789
3790fi
3791if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3792 echo "$ac_t""yes" 1>&6
3793 cat >> confdefs.h <<\EOF
3794#define HAVE_OPENPTY 1
3795EOF
3796 LIBS="$LIBS -lutil"
3797else
3798 echo "$ac_t""no" 1>&6
3799fi
3800
3801fi
3802done
3803
3804for ac_func in forkpty
3805do
3806echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003807echo "configure:3808: checking for $ac_func" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003808if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003809 echo $ac_n "(cached) $ac_c" 1>&6
3810else
3811 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003812#line 3813 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00003813#include "confdefs.h"
3814/* System header to define __stub macros and hopefully few prototypes,
3815 which can conflict with char $ac_func(); below. */
3816#include <assert.h>
3817/* Override any gcc2 internal prototype to avoid an error. */
3818/* We use char because int might match the return type of a gcc2
3819 builtin and then its argument prototype would still apply. */
3820char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00003821
3822int main() {
3823
3824/* The GNU C library defines this for functions which it implements
3825 to always fail with ENOSYS. Some functions are actually named
3826 something starting with __ and the normal name is an alias. */
3827#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3828choke me
3829#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003830$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00003831#endif
3832
3833; return 0; }
3834EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003835if { (eval echo configure:3836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003836 rm -rf conftest*
3837 eval "ac_cv_func_$ac_func=yes"
3838else
3839 echo "configure: failed program was:" >&5
3840 cat conftest.$ac_ext >&5
3841 rm -rf conftest*
3842 eval "ac_cv_func_$ac_func=no"
3843fi
3844rm -f conftest*
3845fi
3846
3847if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3848 echo "$ac_t""yes" 1>&6
3849 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3850 cat >> confdefs.h <<EOF
3851#define $ac_tr_func 1
3852EOF
3853
3854else
3855 echo "$ac_t""no" 1>&6
3856echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003857echo "configure:3858: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00003858ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003859if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003860 echo $ac_n "(cached) $ac_c" 1>&6
3861else
3862 ac_save_LIBS="$LIBS"
3863LIBS="-lutil $LIBS"
3864cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003865#line 3866 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00003866#include "confdefs.h"
3867/* Override any gcc2 internal prototype to avoid an error. */
3868/* We use char because int might match the return type of a gcc2
3869 builtin and then its argument prototype would still apply. */
3870char forkpty();
3871
3872int main() {
3873forkpty()
3874; return 0; }
3875EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003876if { (eval echo configure:3877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003877 rm -rf conftest*
3878 eval "ac_cv_lib_$ac_lib_var=yes"
3879else
3880 echo "configure: failed program was:" >&5
3881 cat conftest.$ac_ext >&5
3882 rm -rf conftest*
3883 eval "ac_cv_lib_$ac_lib_var=no"
3884fi
3885rm -f conftest*
3886LIBS="$ac_save_LIBS"
3887
3888fi
3889if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3890 echo "$ac_t""yes" 1>&6
3891 cat >> confdefs.h <<\EOF
3892#define HAVE_FORKPTY 1
3893EOF
3894 LIBS="$LIBS -lutil"
3895else
3896 echo "$ac_t""no" 1>&6
3897fi
3898
3899fi
3900done
3901
3902
3903# check for long file support functions
3904for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
3905do
3906echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003907echo "configure:3908: checking for $ac_func" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003908if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003909 echo $ac_n "(cached) $ac_c" 1>&6
3910else
3911 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003912#line 3913 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00003913#include "confdefs.h"
3914/* System header to define __stub macros and hopefully few prototypes,
3915 which can conflict with char $ac_func(); below. */
3916#include <assert.h>
3917/* Override any gcc2 internal prototype to avoid an error. */
3918/* We use char because int might match the return type of a gcc2
3919 builtin and then its argument prototype would still apply. */
3920char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00003921
3922int main() {
3923
3924/* The GNU C library defines this for functions which it implements
3925 to always fail with ENOSYS. Some functions are actually named
3926 something starting with __ and the normal name is an alias. */
3927#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3928choke me
3929#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003930$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00003931#endif
3932
3933; return 0; }
3934EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003935if { (eval echo configure:3936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003936 rm -rf conftest*
3937 eval "ac_cv_func_$ac_func=yes"
3938else
3939 echo "configure: failed program was:" >&5
3940 cat conftest.$ac_ext >&5
3941 rm -rf conftest*
3942 eval "ac_cv_func_$ac_func=no"
3943fi
3944rm -f conftest*
3945fi
3946
3947if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3948 echo "$ac_t""yes" 1>&6
3949 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3950 cat >> confdefs.h <<EOF
3951#define $ac_tr_func 1
3952EOF
3953
3954else
3955 echo "$ac_t""no" 1>&6
3956fi
3957done
3958
3959
3960for ac_func in dup2 getcwd strdup strerror memmove
3961do
3962echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003963echo "configure:3964: checking for $ac_func" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003964if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003965 echo $ac_n "(cached) $ac_c" 1>&6
3966else
3967 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003968#line 3969 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003969#include "confdefs.h"
3970/* System header to define __stub macros and hopefully few prototypes,
3971 which can conflict with char $ac_func(); below. */
3972#include <assert.h>
3973/* Override any gcc2 internal prototype to avoid an error. */
3974/* We use char because int might match the return type of a gcc2
3975 builtin and then its argument prototype would still apply. */
3976char $ac_func();
3977
3978int main() {
3979
3980/* The GNU C library defines this for functions which it implements
3981 to always fail with ENOSYS. Some functions are actually named
3982 something starting with __ and the normal name is an alias. */
3983#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3984choke me
3985#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00003986$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003987#endif
3988
3989; return 0; }
3990EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003991if { (eval echo configure:3992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003992 rm -rf conftest*
3993 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003994else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003995 echo "configure: failed program was:" >&5
3996 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00003997 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003998 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003999fi
4000rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004001fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004002
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004003if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004004 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004005 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4006 cat >> confdefs.h <<EOF
4007#define $ac_tr_func 1
4008EOF
4009
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004010else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004011 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004012LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004013fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004014done
4015
Guido van Rossumf78abae1997-01-21 22:02:36 +00004016
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004017echo $ac_n "checking for getpgrp""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004018echo "configure:4019: checking for getpgrp" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004019if eval "test \"`echo '$''{'ac_cv_func_getpgrp'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004020 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004021else
4022 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004023#line 4024 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004024#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004025/* System header to define __stub macros and hopefully few prototypes,
4026 which can conflict with char getpgrp(); below. */
4027#include <assert.h>
4028/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004029/* We use char because int might match the return type of a gcc2
4030 builtin and then its argument prototype would still apply. */
4031char getpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004032
Guido van Rossumf78abae1997-01-21 22:02:36 +00004033int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004034
Guido van Rossum627b2d71993-12-24 10:39:16 +00004035/* The GNU C library defines this for functions which it implements
4036 to always fail with ENOSYS. Some functions are actually named
4037 something starting with __ and the normal name is an alias. */
4038#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
4039choke me
4040#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004041getpgrp();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004042#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004043
4044; return 0; }
4045EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004046if { (eval echo configure:4047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004047 rm -rf conftest*
4048 eval "ac_cv_func_getpgrp=yes"
4049else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004050 echo "configure: failed program was:" >&5
4051 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004052 rm -rf conftest*
4053 eval "ac_cv_func_getpgrp=no"
4054fi
4055rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004056fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004057
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058if eval "test \"`echo '$ac_cv_func_'getpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004059 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004060 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004061#line 4062 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004062#include "confdefs.h"
4063#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004064int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004065getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004066; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004067EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004068if { (eval echo configure:4069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004069 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004070 cat >> confdefs.h <<\EOF
4071#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004072EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004073
Guido van Rossumf78abae1997-01-21 22:02:36 +00004074else
4075 echo "configure: failed program was:" >&5
4076 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004077fi
4078rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004079else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004080 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004081fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004082
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004083echo $ac_n "checking for setpgrp""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004084echo "configure:4085: checking for setpgrp" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004085if eval "test \"`echo '$''{'ac_cv_func_setpgrp'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004086 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004087else
4088 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004089#line 4090 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004090#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004091/* System header to define __stub macros and hopefully few prototypes,
4092 which can conflict with char setpgrp(); below. */
4093#include <assert.h>
4094/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004095/* We use char because int might match the return type of a gcc2
4096 builtin and then its argument prototype would still apply. */
4097char setpgrp();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004098
Guido van Rossumf78abae1997-01-21 22:02:36 +00004099int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004100
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004101/* The GNU C library defines this for functions which it implements
4102 to always fail with ENOSYS. Some functions are actually named
4103 something starting with __ and the normal name is an alias. */
4104#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
4105choke me
4106#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004107setpgrp();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004108#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004109
4110; return 0; }
4111EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004112if { (eval echo configure:4113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004113 rm -rf conftest*
4114 eval "ac_cv_func_setpgrp=yes"
4115else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004116 echo "configure: failed program was:" >&5
4117 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004118 rm -rf conftest*
4119 eval "ac_cv_func_setpgrp=no"
4120fi
4121rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004122fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004123
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004124if eval "test \"`echo '$ac_cv_func_'setpgrp`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004125 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004126 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004127#line 4128 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004128#include "confdefs.h"
4129#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004130int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004131setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004132; return 0; }
4133EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004134if { (eval echo configure:4135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004135 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004136 cat >> confdefs.h <<\EOF
4137#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004138EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004139
Guido van Rossumf78abae1997-01-21 22:02:36 +00004140else
4141 echo "configure: failed program was:" >&5
4142 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004143fi
4144rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004145else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004146 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004147fi
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004148
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004149echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004150echo "configure:4151: checking for gettimeofday" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004151if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004152 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004153else
4154 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004155#line 4156 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004156#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004157/* System header to define __stub macros and hopefully few prototypes,
4158 which can conflict with char gettimeofday(); below. */
4159#include <assert.h>
4160/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004161/* We use char because int might match the return type of a gcc2
4162 builtin and then its argument prototype would still apply. */
4163char gettimeofday();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004164
Guido van Rossumf78abae1997-01-21 22:02:36 +00004165int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004166
4167/* The GNU C library defines this for functions which it implements
4168 to always fail with ENOSYS. Some functions are actually named
4169 something starting with __ and the normal name is an alias. */
4170#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
4171choke me
4172#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004173gettimeofday();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004174#endif
4175
4176; return 0; }
4177EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004178if { (eval echo configure:4179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004179 rm -rf conftest*
4180 eval "ac_cv_func_gettimeofday=yes"
4181else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004182 echo "configure: failed program was:" >&5
4183 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004184 rm -rf conftest*
4185 eval "ac_cv_func_gettimeofday=no"
4186fi
4187rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004188fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004189
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004190if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004191 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004193#line 4194 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004194#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004195#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004196int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004197gettimeofday((struct timeval*)0,(struct timezone*)0);
4198; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004199EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004200if { (eval echo configure:4201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004201 :
4202else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004203 echo "configure: failed program was:" >&5
4204 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004205 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004206 cat >> confdefs.h <<\EOF
4207#define GETTIMEOFDAY_NO_TZ 1
4208EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004209
4210fi
4211rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004212else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004213 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004214fi
4215
4216
4217# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004218echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004219echo "configure:4220: checking whether time.h and sys/time.h may both be included" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004220if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004221 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004222else
4223 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004224#line 4225 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004225#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004226#include <sys/types.h>
4227#include <sys/time.h>
4228#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004229int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004230struct tm *tp;
4231; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004232EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +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 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004236else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004237 echo "configure: failed program was:" >&5
4238 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004239 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004241fi
4242rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004243fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004244
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004245echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004246if test $ac_cv_header_time = yes; then
4247 cat >> confdefs.h <<\EOF
4248#define TIME_WITH_SYS_TIME 1
4249EOF
4250
4251fi
4252
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004253echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004254echo "configure:4255: checking whether struct tm is in sys/time.h or time.h" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004255if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004256 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004257else
4258 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004259#line 4260 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004260#include "confdefs.h"
4261#include <sys/types.h>
4262#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004263int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004264struct tm *tp; tp->tm_sec;
4265; return 0; }
4266EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004267if { (eval echo configure:4268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268 rm -rf conftest*
4269 ac_cv_struct_tm=time.h
4270else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004271 echo "configure: failed program was:" >&5
4272 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273 rm -rf conftest*
4274 ac_cv_struct_tm=sys/time.h
4275fi
4276rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004277fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004278
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004279echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280if test $ac_cv_struct_tm = sys/time.h; then
4281 cat >> confdefs.h <<\EOF
4282#define TM_IN_SYS_TIME 1
4283EOF
4284
4285fi
4286
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004287echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004288echo "configure:4289: checking for tm_zone in struct tm" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004289if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004290 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004291else
4292 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004293#line 4294 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004294#include "confdefs.h"
4295#include <sys/types.h>
4296#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004297int main() {
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004298struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004299; return 0; }
4300EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004301if { (eval echo configure:4302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004302 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004303 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004304else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004305 echo "configure: failed program was:" >&5
4306 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004307 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004308 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004309fi
4310rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004311fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004312
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004313echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4314if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004315 cat >> confdefs.h <<\EOF
4316#define HAVE_TM_ZONE 1
4317EOF
4318
4319else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004320 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004321echo "configure:4322: checking for tzname" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004322if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004323 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004324else
4325 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004326#line 4327 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004327#include "confdefs.h"
4328#include <time.h>
4329#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004330extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004331#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004332int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004333atoi(*tzname);
4334; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004335EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004336if { (eval echo configure:4337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004337 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004338 ac_cv_var_tzname=yes
4339else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004340 echo "configure: failed program was:" >&5
4341 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004342 rm -rf conftest*
4343 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004344fi
4345rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004346fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004347
4348echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004349 if test $ac_cv_var_tzname = yes; then
4350 cat >> confdefs.h <<\EOF
4351#define HAVE_TZNAME 1
4352EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004353
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004354 fi
4355fi
4356
4357
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004358echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004359echo "configure:4360: checking for time.h that defines altzone" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004360if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004361 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004362else
4363 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004364#line 4365 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004365#include "confdefs.h"
4366#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004367int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004368return altzone;
4369; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004370EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004371if { (eval echo configure:4372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004372 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004373 ac_cv_header_time_altzone=yes
4374else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004375 echo "configure: failed program was:" >&5
4376 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004377 rm -rf conftest*
4378 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004379fi
4380rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004381fi
4382
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004383echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004384if test $ac_cv_header_time_altzone = yes; then
4385 cat >> confdefs.h <<\EOF
4386#define HAVE_ALTZONE 1
4387EOF
4388
4389fi
4390
Guido van Rossumda88dad1995-01-26 00:46:29 +00004391was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004392echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004393echo "configure:4394: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004394cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004395#line 4396 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004396#include "confdefs.h"
4397
4398#include <sys/types.h>
4399#include <sys/select.h>
4400#include <sys/time.h>
4401
Guido van Rossumf78abae1997-01-21 22:02:36 +00004402int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004403;
4404; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004405EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004406if { (eval echo configure:4407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004407 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004408 cat >> confdefs.h <<\EOF
4409#define SYS_SELECT_WITH_SYS_TIME 1
4410EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004411 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004412else
4413 echo "configure: failed program was:" >&5
4414 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004415fi
4416rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004417echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004418
4419# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004420
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004421echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004422echo "configure:4423: checking whether char is unsigned" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004423if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004424 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004425else
4426 if test "$GCC" = yes; then
4427 # GCC predefines this symbol on systems where it applies.
4428cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004429#line 4430 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004430#include "confdefs.h"
4431#ifdef __CHAR_UNSIGNED__
4432 yes
4433#endif
4434
4435EOF
4436if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4437 egrep "yes" >/dev/null 2>&1; then
4438 rm -rf conftest*
4439 ac_cv_c_char_unsigned=yes
4440else
4441 rm -rf conftest*
4442 ac_cv_c_char_unsigned=no
4443fi
4444rm -f conftest*
4445
4446else
4447if test "$cross_compiling" = yes; then
4448 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4449else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004450 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004451#line 4452 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004452#include "confdefs.h"
4453/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004454#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00004455#define volatile
4456#endif
4457main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00004458 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004459}
4460EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004461if { (eval echo configure:4462: \"$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 +00004462then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004463 ac_cv_c_char_unsigned=yes
4464else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004465 echo "configure: failed program was:" >&5
4466 cat conftest.$ac_ext >&5
4467 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004468 ac_cv_c_char_unsigned=no
4469fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004470rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004471fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004472
4473fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004474fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004475
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004476echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004477if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
4478 cat >> confdefs.h <<\EOF
4479#define __CHAR_UNSIGNED__ 1
4480EOF
4481
4482fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004483
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004484echo $ac_n "checking for working const""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004485echo "configure:4486: checking for working const" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004486if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004487 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004488else
4489 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004490#line 4491 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004491#include "confdefs.h"
4492
Guido van Rossumf78abae1997-01-21 22:02:36 +00004493int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004494
4495/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004496typedef int charset[2]; const charset x;
4497/* SunOS 4.1.1 cc rejects this. */
4498char const *const *ccp;
4499char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004500/* NEC SVR4.0.2 mips cc rejects this. */
4501struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004502static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004503/* AIX XL C 1.02.0.0 rejects this.
4504 It does not let you subtract one const X* pointer from another in an arm
4505 of an if-expression whose if-part is not a constant expression */
4506const char *g = "string";
4507ccp = &g + (g ? g-g : 0);
4508/* HPUX 7.0 cc rejects these. */
4509++ccp;
4510p = (char**) ccp;
4511ccp = (char const *const *) p;
4512{ /* SCO 3.2v4 cc rejects this. */
4513 char *t;
4514 char const *s = 0 ? (char *) 0 : (char const *) 0;
4515
4516 *t++ = 0;
4517}
4518{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004519 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004520 const int *foo = &x[0];
4521 ++foo;
4522}
4523{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4524 typedef const int *iptr;
4525 iptr p = 0;
4526 ++p;
4527}
4528{ /* AIX XL C 1.02.0.0 rejects this saying
4529 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4530 struct s { int j; const int *ap[3]; };
4531 struct s *b; b->j = 5;
4532}
4533{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4534 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004535}
4536
4537; return 0; }
4538EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004539if { (eval echo configure:4540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004540 rm -rf conftest*
4541 ac_cv_c_const=yes
4542else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004543 echo "configure: failed program was:" >&5
4544 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004545 rm -rf conftest*
4546 ac_cv_c_const=no
4547fi
4548rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004549fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004550
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004551echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004552if test $ac_cv_c_const = no; then
4553 cat >> confdefs.h <<\EOF
4554#define const
4555EOF
4556
4557fi
4558
Guido van Rossumef2255b2000-03-10 22:30:29 +00004559echo $ac_n "checking for inline""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004560echo "configure:4561: checking for inline" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004561if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004562 echo $ac_n "(cached) $ac_c" 1>&6
4563else
4564 ac_cv_c_inline=no
4565for ac_kw in inline __inline__ __inline; do
4566 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004567#line 4568 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00004568#include "confdefs.h"
4569
4570int main() {
4571} $ac_kw foo() {
4572; return 0; }
4573EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004574if { (eval echo configure:4575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004575 rm -rf conftest*
4576 ac_cv_c_inline=$ac_kw; break
4577else
4578 echo "configure: failed program was:" >&5
4579 cat conftest.$ac_ext >&5
4580fi
4581rm -f conftest*
4582done
4583
4584fi
4585
4586echo "$ac_t""$ac_cv_c_inline" 1>&6
4587case "$ac_cv_c_inline" in
4588 inline | yes) ;;
4589 no) cat >> confdefs.h <<\EOF
4590#define inline
4591EOF
4592 ;;
4593 *) cat >> confdefs.h <<EOF
4594#define inline $ac_cv_c_inline
4595EOF
4596 ;;
4597esac
4598
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004599
Guido van Rossumda88dad1995-01-26 00:46:29 +00004600works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004601echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004602echo "configure:4603: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004603cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004604#line 4605 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004605#include "confdefs.h"
4606
Guido van Rossumf78abae1997-01-21 22:02:36 +00004607int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004608volatile int x; x = 0;
4609; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004610EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004611if { (eval echo configure:4612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004612 rm -rf conftest*
4613 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004614else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004615 echo "configure: failed program was:" >&5
4616 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004617 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004618 cat >> confdefs.h <<\EOF
4619#define volatile
4620EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004621
4622fi
4623rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004624echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004625
Guido van Rossumda88dad1995-01-26 00:46:29 +00004626works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004627echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004628echo "configure:4629: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004629cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004630#line 4631 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004631#include "confdefs.h"
4632
Guido van Rossumf78abae1997-01-21 22:02:36 +00004633int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004634signed char c;
4635; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004636EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004637if { (eval echo configure:4638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004638 rm -rf conftest*
4639 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004640else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004641 echo "configure: failed program was:" >&5
4642 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004643 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004644 cat >> confdefs.h <<\EOF
4645#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00004646EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004647
4648fi
4649rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004650echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004651
Guido van Rossumda88dad1995-01-26 00:46:29 +00004652have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004653echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004654echo "configure:4655: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004655cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004656#line 4657 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004657#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004658int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00004659int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004660return foo(10);
4661; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004662EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004663if { (eval echo configure:4664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004664 rm -rf conftest*
4665 cat >> confdefs.h <<\EOF
4666#define HAVE_PROTOTYPES 1
4667EOF
4668 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004669else
4670 echo "configure: failed program was:" >&5
4671 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004672fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004673rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004674echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004675
Guido van Rossumda88dad1995-01-26 00:46:29 +00004676works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004677echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004678echo "configure:4679: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004679cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004680#line 4681 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004681#include "confdefs.h"
4682
4683#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00004684int foo(int x, ...) {
4685 va_list va;
4686 va_start(va, x);
4687 va_arg(va, int);
4688 va_arg(va, char *);
4689 va_arg(va, double);
4690 return 0;
4691}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004692
Guido van Rossumf78abae1997-01-21 22:02:36 +00004693int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00004694return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004695; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004696EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004697if { (eval echo configure:4698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004698 rm -rf conftest*
4699 cat >> confdefs.h <<\EOF
4700#define HAVE_STDARG_PROTOTYPES 1
4701EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004702 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004703else
4704 echo "configure: failed program was:" >&5
4705 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004706fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004707rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004708echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004709
Guido van Rossumda88dad1995-01-26 00:46:29 +00004710if test "$have_prototypes" = yes; then
4711bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004712echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004713echo "configure:4714: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004714cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004715#line 4716 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004716#include "confdefs.h"
4717#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004718int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004719char **t;execve("@",t,t);
4720; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004721EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004722if { (eval echo configure:4723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004723 :
4724else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004725 echo "configure: failed program was:" >&5
4726 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004727 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004728 cat >> confdefs.h <<\EOF
4729#define BAD_EXEC_PROTOTYPES 1
4730EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004731 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004732fi
4733rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004734echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004735fi
4736
Guido van Rossumda88dad1995-01-26 00:46:29 +00004737bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004738echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004739echo "configure:4740: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004740if test "$cross_compiling" = yes; then
4741 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4742else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004743 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004744#line 4745 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004745#include "confdefs.h"
4746
4747struct s { int a; int b; };
4748static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004749int foobar() {
4750 static int random;
4751 random = (int) &foo;
4752 return random;
4753}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004754static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004755main() {
4756 exit(!((int)&foo == foobar()));
4757}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004758
4759EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004760if { (eval echo configure:4761: \"$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 +00004761then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004762 :
4763else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004764 echo "configure: failed program was:" >&5
4765 cat conftest.$ac_ext >&5
4766 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004767 cat >> confdefs.h <<\EOF
4768#define BAD_STATIC_FORWARD 1
4769EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004770 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00004771fi
4772rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00004773fi
4774
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004775echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004776
Guido van Rossumda88dad1995-01-26 00:46:29 +00004777va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004778echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004779echo "configure:4780: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004780cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004781#line 4782 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004782#include "confdefs.h"
4783
4784#ifdef HAVE_STDARG_PROTOTYPES
4785#include <stdarg.h>
4786#else
4787#include <varargs.h>
4788#endif
4789
Guido van Rossumf78abae1997-01-21 22:02:36 +00004790int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004791va_list list1, list2; list1 = list2;
4792; return 0; }
4793EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004794if { (eval echo configure:4795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004795 :
4796else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004797 echo "configure: failed program was:" >&5
4798 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004799 rm -rf conftest*
4800 cat >> confdefs.h <<\EOF
4801#define VA_LIST_IS_ARRAY 1
4802EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004803 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004804fi
4805rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004806echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004807
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004808# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
4809echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004810echo "configure:4811: checking for gethostbyname_r" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004811if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004812 echo $ac_n "(cached) $ac_c" 1>&6
4813else
4814 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004815#line 4816 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004816#include "confdefs.h"
4817/* System header to define __stub macros and hopefully few prototypes,
4818 which can conflict with char gethostbyname_r(); below. */
4819#include <assert.h>
4820/* Override any gcc2 internal prototype to avoid an error. */
4821/* We use char because int might match the return type of a gcc2
4822 builtin and then its argument prototype would still apply. */
4823char gethostbyname_r();
4824
4825int main() {
4826
4827/* The GNU C library defines this for functions which it implements
4828 to always fail with ENOSYS. Some functions are actually named
4829 something starting with __ and the normal name is an alias. */
4830#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
4831choke me
4832#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004833gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004834#endif
4835
4836; return 0; }
4837EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004838if { (eval echo configure:4839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004839 rm -rf conftest*
4840 eval "ac_cv_func_gethostbyname_r=yes"
4841else
4842 echo "configure: failed program was:" >&5
4843 cat conftest.$ac_ext >&5
4844 rm -rf conftest*
4845 eval "ac_cv_func_gethostbyname_r=no"
4846fi
4847rm -f conftest*
4848fi
4849
4850if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
4851 echo "$ac_t""yes" 1>&6
4852
4853 cat >> confdefs.h <<\EOF
4854#define HAVE_GETHOSTBYNAME_R 1
4855EOF
4856
4857 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004858echo "configure:4859: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004859 OLD_CFLAGS=$CFLAGS
4860 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
4861 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004862#line 4863 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004863#include "confdefs.h"
4864
4865# include <netdb.h>
4866
4867int main() {
4868
4869 char *name;
4870 struct hostent *he, *res;
4871 char buffer[2048];
4872 int buflen = 2048;
4873 int h_errnop;
4874
4875 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
4876
4877; return 0; }
4878EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004879if { (eval echo configure:4880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004880 rm -rf conftest*
4881
4882 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004883#define HAVE_GETHOSTBYNAME_R 1
4884EOF
4885
4886 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004887#define HAVE_GETHOSTBYNAME_R_6_ARG 1
4888EOF
4889
4890 echo "$ac_t""yes" 1>&6
4891
4892else
4893 echo "configure: failed program was:" >&5
4894 cat conftest.$ac_ext >&5
4895 rm -rf conftest*
4896
4897 echo "$ac_t""no" 1>&6
4898 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004899echo "configure:4900: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004900 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004901#line 4902 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004902#include "confdefs.h"
4903
4904# include <netdb.h>
4905
4906int main() {
4907
4908 char *name;
4909 struct hostent *he;
4910 char buffer[2048];
4911 int buflen = 2048;
4912 int h_errnop;
4913
4914 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
4915
4916; return 0; }
4917EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004918if { (eval echo configure:4919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004919 rm -rf conftest*
4920
4921 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004922#define HAVE_GETHOSTBYNAME_R 1
4923EOF
4924
4925 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004926#define HAVE_GETHOSTBYNAME_R_5_ARG 1
4927EOF
4928
4929 echo "$ac_t""yes" 1>&6
4930
4931else
4932 echo "configure: failed program was:" >&5
4933 cat conftest.$ac_ext >&5
4934 rm -rf conftest*
4935
4936 echo "$ac_t""no" 1>&6
4937 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004938echo "configure:4939: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004939 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004940#line 4941 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004941#include "confdefs.h"
4942
4943# include <netdb.h>
4944
4945int main() {
4946
4947 char *name;
4948 struct hostent *he;
4949 struct hostent_data data;
4950
4951 (void) gethostbyname_r(name, he, &data);
4952
4953; return 0; }
4954EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004955if { (eval echo configure:4956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004956 rm -rf conftest*
4957
4958 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00004959#define HAVE_GETHOSTBYNAME_R 1
4960EOF
4961
4962 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004963#define HAVE_GETHOSTBYNAME_R_3_ARG 1
4964EOF
4965
4966 echo "$ac_t""yes" 1>&6
4967
4968else
4969 echo "configure: failed program was:" >&5
4970 cat conftest.$ac_ext >&5
4971 rm -rf conftest*
4972
4973 echo "$ac_t""no" 1>&6
4974
4975fi
4976rm -f conftest*
4977
4978fi
4979rm -f conftest*
4980
4981fi
4982rm -f conftest*
4983 CFLAGS=$OLD_CFLAGS
4984
4985else
4986 echo "$ac_t""no" 1>&6
4987
4988 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004989echo "configure:4990: checking for gethostbyname" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00004990if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004991 echo $ac_n "(cached) $ac_c" 1>&6
4992else
4993 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004994#line 4995 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00004995#include "confdefs.h"
4996/* System header to define __stub macros and hopefully few prototypes,
4997 which can conflict with char gethostbyname(); below. */
4998#include <assert.h>
4999/* Override any gcc2 internal prototype to avoid an error. */
5000/* We use char because int might match the return type of a gcc2
5001 builtin and then its argument prototype would still apply. */
5002char gethostbyname();
5003
5004int main() {
5005
5006/* The GNU C library defines this for functions which it implements
5007 to always fail with ENOSYS. Some functions are actually named
5008 something starting with __ and the normal name is an alias. */
5009#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5010choke me
5011#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005012gethostbyname();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005013#endif
5014
5015; return 0; }
5016EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005017if { (eval echo configure:5018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005018 rm -rf conftest*
5019 eval "ac_cv_func_gethostbyname=yes"
5020else
5021 echo "configure: failed program was:" >&5
5022 cat conftest.$ac_ext >&5
5023 rm -rf conftest*
5024 eval "ac_cv_func_gethostbyname=no"
5025fi
5026rm -f conftest*
5027fi
5028
5029if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5030 echo "$ac_t""yes" 1>&6
5031 cat >> confdefs.h <<\EOF
5032#define HAVE_GETHOSTBYNAME 1
5033EOF
5034
5035else
5036 echo "$ac_t""no" 1>&6
5037fi
5038
5039
5040fi
5041
5042
5043
5044
5045
5046
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005047
Guido van Rossum627b2d71993-12-24 10:39:16 +00005048# checks for system services
5049# (none yet)
5050
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005051# Linux requires this for correct f.p. operations
Guido van Rossumf78abae1997-01-21 22:02:36 +00005052echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005053echo "configure:5054: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005054ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005055if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005056 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005057else
5058 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005059LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005060cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005061#line 5062 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005062#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005063/* Override any gcc2 internal prototype to avoid an error. */
5064/* We use char because int might match the return type of a gcc2
5065 builtin and then its argument prototype would still apply. */
5066char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005067
Guido van Rossumf78abae1997-01-21 22:02:36 +00005068int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005069__fpu_control()
5070; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005071EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005072if { (eval echo configure:5073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005073 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005074 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005075else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005076 echo "configure: failed program was:" >&5
5077 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005078 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005079 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005080fi
5081rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005082LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005084fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005085if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005086 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005087 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5088 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005089 cat >> confdefs.h <<EOF
5090#define $ac_tr_lib 1
5091EOF
5092
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005093 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005094
5095else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005096 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005097fi
5098
5099
Guido van Rossum7f253911997-05-09 02:42:48 +00005100# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005101echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005102echo "configure:5103: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005103# Check whether --with-fpectl or --without-fpectl was given.
5104if test "${with_fpectl+set}" = set; then
5105 withval="$with_fpectl"
5106
5107if test "$withval" != no
5108then cat >> confdefs.h <<\EOF
5109#define WANT_SIGFPE_HANDLER 1
5110EOF
5111 echo "$ac_t""yes" 1>&6
5112else echo "$ac_t""no" 1>&6
5113fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005114else
5115 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005116fi
5117
5118
Guido van Rossum7f43da71994-08-01 12:15:30 +00005119# check for --with-libm=...
5120
Guido van Rossum563e7081996-09-10 18:20:48 +00005121case $ac_sys_system in
5122next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005123BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005124*) LIBM=-lm
5125esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005126echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005127echo "configure:5128: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005128# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005129if test "${with_libm+set}" = set; then
5130 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005131
Guido van Rossum7f253911997-05-09 02:42:48 +00005132if test "$withval" = no
5133then LIBM=
5134 echo "$ac_t""force LIBM empty" 1>&6
5135elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005136then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005137 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005138else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005139fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005140else
5141 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005142fi
5143
5144
5145# check for --with-libc=...
5146
Guido van Rossum7f253911997-05-09 02:42:48 +00005147echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005148echo "configure:5149: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005149# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005150if test "${with_libc+set}" = set; then
5151 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005152
Guido van Rossum7f253911997-05-09 02:42:48 +00005153if test "$withval" = no
5154then LIBC=
5155 echo "$ac_t""force LIBC empty" 1>&6
5156elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005157then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005158 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005159else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005160fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005161else
5162 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005163fi
5164
5165
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005166# check for hypot() in math library
5167LIBS_SAVE=$LIBS
5168LIBS="$LIBS $LIBM"
5169for ac_func in hypot
5170do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005171echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005172echo "configure:5173: checking for $ac_func" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005173if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005174 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005175else
5176 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005177#line 5178 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005178#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005179/* System header to define __stub macros and hopefully few prototypes,
5180 which can conflict with char $ac_func(); below. */
5181#include <assert.h>
5182/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005183/* We use char because int might match the return type of a gcc2
5184 builtin and then its argument prototype would still apply. */
5185char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005186
Guido van Rossumf78abae1997-01-21 22:02:36 +00005187int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005188
5189/* The GNU C library defines this for functions which it implements
5190 to always fail with ENOSYS. Some functions are actually named
5191 something starting with __ and the normal name is an alias. */
5192#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5193choke me
5194#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005195$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005196#endif
5197
5198; return 0; }
5199EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005200if { (eval echo configure:5201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005201 rm -rf conftest*
5202 eval "ac_cv_func_$ac_func=yes"
5203else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005204 echo "configure: failed program was:" >&5
5205 cat conftest.$ac_ext >&5
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005206 rm -rf conftest*
5207 eval "ac_cv_func_$ac_func=no"
5208fi
5209rm -f conftest*
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005210fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005211
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005212if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005213 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005214 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005215 cat >> confdefs.h <<EOF
5216#define $ac_tr_func 1
5217EOF
5218
5219else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005220 echo "$ac_t""no" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005221fi
5222done
5223
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005224for ac_func in hypot
5225do
5226echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005227echo "configure:5228: checking for $ac_func" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005228if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005229 echo $ac_n "(cached) $ac_c" 1>&6
5230else
5231 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005232#line 5233 "configure"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005233#include "confdefs.h"
5234/* System header to define __stub macros and hopefully few prototypes,
5235 which can conflict with char $ac_func(); below. */
5236#include <assert.h>
5237/* Override any gcc2 internal prototype to avoid an error. */
5238/* We use char because int might match the return type of a gcc2
5239 builtin and then its argument prototype would still apply. */
5240char $ac_func();
5241
Guido van Rossumf78abae1997-01-21 22:02:36 +00005242int main() {
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005243
5244/* The GNU C library defines this for functions which it implements
5245 to always fail with ENOSYS. Some functions are actually named
5246 something starting with __ and the normal name is an alias. */
5247#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5248choke me
5249#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005250$ac_func();
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005251#endif
5252
5253; return 0; }
5254EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005255if { (eval echo configure:5256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005256 rm -rf conftest*
5257 eval "ac_cv_func_$ac_func=yes"
5258else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005259 echo "configure: failed program was:" >&5
5260 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005261 rm -rf conftest*
5262 eval "ac_cv_func_$ac_func=no"
5263fi
5264rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005265fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005266
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005267if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5268 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005269 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5270 cat >> confdefs.h <<EOF
5271#define $ac_tr_func 1
5272EOF
5273
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005274else
5275 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005276LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005277fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005278done
5279
Guido van Rossumf78abae1997-01-21 22:02:36 +00005280
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005281LIBS=$LIBS_SAVE
5282
Guido van Rossuma28518a2000-05-11 18:41:32 +00005283# check for rint() in math library
5284LIBS_SAVE=$LIBS
5285LIBS="$LIBS $LIBM"
5286for ac_func in rint
5287do
5288echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005289echo "configure:5290: checking for $ac_func" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005290if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma28518a2000-05-11 18:41:32 +00005291 echo $ac_n "(cached) $ac_c" 1>&6
5292else
5293 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005294#line 5295 "configure"
Guido van Rossuma28518a2000-05-11 18:41:32 +00005295#include "confdefs.h"
5296/* System header to define __stub macros and hopefully few prototypes,
5297 which can conflict with char $ac_func(); below. */
5298#include <assert.h>
5299/* Override any gcc2 internal prototype to avoid an error. */
5300/* We use char because int might match the return type of a gcc2
5301 builtin and then its argument prototype would still apply. */
5302char $ac_func();
5303
5304int main() {
5305
5306/* The GNU C library defines this for functions which it implements
5307 to always fail with ENOSYS. Some functions are actually named
5308 something starting with __ and the normal name is an alias. */
5309#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5310choke me
5311#else
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005312$ac_func();
Guido van Rossuma28518a2000-05-11 18:41:32 +00005313#endif
5314
5315; return 0; }
5316EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005317if { (eval echo configure:5318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma28518a2000-05-11 18:41:32 +00005318 rm -rf conftest*
5319 eval "ac_cv_func_$ac_func=yes"
5320else
5321 echo "configure: failed program was:" >&5
5322 cat conftest.$ac_ext >&5
5323 rm -rf conftest*
5324 eval "ac_cv_func_$ac_func=no"
5325fi
5326rm -f conftest*
5327fi
5328
5329if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5330 echo "$ac_t""yes" 1>&6
5331 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5332 cat >> confdefs.h <<EOF
5333#define $ac_tr_func 1
5334EOF
5335
5336else
5337 echo "$ac_t""no" 1>&6
5338fi
5339done
5340
5341LIBS=$LIBS_SAVE
5342
Guido van Rossumda88dad1995-01-26 00:46:29 +00005343# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005344echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005345echo "configure:5346: checking for genuine getopt" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005346if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005347 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005348else
5349 if test "$cross_compiling" = yes; then
5350 ac_cv_func_getopt=no
5351else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005352 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005353#line 5354 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00005354#include "confdefs.h"
5355#include <stdio.h>
5356extern int optind, opterr, getopt();
5357extern char* optarg;
5358int main() {
5359 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
5360 opterr = 0;
5361 if (getopt(3, av, "f:") == 'f') { exit(1); }
5362 exit(0);
5363}
5364EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005365if { (eval echo configure:5366: \"$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 +00005366then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005367 ac_cv_func_getopt=yes
5368else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005369 echo "configure: failed program was:" >&5
5370 cat conftest.$ac_ext >&5
5371 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00005372 ac_cv_func_getopt=no
5373fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00005374rm -fr conftest*
5375fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005376
5377fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005378echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005379test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
5380
Guido van Rossumad713701997-07-10 22:42:38 +00005381# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005382echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005383echo "configure:5384: checking what malloc(0) returns" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005384if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005385 echo $ac_n "(cached) $ac_c" 1>&6
5386else
5387 if test "$cross_compiling" = yes; then
5388 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5389else
5390 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005391#line 5392 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005392#include "confdefs.h"
5393#include <stdio.h>
5394#ifdef HAVE_STDLIB
5395#include <stdlib.h>
5396#else
5397char *malloc(), *realloc();
5398int *free();
5399#endif
5400main() {
5401 char *p;
5402 p = malloc(0);
5403 if (p == NULL) exit(1);
5404 p = realloc(p, 0);
5405 if (p == NULL) exit(1);
5406 free(p);
5407 exit(0);
5408}
5409EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005410if { (eval echo configure:5411: \"$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 +00005411then
5412 ac_cv_malloc_zero=nonnull
5413else
5414 echo "configure: failed program was:" >&5
5415 cat conftest.$ac_ext >&5
5416 rm -fr conftest*
5417 ac_cv_malloc_zero=null
5418fi
5419rm -fr conftest*
5420fi
5421
5422fi
5423
5424echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5425if test "$ac_cv_malloc_zero" = null
5426then
5427 cat >> confdefs.h <<\EOF
5428#define MALLOC_ZERO_RETURNS_NULL 1
5429EOF
5430
5431fi
5432
Guido van Rossumef2255b2000-03-10 22:30:29 +00005433# check for wchar.h
5434ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5435echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005436echo "configure:5437: checking for wchar.h" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005437if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005438 echo $ac_n "(cached) $ac_c" 1>&6
5439else
5440 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005441#line 5442 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005442#include "confdefs.h"
5443#include <wchar.h>
5444EOF
5445ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005446{ (eval echo configure:5447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005447ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5448if test -z "$ac_err"; then
5449 rm -rf conftest*
5450 eval "ac_cv_header_$ac_safe=yes"
5451else
5452 echo "$ac_err" >&5
5453 echo "configure: failed program was:" >&5
5454 cat conftest.$ac_ext >&5
5455 rm -rf conftest*
5456 eval "ac_cv_header_$ac_safe=no"
5457fi
5458rm -f conftest*
5459fi
5460if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5461 echo "$ac_t""yes" 1>&6
5462 cat >> confdefs.h <<\EOF
5463#define HAVE_WCHAR_H 1
5464EOF
5465 wchar_h="yes"
5466else
5467 echo "$ac_t""no" 1>&6
5468wchar_h="no"
5469
5470fi
5471
5472
5473# check for usable wchar_t
5474usable_wchar_t="unkown"
5475echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005476echo "configure:5477: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005477if test "$cross_compiling" = yes; then
5478 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5479else
5480 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005481#line 5482 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005482#include "confdefs.h"
5483
5484#include "wchar.h"
5485#include "wctype.h"
5486main() {
5487 wchar_t s;
5488 if (sizeof(s) == 2)
5489 exit(0);
5490 else
5491 exit(1);
5492}
5493
5494EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005495if { (eval echo configure:5496: \"$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 +00005496then
5497 cat >> confdefs.h <<\EOF
5498#define HAVE_USABLE_WCHAR_T 1
5499EOF
5500 usable_wchar_t="yes"
5501else
5502 echo "configure: failed program was:" >&5
5503 cat conftest.$ac_ext >&5
5504 rm -fr conftest*
5505 usable_wchar_t="no"
5506fi
5507rm -fr conftest*
5508fi
5509
5510echo "$ac_t""$usable_wchar_t" 1>&6
5511
5512# check for endianness
5513echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005514echo "configure:5515: checking whether byte ordering is bigendian" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005515if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005516 echo $ac_n "(cached) $ac_c" 1>&6
5517else
5518 ac_cv_c_bigendian=unknown
5519# See if sys/param.h defines the BYTE_ORDER macro.
5520cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005521#line 5522 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005522#include "confdefs.h"
5523#include <sys/types.h>
5524#include <sys/param.h>
5525int main() {
5526
5527#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5528 bogus endian macros
5529#endif
5530; return 0; }
5531EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005532if { (eval echo configure:5533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005533 rm -rf conftest*
5534 # It does; now see whether it defined to BIG_ENDIAN or not.
5535cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005536#line 5537 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005537#include "confdefs.h"
5538#include <sys/types.h>
5539#include <sys/param.h>
5540int main() {
5541
5542#if BYTE_ORDER != BIG_ENDIAN
5543 not big endian
5544#endif
5545; return 0; }
5546EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005547if { (eval echo configure:5548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005548 rm -rf conftest*
5549 ac_cv_c_bigendian=yes
5550else
5551 echo "configure: failed program was:" >&5
5552 cat conftest.$ac_ext >&5
5553 rm -rf conftest*
5554 ac_cv_c_bigendian=no
5555fi
5556rm -f conftest*
5557else
5558 echo "configure: failed program was:" >&5
5559 cat conftest.$ac_ext >&5
5560fi
5561rm -f conftest*
5562if test $ac_cv_c_bigendian = unknown; then
5563if test "$cross_compiling" = yes; then
5564 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5565else
5566 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005567#line 5568 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005568#include "confdefs.h"
5569main () {
5570 /* Are we little or big endian? From Harbison&Steele. */
5571 union
5572 {
5573 long l;
5574 char c[sizeof (long)];
5575 } u;
5576 u.l = 1;
5577 exit (u.c[sizeof (long) - 1] == 1);
5578}
5579EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005580if { (eval echo configure:5581: \"$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 +00005581then
5582 ac_cv_c_bigendian=no
5583else
5584 echo "configure: failed program was:" >&5
5585 cat conftest.$ac_ext >&5
5586 rm -fr conftest*
5587 ac_cv_c_bigendian=yes
5588fi
5589rm -fr conftest*
5590fi
5591
5592fi
5593fi
5594
5595echo "$ac_t""$ac_cv_c_bigendian" 1>&6
5596if test $ac_cv_c_bigendian = yes; then
5597 cat >> confdefs.h <<\EOF
5598#define WORDS_BIGENDIAN 1
5599EOF
5600
5601fi
5602
5603
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005604# Check whether right shifting a negative integer extends the sign bit
5605# or fills with zeros (like the Cray J90, according to Tim Peters).
5606echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005607echo "configure:5608: checking whether right shift extends the sign bit" >&5
Vladimir Marangozova6180282000-07-12 05:05:06 +00005608if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
5609 echo $ac_n "(cached) $ac_c" 1>&6
5610else
5611
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005612if test "$cross_compiling" = yes; then
5613 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5614else
5615 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005616#line 5617 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005617#include "confdefs.h"
5618
5619int main()
5620{
Vladimir Marangozova6180282000-07-12 05:05:06 +00005621 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005622}
5623
5624EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005625if { (eval echo configure:5626: \"$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 +00005626then
5627 ac_cv_rshift_extends_sign=yes
5628else
5629 echo "configure: failed program was:" >&5
5630 cat conftest.$ac_ext >&5
5631 rm -fr conftest*
5632 ac_cv_rshift_extends_sign=no
5633fi
5634rm -fr conftest*
5635fi
5636
5637fi
5638
5639echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
5640if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005641then
5642 cat >> confdefs.h <<\EOF
5643#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
5644EOF
5645
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005646fi
5647
5648
Guido van Rossum95713eb2000-05-18 20:53:31 +00005649# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
5650# Add sys/socket.h to confdefs.h
5651cat >> confdefs.h <<\EOF
5652#ifdef HAVE_SYS_SOCKET_H
5653#include <sys/socket.h>
5654#endif
5655EOF
5656echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005657echo "configure:5658: checking for socklen_t" >&5
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005658if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00005659 echo $ac_n "(cached) $ac_c" 1>&6
5660else
5661 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00005662#line 5663 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005663#include "confdefs.h"
5664#include <sys/types.h>
5665#if STDC_HEADERS
5666#include <stdlib.h>
5667#include <stddef.h>
5668#endif
5669EOF
5670if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5671 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5672 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005673 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00005674else
5675 rm -rf conftest*
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005676 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00005677fi
5678rm -f conftest*
5679
5680fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005681echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
5682if test $ac_cv_type_socklen_t = no; then
5683 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00005684#define socklen_t int
5685EOF
5686
5687fi
5688
5689
Guido van Rossum627b2d71993-12-24 10:39:16 +00005690# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005691trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005692cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005693# This file is a shell script that caches the results of configure
5694# tests run on this system so they can be shared between configure
5695# scripts and configure runs. It is not useful on other systems.
5696# If it contains results you don't want to keep, you may remove or edit it.
5697#
5698# By default, configure uses ./config.cache as the cache file,
5699# creating it if it does not exist already. You can give configure
5700# the --cache-file=FILE option to use a different cache file; that is
5701# what configure does when it calls configure scripts in
5702# subdirectories, so they share the cache.
5703# Giving --cache-file=/dev/null disables caching, for debugging configure.
5704# config.status only pays attention to the cache file if you give it the
5705# --recheck option to rerun configure.
5706#
5707EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005708# The following way of writing the cache mishandles newlines in values,
5709# but we know of no workaround that is simple, portable, and efficient.
5710# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005711# Ultrix sh set writes to stderr and can't be redirected directly,
5712# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005713(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005714 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005715 *ac_space=\ *)
5716 # `set' does not quote correctly, so add quotes (double-quote substitution
5717 # turns \\\\ into \\, and sed turns \\ into \).
5718 sed -n \
5719 -e "s/'/'\\\\''/g" \
5720 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5721 ;;
5722 *)
5723 # `set' quotes correctly as required by POSIX, so do not add quotes.
5724 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5725 ;;
5726 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005727if cmp -s $cache_file confcache; then
5728 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005729else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005730 if test -w $cache_file; then
5731 echo "updating cache $cache_file"
5732 cat confcache > $cache_file
5733 else
5734 echo "not updating unwritable cache $cache_file"
5735 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005736fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005737rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00005738
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005739trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005740
5741test "x$prefix" = xNONE && prefix=$ac_default_prefix
5742# Let make expand exec_prefix.
5743test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00005744
Guido van Rossum7f43da71994-08-01 12:15:30 +00005745# Any assignment to VPATH causes Sun make to only execute
5746# the first set of double-colon rules, so remove it if not needed.
5747# If there is a colon in the path, we need to keep it.
5748if test "x$srcdir" = x.; then
5749 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5750fi
5751
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005752trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00005753
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005754DEFS=-DHAVE_CONFIG_H
5755
5756# Without the "./", some shells look in PATH for config.status.
5757: ${CONFIG_STATUS=./config.status}
5758
5759echo creating $CONFIG_STATUS
5760rm -f $CONFIG_STATUS
5761cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005762#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00005763# Generated automatically by configure.
5764# Run this file to recreate the current configuration.
5765# This directory was configured as follows,
5766# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5767#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005768# $0 $ac_configure_args
5769#
5770# Compiler output produced by configure, useful for debugging
5771# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00005772
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005773ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005774for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00005775do
Guido van Rossum7f43da71994-08-01 12:15:30 +00005776 case "\$ac_option" in
5777 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005778 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5779 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00005780 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005781 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005782 exit 0 ;;
5783 -help | --help | --hel | --he | --h)
5784 echo "\$ac_cs_usage"; exit 0 ;;
5785 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005786 esac
5787done
5788
Guido van Rossum7f43da71994-08-01 12:15:30 +00005789ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00005790
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005791trap 'rm -fr `echo "Makefile \
5792 Objects/Makefile \
5793 Parser/Makefile \
5794 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00005795 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00005796 Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005797EOF
5798cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005799
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005800# Protect against being on the right side of a sed subst in config.status.
5801sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5802 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005803$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00005804$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005805s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005806s%@CFLAGS@%$CFLAGS%g
5807s%@CPPFLAGS@%$CPPFLAGS%g
5808s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005809s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005810s%@DEFS@%$DEFS%g
5811s%@LDFLAGS@%$LDFLAGS%g
5812s%@LIBS@%$LIBS%g
5813s%@exec_prefix@%$exec_prefix%g
5814s%@prefix@%$prefix%g
5815s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005816s%@bindir@%$bindir%g
5817s%@sbindir@%$sbindir%g
5818s%@libexecdir@%$libexecdir%g
5819s%@datadir@%$datadir%g
5820s%@sysconfdir@%$sysconfdir%g
5821s%@sharedstatedir@%$sharedstatedir%g
5822s%@localstatedir@%$localstatedir%g
5823s%@libdir@%$libdir%g
5824s%@includedir@%$includedir%g
5825s%@oldincludedir@%$oldincludedir%g
5826s%@infodir@%$infodir%g
5827s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00005828s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005829s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00005830s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00005831s%@SET_CXX@%$SET_CXX%g
5832s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005833s%@CC@%$CC%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00005834s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
5835s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00005836s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005837s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005838s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00005839s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00005840s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5841s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005842s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00005843s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005844s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00005845s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00005846s%@SO@%$SO%g
5847s%@LDSHARED@%$LDSHARED%g
5848s%@CCSHARED@%$CCSHARED%g
5849s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00005850s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00005851s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00005852s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005853s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00005854s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005855s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005856s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
5857s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
5858s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005859s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005860s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005861s%@LIBM@%$LIBM%g
5862s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005863
5864CEOF
5865EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005866
5867cat >> $CONFIG_STATUS <<\EOF
5868
5869# Split the substitutions into bite-sized pieces for seds with
5870# small command number limits, like on Digital OSF/1 and HP-UX.
5871ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5872ac_file=1 # Number of current file.
5873ac_beg=1 # First line for current file.
5874ac_end=$ac_max_sed_cmds # Line after last line for current file.
5875ac_more_lines=:
5876ac_sed_cmds=""
5877while $ac_more_lines; do
5878 if test $ac_beg -gt 1; then
5879 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5880 else
5881 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5882 fi
5883 if test ! -s conftest.s$ac_file; then
5884 ac_more_lines=false
5885 rm -f conftest.s$ac_file
5886 else
5887 if test -z "$ac_sed_cmds"; then
5888 ac_sed_cmds="sed -f conftest.s$ac_file"
5889 else
5890 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5891 fi
5892 ac_file=`expr $ac_file + 1`
5893 ac_beg=$ac_end
5894 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5895 fi
5896done
5897if test -z "$ac_sed_cmds"; then
5898 ac_sed_cmds=cat
5899fi
5900EOF
5901
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005902cat >> $CONFIG_STATUS <<EOF
5903
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005904CONFIG_FILES=\${CONFIG_FILES-"Makefile \
5905 Objects/Makefile \
5906 Parser/Makefile \
5907 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00005908 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00005909 Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005910EOF
5911cat >> $CONFIG_STATUS <<\EOF
5912for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00005913 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005914 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005915 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005916 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5917 *) ac_file_in="${ac_file}.in" ;;
5918 esac
5919
Guido van Rossumf78abae1997-01-21 22:02:36 +00005920 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005921
5922 # Remove last slash and all that follows it. Not all systems have dirname.
5923 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5924 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5925 # The file is in a subdirectory.
5926 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005927 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005928 # A "../" for each directory in $ac_dir_suffix.
5929 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5930 else
5931 ac_dir_suffix= ac_dots=
5932 fi
5933
5934 case "$ac_given_srcdir" in
5935 .) srcdir=.
5936 if test -z "$ac_dots"; then top_srcdir=.
5937 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5938 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5939 *) # Relative path.
5940 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5941 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5942 esac
5943
Guido van Rossumf78abae1997-01-21 22:02:36 +00005944
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005945 echo creating "$ac_file"
5946 rm -f "$ac_file"
5947 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5948 case "$ac_file" in
5949 *Makefile*) ac_comsub="1i\\
5950# $configure_input" ;;
5951 *) ac_comsub= ;;
5952 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00005953
5954 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 +00005955 sed -e "$ac_comsub
5956s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00005957s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00005958s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00005959" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00005960fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00005961rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005962
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005963# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5964# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00005965#
5966# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005967ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5968ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005969ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005970ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005971# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005972ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5973ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005974ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005975ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005976# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005977ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5978ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005979ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005980ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00005981
Guido van Rossumf78abae1997-01-21 22:02:36 +00005982if test "${CONFIG_HEADERS+set}" != set; then
5983EOF
5984cat >> $CONFIG_STATUS <<EOF
5985 CONFIG_HEADERS="config.h"
5986EOF
5987cat >> $CONFIG_STATUS <<\EOF
5988fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005989for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00005990 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005991 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005992 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005993 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5994 *) ac_file_in="${ac_file}.in" ;;
5995 esac
5996
Guido van Rossum7f43da71994-08-01 12:15:30 +00005997 echo creating $ac_file
5998
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005999 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006000 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6001 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006002
6003EOF
6004
6005# Transform confdefs.h into a sed script conftest.vals that substitutes
6006# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006007# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006008# Protect against being in an unquoted here document in config.status.
6009rm -f conftest.vals
6010cat > conftest.hdr <<\EOF
6011s/[\\&%]/\\&/g
6012s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006013s%#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 +00006014s%ac_d%ac_u%gp
6015s%ac_u%ac_e%gp
6016EOF
6017sed -n -f conftest.hdr confdefs.h > conftest.vals
6018rm -f conftest.hdr
6019
6020# This sed command replaces #undef with comments. This is necessary, for
6021# example, in the case of _POSIX_SOURCE, which is predefined and required
6022# on some systems where configure will not decide to define it.
6023cat >> conftest.vals <<\EOF
6024s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6025EOF
6026
6027# Break up conftest.vals because some shells have a limit on
6028# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006029
6030rm -f conftest.tail
6031while :
6032do
6033 ac_lines=`grep -c . conftest.vals`
6034 # grep -c gives empty output for an empty file on some AIX systems.
6035 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6036 # Write a limited-size here document to conftest.frag.
6037 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6038 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6039 echo 'CEOF
6040 sed -f conftest.frag conftest.in > conftest.out
6041 rm -f conftest.in
6042 mv conftest.out conftest.in
6043' >> $CONFIG_STATUS
6044 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6045 rm -f conftest.vals
6046 mv conftest.tail conftest.vals
6047done
6048rm -f conftest.vals
6049
6050cat >> $CONFIG_STATUS <<\EOF
6051 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006052 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006053 cat conftest.in >> conftest.h
6054 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006055 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006056 echo "$ac_file is unchanged"
6057 rm -f conftest.h
6058 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006059 # Remove last slash and all that follows it. Not all systems have dirname.
6060 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6061 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6062 # The file is in a subdirectory.
6063 test ! -d "$ac_dir" && mkdir "$ac_dir"
6064 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006065 rm -f $ac_file
6066 mv conftest.h $ac_file
6067 fi
6068fi; done
6069
Guido van Rossumf78abae1997-01-21 22:02:36 +00006070EOF
6071cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006072
Guido van Rossumf78abae1997-01-21 22:02:36 +00006073EOF
6074cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006075
6076exit 0
6077EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006078chmod +x $CONFIG_STATUS
6079rm -fr confdefs* $ac_clean_files
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006080test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006081