blob: bab3fff339dfc9a5aa0b5e0c8cc2fa0f9bafed43 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Fred Drakea1a84e72001-03-06 05:52:16 +00003# From configure.in Revision: 1.208
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004
Guido van Rossum627b2d71993-12-24 10:39:16 +00005# Guess values for system-dependent variables and create Makefiles.
Guido van Rossum8d6e8af2000-10-30 17:45:07 +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
Guido van Rossum3dc0a512000-10-05 18:00:06 +000019 --with-next-framework Build (OpenStep|Rhapsody|MacOSX|Darwin) framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000020ac_help="$ac_help
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021 --with-dyld Use (OpenStep|Rhapsody|MacOSX|Darwin) 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
Neil Schemenauerdfb38e42001-01-27 06:57:08 +000027 --with-suffix=.exe set executable suffix"
28ac_help="$ac_help
Skip Montanarocb853262000-08-30 22:29:48 +000029 --with-pydebug build with Py_DEBUG defined"
30ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000031 --with-libs='lib1 ...' link against additional libs"
Guido van Rossuma68acba1996-07-31 17:36:39 +000032ac_help="$ac_help
Neil Schemenauerd32c2492001-01-24 17:25:28 +000033 --with-signal-module disable/enable signal module"
34ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000035 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000036ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000037 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000038ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000039 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000040ac_help="$ac_help
Guido van Rossum9e8181b2000-09-19 00:46:46 +000041 --with-pth use GNU pth threading libraries"
42ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000043 --with(out)-cycle-gc disable/enable garbage collection"
44ac_help="$ac_help
Neil Schemenauera35c6882001-02-27 04:45:05 +000045 --with(out)-pymalloc disable/enable specialized mallocs"
46ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000047 --with-wctype-functions use wctype.h functions"
48ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000049 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000050ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000051 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000052ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000053 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000054ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000055 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000056ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000057 --with-libc=STRING C library"
Guido van Rossum4c3f57c2001-01-10 20:40:46 +000058ac_help="$ac_help
59 --with-check-import-case enable imported module name case checking"
Guido van Rossum627b2d71993-12-24 10:39:16 +000060
Guido van Rossum7f43da71994-08-01 12:15:30 +000061# Initialize some variables set by options.
62# The variables have the same names as the options, with
63# dashes changed to underlines.
64build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000065cache_file=./config.cache
66exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000067host=NONE
68no_create=
69nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000070no_recursion=
71prefix=NONE
72program_prefix=NONE
73program_suffix=NONE
74program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000075silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000076site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000077srcdir=
78target=NONE
79verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000080x_includes=NONE
81x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000082bindir='${exec_prefix}/bin'
83sbindir='${exec_prefix}/sbin'
84libexecdir='${exec_prefix}/libexec'
85datadir='${prefix}/share'
86sysconfdir='${prefix}/etc'
87sharedstatedir='${prefix}/com'
88localstatedir='${prefix}/var'
89libdir='${exec_prefix}/lib'
90includedir='${prefix}/include'
91oldincludedir='/usr/include'
92infodir='${prefix}/info'
93mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000094
95# Initialize some other variables.
96subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000097MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000098SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +000099# Maximum number of lines to put in a shell here document.
100ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +0000101
102ac_prev=
103for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000104do
Guido van Rossum627b2d71993-12-24 10:39:16 +0000105
Guido van Rossum7f43da71994-08-01 12:15:30 +0000106 # If the previous option needs an argument, assign it.
107 if test -n "$ac_prev"; then
108 eval "$ac_prev=\$ac_option"
109 ac_prev=
110 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000111 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000112
Guido van Rossum7f43da71994-08-01 12:15:30 +0000113 case "$ac_option" in
114 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
115 *) ac_optarg= ;;
116 esac
117
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000118 # Accept the important Cygnus configure options, so we can diagnose typos.
119
Guido van Rossum7f43da71994-08-01 12:15:30 +0000120 case "$ac_option" in
121
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000122 -bindir | --bindir | --bindi | --bind | --bin | --bi)
123 ac_prev=bindir ;;
124 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
125 bindir="$ac_optarg" ;;
126
127 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000128 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000129 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000130 build="$ac_optarg" ;;
131
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000132 -cache-file | --cache-file | --cache-fil | --cache-fi \
133 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
134 ac_prev=cache_file ;;
135 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
136 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
137 cache_file="$ac_optarg" ;;
138
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000139 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
140 ac_prev=datadir ;;
141 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
142 | --da=*)
143 datadir="$ac_optarg" ;;
144
Guido van Rossum7f43da71994-08-01 12:15:30 +0000145 -disable-* | --disable-*)
146 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000147 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000148 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000149 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000150 fi
151 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
152 eval "enable_${ac_feature}=no" ;;
153
154 -enable-* | --enable-*)
155 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000156 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000157 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000158 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000159 fi
160 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
161 case "$ac_option" in
162 *=*) ;;
163 *) ac_optarg=yes ;;
164 esac
165 eval "enable_${ac_feature}='$ac_optarg'" ;;
166
Guido van Rossum7f43da71994-08-01 12:15:30 +0000167 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
168 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
169 | --exec | --exe | --ex)
170 ac_prev=exec_prefix ;;
171 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
172 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
173 | --exec=* | --exe=* | --ex=*)
174 exec_prefix="$ac_optarg" ;;
175
176 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000177 # Obsolete; use --with-gas.
178 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000179
180 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000181 # Omit some internal or obsolete options to make the list less imposing.
182 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000183 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000184Usage: configure [options] [host]
185Options: [defaults in brackets after descriptions]
186Configuration:
187 --cache-file=FILE cache test results in FILE
188 --help print this message
189 --no-create do not create output files
190 --quiet, --silent do not print \`checking...' messages
191 --version print the version of autoconf that created configure
192Directory and file names:
193 --prefix=PREFIX install architecture-independent files in PREFIX
194 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000195 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000196 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000197 --bindir=DIR user executables in DIR [EPREFIX/bin]
198 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
199 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
200 --datadir=DIR read-only architecture-independent data in DIR
201 [PREFIX/share]
202 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
203 --sharedstatedir=DIR modifiable architecture-independent data in DIR
204 [PREFIX/com]
205 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
206 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
207 --includedir=DIR C header files in DIR [PREFIX/include]
208 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
209 --infodir=DIR info documentation in DIR [PREFIX/info]
210 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000211 --srcdir=DIR find the sources in DIR [configure dir or ..]
212 --program-prefix=PREFIX prepend PREFIX to installed program names
213 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000214 --program-transform-name=PROGRAM
215 run sed PROGRAM on installed program names
216EOF
217 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000218Host type:
219 --build=BUILD configure for building on BUILD [BUILD=HOST]
220 --host=HOST configure for HOST [guessed]
221 --target=TARGET configure for TARGET [TARGET=HOST]
222Features and packages:
223 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
224 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
225 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
226 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
227 --x-includes=DIR X include files are in DIR
228 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000229EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000230 if test -n "$ac_help"; then
231 echo "--enable and --with options recognized:$ac_help"
232 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000233 exit 0 ;;
234
235 -host | --host | --hos | --ho)
236 ac_prev=host ;;
237 -host=* | --host=* | --hos=* | --ho=*)
238 host="$ac_optarg" ;;
239
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000240 -includedir | --includedir | --includedi | --included | --include \
241 | --includ | --inclu | --incl | --inc)
242 ac_prev=includedir ;;
243 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
244 | --includ=* | --inclu=* | --incl=* | --inc=*)
245 includedir="$ac_optarg" ;;
246
247 -infodir | --infodir | --infodi | --infod | --info | --inf)
248 ac_prev=infodir ;;
249 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
250 infodir="$ac_optarg" ;;
251
252 -libdir | --libdir | --libdi | --libd)
253 ac_prev=libdir ;;
254 -libdir=* | --libdir=* | --libdi=* | --libd=*)
255 libdir="$ac_optarg" ;;
256
257 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
258 | --libexe | --libex | --libe)
259 ac_prev=libexecdir ;;
260 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
261 | --libexe=* | --libex=* | --libe=*)
262 libexecdir="$ac_optarg" ;;
263
264 -localstatedir | --localstatedir | --localstatedi | --localstated \
265 | --localstate | --localstat | --localsta | --localst \
266 | --locals | --local | --loca | --loc | --lo)
267 ac_prev=localstatedir ;;
268 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
269 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
270 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
271 localstatedir="$ac_optarg" ;;
272
273 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
274 ac_prev=mandir ;;
275 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
276 mandir="$ac_optarg" ;;
277
Guido van Rossum7f43da71994-08-01 12:15:30 +0000278 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000279 # Obsolete; use --without-fp.
280 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000281
282 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
283 | --no-cr | --no-c)
284 no_create=yes ;;
285
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000286 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
287 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
288 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000289
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000290 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
291 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
292 | --oldin | --oldi | --old | --ol | --o)
293 ac_prev=oldincludedir ;;
294 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
295 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
296 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
297 oldincludedir="$ac_optarg" ;;
298
Guido van Rossum7f43da71994-08-01 12:15:30 +0000299 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
300 ac_prev=prefix ;;
301 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
302 prefix="$ac_optarg" ;;
303
304 -program-prefix | --program-prefix | --program-prefi | --program-pref \
305 | --program-pre | --program-pr | --program-p)
306 ac_prev=program_prefix ;;
307 -program-prefix=* | --program-prefix=* | --program-prefi=* \
308 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
309 program_prefix="$ac_optarg" ;;
310
311 -program-suffix | --program-suffix | --program-suffi | --program-suff \
312 | --program-suf | --program-su | --program-s)
313 ac_prev=program_suffix ;;
314 -program-suffix=* | --program-suffix=* | --program-suffi=* \
315 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
316 program_suffix="$ac_optarg" ;;
317
318 -program-transform-name | --program-transform-name \
319 | --program-transform-nam | --program-transform-na \
320 | --program-transform-n | --program-transform- \
321 | --program-transform | --program-transfor \
322 | --program-transfo | --program-transf \
323 | --program-trans | --program-tran \
324 | --progr-tra | --program-tr | --program-t)
325 ac_prev=program_transform_name ;;
326 -program-transform-name=* | --program-transform-name=* \
327 | --program-transform-nam=* | --program-transform-na=* \
328 | --program-transform-n=* | --program-transform-=* \
329 | --program-transform=* | --program-transfor=* \
330 | --program-transfo=* | --program-transf=* \
331 | --program-trans=* | --program-tran=* \
332 | --progr-tra=* | --program-tr=* | --program-t=*)
333 program_transform_name="$ac_optarg" ;;
334
335 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
336 | -silent | --silent | --silen | --sile | --sil)
337 silent=yes ;;
338
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000339 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
340 ac_prev=sbindir ;;
341 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
342 | --sbi=* | --sb=*)
343 sbindir="$ac_optarg" ;;
344
345 -sharedstatedir | --sharedstatedir | --sharedstatedi \
346 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
347 | --sharedst | --shareds | --shared | --share | --shar \
348 | --sha | --sh)
349 ac_prev=sharedstatedir ;;
350 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
351 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
352 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
353 | --sha=* | --sh=*)
354 sharedstatedir="$ac_optarg" ;;
355
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000356 -site | --site | --sit)
357 ac_prev=site ;;
358 -site=* | --site=* | --sit=*)
359 site="$ac_optarg" ;;
360
Guido van Rossum7f43da71994-08-01 12:15:30 +0000361 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
362 ac_prev=srcdir ;;
363 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
364 srcdir="$ac_optarg" ;;
365
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000366 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
367 | --syscon | --sysco | --sysc | --sys | --sy)
368 ac_prev=sysconfdir ;;
369 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
370 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
371 sysconfdir="$ac_optarg" ;;
372
Guido van Rossum7f43da71994-08-01 12:15:30 +0000373 -target | --target | --targe | --targ | --tar | --ta | --t)
374 ac_prev=target ;;
375 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
376 target="$ac_optarg" ;;
377
378 -v | -verbose | --verbose | --verbos | --verbo | --verb)
379 verbose=yes ;;
380
381 -version | --version | --versio | --versi | --vers)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000382 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000383 exit 0 ;;
384
385 -with-* | --with-*)
386 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000387 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000388 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000389 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000390 fi
391 ac_package=`echo $ac_package| sed 's/-/_/g'`
392 case "$ac_option" in
393 *=*) ;;
394 *) ac_optarg=yes ;;
395 esac
396 eval "with_${ac_package}='$ac_optarg'" ;;
397
398 -without-* | --without-*)
399 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000400 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000401 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000402 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403 fi
404 ac_package=`echo $ac_package| sed 's/-/_/g'`
405 eval "with_${ac_package}=no" ;;
406
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000407 --x)
408 # Obsolete; use --with-x.
409 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000410
411 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
412 | --x-incl | --x-inc | --x-in | --x-i)
413 ac_prev=x_includes ;;
414 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
415 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
416 x_includes="$ac_optarg" ;;
417
418 -x-libraries | --x-libraries | --x-librarie | --x-librari \
419 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
420 ac_prev=x_libraries ;;
421 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
422 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
423 x_libraries="$ac_optarg" ;;
424
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000425 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000426 ;;
427
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000428 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000429 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000430 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000431 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000432 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000433 { 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 +0000434 fi
435 nonopt="$ac_option"
436 ;;
437
438 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000439done
440
Guido van Rossum7f43da71994-08-01 12:15:30 +0000441if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000442 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000443fi
444
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000445trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000446
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000447# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000448# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000449# 1 file creation
450# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000451# 3 some systems may open it to /dev/tty
452# 4 used on the Kubota Titan
453# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000454# 5 compiler messages saved in config.log
455if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000456 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000457else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000458 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000459fi
460exec 5>./config.log
461
462echo "\
463This file contains any messages produced by compilers while
464running configure, to aid debugging if configure makes a mistake.
465" 1>&5
466
467# Strip out --no-create and --no-recursion so they do not pile up.
468# Also quote any args containing shell metacharacters.
469ac_configure_args=
470for ac_arg
471do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 case "$ac_arg" in
473 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
474 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000475 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
476 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
477 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
478 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
479 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000480 esac
481done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000482
483# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000484# Only set these to C if already set. These must not be set unconditionally
485# because not all systems understand e.g. LANG=C (notably SCO).
486# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
487# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000488if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000489if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
490if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
491if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000492
Guido van Rossum7f43da71994-08-01 12:15:30 +0000493# confdefs.h avoids OS command line length limits that DEFS can exceed.
494rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000495# AIX cpp loses on an empty file, so make sure it contains at least a newline.
496echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000497
498# A filename unique to this package, relative to the directory that
499# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000500ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000501
502# Find the source files, if location was not specified.
503if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000504 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000505 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000506 ac_prog=$0
507 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
508 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
509 srcdir=$ac_confdir
510 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000511 srcdir=..
512 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000513else
514 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000515fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000516if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000517 if test "$ac_srcdir_defaulted" = yes; then
518 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000519 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000520 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000521 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000522fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000523srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
524
525# Prefer explicitly selected file to automatically selected ones.
526if test -z "$CONFIG_SITE"; then
527 if test "x$prefix" != xNONE; then
528 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
529 else
530 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
531 fi
532fi
533for ac_site_file in $CONFIG_SITE; do
534 if test -r "$ac_site_file"; then
535 echo "loading site script $ac_site_file"
536 . "$ac_site_file"
537 fi
538done
539
540if test -r "$cache_file"; then
541 echo "loading cache $cache_file"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000542 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000543else
544 echo "creating cache $cache_file"
545 > $cache_file
546fi
547
Guido van Rossum7f43da71994-08-01 12:15:30 +0000548ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000549# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000550ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000551ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000552ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000553cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000554
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000555ac_exeext=
556ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000557if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
558 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
559 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
560 ac_n= ac_c='
561' ac_t=' '
562 else
563 ac_n=-n ac_c= ac_t=
564 fi
565else
566 ac_n= ac_c='\c' ac_t=
567fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000568
Guido van Rossum0a516c91994-09-12 10:58:40 +0000569
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000570
Guido van Rossum627b2d71993-12-24 10:39:16 +0000571
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000572# Set VERSION so we only need to edit in one place (i.e., here)
573
Neil Schemenauer7d645772001-01-17 21:59:33 +0000574VERSION=2.1
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000575
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000576# NEXTSTEP|MacOSX|Darwin stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000577if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000578
579 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +0000580echo "configure:581: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000581 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000582if test "${with_next_archs+set}" = set; then
583 withval="$with_next_archs"
584
Guido van Rossum563e7081996-09-10 18:20:48 +0000585 if test -n "$withval"; then
586 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
587 # GCC does not currently support multi archs on the NeXT
588 with_gcc=no
589 fi
590 echo "$ac_t""$with_next_archs" 1>&6
591
592else
593 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000594fi
595
Guido van Rossum563e7081996-09-10 18:20:48 +0000596
597 if test -z "$MACHDEP"
598 then
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000599 ac_sys_system=`uname -s`
600 if test "$ac_sys_system" = "Darwin" ; then
601 ac_sys_release=`uname -r`
602 else
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000603 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000604 sed -e 's/://' -e 's/\./_/'` && \
605 ac_sys_system=next && ac_sys_release=$4
606 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000607
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000608 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000609 fi
610fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000611
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000612# Check whether --with-next-framework or --without-next-framework was given.
613if test "${with_next_framework+set}" = set; then
614 withval="$with_next_framework"
615 :
616fi
617
618# Check whether --with-dyld or --without-dyld was given.
619if test "${with_dyld+set}" = set; then
620 withval="$with_dyld"
621 :
622fi
623
Guido van Rossum91922671997-10-09 20:24:13 +0000624
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000625# Set name for machine-dependent library files
626
627echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +0000628echo "configure:629: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000629if test -z "$MACHDEP"
630then
Guido van Rossum563e7081996-09-10 18:20:48 +0000631 ac_sys_system=`uname -s`
Trent Mick635f6fb2000-08-23 21:33:05 +0000632 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000633 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000634 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000635 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000636 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000637 ac_md_system=`echo $ac_sys_system |
638 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
639 ac_md_release=`echo $ac_sys_release |
640 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000641 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000642
Guido van Rossum07397971997-04-29 21:49:50 +0000643 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000644 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000645 esac
646fi
Guido van Rossum91922671997-10-09 20:24:13 +0000647
648#
649# SGI compilers allow the specification of the both the ABI and the
650# ISA on the command line. Depending on the values of these switches,
651# different and often incompatable code will be generated.
652#
653# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
654# thus supply support for various ABI/ISA combinations. The MACHDEP
655# variable is also adjusted.
656#
657
658if test ! -z "$SGI_ABI"
659then
660 CC="cc $SGI_ABI"
661 LDFLAGS="$SGI_ABI $LDFLAGS"
662 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
663fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000664echo "$ac_t""$MACHDEP" 1>&6
665
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000667echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +0000668echo "configure:669: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000669# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000670if test "${with_gcc+set}" = set; then
671 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000672
673 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000674 no) CC=cc
675 without_gcc=yes;;
676 yes) CC=gcc
677 without_gcc=no;;
678 *) CC=$withval
679 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000680 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000681else
Guido van Rossume77438c1995-09-13 18:59:59 +0000682
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000683 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000684 OSF1) CC=cc
685 without_gcc=;;
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000686 AIX*) CC=cc_r
687 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000688 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000689 case $BE_HOST_CPU in
690 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000691 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000692 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000693 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000694 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000695 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000696 ;;
697 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000698 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000699 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000700 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000701 ;;
702 *)
Fred Drake5790be12000-10-09 17:06:13 +0000703 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000704 ;;
705 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000706 AR="\$(srcdir)/Modules/ar_beos"
707 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000708 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000709 Monterey*)
710 RANLIB=:
711 without_gcc=;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000712 *) without_gcc=no;;
713 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714fi
715
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000716echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000717
Guido van Rossum95012191999-12-16 17:50:52 +0000718
719
Fred Drakea1a84e72001-03-06 05:52:16 +0000720MAINOBJ=python.o
Guido van Rossum95012191999-12-16 17:50:52 +0000721echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +0000722echo "configure:723: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000723# Check whether --with-cxx or --without-cxx was given.
724if test "${with_cxx+set}" = set; then
725 withval="$with_cxx"
726
Martin v. Löwis22352952000-12-13 17:37:02 +0000727 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000728 case $withval in
729 no) CXX=
730 with_cxx=no;;
731 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +0000732 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +0000733 with_cxx=$withval;;
734 esac
735else
736
737 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000738 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000739
740fi
741
742echo "$ac_t""$with_cxx" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000743
744
745if test "$check_cxx" = "yes"
746then
747 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
748do
749# Extract the first word of "$ac_prog", so it can be a program name with args.
750set dummy $ac_prog; ac_word=$2
751echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +0000752echo "configure:753: checking for $ac_word" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000753if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
754 echo $ac_n "(cached) $ac_c" 1>&6
755else
756 if test -n "$CXX"; then
757 ac_cv_prog_CXX="$CXX" # Let the user override the test.
758else
759 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
760 ac_dummy="$PATH"
761 for ac_dir in $ac_dummy; do
762 test -z "$ac_dir" && ac_dir=.
763 if test -f $ac_dir/$ac_word; then
764 ac_cv_prog_CXX="$ac_prog"
765 break
766 fi
767 done
768 IFS="$ac_save_ifs"
769fi
770fi
771CXX="$ac_cv_prog_CXX"
772if test -n "$CXX"; then
773 echo "$ac_t""$CXX" 1>&6
774else
775 echo "$ac_t""no" 1>&6
776fi
777
778test -n "$CXX" && break
779done
780test -n "$CXX" || CXX="notfound"
781
782 if test "$CXX" = "notfound"
783 then
784 CXX=
785 else
786 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +0000787echo "configure:788: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000788
789ac_ext=C
790# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
791ac_cpp='$CXXCPP $CPPFLAGS'
792ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
793ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
794cross_compiling=$ac_cv_prog_cxx_cross
795
796cat > conftest.$ac_ext << EOF
797
Neil Schemenauera35c6882001-02-27 04:45:05 +0000798#line 799 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000799#include "confdefs.h"
800
801int main(){return(0);}
802EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +0000803if { (eval echo configure:804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis22352952000-12-13 17:37:02 +0000804 ac_cv_prog_cxx_works=yes
805 # If we can't run a trivial program, we are probably using a cross compiler.
806 if (./conftest; exit) 2>/dev/null; then
807 ac_cv_prog_cxx_cross=no
808 else
809 ac_cv_prog_cxx_cross=yes
810 fi
811else
812 echo "configure: failed program was:" >&5
813 cat conftest.$ac_ext >&5
814 ac_cv_prog_cxx_works=no
815fi
816rm -fr conftest*
817ac_ext=c
818# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
819ac_cpp='$CPP $CPPFLAGS'
820ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
821ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
822cross_compiling=$ac_cv_prog_cc_cross
823
824echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
825if test $ac_cv_prog_cxx_works = no; then
826 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
827fi
828echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +0000829echo "configure:830: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000830echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
831cross_compiling=$ac_cv_prog_cxx_cross
832
833 fi
834fi
835
Guido van Rossum8b131c51995-03-09 14:10:13 +0000836# If the user switches compilers, we can't believe the cache
837if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
838then
839 { echo "configure: error: cached CC is different -- throw away $cache_file
840(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
841fi
842
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843# Extract the first word of "gcc", so it can be a program name with args.
844set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000845echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +0000846echo "configure:847: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000847if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000848 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849else
850 if test -n "$CC"; then
851 ac_cv_prog_CC="$CC" # Let the user override the test.
852else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000853 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
854 ac_dummy="$PATH"
855 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856 test -z "$ac_dir" && ac_dir=.
857 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000859 break
860 fi
861 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000863fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864fi
865CC="$ac_cv_prog_CC"
866if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000867 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000869 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000871
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000872if test -z "$CC"; then
873 # Extract the first word of "cc", so it can be a program name with args.
874set dummy cc; ac_word=$2
875echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +0000876echo "configure:877: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000877if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878 echo $ac_n "(cached) $ac_c" 1>&6
879else
880 if test -n "$CC"; then
881 ac_cv_prog_CC="$CC" # Let the user override the test.
882else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000883 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000884 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000885 ac_dummy="$PATH"
886 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000887 test -z "$ac_dir" && ac_dir=.
888 if test -f $ac_dir/$ac_word; then
889 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
890 ac_prog_rejected=yes
891 continue
892 fi
893 ac_cv_prog_CC="cc"
894 break
895 fi
896 done
897 IFS="$ac_save_ifs"
898if test $ac_prog_rejected = yes; then
899 # We found a bogon in the path, so make sure we never use it.
900 set dummy $ac_cv_prog_CC
901 shift
902 if test $# -gt 0; then
903 # We chose a different compiler from the bogus one.
904 # However, it has the same basename, so the bogon will be chosen
905 # first if we set CC to just the basename; use the full file name.
906 shift
907 set dummy "$ac_dir/$ac_word" "$@"
908 shift
909 ac_cv_prog_CC="$@"
910 fi
911fi
912fi
913fi
914CC="$ac_cv_prog_CC"
915if test -n "$CC"; then
916 echo "$ac_t""$CC" 1>&6
917else
918 echo "$ac_t""no" 1>&6
919fi
920
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000921 if test -z "$CC"; then
922 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000923 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000924 # Extract the first word of "cl", so it can be a program name with args.
925set dummy cl; ac_word=$2
926echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +0000927echo "configure:928: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000928if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000929 echo $ac_n "(cached) $ac_c" 1>&6
930else
931 if test -n "$CC"; then
932 ac_cv_prog_CC="$CC" # Let the user override the test.
933else
934 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
935 ac_dummy="$PATH"
936 for ac_dir in $ac_dummy; do
937 test -z "$ac_dir" && ac_dir=.
938 if test -f $ac_dir/$ac_word; then
939 ac_cv_prog_CC="cl"
940 break
941 fi
942 done
943 IFS="$ac_save_ifs"
944fi
945fi
946CC="$ac_cv_prog_CC"
947if test -n "$CC"; then
948 echo "$ac_t""$CC" 1>&6
949else
950 echo "$ac_t""no" 1>&6
951fi
952 ;;
953 esac
954 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
956fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000958echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +0000959echo "configure:960: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000960
961ac_ext=c
962# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
963ac_cpp='$CPP $CPPFLAGS'
964ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000965ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000966cross_compiling=$ac_cv_prog_cc_cross
967
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000968cat > conftest.$ac_ext << EOF
969
Neil Schemenauera35c6882001-02-27 04:45:05 +0000970#line 971 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000971#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000972
Guido van Rossumf78abae1997-01-21 22:02:36 +0000973main(){return(0);}
974EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +0000975if { (eval echo configure:976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000976 ac_cv_prog_cc_works=yes
977 # If we can't run a trivial program, we are probably using a cross compiler.
978 if (./conftest; exit) 2>/dev/null; then
979 ac_cv_prog_cc_cross=no
980 else
981 ac_cv_prog_cc_cross=yes
982 fi
983else
984 echo "configure: failed program was:" >&5
985 cat conftest.$ac_ext >&5
986 ac_cv_prog_cc_works=no
987fi
988rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000989ac_ext=c
990# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
991ac_cpp='$CPP $CPPFLAGS'
992ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
993ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
994cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000995
996echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
997if test $ac_cv_prog_cc_works = no; then
998 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
999fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001000echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001001echo "configure:1002: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001002echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1003cross_compiling=$ac_cv_prog_cc_cross
1004
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001005echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001006echo "configure:1007: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001007if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001008 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009else
1010 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001011#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001012 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001013#endif
1014EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001015if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001016 ac_cv_prog_gcc=yes
1017else
1018 ac_cv_prog_gcc=no
1019fi
1020fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001022echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001023
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001024if test $ac_cv_prog_gcc = yes; then
1025 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001026else
1027 GCC=
1028fi
1029
1030ac_test_CFLAGS="${CFLAGS+set}"
1031ac_save_CFLAGS="$CFLAGS"
1032CFLAGS=
1033echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001034echo "configure:1035: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001035if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001036 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037else
1038 echo 'void f(){}' > conftest.c
1039if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001040 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001042 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001043fi
1044rm -f conftest*
1045
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001046fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
Guido van Rossumf78abae1997-01-21 22:02:36 +00001048echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001049if test "$ac_test_CFLAGS" = set; then
1050 CFLAGS="$ac_save_CFLAGS"
1051elif test $ac_cv_prog_cc_g = yes; then
1052 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001053 CFLAGS="-g -O2"
1054 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001055 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001056 fi
1057else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001058 if test "$GCC" = yes; then
1059 CFLAGS="-O2"
1060 else
1061 CFLAGS=
1062 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001063fi
1064
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001065echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001066echo "configure:1067: checking for Cygwin environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001067if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1068 echo $ac_n "(cached) $ac_c" 1>&6
1069else
1070 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001071#line 1072 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001072#include "confdefs.h"
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001073
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001074int main() {
1075
1076#ifndef __CYGWIN__
1077#define __CYGWIN__ __CYGWIN32__
1078#endif
1079return __CYGWIN__;
1080; return 0; }
1081EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001082if { (eval echo configure:1083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001083 rm -rf conftest*
1084 ac_cv_cygwin=yes
1085else
1086 echo "configure: failed program was:" >&5
1087 cat conftest.$ac_ext >&5
1088 rm -rf conftest*
1089 ac_cv_cygwin=no
1090fi
1091rm -f conftest*
1092rm -f conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001093fi
1094
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001095echo "$ac_t""$ac_cv_cygwin" 1>&6
1096CYGWIN=
1097test "$ac_cv_cygwin" = yes && CYGWIN=yes
1098echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001099echo "configure:1100: checking for mingw32 environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001100if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1101 echo $ac_n "(cached) $ac_c" 1>&6
1102else
1103 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001104#line 1105 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001105#include "confdefs.h"
1106
1107int main() {
1108return __MINGW32__;
1109; return 0; }
1110EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001111if { (eval echo configure:1112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001112 rm -rf conftest*
1113 ac_cv_mingw32=yes
1114else
1115 echo "configure: failed program was:" >&5
1116 cat conftest.$ac_ext >&5
1117 rm -rf conftest*
1118 ac_cv_mingw32=no
1119fi
1120rm -f conftest*
1121rm -f conftest*
1122fi
1123
1124echo "$ac_t""$ac_cv_mingw32" 1>&6
1125MINGW32=
1126test "$ac_cv_mingw32" = yes && MINGW32=yes
1127
1128
1129echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001130echo "configure:1131: checking for executable suffix" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001131if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1132 echo $ac_n "(cached) $ac_c" 1>&6
1133else
1134 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1135 ac_cv_exeext=.exe
1136else
1137 rm -f conftest*
1138 echo 'int main () { return 0; }' > conftest.$ac_ext
1139 ac_cv_exeext=
Neil Schemenauera35c6882001-02-27 04:45:05 +00001140 if { (eval echo configure:1141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001141 for file in conftest.*; do
1142 case $file in
1143 *.c | *.o | *.obj) ;;
1144 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1145 esac
1146 done
1147 else
1148 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1149 fi
1150 rm -f conftest*
1151 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1152fi
1153fi
1154
1155EXEEXT=""
1156test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1157echo "$ac_t""${ac_cv_exeext}" 1>&6
1158ac_exeext=$EXEEXT
1159
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001160echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001161echo "configure:1162: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001162# Check whether --with-suffix or --without-suffix was given.
1163if test "${with_suffix+set}" = set; then
1164 withval="$with_suffix"
1165
1166 case $withval in
1167 no) EXEEXT=;;
1168 yes) EXEEXT=.exe;;
1169 *) EXEEXT=$withval;;
1170 esac
1171fi
1172
1173echo "$ac_t""$EXEEXT" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001174
Guido van Rossumdd997f71998-10-07 19:58:26 +00001175case $MACHDEP in
1176bsdos*)
1177 case $CC in
1178 gcc) CC="$CC -D_HAVE_BSDI";;
1179 esac;;
1180esac
1181
Guido van Rossum24b1e751997-08-21 02:29:16 +00001182case $ac_sys_system in
1183hp*|HP*)
1184 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001185 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001186 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001187Monterey*)
1188 case $CC in
1189 cc) CC="$CC -Wl,-Bexport";;
1190 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001191esac
1192
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001193
1194echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001195echo "configure:1196: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001196if test -z "$LIBRARY"
1197then
1198 LIBRARY='libpython$(VERSION).a'
1199fi
1200echo "$ac_t""$LIBRARY" 1>&6
1201
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001202# LDLIBRARY is the name of the library to link against (as opposed to the
1203# name of the library into which to insert object files). On systems
1204# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
Guido van Rossumaef734b2001-01-10 21:09:12 +00001205# the Makefiles). On Cygwin LDLIBRARY is the import library, DLLLIBRARY is the
1206# shared (i.e., DLL) library.
1207
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001208
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001209LDLIBRARY="$LIBRARY"
Guido van Rossumca563f22001-01-23 01:52:44 +00001210DLLLIBRARY=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001211
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001212# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001213# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001214# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001215
1216echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001217echo "configure:1218: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001218if test -z "$LINKCC"
1219then
1220 case $ac_sys_system in
1221 AIX*)
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001222 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001223 dgux*)
1224 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001225 Monterey64*)
1226 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001227 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001228 esac
1229fi
1230echo "$ac_t""$LINKCC" 1>&6
1231
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001232echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001233echo "configure:1234: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001234
1235# NeXT framework builds require that the 'ar' library be converted into
1236# a bundle using libtool.
1237if test "$with_next_framework"
1238then
1239 LDLIBRARY='libpython$(VERSION).dylib'
1240fi
1241
1242# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001243case $MACHDEP in
1244dguxR4)
1245 LDLIBRARY='libpython$(VERSION).so'
1246 OPT="$OPT -pic"
1247 ;;
1248beos*)
1249 LDLIBRARY='libpython$(VERSION).so'
1250 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001251cygwin*)
1252 LDLIBRARY='libpython$(VERSION).dll.a'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001253 DLLLIBRARY='libpython$(VERSION).dll'
Guido van Rossumaef734b2001-01-10 21:09:12 +00001254 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001255esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001256echo "$ac_t""$LDLIBRARY" 1>&6
1257
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001258# Extract the first word of "ranlib", so it can be a program name with args.
1259set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001260echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001261echo "configure:1262: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001262if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001263 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001264else
1265 if test -n "$RANLIB"; then
1266 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1267else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001268 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1269 ac_dummy="$PATH"
1270 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271 test -z "$ac_dir" && ac_dir=.
1272 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001273 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274 break
1275 fi
1276 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001278 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001280fi
1281RANLIB="$ac_cv_prog_RANLIB"
1282if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001283 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001284else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001285 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001286fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287
1288
Guido van Rossum7f43da71994-08-01 12:15:30 +00001289for ac_prog in ar aal
1290do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001291# Extract the first word of "$ac_prog", so it can be a program name with args.
1292set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001293echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001294echo "configure:1295: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001295if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001296 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001297else
1298 if test -n "$AR"; then
1299 ac_cv_prog_AR="$AR" # Let the user override the test.
1300else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001301 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1302 ac_dummy="$PATH"
1303 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001304 test -z "$ac_dir" && ac_dir=.
1305 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001306 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001307 break
1308 fi
1309 done
1310 IFS="$ac_save_ifs"
1311fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312fi
1313AR="$ac_cv_prog_AR"
1314if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001315 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001317 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001318fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001319
1320test -n "$AR" && break
1321done
1322test -n "$AR" || AR="ar"
1323
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001324ac_aux_dir=
1325for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1326 if test -f $ac_dir/install-sh; then
1327 ac_aux_dir=$ac_dir
1328 ac_install_sh="$ac_aux_dir/install-sh -c"
1329 break
1330 elif test -f $ac_dir/install.sh; then
1331 ac_aux_dir=$ac_dir
1332 ac_install_sh="$ac_aux_dir/install.sh -c"
1333 break
1334 fi
1335done
1336if test -z "$ac_aux_dir"; then
1337 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001338fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001339ac_config_guess=$ac_aux_dir/config.guess
1340ac_config_sub=$ac_aux_dir/config.sub
1341ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1342
1343# Find a good install program. We prefer a C program (faster),
1344# so one script is as good as another. But avoid the broken or
1345# incompatible versions:
1346# SysV /etc/install, /usr/sbin/install
1347# SunOS /usr/etc/install
1348# IRIX /sbin/install
1349# AIX /bin/install
1350# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1351# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1352# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1353# ./install, which can be erroneously created by make from ./install.sh.
1354echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001355echo "configure:1356: checking for a BSD compatible install" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001356if test -z "$INSTALL"; then
1357if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1358 echo $ac_n "(cached) $ac_c" 1>&6
1359else
1360 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1361 for ac_dir in $PATH; do
1362 # Account for people who put trailing slashes in PATH elements.
1363 case "$ac_dir/" in
1364 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1365 *)
1366 # OSF1 and SCO ODT 3.0 have their own names for install.
1367 # Don't use installbsd from OSF since it installs stuff as root
1368 # by default.
1369 for ac_prog in ginstall scoinst install; do
1370 if test -f $ac_dir/$ac_prog; then
1371 if test $ac_prog = install &&
1372 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1373 # AIX install. It has an incompatible calling convention.
1374 :
1375 else
1376 ac_cv_path_install="$ac_dir/$ac_prog -c"
1377 break 2
1378 fi
1379 fi
1380 done
1381 ;;
1382 esac
1383 done
1384 IFS="$ac_save_IFS"
1385
1386fi
1387 if test "${ac_cv_path_install+set}" = set; then
1388 INSTALL="$ac_cv_path_install"
1389 else
1390 # As a last resort, use the slow shell script. We don't cache a
1391 # path for INSTALL within a source directory, because that will
1392 # break other packages using the cache if that directory is
1393 # removed, or if the path is relative.
1394 INSTALL="$ac_install_sh"
1395 fi
1396fi
1397echo "$ac_t""$INSTALL" 1>&6
1398
1399# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1400# It thinks the first close brace ends the variable substitution.
1401test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1402
1403test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1404
1405test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1406
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001407
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001408# Not every filesystem supports hard links
1409
1410if test -z "$LN" ; then
1411 case $ac_sys_system in
1412 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001413 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001414 *) LN=ln;;
1415 esac
1416fi
1417
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001418# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001419
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001420if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001421then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001422 case $GCC in
1423 yes)
1424 case $ac_cv_prog_cc_g in
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001425 yes) OPT="-g -O2 -Wall -Wstrict-prototypes";;
1426 *) OPT="-O2 -Wall -Wstrict-prototypes";;
Guido van Rossumedca74a1997-07-18 23:29:40 +00001427 esac
1428 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001429 *) OPT="-O";;
1430 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001431fi
1432
Trent Mick635f6fb2000-08-23 21:33:05 +00001433# The current (beta) Monterey compiler dies with optimizations
1434case $ac_sys_system in
1435Monterey*) OPT="";;
1436esac
1437
Guido van Rossum563e7081996-09-10 18:20:48 +00001438if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001439then
1440 OPT="$OPT $ac_arch_flags"
1441fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001442# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001443echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001444echo "configure:1445: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001445# On Suns, sometimes $CPP names a directory.
1446if test -n "$CPP" && test -d "$CPP"; then
1447 CPP=
1448fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001449if test -z "$CPP"; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001450if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001451 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001452else
1453 # This must be in double quotes, not single quotes, because CPP may get
1454 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001455 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001456 # On the NeXT, cc -E runs the code through the compiler's parser,
1457 # not just through cpp.
1458 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001459#line 1460 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001460#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001461#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001462Syntax Error
1463EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001464ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Neil Schemenauera35c6882001-02-27 04:45:05 +00001465{ (eval echo configure:1466: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001466ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1467if test -z "$ac_err"; then
1468 :
1469else
1470 echo "$ac_err" >&5
1471 echo "configure: failed program was:" >&5
1472 cat conftest.$ac_ext >&5
1473 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001474 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001475 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001476#line 1477 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001477#include "confdefs.h"
1478#include <assert.h>
1479Syntax Error
1480EOF
1481ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Neil Schemenauera35c6882001-02-27 04:45:05 +00001482{ (eval echo configure:1483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001483ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001484if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001485 :
1486else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001487 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001488 echo "configure: failed program was:" >&5
1489 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001490 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001491 CPP="${CC-cc} -nologo -E"
1492 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001493#line 1494 "configure"
Guido van Rossumff555e32000-09-22 15:38:21 +00001494#include "confdefs.h"
1495#include <assert.h>
1496Syntax Error
1497EOF
1498ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Neil Schemenauera35c6882001-02-27 04:45:05 +00001499{ (eval echo configure:1500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumff555e32000-09-22 15:38:21 +00001500ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1501if test -z "$ac_err"; then
1502 :
1503else
1504 echo "$ac_err" >&5
1505 echo "configure: failed program was:" >&5
1506 cat conftest.$ac_ext >&5
1507 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001508 CPP=/lib/cpp
1509fi
1510rm -f conftest*
1511fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001512rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001513fi
1514rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001515 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001516fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001517 CPP="$ac_cv_prog_CPP"
1518else
1519 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001520fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001521echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001522
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001523echo $ac_n "checking for AIX""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001524echo "configure:1525: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001525cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001526#line 1527 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001527#include "confdefs.h"
1528#ifdef _AIX
1529 yes
1530#endif
1531
1532EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001533if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1534 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001535 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001536 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001537#define _ALL_SOURCE 1
1538EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001539
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001540else
1541 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001542 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001543fi
1544rm -f conftest*
1545
1546
Guido van Rossumf78abae1997-01-21 22:02:36 +00001547ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001548echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001549echo "configure:1550: checking for minix/config.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001550if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001551 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001552else
1553 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001554#line 1555 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001555#include "confdefs.h"
1556#include <minix/config.h>
1557EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001558ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Neil Schemenauera35c6882001-02-27 04:45:05 +00001559{ (eval echo configure:1560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001560ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001561if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001562 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001563 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001564else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001565 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001566 echo "configure: failed program was:" >&5
1567 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001568 rm -rf conftest*
1569 eval "ac_cv_header_$ac_safe=no"
1570fi
1571rm -f conftest*
1572fi
1573if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001574 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001575 MINIX=yes
1576else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001577 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001578MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001579fi
1580
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001581if test "$MINIX" = yes; then
1582 cat >> confdefs.h <<\EOF
1583#define _POSIX_SOURCE 1
1584EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001585
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001586 cat >> confdefs.h <<\EOF
1587#define _POSIX_1_SOURCE 2
1588EOF
1589
1590 cat >> confdefs.h <<\EOF
1591#define _MINIX 1
1592EOF
1593
1594fi
1595
Guido van Rossumda88dad1995-01-26 00:46:29 +00001596
Guido van Rossum91922671997-10-09 20:24:13 +00001597echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001598echo "configure:1599: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001599if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001600 echo $ac_n "(cached) $ac_c" 1>&6
1601else
1602 ac_save_cc="$CC"
1603CC="$CC -OPT:Olimit=0"
1604if test "$cross_compiling" = yes; then
1605 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1606else
1607 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001608#line 1609 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001609#include "confdefs.h"
1610int main() { return 0; }
1611EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001612if { (eval echo configure:1613: \"$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 +00001613then
1614 ac_cv_opt_olimit_ok=yes
1615else
1616 echo "configure: failed program was:" >&5
1617 cat conftest.$ac_ext >&5
1618 rm -fr conftest*
1619 ac_cv_opt_olimit_ok=no
1620fi
1621rm -fr conftest*
1622fi
1623
1624CC="$ac_save_cc"
1625fi
1626
1627echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001628if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001629 case $ac_sys_system in
1630 Darwin*) OPT="$OPT" ;;
1631 *) OPT="$OPT -OPT:Olimit=0";;
1632 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001633else
1634 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001635echo "configure:1636: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001636 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001637 echo $ac_n "(cached) $ac_c" 1>&6
1638else
1639 ac_save_cc="$CC"
1640 CC="$CC -Olimit 1500"
1641 if test "$cross_compiling" = yes; then
1642 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1643else
1644 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001645#line 1646 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001646#include "confdefs.h"
1647int main() { return 0; }
1648EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001649if { (eval echo configure:1650: \"$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 +00001650then
1651 ac_cv_olimit_ok=yes
1652else
1653 echo "configure: failed program was:" >&5
1654 cat conftest.$ac_ext >&5
1655 rm -fr conftest*
1656 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001657fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001658rm -fr conftest*
1659fi
1660
1661 CC="$ac_save_cc"
1662fi
1663
1664 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1665 if test $ac_cv_olimit_ok = yes; then
1666 OPT="$OPT -Olimit 1500"
1667 fi
1668fi
1669
Guido van Rossum84e7b241996-08-19 21:59:00 +00001670
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001671# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001672echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001673echo "configure:1674: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001674if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001675 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001676else
1677 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001678#line 1679 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001679#include "confdefs.h"
1680#include <stdlib.h>
1681#include <stdarg.h>
1682#include <string.h>
1683#include <float.h>
1684EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001685ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Neil Schemenauera35c6882001-02-27 04:45:05 +00001686{ (eval echo configure:1687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001687ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001688if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001689 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001690 ac_cv_header_stdc=yes
1691else
1692 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001693 echo "configure: failed program was:" >&5
1694 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001695 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001696 ac_cv_header_stdc=no
1697fi
1698rm -f conftest*
1699
1700if test $ac_cv_header_stdc = yes; then
1701 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1702cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001703#line 1704 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704#include "confdefs.h"
1705#include <string.h>
1706EOF
1707if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1708 egrep "memchr" >/dev/null 2>&1; then
1709 :
1710else
1711 rm -rf conftest*
1712 ac_cv_header_stdc=no
1713fi
1714rm -f conftest*
1715
1716fi
1717
1718if test $ac_cv_header_stdc = yes; then
1719 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1720cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001721#line 1722 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001722#include "confdefs.h"
1723#include <stdlib.h>
1724EOF
1725if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1726 egrep "free" >/dev/null 2>&1; then
1727 :
1728else
1729 rm -rf conftest*
1730 ac_cv_header_stdc=no
1731fi
1732rm -f conftest*
1733
1734fi
1735
1736if test $ac_cv_header_stdc = yes; then
1737 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1738if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001739 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001740else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001741 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001742#line 1743 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001743#include "confdefs.h"
1744#include <ctype.h>
1745#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1746#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001747#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001748int main () { int i; for (i = 0; i < 256; i++)
1749if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1750exit (0); }
1751
1752EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001753if { (eval echo configure:1754: \"$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 +00001754then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001755 :
1756else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001757 echo "configure: failed program was:" >&5
1758 cat conftest.$ac_ext >&5
1759 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001760 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001761fi
1762rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001763fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001764
1765fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001766fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001767
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001768echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001769if test $ac_cv_header_stdc = yes; then
1770 cat >> confdefs.h <<\EOF
1771#define STDC_HEADERS 1
1772EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001773
1774fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001775
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00001776for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00001777signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakea50d6ec2000-08-31 16:13:20 +00001778sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001779sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00001780sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
1781ndbm.h db1/ndbm.h gdbm/ndbm.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001782do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001783ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001784echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001785echo "configure:1786: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001786if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001787 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001788else
1789 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001790#line 1791 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001791#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001792#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001793EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001794ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Neil Schemenauera35c6882001-02-27 04:45:05 +00001795{ (eval echo configure:1796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001796ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001797if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001798 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001799 eval "ac_cv_header_$ac_safe=yes"
1800else
1801 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001802 echo "configure: failed program was:" >&5
1803 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001804 rm -rf conftest*
1805 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001806fi
1807rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001808fi
1809if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001810 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001811 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001812 cat >> confdefs.h <<EOF
1813#define $ac_tr_hdr 1
1814EOF
1815
1816else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001817 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001818fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001819done
1820
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001821ac_header_dirent=no
1822for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1823do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001824ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001825echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001826echo "configure:1827: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001827if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001828 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001829else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001830 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001831#line 1832 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001832#include "confdefs.h"
1833#include <sys/types.h>
1834#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001835int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001836DIR *dirp = 0;
1837; return 0; }
1838EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001839if { (eval echo configure:1840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001840 rm -rf conftest*
1841 eval "ac_cv_header_dirent_$ac_safe=yes"
1842else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001843 echo "configure: failed program was:" >&5
1844 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001845 rm -rf conftest*
1846 eval "ac_cv_header_dirent_$ac_safe=no"
1847fi
1848rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001849fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001850if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001851 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001852 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001853 cat >> confdefs.h <<EOF
1854#define $ac_tr_hdr 1
1855EOF
1856 ac_header_dirent=$ac_hdr; break
1857else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001858 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001859fi
1860done
1861# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1862if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001863echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001864echo "configure:1865: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001865ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001866if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001867 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001868else
1869 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001870LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001871cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001872#line 1873 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001873#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001874/* Override any gcc2 internal prototype to avoid an error. */
1875/* We use char because int might match the return type of a gcc2
1876 builtin and then its argument prototype would still apply. */
1877char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001878
Guido van Rossumf78abae1997-01-21 22:02:36 +00001879int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001880opendir()
1881; return 0; }
1882EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001883if { (eval echo configure:1884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001884 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001885 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001886else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001887 echo "configure: failed program was:" >&5
1888 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001889 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001890 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001891fi
1892rm -f conftest*
1893LIBS="$ac_save_LIBS"
1894
1895fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001896if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001897 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001898 LIBS="$LIBS -ldir"
1899else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001900 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001901fi
1902
1903else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001904echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001905echo "configure:1906: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001906ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001907if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001908 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001909else
1910 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001911LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001912cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001913#line 1914 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001914#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001915/* Override any gcc2 internal prototype to avoid an error. */
1916/* We use char because int might match the return type of a gcc2
1917 builtin and then its argument prototype would still apply. */
1918char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001919
Guido van Rossumf78abae1997-01-21 22:02:36 +00001920int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001921opendir()
1922; return 0; }
1923EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001924if { (eval echo configure:1925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001925 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001926 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001927else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001928 echo "configure: failed program was:" >&5
1929 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001930 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001931 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001932fi
1933rm -f conftest*
1934LIBS="$ac_save_LIBS"
1935
1936fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001937if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001938 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001939 LIBS="$LIBS -lx"
1940else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001941 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001942fi
1943
1944fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001945
1946
1947# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001948was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001949echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001950echo "configure:1951: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001951cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001952#line 1953 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001953#include "confdefs.h"
1954#include <time.h>
1955EOF
1956if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1957 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001958 rm -rf conftest*
1959 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001960else
1961 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001962 cat >> confdefs.h <<\EOF
1963#define clock_t long
1964EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001965
1966fi
1967rm -f conftest*
1968
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001969echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001970
Guido van Rossum84e7b241996-08-19 21:59:00 +00001971# Add some code to confdefs.h so that the test for off_t works on SCO
1972cat >> confdefs.h <<\EOF
1973#if defined(SCO_DS)
1974#undef _OFF_T
1975#endif
1976EOF
1977
Guido van Rossumef2255b2000-03-10 22:30:29 +00001978# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001979echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00001980echo "configure:1981: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001981if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001982 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001983else
1984 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00001985#line 1986 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001986#include "confdefs.h"
1987#include <sys/types.h>
1988#if STDC_HEADERS
1989#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001990#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001991#endif
1992EOF
1993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001994 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 +00001995 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001996 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001997else
1998 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001999 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002000fi
2001rm -f conftest*
2002
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002003fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002004echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2005if test $ac_cv_type_mode_t = no; then
2006 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002007#define mode_t int
2008EOF
2009
2010fi
2011
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002012echo $ac_n "checking for off_t""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002013echo "configure:2014: checking for off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002014if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002015 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002016else
2017 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002018#line 2019 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002019#include "confdefs.h"
2020#include <sys/types.h>
2021#if STDC_HEADERS
2022#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002023#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002024#endif
2025EOF
2026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002027 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 +00002028 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002029 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002030else
2031 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002032 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002033fi
2034rm -f conftest*
2035
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002036fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002037echo "$ac_t""$ac_cv_type_off_t" 1>&6
2038if test $ac_cv_type_off_t = no; then
2039 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002040#define off_t long
2041EOF
2042
2043fi
2044
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002045echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002046echo "configure:2047: checking for pid_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002047if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002048 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002049else
2050 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002051#line 2052 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002052#include "confdefs.h"
2053#include <sys/types.h>
2054#if STDC_HEADERS
2055#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002056#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002057#endif
2058EOF
2059if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002060 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 +00002061 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002062 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002063else
2064 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002065 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002066fi
2067rm -f conftest*
2068
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002069fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002070echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2071if test $ac_cv_type_pid_t = no; then
2072 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002073#define pid_t int
2074EOF
2075
2076fi
2077
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002078echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002079echo "configure:2080: checking return type of signal handlers" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002080if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002081 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002082else
2083 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002084#line 2085 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002085#include "confdefs.h"
2086#include <sys/types.h>
2087#include <signal.h>
2088#ifdef signal
2089#undef signal
2090#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002091#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002092extern "C" void (*signal (int, void (*)(int)))(int);
2093#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002094void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002095#endif
2096
Guido van Rossumf78abae1997-01-21 22:02:36 +00002097int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002098int i;
2099; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002100EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002101if { (eval echo configure:2102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002102 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002103 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002104else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002105 echo "configure: failed program was:" >&5
2106 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002107 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002108 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002109fi
2110rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002111fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002112
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002113echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002114cat >> confdefs.h <<EOF
2115#define RETSIGTYPE $ac_cv_type_signal
2116EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002117
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002118
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002119echo $ac_n "checking for size_t""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002120echo "configure:2121: checking for size_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002121if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002122 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002123else
2124 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002125#line 2126 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002126#include "confdefs.h"
2127#include <sys/types.h>
2128#if STDC_HEADERS
2129#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002130#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002131#endif
2132EOF
2133if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002134 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 +00002135 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002136 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002137else
2138 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002139 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002140fi
2141rm -f conftest*
2142
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002143fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002144echo "$ac_t""$ac_cv_type_size_t" 1>&6
2145if test $ac_cv_type_size_t = no; then
2146 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002147#define size_t unsigned
2148EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002149
2150fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002151
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002152echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002153echo "configure:2154: checking for uid_t in sys/types.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002154if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002155 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002156else
2157 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002158#line 2159 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002159#include "confdefs.h"
2160#include <sys/types.h>
2161EOF
2162if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2163 egrep "uid_t" >/dev/null 2>&1; then
2164 rm -rf conftest*
2165 ac_cv_type_uid_t=yes
2166else
2167 rm -rf conftest*
2168 ac_cv_type_uid_t=no
2169fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002170rm -f conftest*
2171
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002172fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002173
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002174echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002175if test $ac_cv_type_uid_t = no; then
2176 cat >> confdefs.h <<\EOF
2177#define uid_t int
2178EOF
2179
2180 cat >> confdefs.h <<\EOF
2181#define gid_t int
2182EOF
2183
2184fi
2185
Guido van Rossum627b2d71993-12-24 10:39:16 +00002186
Guido van Rossumef2255b2000-03-10 22:30:29 +00002187# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002188echo $ac_n "checking size of int""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002189echo "configure:2190: checking size of int" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002190if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002191 echo $ac_n "(cached) $ac_c" 1>&6
2192else
2193 if test "$cross_compiling" = yes; then
2194 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2195else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002196 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002197#line 2198 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002198#include "confdefs.h"
2199#include <stdio.h>
2200main()
2201{
2202 FILE *f=fopen("conftestval", "w");
2203 if (!f) exit(1);
2204 fprintf(f, "%d\n", sizeof(int));
2205 exit(0);
2206}
2207EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002208if { (eval echo configure:2209: \"$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 +00002209then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002210 ac_cv_sizeof_int=`cat conftestval`
2211else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002212 echo "configure: failed program was:" >&5
2213 cat conftest.$ac_ext >&5
2214 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002215 ac_cv_sizeof_int=0
2216fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002217rm -fr conftest*
2218fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002219
2220fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002221echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2222cat >> confdefs.h <<EOF
2223#define SIZEOF_INT $ac_cv_sizeof_int
2224EOF
2225
2226
2227echo $ac_n "checking size of long""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002228echo "configure:2229: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002229if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002230 echo $ac_n "(cached) $ac_c" 1>&6
2231else
2232 if test "$cross_compiling" = yes; then
2233 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2234else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002235 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002236#line 2237 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002237#include "confdefs.h"
2238#include <stdio.h>
2239main()
2240{
2241 FILE *f=fopen("conftestval", "w");
2242 if (!f) exit(1);
2243 fprintf(f, "%d\n", sizeof(long));
2244 exit(0);
2245}
2246EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002247if { (eval echo configure:2248: \"$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 +00002248then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002249 ac_cv_sizeof_long=`cat conftestval`
2250else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002251 echo "configure: failed program was:" >&5
2252 cat conftest.$ac_ext >&5
2253 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002254 ac_cv_sizeof_long=0
2255fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002256rm -fr conftest*
2257fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002258
2259fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002260echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2261cat >> confdefs.h <<EOF
2262#define SIZEOF_LONG $ac_cv_sizeof_long
2263EOF
2264
2265
Guido van Rossumad678af1998-10-02 14:42:15 +00002266echo $ac_n "checking size of void *""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002267echo "configure:2268: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002268if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002269 echo $ac_n "(cached) $ac_c" 1>&6
2270else
2271 if test "$cross_compiling" = yes; then
2272 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2273else
2274 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002275#line 2276 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002276#include "confdefs.h"
2277#include <stdio.h>
2278main()
2279{
2280 FILE *f=fopen("conftestval", "w");
2281 if (!f) exit(1);
2282 fprintf(f, "%d\n", sizeof(void *));
2283 exit(0);
2284}
2285EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002286if { (eval echo configure:2287: \"$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 +00002287then
2288 ac_cv_sizeof_void_p=`cat conftestval`
2289else
2290 echo "configure: failed program was:" >&5
2291 cat conftest.$ac_ext >&5
2292 rm -fr conftest*
2293 ac_cv_sizeof_void_p=0
2294fi
2295rm -fr conftest*
2296fi
2297
2298fi
2299echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2300cat >> confdefs.h <<EOF
2301#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2302EOF
2303
2304
Guido van Rossumef2255b2000-03-10 22:30:29 +00002305echo $ac_n "checking size of char""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002306echo "configure:2307: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002307if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002308 echo $ac_n "(cached) $ac_c" 1>&6
2309else
2310 if test "$cross_compiling" = yes; then
2311 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2312else
2313 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002314#line 2315 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002315#include "confdefs.h"
2316#include <stdio.h>
2317main()
2318{
2319 FILE *f=fopen("conftestval", "w");
2320 if (!f) exit(1);
2321 fprintf(f, "%d\n", sizeof(char));
2322 exit(0);
2323}
2324EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002325if { (eval echo configure:2326: \"$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 +00002326then
2327 ac_cv_sizeof_char=`cat conftestval`
2328else
2329 echo "configure: failed program was:" >&5
2330 cat conftest.$ac_ext >&5
2331 rm -fr conftest*
2332 ac_cv_sizeof_char=0
2333fi
2334rm -fr conftest*
2335fi
2336
2337fi
2338echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2339cat >> confdefs.h <<EOF
2340#define SIZEOF_CHAR $ac_cv_sizeof_char
2341EOF
2342
2343
2344echo $ac_n "checking size of short""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002345echo "configure:2346: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002346if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002347 echo $ac_n "(cached) $ac_c" 1>&6
2348else
2349 if test "$cross_compiling" = yes; then
2350 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2351else
2352 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002353#line 2354 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002354#include "confdefs.h"
2355#include <stdio.h>
2356main()
2357{
2358 FILE *f=fopen("conftestval", "w");
2359 if (!f) exit(1);
2360 fprintf(f, "%d\n", sizeof(short));
2361 exit(0);
2362}
2363EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002364if { (eval echo configure:2365: \"$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 +00002365then
2366 ac_cv_sizeof_short=`cat conftestval`
2367else
2368 echo "configure: failed program was:" >&5
2369 cat conftest.$ac_ext >&5
2370 rm -fr conftest*
2371 ac_cv_sizeof_short=0
2372fi
2373rm -fr conftest*
2374fi
2375
2376fi
2377echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2378cat >> confdefs.h <<EOF
2379#define SIZEOF_SHORT $ac_cv_sizeof_short
2380EOF
2381
2382
2383echo $ac_n "checking size of float""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002384echo "configure:2385: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002385if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002386 echo $ac_n "(cached) $ac_c" 1>&6
2387else
2388 if test "$cross_compiling" = yes; then
2389 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2390else
2391 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002392#line 2393 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002393#include "confdefs.h"
2394#include <stdio.h>
2395main()
2396{
2397 FILE *f=fopen("conftestval", "w");
2398 if (!f) exit(1);
2399 fprintf(f, "%d\n", sizeof(float));
2400 exit(0);
2401}
2402EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002403if { (eval echo configure:2404: \"$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 +00002404then
2405 ac_cv_sizeof_float=`cat conftestval`
2406else
2407 echo "configure: failed program was:" >&5
2408 cat conftest.$ac_ext >&5
2409 rm -fr conftest*
2410 ac_cv_sizeof_float=0
2411fi
2412rm -fr conftest*
2413fi
2414
2415fi
2416echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2417cat >> confdefs.h <<EOF
2418#define SIZEOF_FLOAT $ac_cv_sizeof_float
2419EOF
2420
2421
2422echo $ac_n "checking size of double""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002423echo "configure:2424: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002424if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002425 echo $ac_n "(cached) $ac_c" 1>&6
2426else
2427 if test "$cross_compiling" = yes; then
2428 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2429else
2430 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002431#line 2432 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002432#include "confdefs.h"
2433#include <stdio.h>
2434main()
2435{
2436 FILE *f=fopen("conftestval", "w");
2437 if (!f) exit(1);
2438 fprintf(f, "%d\n", sizeof(double));
2439 exit(0);
2440}
2441EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002442if { (eval echo configure:2443: \"$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 +00002443then
2444 ac_cv_sizeof_double=`cat conftestval`
2445else
2446 echo "configure: failed program was:" >&5
2447 cat conftest.$ac_ext >&5
2448 rm -fr conftest*
2449 ac_cv_sizeof_double=0
2450fi
2451rm -fr conftest*
2452fi
2453
2454fi
2455echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2456cat >> confdefs.h <<EOF
2457#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2458EOF
2459
2460
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002461echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002462echo "configure:2463: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002463if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002464 echo $ac_n "(cached) $ac_c" 1>&6
2465else
2466 if test "$cross_compiling" = yes; then
2467 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2468else
2469 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002470#line 2471 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002471#include "confdefs.h"
2472#include <stdio.h>
2473main()
2474{
2475 FILE *f=fopen("conftestval", "w");
2476 if (!f) exit(1);
2477 fprintf(f, "%d\n", sizeof(fpos_t));
2478 exit(0);
2479}
2480EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002481if { (eval echo configure:2482: \"$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 +00002482then
2483 ac_cv_sizeof_fpos_t=`cat conftestval`
2484else
2485 echo "configure: failed program was:" >&5
2486 cat conftest.$ac_ext >&5
2487 rm -fr conftest*
2488 ac_cv_sizeof_fpos_t=0
2489fi
2490rm -fr conftest*
2491fi
2492
2493fi
2494echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2495cat >> confdefs.h <<EOF
2496#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2497EOF
2498
2499
Guido van Rossum0a516c91994-09-12 10:58:40 +00002500
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002501echo $ac_n "checking for long long support""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002502echo "configure:2503: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002503have_long_long=no
2504cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002505#line 2506 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002506#include "confdefs.h"
2507
2508int main() {
2509long long x; x = (long long)0;
2510; return 0; }
2511EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002512if { (eval echo configure:2513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002513 rm -rf conftest*
2514 cat >> confdefs.h <<\EOF
2515#define HAVE_LONG_LONG 1
2516EOF
2517 have_long_long=yes
2518else
2519 echo "configure: failed program was:" >&5
2520 cat conftest.$ac_ext >&5
2521fi
2522rm -f conftest*
2523echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002524if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002525echo $ac_n "checking size of long long""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002526echo "configure:2527: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002527if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002528 echo $ac_n "(cached) $ac_c" 1>&6
2529else
2530 if test "$cross_compiling" = yes; then
2531 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2532else
2533 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002534#line 2535 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002535#include "confdefs.h"
2536#include <stdio.h>
2537main()
2538{
2539 FILE *f=fopen("conftestval", "w");
2540 if (!f) exit(1);
2541 fprintf(f, "%d\n", sizeof(long long));
2542 exit(0);
2543}
2544EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002545if { (eval echo configure:2546: \"$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 +00002546then
2547 ac_cv_sizeof_long_long=`cat conftestval`
2548else
2549 echo "configure: failed program was:" >&5
2550 cat conftest.$ac_ext >&5
2551 rm -fr conftest*
2552 ac_cv_sizeof_long_long=0
2553fi
2554rm -fr conftest*
2555fi
2556
2557fi
2558echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2559cat >> confdefs.h <<EOF
2560#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2561EOF
2562
2563
2564fi
2565
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002566echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002567echo "configure:2568: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002568have_uintptr_t=no
2569cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002570#line 2571 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002571#include "confdefs.h"
2572
2573int main() {
2574uintptr_t x; x = (uintptr_t)0;
2575; return 0; }
2576EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002577if { (eval echo configure:2578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002578 rm -rf conftest*
2579 cat >> confdefs.h <<\EOF
2580#define HAVE_UINTPTR_T 1
2581EOF
2582 have_uintptr_t=yes
2583else
2584 echo "configure: failed program was:" >&5
2585 cat conftest.$ac_ext >&5
2586fi
2587rm -f conftest*
2588echo "$ac_t""$have_uintptr_t" 1>&6
2589if test "$have_uintptr_t" = yes ; then
2590echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002591echo "configure:2592: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002592if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002593 echo $ac_n "(cached) $ac_c" 1>&6
2594else
2595 if test "$cross_compiling" = yes; then
2596 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2597else
2598 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002599#line 2600 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002600#include "confdefs.h"
2601#include <stdio.h>
2602main()
2603{
2604 FILE *f=fopen("conftestval", "w");
2605 if (!f) exit(1);
2606 fprintf(f, "%d\n", sizeof(uintptr_t));
2607 exit(0);
2608}
2609EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002610if { (eval echo configure:2611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002611then
2612 ac_cv_sizeof_uintptr_t=`cat conftestval`
2613else
2614 echo "configure: failed program was:" >&5
2615 cat conftest.$ac_ext >&5
2616 rm -fr conftest*
2617 ac_cv_sizeof_uintptr_t=0
2618fi
2619rm -fr conftest*
2620fi
2621
2622fi
2623echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2624cat >> confdefs.h <<EOF
2625#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2626EOF
2627
2628
2629fi
2630
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002631# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2632echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002633echo "configure:2634: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002634if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002635 echo $ac_n "(cached) $ac_c" 1>&6
2636else
2637 if test "$cross_compiling" = yes; then
2638 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2639else
2640 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002641#line 2642 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002642#include "confdefs.h"
2643#include <stdio.h>
2644#include <sys/types.h>
2645main()
2646{
2647 FILE *f=fopen("conftestval", "w");
2648 if (!f) exit(1);
2649 fprintf(f, "%d\n", sizeof(off_t));
2650 exit(0);
2651}
2652EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002653if { (eval echo configure:2654: \"$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 +00002654then
2655 ac_cv_sizeof_off_t=`cat conftestval`
2656else
2657 echo "configure: failed program was:" >&5
2658 cat conftest.$ac_ext >&5
2659 rm -fr conftest*
2660 ac_cv_sizeof_off_t=0
2661fi
2662rm -fr conftest*
2663fi
2664
2665
2666fi
2667
2668echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2669cat >> confdefs.h <<EOF
2670#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2671EOF
2672
2673
2674echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002675echo "configure:2676: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002676if test "$have_long_long" = yes -a \
2677 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2678 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002679 cat >> confdefs.h <<\EOF
2680#define HAVE_LARGEFILE_SUPPORT 1
2681EOF
2682
2683 echo "$ac_t""yes" 1>&6
2684else
2685 echo "$ac_t""no" 1>&6
2686fi
2687
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002688# AC_CHECK_SIZEOF() doesn't include <time.h>.
2689echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002690echo "configure:2691: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002691if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002692 echo $ac_n "(cached) $ac_c" 1>&6
2693else
2694 if test "$cross_compiling" = yes; then
2695 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2696else
2697 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002698#line 2699 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002699#include "confdefs.h"
2700#include <stdio.h>
2701#include <time.h>
2702main()
2703{
2704 FILE *f=fopen("conftestval", "w");
2705 if (!f) exit(1);
2706 fprintf(f, "%d\n", sizeof(time_t));
2707 exit(0);
2708}
2709EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002710if { (eval echo configure:2711: \"$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 +00002711then
2712 ac_cv_sizeof_time_t=`cat conftestval`
2713else
2714 echo "configure: failed program was:" >&5
2715 cat conftest.$ac_ext >&5
2716 rm -fr conftest*
2717 ac_cv_sizeof_time_t=0
2718fi
2719rm -fr conftest*
2720fi
2721
2722
2723fi
2724
2725echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2726cat >> confdefs.h <<EOF
2727#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2728EOF
2729
2730
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002731
Trent Mick635f6fb2000-08-23 21:33:05 +00002732# if have pthread_t then define SIZEOF_PTHREAD_T
2733echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002734echo "configure:2735: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002735have_pthread_t=no
2736cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002737#line 2738 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002738#include "confdefs.h"
2739#include <pthread.h>
2740int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002741pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002742; return 0; }
2743EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002744if { (eval echo configure:2745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002745 rm -rf conftest*
2746 have_pthread_t=yes
2747else
2748 echo "configure: failed program was:" >&5
2749 cat conftest.$ac_ext >&5
2750fi
2751rm -f conftest*
2752echo "$ac_t""$have_pthread_t" 1>&6
2753if test "$have_pthread_t" = yes ; then
2754 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2755 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002756echo "configure:2757: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002757 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002758 echo $ac_n "(cached) $ac_c" 1>&6
2759else
2760 if test "$cross_compiling" = yes; then
2761 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2762else
2763 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002764#line 2765 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002765#include "confdefs.h"
2766#include <stdio.h>
2767 #include <pthread.h>
2768 main()
2769 {
2770 FILE *f=fopen("conftestval", "w");
2771 if (!f) exit(1);
2772 fprintf(f, "%d\n", sizeof(pthread_t));
2773 exit(0);
2774 }
2775EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00002776if { (eval echo configure:2777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Trent Mick635f6fb2000-08-23 21:33:05 +00002777then
2778 ac_cv_sizeof_pthread_t=`cat conftestval`
2779else
2780 echo "configure: failed program was:" >&5
2781 cat conftest.$ac_ext >&5
2782 rm -fr conftest*
2783 ac_cv_sizeof_pthread_t=0
2784fi
2785rm -fr conftest*
2786fi
2787
2788
2789fi
2790
2791 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2792 cat >> confdefs.h <<EOF
2793#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2794EOF
2795
2796fi
2797
2798
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002799# Minor variations in building a framework between NextStep versions 4 and 5
2800
2801case $ac_sys_system/$ac_sys_release in
Guido van Rossum5839e582000-10-09 19:52:35 +00002802 Darwin/*)
2803 ns_undef_sym='_environ'
2804 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002805 next/4*)
2806 ns_undef_sym='__environ'
2807 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2808 next/5*)
2809 ns_undef_sym='_environ'
2810 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2811esac
2812
2813echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002814echo "configure:2815: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002815if test "$with_next_framework"
2816then
2817 OPT="$OPT -fno-common"
2818 # -U __environ is needed since bundles don't have access
2819 # to crt0 when built but will always be linked against it
2820 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2821 cat >> confdefs.h <<\EOF
2822#define WITH_NEXT_FRAMEWORK 1
2823EOF
2824
2825 echo "$ac_t""yes" 1>&6
2826else
2827 echo "$ac_t""no" 1>&6
2828fi
2829
2830echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002831echo "configure:2832: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002832if test "$with_next_framework" -o "$with_dyld"
2833then
2834 if test "$with_dyld"
2835 then
2836 echo "$ac_t""yes" 1>&6
2837 else
2838 echo "$ac_t""required for framework build" 1>&6
2839 fi
2840 cat >> confdefs.h <<\EOF
2841#define WITH_DYLD 1
2842EOF
2843
2844 ns_dyld='set'
2845else
2846 echo "$ac_t""no" 1>&6
2847fi
2848
Guido van Rossum0a516c91994-09-12 10:58:40 +00002849# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002850
2851
2852
2853
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002854
Guido van Rossum0a516c91994-09-12 10:58:40 +00002855# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00002856# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002857echo $ac_n "checking SO""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002858echo "configure:2859: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002859if test -z "$SO"
2860then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002861 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002862 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00002863 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00002864 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002865 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002866fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002867echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002868# LDSHARED is the ld *command* used to create shared library
2869# -- "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 +00002870# (Shared libraries in this instance are shared modules to be loaded into
2871# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002872echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002873echo "configure:2874: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002874if test -z "$LDSHARED"
2875then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002876 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002877 AIX*)
2878 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
2879 LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp"
2880 ;;
2881 BeOS*)
2882 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
2883 LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
2884 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00002885 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002886 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002887 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a662000-05-26 12:22:54 +00002888 SunOS/5*)
2889 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00002890 then LDSHARED='$(CC) -shared'
Greg Ward57c9a662000-05-26 12:22:54 +00002891 else LDSHARED="ld -G";
2892 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002893 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002894 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2895 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002896 Darwin/*|next/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002897 if test "$ns_dyld"
Guido van Rossumacb14c72001-01-10 21:41:16 +00002898 then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002899 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2900 fi
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002901 if test "$with_next_framework" ; then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002902 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2903 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002904 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002905 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002906 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002907 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002908 NetBSD*)
2909 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2910 then
2911 LDSHARED="cc -shared"
2912 else
2913 LDSHARED="ld -Bshareable"
2914 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002915 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00002916 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00002917 then
2918 LDSHARED="cc -shared ${LDFLAGS}"
2919 else
2920 LDSHARED="ld -Bshareable ${LDFLAGS}"
2921 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002922 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002923 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00002924 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002925 *) LDSHARED="ld";;
2926 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002927fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002928echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002929BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00002930# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002931# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002932echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002933echo "configure:2934: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002934if test -z "$CCSHARED"
2935then
Guido van Rossum07397971997-04-29 21:49:50 +00002936 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00002937 SunOS*) if test "$GCC" = yes;
2938 then CCSHARED="-fPIC";
2939 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00002940 hp*|HP*) if test "$GCC" = yes;
2941 then CCSHARED="-fpic";
2942 else CCSHARED="+z";
2943 fi;;
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002944 Linux*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002945 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002946 OpenBSD*) CCSHARED="-fpic";;
2947 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002948 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002949 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002950 IRIX*/6*) case $CC in
2951 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002952 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002953 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00002954 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002955 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002956fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002957echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002958# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002959# the python executable -- this is only needed for a few systems
2960echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002961echo "configure:2962: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002962if test -z "$LINKFORSHARED"
2963then
Guido van Rossum07397971997-04-29 21:49:50 +00002964 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002965 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002966 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002967 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002968 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002969 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002970 # -u libsys_s pulls in all symbols in libsys
2971 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2972 # -u __dummy makes the linker aware of the objc runtime
2973 # in System.framework; otherwise, __objcInit (referenced in
2974 # crt1.o) gets erroneously defined as common, which breaks dynamic
2975 # loading of any modules which reference it in System.framework
2976 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossumacb14c72001-01-10 21:41:16 +00002977 Darwin/*) LINKFORSHARED="-u __dummy -framework System -framework Foundation" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002978 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00002979 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002980 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00002981 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2982 then
2983 LINKFORSHARED="-Wl,--export-dynamic"
2984 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002985 SunOS/5*) case $CC in
2986 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002987 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002988 then
2989 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002990 fi;;
2991 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002992 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002993fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002994echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002995
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002996
2997echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00002998echo "configure:2999: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002999if test ! "$LIBRARY" = "$LDLIBRARY"
3000then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003001 case $ac_sys_system in
3002 CYGWIN*)
3003 # Cygwin needs CCSHARED when building extension DLLs
3004 # but not when building the interpreter DLL.
3005 CFLAGSFORSHARED='';;
3006 *)
3007 CFLAGSFORSHARED='$(CCSHARED)'
3008 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003009fi
3010echo "$ac_t""$CFLAGSFORSHARED" 1>&6
3011
Guido van Rossum627b2d71993-12-24 10:39:16 +00003012# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00003013echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003014echo "configure:3015: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003015ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003016if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003017 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003018else
3019 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003020LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003021cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003022#line 3023 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003023#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003024/* Override any gcc2 internal prototype to avoid an error. */
3025/* We use char because int might match the return type of a gcc2
3026 builtin and then its argument prototype would still apply. */
3027char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003028
Guido van Rossumf78abae1997-01-21 22:02:36 +00003029int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003030dlopen()
3031; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003032EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003033if { (eval echo configure:3034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003034 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003035 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003036else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003037 echo "configure: failed program was:" >&5
3038 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003039 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003040 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003041fi
3042rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003043LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003044
Guido van Rossum627b2d71993-12-24 10:39:16 +00003045fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003046if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003047 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003048 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3049 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003050 cat >> confdefs.h <<EOF
3051#define $ac_tr_lib 1
3052EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003053
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003054 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003055
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003056else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003057 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003058fi
3059 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00003060echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003061echo "configure:3062: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003062ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003063if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003064 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003065else
3066 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003067LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003068cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003069#line 3070 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003070#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003071/* Override any gcc2 internal prototype to avoid an error. */
3072/* We use char because int might match the return type of a gcc2
3073 builtin and then its argument prototype would still apply. */
3074char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003075
Guido van Rossumf78abae1997-01-21 22:02:36 +00003076int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003077shl_load()
3078; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003079EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003080if { (eval echo configure:3081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003081 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003082 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003083else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003084 echo "configure: failed program was:" >&5
3085 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003086 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003087 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003088fi
3089rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003090LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003091
Guido van Rossum627b2d71993-12-24 10:39:16 +00003092fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003093if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003094 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003095 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3096 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003097 cat >> confdefs.h <<EOF
3098#define $ac_tr_lib 1
3099EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003100
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003101 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003102
3103else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003104 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003105fi
3106 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003107
Skip Montanarocb853262000-08-30 22:29:48 +00003108# Check for --with-pydebug
3109echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003110echo "configure:3111: checking for --with-pydebug" >&5
Skip Montanarocb853262000-08-30 22:29:48 +00003111# Check whether --with-pydebug or --without-pydebug was given.
3112if test "${with_pydebug+set}" = set; then
3113 withval="$with_pydebug"
3114
3115if test "$withval" != no
3116then cat >> confdefs.h <<\EOF
3117#define Py_DEBUG 1
3118EOF
3119 echo "$ac_t""yes" 1>&6
3120else echo "$ac_t""no" 1>&6
3121fi
3122else
3123 echo "$ac_t""no" 1>&6
3124fi
3125
3126
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003127# checks for system dependent C++ extensions support
3128case "$ac_sys_system" in
3129 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003130echo "configure:3131: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003131 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003132#line 3133 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003133#include "confdefs.h"
3134#include "/usr/lpp/xlC/include/load.h"
3135int main() {
3136loadAndInit("", 0, "")
3137; return 0; }
3138EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003139if { (eval echo configure:3140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003140 rm -rf conftest*
3141 cat >> confdefs.h <<\EOF
3142#define AIX_GENUINE_CPLUSPLUS 1
3143EOF
3144
3145 echo "$ac_t""yes" 1>&6
3146else
3147 echo "configure: failed program was:" >&5
3148 cat conftest.$ac_ext >&5
3149 rm -rf conftest*
3150 echo "$ac_t""no" 1>&6
3151fi
3152rm -f conftest*;;
3153 *) ;;
3154esac
3155
Guido van Rossum70c7f481998-03-26 18:44:10 +00003156# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3157# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003158# BeOS' sockets are stashed in libnet.
3159case "$ac_sys_system" in
3160IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003161*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003162echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003163echo "configure:3164: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003164ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003165if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003166 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003167else
3168 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003169LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003170cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003171#line 3172 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003172#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003173/* Override any gcc2 internal prototype to avoid an error. */
3174/* We use char because int might match the return type of a gcc2
3175 builtin and then its argument prototype would still apply. */
3176char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003177
Guido van Rossumf78abae1997-01-21 22:02:36 +00003178int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003179t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003180; return 0; }
3181EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003182if { (eval echo configure:3183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003183 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003184 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003185else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003186 echo "configure: failed program was:" >&5
3187 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003188 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003189 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003190fi
3191rm -f conftest*
3192LIBS="$ac_save_LIBS"
3193
3194fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003195if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003196 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003197 LIBS="-lnsl $LIBS"
3198else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003199 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003200fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003201 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003202echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003203echo "configure:3204: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003204ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003205if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003206 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003207else
3208 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003209LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003210cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003211#line 3212 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +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. */
3216char socket();
3217
3218int main() {
3219socket()
3220; return 0; }
3221EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003222if { (eval echo configure:3223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +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
Guido van Rossumad678af1998-10-02 14:42:15 +00003237 LIBS="-lsocket $LIBS"
3238else
3239 echo "$ac_t""no" 1>&6
3240fi
3241 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003242;;
3243esac
3244case "$ac_sys_system" in
3245BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003246echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003247echo "configure:3248: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003248ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003249if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003250 echo $ac_n "(cached) $ac_c" 1>&6
3251else
3252 ac_save_LIBS="$LIBS"
3253LIBS="-lnet $LIBS $LIBS"
3254cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003255#line 3256 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003256#include "confdefs.h"
3257/* Override any gcc2 internal prototype to avoid an error. */
3258/* We use char because int might match the return type of a gcc2
3259 builtin and then its argument prototype would still apply. */
3260char socket();
3261
3262int main() {
3263socket()
3264; return 0; }
3265EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003266if { (eval echo configure:3267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003267 rm -rf conftest*
3268 eval "ac_cv_lib_$ac_lib_var=yes"
3269else
3270 echo "configure: failed program was:" >&5
3271 cat conftest.$ac_ext >&5
3272 rm -rf conftest*
3273 eval "ac_cv_lib_$ac_lib_var=no"
3274fi
3275rm -f conftest*
3276LIBS="$ac_save_LIBS"
3277
3278fi
3279if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3280 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003281 LIBS="-lnet $LIBS"
3282else
3283 echo "$ac_t""no" 1>&6
3284fi
3285 # BeOS
3286;;
3287esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003288
Guido van Rossuma68acba1996-07-31 17:36:39 +00003289echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003290echo "configure:3291: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003291# Check whether --with-libs or --without-libs was given.
3292if test "${with_libs+set}" = set; then
3293 withval="$with_libs"
3294
3295echo "$ac_t""$withval" 1>&6
3296LIBS="$withval $LIBS"
3297
3298else
3299 echo "$ac_t""no" 1>&6
3300fi
3301
Guido van Rossum7f43da71994-08-01 12:15:30 +00003302
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003303# Determine if signalmodule should be used.
3304
3305
3306echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003307echo "configure:3308: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003308# Check whether --with-signal-module or --without-signal-module was given.
3309if test "${with_signal_module+set}" = set; then
3310 withval="$with_signal_module"
3311 :
3312fi
3313
3314
3315if test -z "$with_signal_module"
3316then with_signal_module="yes"
3317fi
3318echo "$ac_t""$with_signal_module" 1>&6
3319
3320if test "${with_signal_module}" = "yes"; then
3321 USE_SIGNAL_MODULE=""
3322 SIGNAL_OBJS=""
3323else
3324 USE_SIGNAL_MODULE="#"
3325 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3326fi
3327
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003328# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003329
Barry Warsawc0d24d82000-06-29 16:12:00 +00003330USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003331
Guido van Rossumec2f0731997-01-22 20:54:01 +00003332echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003333echo "configure:3334: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003334
3335# Check whether --with-dec-threads or --without-dec-threads was given.
3336if test "${with_dec_threads+set}" = set; then
3337 withval="$with_dec_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003338
3339echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003340LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003341if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003342 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003343fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003344else
3345 echo "$ac_t""no" 1>&6
3346fi
3347
3348
3349echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003350echo "configure:3351: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003351# Check whether --with-threads or --without-threads was given.
3352if test "${with_threads+set}" = set; then
3353 withval="$with_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003354 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003355fi
3356
3357
Barry Warsawc0d24d82000-06-29 16:12:00 +00003358# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003359# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003360if test "${with_thread+set}" = set; then
3361 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003362
3363with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003364fi
Barry Warsawc0d24d82000-06-29 16:12:00 +00003365
3366
3367if test -z "$with_threads"
3368then with_threads="yes"
3369fi
3370echo "$ac_t""$with_threads" 1>&6
3371
3372if test "$with_threads" = "no"
3373then
3374 USE_THREAD_MODULE="#"
3375else
Guido van Rossum40951012000-10-07 16:21:27 +00003376 if test ! -z "$with_threads" -a -d "$with_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003377 then LDFLAGS="$LDFLAGS -L$with_threads"
3378 fi
Guido van Rossum40951012000-10-07 16:21:27 +00003379 if test ! -z "$withval" -a -d "$withval"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003380 then LDFLAGS="$LDFLAGS -L$withval"
3381 fi
3382 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003383#define _REENTRANT 1
3384EOF
3385
Barry Warsawc0d24d82000-06-29 16:12:00 +00003386 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003387echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003388echo "configure:3389: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003389if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003390 echo $ac_n "(cached) $ac_c" 1>&6
3391else
3392 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003393#line 3394 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003394#include "confdefs.h"
3395#include <mach/cthreads.h>
3396EOF
3397ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Neil Schemenauera35c6882001-02-27 04:45:05 +00003398{ (eval echo configure:3399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003399ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003400if test -z "$ac_err"; then
3401 rm -rf conftest*
3402 eval "ac_cv_header_$ac_safe=yes"
3403else
3404 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003405 echo "configure: failed program was:" >&5
3406 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003407 rm -rf conftest*
3408 eval "ac_cv_header_$ac_safe=no"
3409fi
3410rm -f conftest*
3411fi
3412if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3413 echo "$ac_t""yes" 1>&6
3414 cat >> confdefs.h <<\EOF
3415#define WITH_THREAD 1
3416EOF
3417
Barry Warsawc0d24d82000-06-29 16:12:00 +00003418 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003419#define C_THREADS 1
3420EOF
3421
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003422 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003423else
3424 echo "$ac_t""no" 1>&6
3425
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003426 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003427echo "configure:3428: checking for --with-pth" >&5
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003428 # Check whether --with-pth or --without-pth was given.
3429if test "${with_pth+set}" = set; then
3430 withval="$with_pth"
3431
3432 echo "$ac_t""$withval" 1>&6
3433 cat >> confdefs.h <<\EOF
3434#define WITH_THREAD 1
3435EOF
3436
3437 cat >> confdefs.h <<\EOF
3438#define HAVE_PTH 1
3439EOF
3440
3441 LIBS="-lpth $LIBS"
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003442 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003443else
3444
3445 echo "$ac_t""no" 1>&6
Barry Warsawc0d24d82000-06-29 16:12:00 +00003446 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003447echo "configure:3448: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003448ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003449if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003450 echo $ac_n "(cached) $ac_c" 1>&6
3451else
3452 ac_save_LIBS="$LIBS"
3453LIBS="-lpthread $LIBS"
3454cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003455#line 3456 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003456#include "confdefs.h"
3457/* Override any gcc2 internal prototype to avoid an error. */
3458/* We use char because int might match the return type of a gcc2
3459 builtin and then its argument prototype would still apply. */
3460char pthread_create();
3461
3462int main() {
3463pthread_create()
3464; return 0; }
3465EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003466if { (eval echo configure:3467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003467 rm -rf conftest*
3468 eval "ac_cv_lib_$ac_lib_var=yes"
3469else
3470 echo "configure: failed program was:" >&5
3471 cat conftest.$ac_ext >&5
3472 rm -rf conftest*
3473 eval "ac_cv_lib_$ac_lib_var=no"
3474fi
3475rm -f conftest*
3476LIBS="$ac_save_LIBS"
3477
3478fi
3479if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3480 echo "$ac_t""yes" 1>&6
3481 cat >> confdefs.h <<\EOF
3482#define WITH_THREAD 1
3483EOF
3484
Barry Warsawc0d24d82000-06-29 16:12:00 +00003485 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003486#define _POSIX_THREADS 1
3487EOF
3488
Barry Warsawc0d24d82000-06-29 16:12:00 +00003489 LIBS="-lpthread $LIBS"
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003490 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003491else
3492 echo "$ac_t""no" 1>&6
3493
Barry Warsawc0d24d82000-06-29 16:12:00 +00003494 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003495echo "configure:3496: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003496if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003497 echo $ac_n "(cached) $ac_c" 1>&6
3498else
3499 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003500#line 3501 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003501#include "confdefs.h"
3502/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003503 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003504#include <assert.h>
3505/* Override any gcc2 internal prototype to avoid an error. */
3506/* We use char because int might match the return type of a gcc2
3507 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003508char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003509
3510int main() {
3511
3512/* The GNU C library defines this for functions which it implements
3513 to always fail with ENOSYS. Some functions are actually named
3514 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003515#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003516choke me
3517#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003518pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003519#endif
3520
3521; return 0; }
3522EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003523if { (eval echo configure:3524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003524 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003525 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003526else
3527 echo "configure: failed program was:" >&5
3528 cat conftest.$ac_ext >&5
3529 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003530 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003531fi
3532rm -f conftest*
3533fi
3534
Guido van Rossumea516321998-12-17 18:08:55 +00003535if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003536 echo "$ac_t""yes" 1>&6
3537 cat >> confdefs.h <<\EOF
3538#define WITH_THREAD 1
3539EOF
3540
Guido van Rossum5839e582000-10-09 19:52:35 +00003541 case $ac_sys_system in
3542 Darwin*) ;;
3543 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003544#define _POSIX_THREADS 1
3545EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003546;;
3547 esac
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003548 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003549else
3550 echo "$ac_t""no" 1>&6
3551
Barry Warsawc0d24d82000-06-29 16:12:00 +00003552 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003553echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003554echo "configure:3555: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003555if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003556 echo $ac_n "(cached) $ac_c" 1>&6
3557else
3558 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003559#line 3560 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003560#include "confdefs.h"
3561#include <kernel/OS.h>
3562EOF
3563ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Neil Schemenauera35c6882001-02-27 04:45:05 +00003564{ (eval echo configure:3565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003565ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003566if test -z "$ac_err"; then
3567 rm -rf conftest*
3568 eval "ac_cv_header_$ac_safe=yes"
3569else
3570 echo "$ac_err" >&5
3571 echo "configure: failed program was:" >&5
3572 cat conftest.$ac_ext >&5
3573 rm -rf conftest*
3574 eval "ac_cv_header_$ac_safe=no"
3575fi
3576rm -f conftest*
3577fi
3578if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3579 echo "$ac_t""yes" 1>&6
3580 cat >> confdefs.h <<\EOF
3581#define WITH_THREAD 1
3582EOF
3583
Barry Warsawc0d24d82000-06-29 16:12:00 +00003584 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003585#define BEOS_THREADS 1
3586EOF
3587
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003588 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003589else
3590 echo "$ac_t""no" 1>&6
3591
Barry Warsawc0d24d82000-06-29 16:12:00 +00003592 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003593echo "configure:3594: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003594ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003595if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003596 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003597else
3598 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003599LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003600cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003601#line 3602 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003602#include "confdefs.h"
3603/* Override any gcc2 internal prototype to avoid an error. */
3604/* We use char because int might match the return type of a gcc2
3605 builtin and then its argument prototype would still apply. */
3606char pthread_create();
3607
3608int main() {
3609pthread_create()
3610; return 0; }
3611EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003612if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003613 rm -rf conftest*
3614 eval "ac_cv_lib_$ac_lib_var=yes"
3615else
3616 echo "configure: failed program was:" >&5
3617 cat conftest.$ac_ext >&5
3618 rm -rf conftest*
3619 eval "ac_cv_lib_$ac_lib_var=no"
3620fi
3621rm -f conftest*
3622LIBS="$ac_save_LIBS"
3623
3624fi
3625if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3626 echo "$ac_t""yes" 1>&6
3627 cat >> confdefs.h <<\EOF
3628#define WITH_THREAD 1
3629EOF
3630
3631 cat >> confdefs.h <<\EOF
3632#define _POSIX_THREADS 1
3633EOF
3634
3635 LIBS="$LIBS -lpthreads"
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003636 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003637else
3638 echo "$ac_t""no" 1>&6
3639
3640 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003641echo "configure:3642: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003642ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003643if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003644 echo $ac_n "(cached) $ac_c" 1>&6
3645else
3646 ac_save_LIBS="$LIBS"
3647LIBS="-lc_r $LIBS"
3648cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003649#line 3650 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003650#include "confdefs.h"
3651/* Override any gcc2 internal prototype to avoid an error. */
3652/* We use char because int might match the return type of a gcc2
3653 builtin and then its argument prototype would still apply. */
3654char pthread_create();
3655
3656int main() {
3657pthread_create()
3658; return 0; }
3659EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003660if { (eval echo configure:3661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003661 rm -rf conftest*
3662 eval "ac_cv_lib_$ac_lib_var=yes"
3663else
3664 echo "configure: failed program was:" >&5
3665 cat conftest.$ac_ext >&5
3666 rm -rf conftest*
3667 eval "ac_cv_lib_$ac_lib_var=no"
3668fi
3669rm -f conftest*
3670LIBS="$ac_save_LIBS"
3671
3672fi
3673if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3674 echo "$ac_t""yes" 1>&6
3675 cat >> confdefs.h <<\EOF
3676#define WITH_THREAD 1
3677EOF
3678
Barry Warsawc0d24d82000-06-29 16:12:00 +00003679 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003680#define _POSIX_THREADS 1
3681EOF
3682
Greg Steinadf63d62000-07-05 10:38:09 +00003683 LIBS="$LIBS -lc_r"
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003684 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003685else
3686 echo "$ac_t""no" 1>&6
3687
Greg Steinadf63d62000-07-05 10:38:09 +00003688 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003689echo "configure:3690: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003690ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003691if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003692 echo $ac_n "(cached) $ac_c" 1>&6
3693else
3694 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003695LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003696cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003697#line 3698 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003698#include "confdefs.h"
3699/* Override any gcc2 internal prototype to avoid an error. */
3700/* We use char because int might match the return type of a gcc2
3701 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003702char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003703
3704int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003705__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003706; return 0; }
3707EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003708if { (eval echo configure:3709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003709 rm -rf conftest*
3710 eval "ac_cv_lib_$ac_lib_var=yes"
3711else
3712 echo "configure: failed program was:" >&5
3713 cat conftest.$ac_ext >&5
3714 rm -rf conftest*
3715 eval "ac_cv_lib_$ac_lib_var=no"
3716fi
3717rm -f conftest*
3718LIBS="$ac_save_LIBS"
3719
3720fi
3721if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3722 echo "$ac_t""yes" 1>&6
3723 cat >> confdefs.h <<\EOF
3724#define WITH_THREAD 1
3725EOF
3726
Barry Warsawc0d24d82000-06-29 16:12:00 +00003727 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003728#define _POSIX_THREADS 1
3729EOF
3730
Greg Steinadf63d62000-07-05 10:38:09 +00003731 LIBS="$LIBS -lthread"
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003732 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003733else
3734 echo "$ac_t""no" 1>&6
3735
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003736 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003737echo "configure:3738: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003738ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
3739if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3740 echo $ac_n "(cached) $ac_c" 1>&6
3741else
3742 ac_save_LIBS="$LIBS"
3743LIBS="-lpthread $LIBS"
3744cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003745#line 3746 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003746#include "confdefs.h"
3747/* Override any gcc2 internal prototype to avoid an error. */
3748/* We use char because int might match the return type of a gcc2
3749 builtin and then its argument prototype would still apply. */
3750char __pthread_create_system();
3751
3752int main() {
3753__pthread_create_system()
3754; return 0; }
3755EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003756if { (eval echo configure:3757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003757 rm -rf conftest*
3758 eval "ac_cv_lib_$ac_lib_var=yes"
3759else
3760 echo "configure: failed program was:" >&5
3761 cat conftest.$ac_ext >&5
3762 rm -rf conftest*
3763 eval "ac_cv_lib_$ac_lib_var=no"
3764fi
3765rm -f conftest*
3766LIBS="$ac_save_LIBS"
3767
3768fi
3769if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3770 echo "$ac_t""yes" 1>&6
3771 cat >> confdefs.h <<\EOF
3772#define WITH_THREAD 1
3773EOF
3774
3775 cat >> confdefs.h <<\EOF
3776#define _POSIX_THREADS 1
3777EOF
3778
3779 LIBS="$LIBS -lpthread"
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003780 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003781else
3782 echo "$ac_t""no" 1>&6
3783
Barry Warsawc0d24d82000-06-29 16:12:00 +00003784 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003785echo "configure:3786: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003786ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003787if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003788 echo $ac_n "(cached) $ac_c" 1>&6
3789else
3790 ac_save_LIBS="$LIBS"
3791LIBS="-lcma $LIBS"
3792cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003793#line 3794 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003794#include "confdefs.h"
3795/* Override any gcc2 internal prototype to avoid an error. */
3796/* We use char because int might match the return type of a gcc2
3797 builtin and then its argument prototype would still apply. */
3798char pthread_create();
3799
3800int main() {
3801pthread_create()
3802; return 0; }
3803EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003804if { (eval echo configure:3805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003805 rm -rf conftest*
3806 eval "ac_cv_lib_$ac_lib_var=yes"
3807else
3808 echo "configure: failed program was:" >&5
3809 cat conftest.$ac_ext >&5
3810 rm -rf conftest*
3811 eval "ac_cv_lib_$ac_lib_var=no"
3812fi
3813rm -f conftest*
3814LIBS="$ac_save_LIBS"
3815
3816fi
3817if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3818 echo "$ac_t""yes" 1>&6
3819 cat >> confdefs.h <<\EOF
3820#define WITH_THREAD 1
3821EOF
3822
Barry Warsawc0d24d82000-06-29 16:12:00 +00003823 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003824#define _POSIX_THREADS 1
3825EOF
3826
Barry Warsawc0d24d82000-06-29 16:12:00 +00003827 LIBS="$LIBS -lcma"
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003828 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003829else
3830 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003831
3832 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003833fi
3834
Barry Warsawc0d24d82000-06-29 16:12:00 +00003835
Guido van Rossum627b2d71993-12-24 10:39:16 +00003836fi
3837
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003838fi
3839
Guido van Rossum0be3e491997-05-22 20:33:33 +00003840fi
3841
Guido van Rossum49545951997-12-02 19:28:29 +00003842fi
3843
Guido van Rossumb93a8621998-05-07 13:27:32 +00003844fi
3845
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003846fi
3847
Guido van Rossumad678af1998-10-02 14:42:15 +00003848fi
3849
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003850fi
3851
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003852fi
3853
Guido van Rossum0be3e491997-05-22 20:33:33 +00003854
Barry Warsawc0d24d82000-06-29 16:12:00 +00003855 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003856echo "configure:3857: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003857ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003858if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003859 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003860else
3861 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003862LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003863cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003864#line 3865 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003865#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003866/* Override any gcc2 internal prototype to avoid an error. */
3867/* We use char because int might match the return type of a gcc2
3868 builtin and then its argument prototype would still apply. */
3869char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003870
Guido van Rossumf78abae1997-01-21 22:02:36 +00003871int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003872usconfig()
3873; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003874EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003875if { (eval echo configure:3876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003876 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003877 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003878else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003879 echo "configure: failed program was:" >&5
3880 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003881 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003882 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003883fi
3884rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003885LIBS="$ac_save_LIBS"
3886
3887fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003888if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003889 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003890 cat >> confdefs.h <<\EOF
3891#define WITH_THREAD 1
3892EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003893
Barry Warsawc0d24d82000-06-29 16:12:00 +00003894 LIBS="$LIBS -lmpc"
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003895 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003896 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003897else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003898 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003899fi
3900
Barry Warsawc0d24d82000-06-29 16:12:00 +00003901 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003902echo "configure:3903: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003903ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003904if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003905 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003906else
3907 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003908LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003909cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003910#line 3911 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003911#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003912/* Override any gcc2 internal prototype to avoid an error. */
3913/* We use char because int might match the return type of a gcc2
3914 builtin and then its argument prototype would still apply. */
3915char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003916
Guido van Rossumf78abae1997-01-21 22:02:36 +00003917int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003918thr_create()
3919; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003920EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00003921if { (eval echo configure:3922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003922 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003923 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003924else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003925 echo "configure: failed program was:" >&5
3926 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003927 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003928 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003929fi
3930rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003931LIBS="$ac_save_LIBS"
3932
3933fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003934if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003935 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003936 cat >> confdefs.h <<\EOF
3937#define WITH_THREAD 1
3938EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003939
Barry Warsawc0d24d82000-06-29 16:12:00 +00003940 LIBS="$LIBS -lthread"
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003941 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003942 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003943else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003944 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003945fi
3946
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00003947
3948 if test "$USE_THREAD_MODULE" != "#"
3949 then
3950 # If the above checks didn't disable threads, (at least) OSF1
3951 # needs this '-threads' argument during linking.
3952 case $ac_sys_system in
3953 OSF1) LDLAST=-threads;;
3954 esac
3955 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003956fi
3957
Barry Warsawef82cd72000-06-30 16:21:01 +00003958# Check for GC support
3959
3960USE_GC_MODULE=""
3961echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00003962echo "configure:3963: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003963# Check whether --with-cycle-gc or --without-cycle-gc was given.
3964if test "${with_cycle_gc+set}" = set; then
3965 withval="$with_cycle_gc"
3966 :
3967fi
3968
3969
3970if test -z "$with_cycle_gc"
3971then with_cycle_gc="yes"
3972fi
3973if test "$with_cycle_gc" = "no"
3974then
3975 USE_GC_MODULE="#"
3976else
3977 cat >> confdefs.h <<\EOF
3978#define WITH_CYCLE_GC 1
3979EOF
3980
3981fi
3982echo "$ac_t""$with_cycle_gc" 1>&6
3983
Neil Schemenauera35c6882001-02-27 04:45:05 +00003984# Check for Python-specific malloc support
3985echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
3986echo "configure:3987: checking for --with-pymalloc" >&5
3987# Check whether --with-pymalloc or --without-pymalloc was given.
3988if test "${with_pymalloc+set}" = set; then
3989 withval="$with_pymalloc"
3990
3991if test "$withval" != no
3992then cat >> confdefs.h <<\EOF
3993#define WITH_PYMALLOC 1
3994EOF
3995 echo "$ac_t""yes" 1>&6
3996else echo "$ac_t""no" 1>&6
3997fi
3998else
3999 echo "$ac_t""no" 1>&6
4000fi
4001
4002
Barry Warsawef82cd72000-06-30 16:21:01 +00004003# Check for --with-wctype-functions
4004echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004005echo "configure:4006: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004006# Check whether --with-wctype-functions or --without-wctype-functions was given.
4007if test "${with_wctype_functions+set}" = set; then
4008 withval="$with_wctype_functions"
4009
4010if test "$withval" != no
4011then cat >> confdefs.h <<\EOF
4012#define WANT_WCTYPE_FUNCTIONS 1
4013EOF
4014 echo "$ac_t""yes" 1>&6
4015else echo "$ac_t""no" 1>&6
4016fi
4017else
4018 echo "$ac_t""no" 1>&6
4019fi
4020
4021
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004022# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004023
4024DLINCLDIR=/
4025
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004026echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004027echo "configure:4028: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004028# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004029if test "${with_sgi_dl+set}" = set; then
4030 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004031
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004032echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004033cat >> confdefs.h <<\EOF
4034#define WITH_SGI_DL 1
4035EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004036
Guido van Rossume97ee181999-12-20 21:27:22 +00004037DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004038dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004039if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004040then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004041else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004042fi
4043DLINCLDIR=${dldir}
4044LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004045else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004046 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004047fi
4048
4049
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004050echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004051echo "configure:4052: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004052# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004053if test "${with_dl_dld+set}" = set; then
4054 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004055
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004056echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004057cat >> confdefs.h <<\EOF
4058#define WITH_DL_DLD 1
4059EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004060
Guido van Rossume97ee181999-12-20 21:27:22 +00004061DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004062dldir=`echo "$withval" | sed 's/,.*//'`
4063dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004064if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004065then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004066else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004067fi
4068DLINCLDIR=${dldir}
4069LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004070else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004071 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004072fi
4073
4074
Guido van Rossume97ee181999-12-20 21:27:22 +00004075# the dlopen() function means we might want to use dynload_shlib.o. some
4076# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004077for ac_func in dlopen
4078do
4079echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004080echo "configure:4081: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004081if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004082 echo $ac_n "(cached) $ac_c" 1>&6
4083else
4084 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004085#line 4086 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004086#include "confdefs.h"
4087/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004088 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004089#include <assert.h>
4090/* Override any gcc2 internal prototype to avoid an error. */
4091/* We use char because int might match the return type of a gcc2
4092 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004093char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004094
4095int main() {
4096
4097/* The GNU C library defines this for functions which it implements
4098 to always fail with ENOSYS. Some functions are actually named
4099 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004100#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004101choke me
4102#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004103$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004104#endif
4105
4106; return 0; }
4107EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004108if { (eval echo configure:4109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004109 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004110 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004111else
4112 echo "configure: failed program was:" >&5
4113 cat conftest.$ac_ext >&5
4114 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004115 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004116fi
4117rm -f conftest*
4118fi
4119
Thomas Wouters3a584202000-08-05 23:28:51 +00004120if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004121 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004122 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4123 cat >> confdefs.h <<EOF
4124#define $ac_tr_func 1
4125EOF
4126
Guido van Rossume97ee181999-12-20 21:27:22 +00004127else
4128 echo "$ac_t""no" 1>&6
4129fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004130done
Guido van Rossume97ee181999-12-20 21:27:22 +00004131
4132
4133# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4134# loading of modules.
4135
4136echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004137echo "configure:4138: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004138if test -z "$DYNLOADFILE"
4139then
4140 case $ac_sys_system/$ac_sys_release in
4141 AIX*) DYNLOADFILE="dynload_aix.o";;
4142 BeOS*) DYNLOADFILE="dynload_beos.o";;
4143 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossum5839e582000-10-09 19:52:35 +00004144 Darwin/*|next/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004145 *)
4146 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4147 # out any dynamic loading
4148 if test "$ac_cv_func_dlopen" = yes
4149 then DYNLOADFILE="dynload_shlib.o"
4150 else DYNLOADFILE="dynload_stub.o"
4151 fi
4152 ;;
4153 esac
4154fi
4155echo "$ac_t""$DYNLOADFILE" 1>&6
4156if test "$DYNLOADFILE" != "dynload_stub.o"
4157then
4158 cat >> confdefs.h <<\EOF
4159#define HAVE_DYNAMIC_LOADING 1
4160EOF
4161
4162fi
4163
Guido van Rossum627b2d71993-12-24 10:39:16 +00004164# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00004165for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004166 flock fork fsync fdatasync fpathconf ftime ftruncate \
Andrew M. Kuchlinga9586c72001-01-08 17:58:56 +00004167 getgroups getlogin getpeername getpid getpwent getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00004168 kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004169 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004170 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004171 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00004172 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00004173 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004174 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters70c21a12000-07-14 14:28:33 +00004175 truncate uname waitpid _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004176do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004177echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004178echo "configure:4179: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004179if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004180 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004181else
4182 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004183#line 4184 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004184#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004185/* System header to define __stub macros and hopefully few prototypes,
4186 which can conflict with char $ac_func(); below. */
4187#include <assert.h>
4188/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004189/* We use char because int might match the return type of a gcc2
4190 builtin and then its argument prototype would still apply. */
4191char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004192
Guido van Rossumf78abae1997-01-21 22:02:36 +00004193int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004194
Guido van Rossum627b2d71993-12-24 10:39:16 +00004195/* The GNU C library defines this for functions which it implements
4196 to always fail with ENOSYS. Some functions are actually named
4197 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004198#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004199choke me
4200#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004201$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004202#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004203
Guido van Rossum7f43da71994-08-01 12:15:30 +00004204; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004205EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004206if { (eval echo configure:4207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004207 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004208 eval "ac_cv_func_$ac_func=yes"
4209else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004210 echo "configure: failed program was:" >&5
4211 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004212 rm -rf conftest*
4213 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004214fi
4215rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004216fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004217
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004218if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004219 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004220 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004221 cat >> confdefs.h <<EOF
4222#define $ac_tr_func 1
4223EOF
4224
4225else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004226 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004227fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004228done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004229
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004230
Fred Drake8cef4cf2000-06-28 16:40:38 +00004231# check for openpty and forkpty
4232
4233for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004234do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004235echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004236echo "configure:4237: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004237if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004238 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004239else
4240 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004241#line 4242 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004242#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004243/* System header to define __stub macros and hopefully few prototypes,
4244 which can conflict with char $ac_func(); below. */
4245#include <assert.h>
4246/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004247/* We use char because int might match the return type of a gcc2
4248 builtin and then its argument prototype would still apply. */
4249char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004250
Guido van Rossumf78abae1997-01-21 22:02:36 +00004251int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004252
Guido van Rossum627b2d71993-12-24 10:39:16 +00004253/* The GNU C library defines this for functions which it implements
4254 to always fail with ENOSYS. Some functions are actually named
4255 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004257choke me
4258#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004259$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004260#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004261
Guido van Rossum7f43da71994-08-01 12:15:30 +00004262; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004263EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004264if { (eval echo configure:4265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004265 rm -rf conftest*
4266 eval "ac_cv_func_$ac_func=yes"
4267else
4268 echo "configure: failed program was:" >&5
4269 cat conftest.$ac_ext >&5
4270 rm -rf conftest*
4271 eval "ac_cv_func_$ac_func=no"
4272fi
4273rm -f conftest*
4274fi
4275
4276if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4277 echo "$ac_t""yes" 1>&6
4278 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4279 cat >> confdefs.h <<EOF
4280#define $ac_tr_func 1
4281EOF
4282
4283else
4284 echo "$ac_t""no" 1>&6
4285echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004286echo "configure:4287: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004287ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004288if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004289 echo $ac_n "(cached) $ac_c" 1>&6
4290else
4291 ac_save_LIBS="$LIBS"
4292LIBS="-lutil $LIBS"
4293cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004294#line 4295 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004295#include "confdefs.h"
4296/* Override any gcc2 internal prototype to avoid an error. */
4297/* We use char because int might match the return type of a gcc2
4298 builtin and then its argument prototype would still apply. */
4299char openpty();
4300
4301int main() {
4302openpty()
4303; return 0; }
4304EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004305if { (eval echo configure:4306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004306 rm -rf conftest*
4307 eval "ac_cv_lib_$ac_lib_var=yes"
4308else
4309 echo "configure: failed program was:" >&5
4310 cat conftest.$ac_ext >&5
4311 rm -rf conftest*
4312 eval "ac_cv_lib_$ac_lib_var=no"
4313fi
4314rm -f conftest*
4315LIBS="$ac_save_LIBS"
4316
4317fi
4318if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4319 echo "$ac_t""yes" 1>&6
4320 cat >> confdefs.h <<\EOF
4321#define HAVE_OPENPTY 1
4322EOF
4323 LIBS="$LIBS -lutil"
4324else
4325 echo "$ac_t""no" 1>&6
4326fi
4327
4328fi
4329done
4330
4331for ac_func in forkpty
4332do
4333echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004334echo "configure:4335: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004335if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004336 echo $ac_n "(cached) $ac_c" 1>&6
4337else
4338 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004339#line 4340 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004340#include "confdefs.h"
4341/* System header to define __stub macros and hopefully few prototypes,
4342 which can conflict with char $ac_func(); below. */
4343#include <assert.h>
4344/* Override any gcc2 internal prototype to avoid an error. */
4345/* We use char because int might match the return type of a gcc2
4346 builtin and then its argument prototype would still apply. */
4347char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004348
4349int main() {
4350
4351/* The GNU C library defines this for functions which it implements
4352 to always fail with ENOSYS. Some functions are actually named
4353 something starting with __ and the normal name is an alias. */
4354#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4355choke me
4356#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004357$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004358#endif
4359
4360; return 0; }
4361EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004362if { (eval echo configure:4363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004363 rm -rf conftest*
4364 eval "ac_cv_func_$ac_func=yes"
4365else
4366 echo "configure: failed program was:" >&5
4367 cat conftest.$ac_ext >&5
4368 rm -rf conftest*
4369 eval "ac_cv_func_$ac_func=no"
4370fi
4371rm -f conftest*
4372fi
4373
4374if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4375 echo "$ac_t""yes" 1>&6
4376 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4377 cat >> confdefs.h <<EOF
4378#define $ac_tr_func 1
4379EOF
4380
4381else
4382 echo "$ac_t""no" 1>&6
4383echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004384echo "configure:4385: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004385ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004386if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004387 echo $ac_n "(cached) $ac_c" 1>&6
4388else
4389 ac_save_LIBS="$LIBS"
4390LIBS="-lutil $LIBS"
4391cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004392#line 4393 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004393#include "confdefs.h"
4394/* Override any gcc2 internal prototype to avoid an error. */
4395/* We use char because int might match the return type of a gcc2
4396 builtin and then its argument prototype would still apply. */
4397char forkpty();
4398
4399int main() {
4400forkpty()
4401; return 0; }
4402EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004403if { (eval echo configure:4404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004404 rm -rf conftest*
4405 eval "ac_cv_lib_$ac_lib_var=yes"
4406else
4407 echo "configure: failed program was:" >&5
4408 cat conftest.$ac_ext >&5
4409 rm -rf conftest*
4410 eval "ac_cv_lib_$ac_lib_var=no"
4411fi
4412rm -f conftest*
4413LIBS="$ac_save_LIBS"
4414
4415fi
4416if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4417 echo "$ac_t""yes" 1>&6
4418 cat >> confdefs.h <<\EOF
4419#define HAVE_FORKPTY 1
4420EOF
4421 LIBS="$LIBS -lutil"
4422else
4423 echo "$ac_t""no" 1>&6
4424fi
4425
4426fi
4427done
4428
4429
4430# check for long file support functions
4431for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4432do
4433echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004434echo "configure:4435: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004435if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004436 echo $ac_n "(cached) $ac_c" 1>&6
4437else
4438 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004439#line 4440 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004440#include "confdefs.h"
4441/* System header to define __stub macros and hopefully few prototypes,
4442 which can conflict with char $ac_func(); below. */
4443#include <assert.h>
4444/* Override any gcc2 internal prototype to avoid an error. */
4445/* We use char because int might match the return type of a gcc2
4446 builtin and then its argument prototype would still apply. */
4447char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004448
4449int main() {
4450
4451/* The GNU C library defines this for functions which it implements
4452 to always fail with ENOSYS. Some functions are actually named
4453 something starting with __ and the normal name is an alias. */
4454#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4455choke me
4456#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004457$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004458#endif
4459
4460; return 0; }
4461EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004462if { (eval echo configure:4463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004463 rm -rf conftest*
4464 eval "ac_cv_func_$ac_func=yes"
4465else
4466 echo "configure: failed program was:" >&5
4467 cat conftest.$ac_ext >&5
4468 rm -rf conftest*
4469 eval "ac_cv_func_$ac_func=no"
4470fi
4471rm -f conftest*
4472fi
4473
4474if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4475 echo "$ac_t""yes" 1>&6
4476 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4477 cat >> confdefs.h <<EOF
4478#define $ac_tr_func 1
4479EOF
4480
4481else
4482 echo "$ac_t""no" 1>&6
4483fi
4484done
4485
4486
4487for ac_func in dup2 getcwd strdup strerror memmove
4488do
4489echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004490echo "configure:4491: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004491if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004492 echo $ac_n "(cached) $ac_c" 1>&6
4493else
4494 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004495#line 4496 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004496#include "confdefs.h"
4497/* System header to define __stub macros and hopefully few prototypes,
4498 which can conflict with char $ac_func(); below. */
4499#include <assert.h>
4500/* Override any gcc2 internal prototype to avoid an error. */
4501/* We use char because int might match the return type of a gcc2
4502 builtin and then its argument prototype would still apply. */
4503char $ac_func();
4504
4505int main() {
4506
4507/* The GNU C library defines this for functions which it implements
4508 to always fail with ENOSYS. Some functions are actually named
4509 something starting with __ and the normal name is an alias. */
4510#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4511choke me
4512#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004513$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004514#endif
4515
4516; return 0; }
4517EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004518if { (eval echo configure:4519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004519 rm -rf conftest*
4520 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004521else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004522 echo "configure: failed program was:" >&5
4523 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004524 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004525 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004526fi
4527rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004528fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004529
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004530if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004531 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004532 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4533 cat >> confdefs.h <<EOF
4534#define $ac_tr_func 1
4535EOF
4536
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004537else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004538 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004539LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004540fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004541done
4542
Guido van Rossumf78abae1997-01-21 22:02:36 +00004543
Thomas Wouters3a584202000-08-05 23:28:51 +00004544for ac_func in getpgrp
4545do
4546echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004547echo "configure:4548: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004548if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004549 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004550else
4551 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004552#line 4553 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004553#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004554/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004555 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004556#include <assert.h>
4557/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004558/* We use char because int might match the return type of a gcc2
4559 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004560char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004561
Guido van Rossumf78abae1997-01-21 22:02:36 +00004562int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004563
Guido van Rossum627b2d71993-12-24 10:39:16 +00004564/* The GNU C library defines this for functions which it implements
4565 to always fail with ENOSYS. Some functions are actually named
4566 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004567#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004568choke me
4569#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004570$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004571#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004572
4573; return 0; }
4574EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004575if { (eval echo configure:4576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004576 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004577 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004578else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004579 echo "configure: failed program was:" >&5
4580 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004581 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004582 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004583fi
4584rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004585fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004586
Thomas Wouters3a584202000-08-05 23:28:51 +00004587if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004588 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004589 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4590 cat >> confdefs.h <<EOF
4591#define $ac_tr_func 1
4592EOF
4593 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004594#line 4595 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004595#include "confdefs.h"
4596#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004597int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004598getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004599; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004600EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004601if { (eval echo configure:4602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004602 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004603 cat >> confdefs.h <<\EOF
4604#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004605EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004606
Guido van Rossumf78abae1997-01-21 22:02:36 +00004607else
4608 echo "configure: failed program was:" >&5
4609 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004610fi
4611rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004612else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004613 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004614fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004615done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004616
Thomas Wouters3a584202000-08-05 23:28:51 +00004617for ac_func in setpgrp
4618do
4619echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004620echo "configure:4621: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004621if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004622 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004623else
4624 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004625#line 4626 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004626#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004627/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004628 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004629#include <assert.h>
4630/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004631/* We use char because int might match the return type of a gcc2
4632 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004633char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004634
Guido van Rossumf78abae1997-01-21 22:02:36 +00004635int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004636
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004637/* The GNU C library defines this for functions which it implements
4638 to always fail with ENOSYS. Some functions are actually named
4639 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004640#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004641choke me
4642#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004643$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004644#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004645
4646; return 0; }
4647EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004648if { (eval echo configure:4649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004649 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004650 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004651else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004652 echo "configure: failed program was:" >&5
4653 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004654 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004655 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004656fi
4657rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004658fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004659
Thomas Wouters3a584202000-08-05 23:28:51 +00004660if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004661 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004662 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4663 cat >> confdefs.h <<EOF
4664#define $ac_tr_func 1
4665EOF
4666 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004667#line 4668 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004668#include "confdefs.h"
4669#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004670int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004671setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004672; return 0; }
4673EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004674if { (eval echo configure:4675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004675 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004676 cat >> confdefs.h <<\EOF
4677#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004678EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004679
Guido van Rossumf78abae1997-01-21 22:02:36 +00004680else
4681 echo "configure: failed program was:" >&5
4682 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004683fi
4684rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004685else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004686 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004687fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004688done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004689
Thomas Wouters3a584202000-08-05 23:28:51 +00004690for ac_func in gettimeofday
4691do
4692echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004693echo "configure:4694: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004694if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004695 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004696else
4697 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004698#line 4699 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004699#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004700/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004701 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004702#include <assert.h>
4703/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004704/* We use char because int might match the return type of a gcc2
4705 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004706char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004707
Guido van Rossumf78abae1997-01-21 22:02:36 +00004708int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004709
4710/* The GNU C library defines this for functions which it implements
4711 to always fail with ENOSYS. Some functions are actually named
4712 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004713#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004714choke me
4715#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004716$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004717#endif
4718
4719; return 0; }
4720EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004721if { (eval echo configure:4722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004722 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004723 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004724else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004725 echo "configure: failed program was:" >&5
4726 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004727 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004728 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004729fi
4730rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004731fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004732
Thomas Wouters3a584202000-08-05 23:28:51 +00004733if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004734 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004735 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4736 cat >> confdefs.h <<EOF
4737#define $ac_tr_func 1
4738EOF
4739 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004740#line 4741 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004741#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004742#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004743int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004744gettimeofday((struct timeval*)0,(struct timezone*)0);
4745; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004746EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004747if { (eval echo configure:4748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004748 :
4749else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004750 echo "configure: failed program was:" >&5
4751 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004752 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004753 cat >> confdefs.h <<\EOF
4754#define GETTIMEOFDAY_NO_TZ 1
4755EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004756
4757fi
4758rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004759else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004760 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004761fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004762done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004763
4764
4765# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004766echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004767echo "configure:4768: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004768if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004769 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004770else
4771 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004772#line 4773 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004773#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004774#include <sys/types.h>
4775#include <sys/time.h>
4776#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004777int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004778struct tm *tp;
4779; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004780EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004781if { (eval echo configure:4782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004782 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004783 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004784else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004785 echo "configure: failed program was:" >&5
4786 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004787 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004788 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004789fi
4790rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004791fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004792
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004793echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004794if test $ac_cv_header_time = yes; then
4795 cat >> confdefs.h <<\EOF
4796#define TIME_WITH_SYS_TIME 1
4797EOF
4798
4799fi
4800
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004801echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004802echo "configure:4803: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004803if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004804 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004805else
4806 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004807#line 4808 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004808#include "confdefs.h"
4809#include <sys/types.h>
4810#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004811int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004812struct tm *tp; tp->tm_sec;
4813; return 0; }
4814EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004815if { (eval echo configure:4816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004816 rm -rf conftest*
4817 ac_cv_struct_tm=time.h
4818else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004819 echo "configure: failed program was:" >&5
4820 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004821 rm -rf conftest*
4822 ac_cv_struct_tm=sys/time.h
4823fi
4824rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004825fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004826
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004827echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004828if test $ac_cv_struct_tm = sys/time.h; then
4829 cat >> confdefs.h <<\EOF
4830#define TM_IN_SYS_TIME 1
4831EOF
4832
4833fi
4834
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004835echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004836echo "configure:4837: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004837if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004838 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004839else
4840 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004841#line 4842 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004842#include "confdefs.h"
4843#include <sys/types.h>
4844#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004845int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004846struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004847; return 0; }
4848EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004849if { (eval echo configure:4850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004850 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004851 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004852else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004853 echo "configure: failed program was:" >&5
4854 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004855 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004856 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004857fi
4858rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004859fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004860
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004861echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4862if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004863 cat >> confdefs.h <<\EOF
4864#define HAVE_TM_ZONE 1
4865EOF
4866
4867else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004868 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004869echo "configure:4870: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004870if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004871 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004872else
4873 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004874#line 4875 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004875#include "confdefs.h"
4876#include <time.h>
4877#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004878extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004879#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004880int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004881atoi(*tzname);
4882; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004883EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004884if { (eval echo configure:4885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004885 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004886 ac_cv_var_tzname=yes
4887else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004888 echo "configure: failed program was:" >&5
4889 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004890 rm -rf conftest*
4891 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004892fi
4893rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004894fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004895
4896echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004897 if test $ac_cv_var_tzname = yes; then
4898 cat >> confdefs.h <<\EOF
4899#define HAVE_TZNAME 1
4900EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004901
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004902 fi
4903fi
4904
4905
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004906echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004907echo "configure:4908: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004908if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004909 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004910else
4911 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004912#line 4913 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004913#include "confdefs.h"
4914#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004915int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004916return altzone;
4917; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004918EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004919if { (eval echo configure:4920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004920 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004921 ac_cv_header_time_altzone=yes
4922else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004923 echo "configure: failed program was:" >&5
4924 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004925 rm -rf conftest*
4926 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004927fi
4928rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004929fi
4930
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004931echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004932if test $ac_cv_header_time_altzone = yes; then
4933 cat >> confdefs.h <<\EOF
4934#define HAVE_ALTZONE 1
4935EOF
4936
4937fi
4938
Guido van Rossumda88dad1995-01-26 00:46:29 +00004939was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004940echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004941echo "configure:4942: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004942cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004943#line 4944 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004944#include "confdefs.h"
4945
4946#include <sys/types.h>
4947#include <sys/select.h>
4948#include <sys/time.h>
4949
Guido van Rossumf78abae1997-01-21 22:02:36 +00004950int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004951;
4952; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004953EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004954if { (eval echo configure:4955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004955 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004956 cat >> confdefs.h <<\EOF
4957#define SYS_SELECT_WITH_SYS_TIME 1
4958EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004959 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004960else
4961 echo "configure: failed program was:" >&5
4962 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004963fi
4964rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004965echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004966
4967# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004968
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004969echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004970echo "configure:4971: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004971if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004972 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004973else
4974 if test "$GCC" = yes; then
4975 # GCC predefines this symbol on systems where it applies.
4976cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004977#line 4978 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004978#include "confdefs.h"
4979#ifdef __CHAR_UNSIGNED__
4980 yes
4981#endif
4982
4983EOF
4984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4985 egrep "yes" >/dev/null 2>&1; then
4986 rm -rf conftest*
4987 ac_cv_c_char_unsigned=yes
4988else
4989 rm -rf conftest*
4990 ac_cv_c_char_unsigned=no
4991fi
4992rm -f conftest*
4993
4994else
4995if test "$cross_compiling" = yes; then
4996 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4997else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004998 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004999#line 5000 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005000#include "confdefs.h"
5001/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005002#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00005003#define volatile
5004#endif
5005main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00005006 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005007}
5008EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005009if { (eval echo configure:5010: \"$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 +00005010then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005011 ac_cv_c_char_unsigned=yes
5012else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005013 echo "configure: failed program was:" >&5
5014 cat conftest.$ac_ext >&5
5015 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005016 ac_cv_c_char_unsigned=no
5017fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005018rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005019fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005020
5021fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005022fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005023
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005024echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005025if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5026 cat >> confdefs.h <<\EOF
5027#define __CHAR_UNSIGNED__ 1
5028EOF
5029
5030fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005031
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005032echo $ac_n "checking for working const""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005033echo "configure:5034: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005034if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005035 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005036else
5037 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005038#line 5039 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005039#include "confdefs.h"
5040
Guido van Rossumf78abae1997-01-21 22:02:36 +00005041int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005042
5043/* Ultrix mips cc rejects this. */
Fred Drakea1a84e72001-03-06 05:52:16 +00005044typedef int charset[2]; const charset x;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005045/* SunOS 4.1.1 cc rejects this. */
5046char const *const *ccp;
5047char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005048/* NEC SVR4.0.2 mips cc rejects this. */
5049struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005050static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005051/* AIX XL C 1.02.0.0 rejects this.
5052 It does not let you subtract one const X* pointer from another in an arm
5053 of an if-expression whose if-part is not a constant expression */
5054const char *g = "string";
5055ccp = &g + (g ? g-g : 0);
5056/* HPUX 7.0 cc rejects these. */
5057++ccp;
5058p = (char**) ccp;
5059ccp = (char const *const *) p;
5060{ /* SCO 3.2v4 cc rejects this. */
5061 char *t;
5062 char const *s = 0 ? (char *) 0 : (char const *) 0;
5063
5064 *t++ = 0;
5065}
5066{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005067 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005068 const int *foo = &x[0];
5069 ++foo;
5070}
5071{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5072 typedef const int *iptr;
5073 iptr p = 0;
5074 ++p;
5075}
5076{ /* AIX XL C 1.02.0.0 rejects this saying
5077 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5078 struct s { int j; const int *ap[3]; };
5079 struct s *b; b->j = 5;
5080}
5081{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5082 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005083}
5084
5085; return 0; }
5086EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005087if { (eval echo configure:5088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005088 rm -rf conftest*
5089 ac_cv_c_const=yes
5090else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005091 echo "configure: failed program was:" >&5
5092 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005093 rm -rf conftest*
5094 ac_cv_c_const=no
5095fi
5096rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005097fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005098
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005099echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005100if test $ac_cv_c_const = no; then
5101 cat >> confdefs.h <<\EOF
5102#define const
5103EOF
5104
5105fi
5106
5107
Guido van Rossumda88dad1995-01-26 00:46:29 +00005108works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005109echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005110echo "configure:5111: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005111cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005112#line 5113 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005113#include "confdefs.h"
5114
Guido van Rossumf78abae1997-01-21 22:02:36 +00005115int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005116volatile int x; x = 0;
5117; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005118EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005119if { (eval echo configure:5120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005120 rm -rf conftest*
5121 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005122else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005123 echo "configure: failed program was:" >&5
5124 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005125 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005126 cat >> confdefs.h <<\EOF
5127#define volatile
5128EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005129
5130fi
5131rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005132echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005133
Guido van Rossumda88dad1995-01-26 00:46:29 +00005134works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005135echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005136echo "configure:5137: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005137cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005138#line 5139 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005139#include "confdefs.h"
5140
Guido van Rossumf78abae1997-01-21 22:02:36 +00005141int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005142signed char c;
5143; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005144EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005145if { (eval echo configure:5146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005146 rm -rf conftest*
5147 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005148else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005149 echo "configure: failed program was:" >&5
5150 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005151 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005152 cat >> confdefs.h <<\EOF
5153#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00005154EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005155
5156fi
5157rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005158echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005159
Guido van Rossumda88dad1995-01-26 00:46:29 +00005160have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005161echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005162echo "configure:5163: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005163cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005164#line 5165 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005165#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005166int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005167int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005168return foo(10);
5169; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005170EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005171if { (eval echo configure:5172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005172 rm -rf conftest*
5173 cat >> confdefs.h <<\EOF
5174#define HAVE_PROTOTYPES 1
5175EOF
5176 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005177else
5178 echo "configure: failed program was:" >&5
5179 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005180fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005181rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005182echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005183
Guido van Rossumda88dad1995-01-26 00:46:29 +00005184works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005185echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005186echo "configure:5187: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005187cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005188#line 5189 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005189#include "confdefs.h"
5190
5191#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00005192int foo(int x, ...) {
5193 va_list va;
5194 va_start(va, x);
5195 va_arg(va, int);
5196 va_arg(va, char *);
5197 va_arg(va, double);
5198 return 0;
5199}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005200
Guido van Rossumf78abae1997-01-21 22:02:36 +00005201int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005202return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005203; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005204EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005205if { (eval echo configure:5206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005206 rm -rf conftest*
5207 cat >> confdefs.h <<\EOF
5208#define HAVE_STDARG_PROTOTYPES 1
5209EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005210 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005211else
5212 echo "configure: failed program was:" >&5
5213 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005214fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005215rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005216echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005217
Guido van Rossumda88dad1995-01-26 00:46:29 +00005218if test "$have_prototypes" = yes; then
5219bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005220echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005221echo "configure:5222: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005222cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005223#line 5224 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005224#include "confdefs.h"
5225#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005226int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005227char **t;execve("@",t,t);
5228; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005229EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005230if { (eval echo configure:5231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005231 :
5232else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005233 echo "configure: failed program was:" >&5
5234 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005235 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005236 cat >> confdefs.h <<\EOF
5237#define BAD_EXEC_PROTOTYPES 1
5238EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005239 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005240fi
5241rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005242echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005243fi
5244
Guido van Rossumda88dad1995-01-26 00:46:29 +00005245bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005246echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005247echo "configure:5248: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005248if test "$cross_compiling" = yes; then
5249 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5250else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005251 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005252#line 5253 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005253#include "confdefs.h"
5254
5255struct s { int a; int b; };
5256static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005257int foobar() {
5258 static int random;
5259 random = (int) &foo;
5260 return random;
5261}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005262static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005263main() {
5264 exit(!((int)&foo == foobar()));
5265}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005266
5267EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005268if { (eval echo configure:5269: \"$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 +00005269then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005270 :
5271else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005272 echo "configure: failed program was:" >&5
5273 cat conftest.$ac_ext >&5
5274 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005275 cat >> confdefs.h <<\EOF
5276#define BAD_STATIC_FORWARD 1
5277EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005278 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005279fi
5280rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005281fi
5282
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005283echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005284
Guido van Rossumda88dad1995-01-26 00:46:29 +00005285va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005286echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005287echo "configure:5288: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005288cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005289#line 5290 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005290#include "confdefs.h"
5291
5292#ifdef HAVE_STDARG_PROTOTYPES
5293#include <stdarg.h>
5294#else
5295#include <varargs.h>
5296#endif
5297
Guido van Rossumf78abae1997-01-21 22:02:36 +00005298int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005299va_list list1, list2; list1 = list2;
5300; return 0; }
5301EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005302if { (eval echo configure:5303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005303 :
5304else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005305 echo "configure: failed program was:" >&5
5306 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005307 rm -rf conftest*
5308 cat >> confdefs.h <<\EOF
5309#define VA_LIST_IS_ARRAY 1
5310EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005311 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005312fi
5313rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005314echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005315
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005316# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5317echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005318echo "configure:5319: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005319if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005320 echo $ac_n "(cached) $ac_c" 1>&6
5321else
5322 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005323#line 5324 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005324#include "confdefs.h"
5325/* System header to define __stub macros and hopefully few prototypes,
5326 which can conflict with char gethostbyname_r(); below. */
5327#include <assert.h>
5328/* Override any gcc2 internal prototype to avoid an error. */
5329/* We use char because int might match the return type of a gcc2
5330 builtin and then its argument prototype would still apply. */
5331char gethostbyname_r();
5332
5333int main() {
5334
5335/* The GNU C library defines this for functions which it implements
5336 to always fail with ENOSYS. Some functions are actually named
5337 something starting with __ and the normal name is an alias. */
5338#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5339choke me
5340#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005341gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005342#endif
5343
5344; return 0; }
5345EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005346if { (eval echo configure:5347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005347 rm -rf conftest*
5348 eval "ac_cv_func_gethostbyname_r=yes"
5349else
5350 echo "configure: failed program was:" >&5
5351 cat conftest.$ac_ext >&5
5352 rm -rf conftest*
5353 eval "ac_cv_func_gethostbyname_r=no"
5354fi
5355rm -f conftest*
5356fi
5357
5358if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5359 echo "$ac_t""yes" 1>&6
5360
5361 cat >> confdefs.h <<\EOF
5362#define HAVE_GETHOSTBYNAME_R 1
5363EOF
5364
5365 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005366echo "configure:5367: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005367 OLD_CFLAGS=$CFLAGS
5368 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
5369 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005370#line 5371 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005371#include "confdefs.h"
5372
5373# include <netdb.h>
5374
5375int main() {
5376
5377 char *name;
5378 struct hostent *he, *res;
5379 char buffer[2048];
5380 int buflen = 2048;
5381 int h_errnop;
5382
5383 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
5384
5385; return 0; }
5386EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005387if { (eval echo configure:5388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005388 rm -rf conftest*
5389
5390 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005391#define HAVE_GETHOSTBYNAME_R 1
5392EOF
5393
5394 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005395#define HAVE_GETHOSTBYNAME_R_6_ARG 1
5396EOF
5397
5398 echo "$ac_t""yes" 1>&6
5399
5400else
5401 echo "configure: failed program was:" >&5
5402 cat conftest.$ac_ext >&5
5403 rm -rf conftest*
5404
5405 echo "$ac_t""no" 1>&6
5406 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005407echo "configure:5408: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005408 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005409#line 5410 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005410#include "confdefs.h"
5411
5412# include <netdb.h>
5413
5414int main() {
5415
5416 char *name;
5417 struct hostent *he;
5418 char buffer[2048];
5419 int buflen = 2048;
5420 int h_errnop;
5421
5422 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
5423
5424; return 0; }
5425EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005426if { (eval echo configure:5427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005427 rm -rf conftest*
5428
5429 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005430#define HAVE_GETHOSTBYNAME_R 1
5431EOF
5432
5433 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005434#define HAVE_GETHOSTBYNAME_R_5_ARG 1
5435EOF
5436
5437 echo "$ac_t""yes" 1>&6
5438
5439else
5440 echo "configure: failed program was:" >&5
5441 cat conftest.$ac_ext >&5
5442 rm -rf conftest*
5443
5444 echo "$ac_t""no" 1>&6
5445 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005446echo "configure:5447: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005447 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005448#line 5449 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005449#include "confdefs.h"
5450
5451# include <netdb.h>
5452
5453int main() {
5454
5455 char *name;
5456 struct hostent *he;
5457 struct hostent_data data;
5458
5459 (void) gethostbyname_r(name, he, &data);
5460
5461; return 0; }
5462EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005463if { (eval echo configure:5464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005464 rm -rf conftest*
5465
5466 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005467#define HAVE_GETHOSTBYNAME_R 1
5468EOF
5469
5470 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005471#define HAVE_GETHOSTBYNAME_R_3_ARG 1
5472EOF
5473
5474 echo "$ac_t""yes" 1>&6
5475
5476else
5477 echo "configure: failed program was:" >&5
5478 cat conftest.$ac_ext >&5
5479 rm -rf conftest*
5480
5481 echo "$ac_t""no" 1>&6
5482
5483fi
5484rm -f conftest*
5485
5486fi
5487rm -f conftest*
5488
5489fi
5490rm -f conftest*
5491 CFLAGS=$OLD_CFLAGS
5492
5493else
5494 echo "$ac_t""no" 1>&6
5495
Thomas Wouters3a584202000-08-05 23:28:51 +00005496 for ac_func in gethostbyname
5497do
5498echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005499echo "configure:5500: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005500if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005501 echo $ac_n "(cached) $ac_c" 1>&6
5502else
5503 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005504#line 5505 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005505#include "confdefs.h"
5506/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005507 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005508#include <assert.h>
5509/* Override any gcc2 internal prototype to avoid an error. */
5510/* We use char because int might match the return type of a gcc2
5511 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005512char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005513
5514int main() {
5515
5516/* The GNU C library defines this for functions which it implements
5517 to always fail with ENOSYS. Some functions are actually named
5518 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005519#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005520choke me
5521#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005522$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005523#endif
5524
5525; return 0; }
5526EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005527if { (eval echo configure:5528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005528 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005529 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005530else
5531 echo "configure: failed program was:" >&5
5532 cat conftest.$ac_ext >&5
5533 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005534 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005535fi
5536rm -f conftest*
5537fi
5538
Thomas Wouters3a584202000-08-05 23:28:51 +00005539if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005540 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005541 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5542 cat >> confdefs.h <<EOF
5543#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005544EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00005545
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005546else
5547 echo "$ac_t""no" 1>&6
5548fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005549done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005550
5551
5552fi
5553
5554
5555
5556
5557
5558
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005559
Guido van Rossum627b2d71993-12-24 10:39:16 +00005560# checks for system services
5561# (none yet)
5562
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005563# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005564echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005565echo "configure:5566: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005566if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005567 echo $ac_n "(cached) $ac_c" 1>&6
5568else
5569 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005570#line 5571 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005571#include "confdefs.h"
5572/* System header to define __stub macros and hopefully few prototypes,
5573 which can conflict with char __fpu_control(); below. */
5574#include <assert.h>
5575/* Override any gcc2 internal prototype to avoid an error. */
5576/* We use char because int might match the return type of a gcc2
5577 builtin and then its argument prototype would still apply. */
5578char __fpu_control();
5579
5580int main() {
5581
5582/* The GNU C library defines this for functions which it implements
5583 to always fail with ENOSYS. Some functions are actually named
5584 something starting with __ and the normal name is an alias. */
5585#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5586choke me
5587#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005588__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005589#endif
5590
5591; return 0; }
5592EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005593if { (eval echo configure:5594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005594 rm -rf conftest*
5595 eval "ac_cv_func___fpu_control=yes"
5596else
5597 echo "configure: failed program was:" >&5
5598 cat conftest.$ac_ext >&5
5599 rm -rf conftest*
5600 eval "ac_cv_func___fpu_control=no"
5601fi
5602rm -f conftest*
5603fi
5604
5605if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5606 echo "$ac_t""yes" 1>&6
5607 :
5608else
5609 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005610echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005611echo "configure:5612: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005612ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005613if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005614 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005615else
5616 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005617LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005618cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005619#line 5620 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005620#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005621/* Override any gcc2 internal prototype to avoid an error. */
5622/* We use char because int might match the return type of a gcc2
5623 builtin and then its argument prototype would still apply. */
5624char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005625
Guido van Rossumf78abae1997-01-21 22:02:36 +00005626int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005627__fpu_control()
5628; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005629EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005630if { (eval echo configure:5631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005631 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005632 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005633else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005634 echo "configure: failed program was:" >&5
5635 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005636 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005637 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005638fi
5639rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005640LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005641
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005642fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005643if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005644 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005645 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5646 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005647 cat >> confdefs.h <<EOF
5648#define $ac_tr_lib 1
5649EOF
5650
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005651 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005652
5653else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005654 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005655fi
5656
5657
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005658fi
5659
5660
Guido van Rossum7f253911997-05-09 02:42:48 +00005661# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005662echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005663echo "configure:5664: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005664# Check whether --with-fpectl or --without-fpectl was given.
5665if test "${with_fpectl+set}" = set; then
5666 withval="$with_fpectl"
5667
5668if test "$withval" != no
5669then cat >> confdefs.h <<\EOF
5670#define WANT_SIGFPE_HANDLER 1
5671EOF
5672 echo "$ac_t""yes" 1>&6
5673else echo "$ac_t""no" 1>&6
5674fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005675else
5676 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005677fi
5678
5679
Guido van Rossum7f43da71994-08-01 12:15:30 +00005680# check for --with-libm=...
5681
Guido van Rossum563e7081996-09-10 18:20:48 +00005682case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00005683Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005684next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005685BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005686*) LIBM=-lm
5687esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005688echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005689echo "configure:5690: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005690# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005691if test "${with_libm+set}" = set; then
5692 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005693
Guido van Rossum7f253911997-05-09 02:42:48 +00005694if test "$withval" = no
5695then LIBM=
5696 echo "$ac_t""force LIBM empty" 1>&6
5697elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005698then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005699 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005700else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005701fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005702else
5703 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005704fi
5705
5706
5707# check for --with-libc=...
5708
Guido van Rossum7f253911997-05-09 02:42:48 +00005709echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005710echo "configure:5711: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005711# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005712if test "${with_libc+set}" = set; then
5713 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005714
Guido van Rossum7f253911997-05-09 02:42:48 +00005715if test "$withval" = no
5716then LIBC=
5717 echo "$ac_t""force LIBC empty" 1>&6
5718elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005719then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005720 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005721else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005722fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005723else
5724 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005725fi
5726
5727
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005728# check for --with-check-import-case
5729# Check whether --with-check-import-case or --without-check-import-case was given.
5730if test "${with_check_import_case+set}" = set; then
5731 withval="$with_check_import_case"
5732 :
5733fi
5734
5735echo $ac_n "checking for --with-check-import-case""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005736echo "configure:5737: checking for --with-check-import-case" >&5
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005737if test "$with_check_import_case"
5738then
5739 cat >> confdefs.h <<\EOF
5740#define CHECK_IMPORT_CASE 1
5741EOF
5742
5743 echo "$ac_t""yes" 1>&6
5744else
5745 echo "$ac_t""no" 1>&6
5746fi
5747
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005748# check for hypot() in math library
5749LIBS_SAVE=$LIBS
5750LIBS="$LIBS $LIBM"
5751for ac_func in hypot
5752do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005753echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005754echo "configure:5755: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005755if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005756 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005757else
5758 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005759#line 5760 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005760#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005761/* System header to define __stub macros and hopefully few prototypes,
5762 which can conflict with char $ac_func(); below. */
5763#include <assert.h>
5764/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005765/* We use char because int might match the return type of a gcc2
5766 builtin and then its argument prototype would still apply. */
5767char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005768
Guido van Rossumf78abae1997-01-21 22:02:36 +00005769int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005770
5771/* The GNU C library defines this for functions which it implements
5772 to always fail with ENOSYS. Some functions are actually named
5773 something starting with __ and the normal name is an alias. */
5774#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5775choke me
5776#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005777$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005778#endif
5779
5780; return 0; }
5781EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005782if { (eval echo configure:5783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005783 rm -rf conftest*
5784 eval "ac_cv_func_$ac_func=yes"
5785else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005786 echo "configure: failed program was:" >&5
5787 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005788 rm -rf conftest*
5789 eval "ac_cv_func_$ac_func=no"
5790fi
5791rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005792fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005793
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005794if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5795 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005796 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5797 cat >> confdefs.h <<EOF
5798#define $ac_tr_func 1
5799EOF
5800
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005801else
5802 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005803LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005804fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005805done
5806
Guido van Rossumf78abae1997-01-21 22:02:36 +00005807
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005808LIBS=$LIBS_SAVE
5809
Guido van Rossumad713701997-07-10 22:42:38 +00005810# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005811echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005812echo "configure:5813: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005813if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005814 echo $ac_n "(cached) $ac_c" 1>&6
5815else
5816 if test "$cross_compiling" = yes; then
5817 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5818else
5819 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005820#line 5821 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005821#include "confdefs.h"
5822#include <stdio.h>
5823#ifdef HAVE_STDLIB
5824#include <stdlib.h>
5825#else
5826char *malloc(), *realloc();
5827int *free();
5828#endif
5829main() {
5830 char *p;
5831 p = malloc(0);
5832 if (p == NULL) exit(1);
5833 p = realloc(p, 0);
5834 if (p == NULL) exit(1);
5835 free(p);
5836 exit(0);
5837}
5838EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005839if { (eval echo configure:5840: \"$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 +00005840then
5841 ac_cv_malloc_zero=nonnull
5842else
5843 echo "configure: failed program was:" >&5
5844 cat conftest.$ac_ext >&5
5845 rm -fr conftest*
5846 ac_cv_malloc_zero=null
5847fi
5848rm -fr conftest*
5849fi
5850
5851fi
5852
5853echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5854if test "$ac_cv_malloc_zero" = null
5855then
5856 cat >> confdefs.h <<\EOF
5857#define MALLOC_ZERO_RETURNS_NULL 1
5858EOF
5859
5860fi
5861
Guido van Rossumef2255b2000-03-10 22:30:29 +00005862# check for wchar.h
5863ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5864echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005865echo "configure:5866: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005866if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005867 echo $ac_n "(cached) $ac_c" 1>&6
5868else
5869 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005870#line 5871 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005871#include "confdefs.h"
5872#include <wchar.h>
5873EOF
5874ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Neil Schemenauera35c6882001-02-27 04:45:05 +00005875{ (eval echo configure:5876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005876ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5877if test -z "$ac_err"; then
5878 rm -rf conftest*
5879 eval "ac_cv_header_$ac_safe=yes"
5880else
5881 echo "$ac_err" >&5
5882 echo "configure: failed program was:" >&5
5883 cat conftest.$ac_ext >&5
5884 rm -rf conftest*
5885 eval "ac_cv_header_$ac_safe=no"
5886fi
5887rm -f conftest*
5888fi
5889if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5890 echo "$ac_t""yes" 1>&6
5891 cat >> confdefs.h <<\EOF
5892#define HAVE_WCHAR_H 1
5893EOF
5894 wchar_h="yes"
5895else
5896 echo "$ac_t""no" 1>&6
5897wchar_h="no"
5898
5899fi
5900
5901
5902# check for usable wchar_t
5903usable_wchar_t="unkown"
5904echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005905echo "configure:5906: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005906if test "$cross_compiling" = yes; then
5907 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5908else
5909 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005910#line 5911 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005911#include "confdefs.h"
5912
5913#include "wchar.h"
5914#include "wctype.h"
5915main() {
5916 wchar_t s;
5917 if (sizeof(s) == 2)
5918 exit(0);
5919 else
5920 exit(1);
5921}
5922
5923EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005924if { (eval echo configure:5925: \"$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 +00005925then
5926 cat >> confdefs.h <<\EOF
5927#define HAVE_USABLE_WCHAR_T 1
5928EOF
5929 usable_wchar_t="yes"
5930else
5931 echo "configure: failed program was:" >&5
5932 cat conftest.$ac_ext >&5
5933 rm -fr conftest*
5934 usable_wchar_t="no"
5935fi
5936rm -fr conftest*
5937fi
5938
5939echo "$ac_t""$usable_wchar_t" 1>&6
5940
5941# check for endianness
5942echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00005943echo "configure:5944: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005944if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005945 echo $ac_n "(cached) $ac_c" 1>&6
5946else
5947 ac_cv_c_bigendian=unknown
5948# See if sys/param.h defines the BYTE_ORDER macro.
5949cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005950#line 5951 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005951#include "confdefs.h"
5952#include <sys/types.h>
5953#include <sys/param.h>
5954int main() {
5955
5956#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5957 bogus endian macros
5958#endif
5959; return 0; }
5960EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005961if { (eval echo configure:5962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005962 rm -rf conftest*
5963 # It does; now see whether it defined to BIG_ENDIAN or not.
5964cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005965#line 5966 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005966#include "confdefs.h"
5967#include <sys/types.h>
5968#include <sys/param.h>
5969int main() {
5970
5971#if BYTE_ORDER != BIG_ENDIAN
5972 not big endian
5973#endif
5974; return 0; }
5975EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005976if { (eval echo configure:5977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005977 rm -rf conftest*
5978 ac_cv_c_bigendian=yes
5979else
5980 echo "configure: failed program was:" >&5
5981 cat conftest.$ac_ext >&5
5982 rm -rf conftest*
5983 ac_cv_c_bigendian=no
5984fi
5985rm -f conftest*
5986else
5987 echo "configure: failed program was:" >&5
5988 cat conftest.$ac_ext >&5
5989fi
5990rm -f conftest*
5991if test $ac_cv_c_bigendian = unknown; then
5992if test "$cross_compiling" = yes; then
5993 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5994else
5995 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00005996#line 5997 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005997#include "confdefs.h"
5998main () {
5999 /* Are we little or big endian? From Harbison&Steele. */
6000 union
6001 {
6002 long l;
6003 char c[sizeof (long)];
6004 } u;
6005 u.l = 1;
6006 exit (u.c[sizeof (long) - 1] == 1);
6007}
6008EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00006009if { (eval echo configure:6010: \"$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 +00006010then
6011 ac_cv_c_bigendian=no
6012else
6013 echo "configure: failed program was:" >&5
6014 cat conftest.$ac_ext >&5
6015 rm -fr conftest*
6016 ac_cv_c_bigendian=yes
6017fi
6018rm -fr conftest*
6019fi
6020
6021fi
6022fi
6023
6024echo "$ac_t""$ac_cv_c_bigendian" 1>&6
6025if test $ac_cv_c_bigendian = yes; then
6026 cat >> confdefs.h <<\EOF
6027#define WORDS_BIGENDIAN 1
6028EOF
6029
6030fi
6031
6032
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006033# Check whether right shifting a negative integer extends the sign bit
6034# or fills with zeros (like the Cray J90, according to Tim Peters).
6035echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00006036echo "configure:6037: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006037if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00006038 echo $ac_n "(cached) $ac_c" 1>&6
6039else
6040
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006041if test "$cross_compiling" = yes; then
6042 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6043else
6044 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00006045#line 6046 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006046#include "confdefs.h"
6047
6048int main()
6049{
Vladimir Marangozova6180282000-07-12 05:05:06 +00006050 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006051}
6052
6053EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00006054if { (eval echo configure:6055: \"$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 +00006055then
6056 ac_cv_rshift_extends_sign=yes
6057else
6058 echo "configure: failed program was:" >&5
6059 cat conftest.$ac_ext >&5
6060 rm -fr conftest*
6061 ac_cv_rshift_extends_sign=no
6062fi
6063rm -fr conftest*
6064fi
6065
6066fi
6067
6068echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
6069if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006070then
6071 cat >> confdefs.h <<\EOF
6072#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
6073EOF
6074
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006075fi
6076
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006077# check for getc_unlocked and related locking functions
6078echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00006079echo "configure:6080: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006080if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
6081 echo $ac_n "(cached) $ac_c" 1>&6
6082else
6083
6084cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00006085#line 6086 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006086#include "confdefs.h"
6087#include <stdio.h>
6088int main() {
6089
6090 FILE *f = fopen("/dev/null", "r");
6091 flockfile(f);
6092 getc_unlocked(f);
6093 funlockfile(f);
6094
6095; return 0; }
6096EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00006097if { (eval echo configure:6098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006098 rm -rf conftest*
6099 ac_cv_have_getc_unlocked=yes
6100else
6101 echo "configure: failed program was:" >&5
6102 cat conftest.$ac_ext >&5
6103 rm -rf conftest*
6104 ac_cv_have_getc_unlocked=no
6105fi
6106rm -f conftest*
6107fi
6108
6109echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
6110if test "$ac_cv_have_getc_unlocked" = yes
6111then
6112 cat >> confdefs.h <<\EOF
6113#define HAVE_GETC_UNLOCKED 1
6114EOF
6115
6116fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006117
Guido van Rossum95713eb2000-05-18 20:53:31 +00006118# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
6119# Add sys/socket.h to confdefs.h
6120cat >> confdefs.h <<\EOF
6121#ifdef HAVE_SYS_SOCKET_H
6122#include <sys/socket.h>
6123#endif
6124EOF
6125echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00006126echo "configure:6127: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006127if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00006128 echo $ac_n "(cached) $ac_c" 1>&6
6129else
6130 cat > conftest.$ac_ext <<EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00006131#line 6132 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00006132#include "confdefs.h"
6133#include <sys/types.h>
6134#if STDC_HEADERS
6135#include <stdlib.h>
6136#include <stddef.h>
6137#endif
6138EOF
6139if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6140 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6141 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006142 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00006143else
6144 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006145 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00006146fi
6147rm -f conftest*
6148
6149fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006150echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
6151if test $ac_cv_type_socklen_t = no; then
6152 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00006153#define socklen_t int
6154EOF
6155
6156fi
6157
6158
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00006159# Add Python/ prefix to LIBOBJS
6160libobjs=$LIBOBJS
6161LIBOBJS=
6162for obj in $libobjs; do
6163 LIBOBJS="$LIBOBJS Python/$obj"
6164done
6165
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006166#AC_MSG_CHECKING(for Modules/Setup)
6167#if test ! -f Modules/Setup ; then
6168# if test ! -d Modules ; then
6169# mkdir Modules
6170# fi
6171# cp "$srcdir/Modules/Setup.dist" Modules/Setup
6172# AC_MSG_RESULT(creating)
6173#else
6174# AC_MSG_RESULT(already exists)
6175#fi
6176
6177
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00006178SRCDIRS="Parser Grammar Objects Python Modules"
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00006179echo $ac_n "checking for build directories""... $ac_c" 1>&6
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00006180echo "configure:6181: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006181for dir in $SRCDIRS; do
6182 if test ! -d $dir; then
6183 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00006184 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006185done
6186echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00006187
Guido van Rossum627b2d71993-12-24 10:39:16 +00006188# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006189trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006190cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006191# This file is a shell script that caches the results of configure
6192# tests run on this system so they can be shared between configure
6193# scripts and configure runs. It is not useful on other systems.
6194# If it contains results you don't want to keep, you may remove or edit it.
6195#
6196# By default, configure uses ./config.cache as the cache file,
6197# creating it if it does not exist already. You can give configure
6198# the --cache-file=FILE option to use a different cache file; that is
6199# what configure does when it calls configure scripts in
6200# subdirectories, so they share the cache.
6201# Giving --cache-file=/dev/null disables caching, for debugging configure.
6202# config.status only pays attention to the cache file if you give it the
6203# --recheck option to rerun configure.
6204#
6205EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006206# The following way of writing the cache mishandles newlines in values,
6207# but we know of no workaround that is simple, portable, and efficient.
6208# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006209# Ultrix sh set writes to stderr and can't be redirected directly,
6210# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006211(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006212 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006213 *ac_space=\ *)
6214 # `set' does not quote correctly, so add quotes (double-quote substitution
6215 # turns \\\\ into \\, and sed turns \\ into \).
6216 sed -n \
6217 -e "s/'/'\\\\''/g" \
6218 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6219 ;;
6220 *)
6221 # `set' quotes correctly as required by POSIX, so do not add quotes.
6222 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6223 ;;
6224 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006225if cmp -s $cache_file confcache; then
6226 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006227else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006228 if test -w $cache_file; then
6229 echo "updating cache $cache_file"
6230 cat confcache > $cache_file
6231 else
6232 echo "not updating unwritable cache $cache_file"
6233 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006234fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006235rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00006236
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006237trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006238
6239test "x$prefix" = xNONE && prefix=$ac_default_prefix
6240# Let make expand exec_prefix.
6241test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00006242
Guido van Rossum7f43da71994-08-01 12:15:30 +00006243# Any assignment to VPATH causes Sun make to only execute
6244# the first set of double-colon rules, so remove it if not needed.
6245# If there is a colon in the path, we need to keep it.
6246if test "x$srcdir" = x.; then
6247 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6248fi
6249
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006250trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00006251
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006252DEFS=-DHAVE_CONFIG_H
6253
6254# Without the "./", some shells look in PATH for config.status.
6255: ${CONFIG_STATUS=./config.status}
6256
6257echo creating $CONFIG_STATUS
6258rm -f $CONFIG_STATUS
6259cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006260#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00006261# Generated automatically by configure.
6262# Run this file to recreate the current configuration.
6263# This directory was configured as follows,
6264# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6265#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006266# $0 $ac_configure_args
6267#
6268# Compiler output produced by configure, useful for debugging
6269# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00006270
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006271ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006272for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00006273do
Guido van Rossum7f43da71994-08-01 12:15:30 +00006274 case "\$ac_option" in
6275 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006276 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6277 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00006278 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006279 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006280 exit 0 ;;
6281 -help | --help | --hel | --he | --h)
6282 echo "\$ac_cs_usage"; exit 0 ;;
6283 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006284 esac
6285done
6286
Guido van Rossum7f43da71994-08-01 12:15:30 +00006287ac_given_srcdir=$srcdir
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006288ac_given_INSTALL="$INSTALL"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006289
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00006290trap 'rm -fr `echo "Makefile.pre Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006291EOF
6292cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006293
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006294# Protect against being on the right side of a sed subst in config.status.
6295sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6296 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006297$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00006298$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006299s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006300s%@CFLAGS@%$CFLAGS%g
6301s%@CPPFLAGS@%$CPPFLAGS%g
6302s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006303s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006304s%@DEFS@%$DEFS%g
6305s%@LDFLAGS@%$LDFLAGS%g
6306s%@LIBS@%$LIBS%g
6307s%@exec_prefix@%$exec_prefix%g
6308s%@prefix@%$prefix%g
6309s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006310s%@bindir@%$bindir%g
6311s%@sbindir@%$sbindir%g
6312s%@libexecdir@%$libexecdir%g
6313s%@datadir@%$datadir%g
6314s%@sysconfdir@%$sysconfdir%g
6315s%@sharedstatedir@%$sharedstatedir%g
6316s%@localstatedir@%$localstatedir%g
6317s%@libdir@%$libdir%g
6318s%@includedir@%$includedir%g
6319s%@oldincludedir@%$oldincludedir%g
6320s%@infodir@%$infodir%g
6321s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00006322s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006323s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00006324s%@SGI_ABI@%$SGI_ABI%g
Martin v. Löwis22352952000-12-13 17:37:02 +00006325s%@CXX@%$CXX%g
Guido van Rossumca563f22001-01-23 01:52:44 +00006326s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006327s%@CC@%$CC%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006328s%@EXEEXT@%$EXEEXT%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00006329s%@LIBRARY@%$LIBRARY%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006330s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumca563f22001-01-23 01:52:44 +00006331s%@DLLLIBRARY@%$DLLLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00006332s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006333s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006334s%@AR@%$AR%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006335s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006336s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006337s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006338s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006339s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006340s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006341s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006342s%@SO@%$SO%g
6343s%@LDSHARED@%$LDSHARED%g
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00006344s%@BLDSHARED@%$BLDSHARED%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006345s%@CCSHARED@%$CCSHARED%g
6346s%@LINKFORSHARED@%$LINKFORSHARED%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00006347s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006348s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
6349s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
Guido van Rossum009f7871997-12-04 00:51:42 +00006350s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00006351s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00006352s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006353s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00006354s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006355s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006356s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
6357s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
6358s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006359s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006360s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006361s%@LIBM@%$LIBM%g
6362s%@LIBC@%$LIBC%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006363s%@SRCDIRS@%$SRCDIRS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006364
6365CEOF
6366EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006367
6368cat >> $CONFIG_STATUS <<\EOF
6369
6370# Split the substitutions into bite-sized pieces for seds with
6371# small command number limits, like on Digital OSF/1 and HP-UX.
6372ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6373ac_file=1 # Number of current file.
6374ac_beg=1 # First line for current file.
6375ac_end=$ac_max_sed_cmds # Line after last line for current file.
6376ac_more_lines=:
6377ac_sed_cmds=""
6378while $ac_more_lines; do
6379 if test $ac_beg -gt 1; then
6380 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6381 else
6382 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6383 fi
6384 if test ! -s conftest.s$ac_file; then
6385 ac_more_lines=false
6386 rm -f conftest.s$ac_file
6387 else
6388 if test -z "$ac_sed_cmds"; then
6389 ac_sed_cmds="sed -f conftest.s$ac_file"
6390 else
6391 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6392 fi
6393 ac_file=`expr $ac_file + 1`
6394 ac_beg=$ac_end
6395 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6396 fi
6397done
6398if test -z "$ac_sed_cmds"; then
6399 ac_sed_cmds=cat
6400fi
6401EOF
6402
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006403cat >> $CONFIG_STATUS <<EOF
6404
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00006405CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006406EOF
6407cat >> $CONFIG_STATUS <<\EOF
6408for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006409 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006410 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006411 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006412 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6413 *) ac_file_in="${ac_file}.in" ;;
6414 esac
6415
Guido van Rossumf78abae1997-01-21 22:02:36 +00006416 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006417
6418 # Remove last slash and all that follows it. Not all systems have dirname.
6419 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6420 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6421 # The file is in a subdirectory.
6422 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006423 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006424 # A "../" for each directory in $ac_dir_suffix.
6425 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6426 else
6427 ac_dir_suffix= ac_dots=
6428 fi
6429
6430 case "$ac_given_srcdir" in
6431 .) srcdir=.
6432 if test -z "$ac_dots"; then top_srcdir=.
6433 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6434 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6435 *) # Relative path.
6436 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6437 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6438 esac
6439
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006440 case "$ac_given_INSTALL" in
6441 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6442 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6443 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006444
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006445 echo creating "$ac_file"
6446 rm -f "$ac_file"
6447 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6448 case "$ac_file" in
6449 *Makefile*) ac_comsub="1i\\
6450# $configure_input" ;;
6451 *) ac_comsub= ;;
6452 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006453
6454 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 +00006455 sed -e "$ac_comsub
6456s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006457s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006458s%@top_srcdir@%$top_srcdir%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006459s%@INSTALL@%$INSTALL%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00006460" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00006461fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00006462rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006463
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006464# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6465# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00006466#
6467# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006468ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6469ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006470ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006471ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006472# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006473ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6474ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006475ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006476ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006477# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006478ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6479ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006480ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006481ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006482
Guido van Rossumf78abae1997-01-21 22:02:36 +00006483if test "${CONFIG_HEADERS+set}" != set; then
6484EOF
6485cat >> $CONFIG_STATUS <<EOF
6486 CONFIG_HEADERS="config.h"
6487EOF
6488cat >> $CONFIG_STATUS <<\EOF
6489fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006490for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006491 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006492 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006493 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006494 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6495 *) ac_file_in="${ac_file}.in" ;;
6496 esac
6497
Guido van Rossum7f43da71994-08-01 12:15:30 +00006498 echo creating $ac_file
6499
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006500 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006501 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6502 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006503
6504EOF
6505
6506# Transform confdefs.h into a sed script conftest.vals that substitutes
6507# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006508# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006509# Protect against being in an unquoted here document in config.status.
6510rm -f conftest.vals
6511cat > conftest.hdr <<\EOF
6512s/[\\&%]/\\&/g
6513s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006514s%#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 +00006515s%ac_d%ac_u%gp
6516s%ac_u%ac_e%gp
6517EOF
6518sed -n -f conftest.hdr confdefs.h > conftest.vals
6519rm -f conftest.hdr
6520
6521# This sed command replaces #undef with comments. This is necessary, for
6522# example, in the case of _POSIX_SOURCE, which is predefined and required
6523# on some systems where configure will not decide to define it.
6524cat >> conftest.vals <<\EOF
6525s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6526EOF
6527
6528# Break up conftest.vals because some shells have a limit on
6529# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006530
6531rm -f conftest.tail
6532while :
6533do
6534 ac_lines=`grep -c . conftest.vals`
6535 # grep -c gives empty output for an empty file on some AIX systems.
6536 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6537 # Write a limited-size here document to conftest.frag.
6538 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6539 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6540 echo 'CEOF
6541 sed -f conftest.frag conftest.in > conftest.out
6542 rm -f conftest.in
6543 mv conftest.out conftest.in
6544' >> $CONFIG_STATUS
6545 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6546 rm -f conftest.vals
6547 mv conftest.tail conftest.vals
6548done
6549rm -f conftest.vals
6550
6551cat >> $CONFIG_STATUS <<\EOF
6552 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006553 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006554 cat conftest.in >> conftest.h
6555 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006556 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006557 echo "$ac_file is unchanged"
6558 rm -f conftest.h
6559 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006560 # Remove last slash and all that follows it. Not all systems have dirname.
6561 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6562 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6563 # The file is in a subdirectory.
6564 test ! -d "$ac_dir" && mkdir "$ac_dir"
6565 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006566 rm -f $ac_file
6567 mv conftest.h $ac_file
6568 fi
6569fi; done
6570
Guido van Rossumf78abae1997-01-21 22:02:36 +00006571EOF
6572cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006573
Guido van Rossumf78abae1997-01-21 22:02:36 +00006574EOF
6575cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006576
6577exit 0
6578EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006579chmod +x $CONFIG_STATUS
6580rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006581test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006582
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00006583
6584echo "creating Setup"
6585if test ! -f Modules/Setup
6586then
6587 cp $srcdir/Modules/Setup.dist Modules/Setup
6588fi
6589
6590echo "creating Setup.local"
6591if test ! -f Modules/Setup.local
6592then
6593 echo "# Edit this file for local setup changes" >Modules/Setup.local
6594fi
6595
6596echo "creating Makefile"
6597$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
6598 -s Modules Modules/Setup.config \
6599 Modules/Setup Modules/Setup.local
Neil Schemenauerc761fc82001-02-19 04:50:49 +00006600mv config.c Modules