blob: 0ab7ed2623b7a47fd7a9e9574a8e93cb23ecdf9d [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Guido van Rossumca563f22001-01-23 01:52:44 +00003# From configure.in Revision: 1.194
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 Warsawc0d24d8b2000-06-29 16:12:00 +000017 --with-next-archs='arch1 arch2 ..' build MAB binary"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000018ac_help="$ac_help
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 Warsawc0d24d8b2000-06-29 16:12:00 +000023 --without-gcc never use gcc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000025 --with-cxx=<compiler> enable C++ support"
Guido van Rossum95012191999-12-16 17:50:52 +000026ac_help="$ac_help
Guido van Rossumff555e32000-09-22 15:38:21 +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 Warsawc0d24d8b2000-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
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000033 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000034ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000035 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000036ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000037 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000038ac_help="$ac_help
Guido van Rossum9e8181b2000-09-19 00:46:46 +000039 --with-pth use GNU pth threading libraries"
40ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000041 --with(out)-cycle-gc disable/enable garbage collection"
42ac_help="$ac_help
Barry Warsawa57b89b2001-01-15 17:07:21 +000043 --with(out)-dbm disable/enable dbm module"
44ac_help="$ac_help
Fred Drakea50d6ec2000-08-31 16:13:20 +000045 --with(out)-libdb disable/enable bsddb module"
46ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000047 --with-wctype-functions use wctype.h functions"
48ac_help="$ac_help
Barry Warsawc0d24d8b2000-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 Warsawc0d24d8b2000-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 Warsawc0d24d8b2000-06-29 16:12:00 +000053 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000054ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000055 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000056ac_help="$ac_help
Barry Warsawc0d24d8b2000-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
Barry Warsawa57b89b2001-01-15 17:07:21 +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
Barry Warsawa57b89b2001-01-15 17:07:21 +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 Rossum91922671997-10-09 20:24:13 +0000666
Guido van Rossum627b2d71993-12-24 10:39:16 +0000667# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000668echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +0000669echo "configure:670: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000670# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000671if test "${with_gcc+set}" = set; then
672 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000673
674 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000675 no) CC=cc
676 without_gcc=yes;;
677 yes) CC=gcc
678 without_gcc=no;;
679 *) CC=$withval
680 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000681 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000682else
Guido van Rossume77438c1995-09-13 18:59:59 +0000683
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000684 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000685 OSF1) CC=cc
686 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000687 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000688 case $BE_HOST_CPU in
689 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000690 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000691 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000692 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
693 CCSHARED="UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000694 LDFLAGS="$LDFLAGS -nodup"
695
696 AR="$PWD/BeOS/ar-fake"
697 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000698 ;;
699 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000700 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000701 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000702 OPT=-O
703 # Really should use srcdir instead of PWD
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000704 AR="$PWD/BeOS/ar-fake"
705 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000706 ;;
707 *)
Fred Drake5790be12000-10-09 17:06:13 +0000708 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000709 ;;
710 esac
711 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000712 Monterey*)
713 RANLIB=:
714 without_gcc=;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000715 *) without_gcc=no;;
716 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000717fi
718
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000719echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000720
Guido van Rossum95012191999-12-16 17:50:52 +0000721
722
723MAINOBJ=python.o
724echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +0000725echo "configure:726: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000726# Check whether --with-cxx or --without-cxx was given.
727if test "${with_cxx+set}" = set; then
728 withval="$with_cxx"
729
Martin v. Löwis22352952000-12-13 17:37:02 +0000730 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000731 case $withval in
732 no) CXX=
733 with_cxx=no;;
734 *) CXX=$withval
735 MAINOBJ=ccpython.o
736 with_cxx=$withval;;
737 esac
738else
739
740 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000741 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000742
743fi
744
745echo "$ac_t""$with_cxx" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000746
747
748if test "$check_cxx" = "yes"
749then
750 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
751do
752# Extract the first word of "$ac_prog", so it can be a program name with args.
753set dummy $ac_prog; ac_word=$2
754echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +0000755echo "configure:756: checking for $ac_word" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000756if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
757 echo $ac_n "(cached) $ac_c" 1>&6
758else
759 if test -n "$CXX"; then
760 ac_cv_prog_CXX="$CXX" # Let the user override the test.
761else
762 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
763 ac_dummy="$PATH"
764 for ac_dir in $ac_dummy; do
765 test -z "$ac_dir" && ac_dir=.
766 if test -f $ac_dir/$ac_word; then
767 ac_cv_prog_CXX="$ac_prog"
768 break
769 fi
770 done
771 IFS="$ac_save_ifs"
772fi
773fi
774CXX="$ac_cv_prog_CXX"
775if test -n "$CXX"; then
776 echo "$ac_t""$CXX" 1>&6
777else
778 echo "$ac_t""no" 1>&6
779fi
780
781test -n "$CXX" && break
782done
783test -n "$CXX" || CXX="notfound"
784
785 if test "$CXX" = "notfound"
786 then
787 CXX=
788 else
789 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +0000790echo "configure:791: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000791
792ac_ext=C
793# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
794ac_cpp='$CXXCPP $CPPFLAGS'
795ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
796ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
797cross_compiling=$ac_cv_prog_cxx_cross
798
799cat > conftest.$ac_ext << EOF
800
Guido van Rossumca563f22001-01-23 01:52:44 +0000801#line 802 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000802#include "confdefs.h"
803
804int main(){return(0);}
805EOF
Guido van Rossumca563f22001-01-23 01:52:44 +0000806if { (eval echo configure:807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis22352952000-12-13 17:37:02 +0000807 ac_cv_prog_cxx_works=yes
808 # If we can't run a trivial program, we are probably using a cross compiler.
809 if (./conftest; exit) 2>/dev/null; then
810 ac_cv_prog_cxx_cross=no
811 else
812 ac_cv_prog_cxx_cross=yes
813 fi
814else
815 echo "configure: failed program was:" >&5
816 cat conftest.$ac_ext >&5
817 ac_cv_prog_cxx_works=no
818fi
819rm -fr conftest*
820ac_ext=c
821# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
822ac_cpp='$CPP $CPPFLAGS'
823ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
824ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
825cross_compiling=$ac_cv_prog_cc_cross
826
827echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
828if test $ac_cv_prog_cxx_works = no; then
829 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
830fi
831echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +0000832echo "configure:833: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000833echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
834cross_compiling=$ac_cv_prog_cxx_cross
835
836 fi
837fi
838
Guido van Rossum95012191999-12-16 17:50:52 +0000839
Guido van Rossum8b131c51995-03-09 14:10:13 +0000840# If the user switches compilers, we can't believe the cache
841if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
842then
843 { echo "configure: error: cached CC is different -- throw away $cache_file
844(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
845fi
846
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000847# Extract the first word of "gcc", so it can be a program name with args.
848set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000849echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +0000850echo "configure:851: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000851if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000852 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853else
854 if test -n "$CC"; then
855 ac_cv_prog_CC="$CC" # Let the user override the test.
856else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000857 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
858 ac_dummy="$PATH"
859 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860 test -z "$ac_dir" && ac_dir=.
861 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000863 break
864 fi
865 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000867fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868fi
869CC="$ac_cv_prog_CC"
870if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000871 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000873 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000875
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876if test -z "$CC"; then
877 # Extract the first word of "cc", so it can be a program name with args.
878set dummy cc; ac_word=$2
879echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +0000880echo "configure:881: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000881if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000882 echo $ac_n "(cached) $ac_c" 1>&6
883else
884 if test -n "$CC"; then
885 ac_cv_prog_CC="$CC" # Let the user override the test.
886else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000887 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000889 ac_dummy="$PATH"
890 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891 test -z "$ac_dir" && ac_dir=.
892 if test -f $ac_dir/$ac_word; then
893 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
894 ac_prog_rejected=yes
895 continue
896 fi
897 ac_cv_prog_CC="cc"
898 break
899 fi
900 done
901 IFS="$ac_save_ifs"
902if test $ac_prog_rejected = yes; then
903 # We found a bogon in the path, so make sure we never use it.
904 set dummy $ac_cv_prog_CC
905 shift
906 if test $# -gt 0; then
907 # We chose a different compiler from the bogus one.
908 # However, it has the same basename, so the bogon will be chosen
909 # first if we set CC to just the basename; use the full file name.
910 shift
911 set dummy "$ac_dir/$ac_word" "$@"
912 shift
913 ac_cv_prog_CC="$@"
914 fi
915fi
916fi
917fi
918CC="$ac_cv_prog_CC"
919if test -n "$CC"; then
920 echo "$ac_t""$CC" 1>&6
921else
922 echo "$ac_t""no" 1>&6
923fi
924
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000925 if test -z "$CC"; then
926 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000927 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000928 # Extract the first word of "cl", so it can be a program name with args.
929set dummy cl; ac_word=$2
930echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +0000931echo "configure:932: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000932if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000933 echo $ac_n "(cached) $ac_c" 1>&6
934else
935 if test -n "$CC"; then
936 ac_cv_prog_CC="$CC" # Let the user override the test.
937else
938 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
939 ac_dummy="$PATH"
940 for ac_dir in $ac_dummy; do
941 test -z "$ac_dir" && ac_dir=.
942 if test -f $ac_dir/$ac_word; then
943 ac_cv_prog_CC="cl"
944 break
945 fi
946 done
947 IFS="$ac_save_ifs"
948fi
949fi
950CC="$ac_cv_prog_CC"
951if test -n "$CC"; then
952 echo "$ac_t""$CC" 1>&6
953else
954 echo "$ac_t""no" 1>&6
955fi
956 ;;
957 esac
958 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
960fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000962echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +0000963echo "configure:964: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000964
965ac_ext=c
966# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
967ac_cpp='$CPP $CPPFLAGS'
968ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000969ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000970cross_compiling=$ac_cv_prog_cc_cross
971
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000972cat > conftest.$ac_ext << EOF
973
Guido van Rossumca563f22001-01-23 01:52:44 +0000974#line 975 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000975#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000976
Guido van Rossumf78abae1997-01-21 22:02:36 +0000977main(){return(0);}
978EOF
Guido van Rossumca563f22001-01-23 01:52:44 +0000979if { (eval echo configure:980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000980 ac_cv_prog_cc_works=yes
981 # If we can't run a trivial program, we are probably using a cross compiler.
982 if (./conftest; exit) 2>/dev/null; then
983 ac_cv_prog_cc_cross=no
984 else
985 ac_cv_prog_cc_cross=yes
986 fi
987else
988 echo "configure: failed program was:" >&5
989 cat conftest.$ac_ext >&5
990 ac_cv_prog_cc_works=no
991fi
992rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000993ac_ext=c
994# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
995ac_cpp='$CPP $CPPFLAGS'
996ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
997ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
998cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000999
1000echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1001if test $ac_cv_prog_cc_works = no; then
1002 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1003fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001004echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001005echo "configure:1006: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001006echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1007cross_compiling=$ac_cv_prog_cc_cross
1008
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001009echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001010echo "configure:1011: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001011if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001012 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001013else
1014 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001015#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001016 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001017#endif
1018EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001019if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001020 ac_cv_prog_gcc=yes
1021else
1022 ac_cv_prog_gcc=no
1023fi
1024fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001026echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001027
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001028if test $ac_cv_prog_gcc = yes; then
1029 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001030else
1031 GCC=
1032fi
1033
1034ac_test_CFLAGS="${CFLAGS+set}"
1035ac_save_CFLAGS="$CFLAGS"
1036CFLAGS=
1037echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001038echo "configure:1039: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001039if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001040 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041else
1042 echo 'void f(){}' > conftest.c
1043if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001044 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001045else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001046 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001047fi
1048rm -f conftest*
1049
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001050fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
Guido van Rossumf78abae1997-01-21 22:02:36 +00001052echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001053if test "$ac_test_CFLAGS" = set; then
1054 CFLAGS="$ac_save_CFLAGS"
1055elif test $ac_cv_prog_cc_g = yes; then
1056 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001057 CFLAGS="-g -O2"
1058 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001059 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001060 fi
1061else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001062 if test "$GCC" = yes; then
1063 CFLAGS="-O2"
1064 else
1065 CFLAGS=
1066 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067fi
1068
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001069
Guido van Rossumff555e32000-09-22 15:38:21 +00001070echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001071echo "configure:1072: checking for --with-suffix" >&5
Guido van Rossumff555e32000-09-22 15:38:21 +00001072# Check whether --with-suffix or --without-suffix was given.
1073if test "${with_suffix+set}" = set; then
1074 withval="$with_suffix"
1075
1076 case $withval in
1077 no) EXE=;;
1078 yes) EXE=.exe;;
1079 *) EXE=$withval;;
1080 esac
1081fi
1082
1083echo "$ac_t""$EXE" 1>&6
1084
Guido van Rossumdd997f71998-10-07 19:58:26 +00001085case $MACHDEP in
1086bsdos*)
1087 case $CC in
1088 gcc) CC="$CC -D_HAVE_BSDI";;
1089 esac;;
1090esac
1091
Guido van Rossum24b1e751997-08-21 02:29:16 +00001092case $ac_sys_system in
1093hp*|HP*)
1094 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001095 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001096 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001097Monterey*)
1098 case $CC in
1099 cc) CC="$CC -Wl,-Bexport";;
1100 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001101esac
1102
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001103# LDLIBRARY is the name of the library to link against (as opposed to the
1104# name of the library into which to insert object files). On systems
1105# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
Guido van Rossumaef734b2001-01-10 21:09:12 +00001106# the Makefiles). On Cygwin LDLIBRARY is the import library, DLLLIBRARY is the
1107# shared (i.e., DLL) library.
1108
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001109
1110
1111LDLIBRARY=''
Guido van Rossumca563f22001-01-23 01:52:44 +00001112DLLLIBRARY=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001113
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001114# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001115# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001116# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001117
1118echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001119echo "configure:1120: checking LINKCC" >&5
Guido van Rossum95012191999-12-16 17:50:52 +00001120if test -z "$LINKCC" -a ! -z "$CXX"
1121then
1122 LINKCC="$CXX"
1123fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001124if test -z "$LINKCC"
1125then
1126 case $ac_sys_system in
1127 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001128 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001129 dgux*)
1130 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001131 Monterey64*)
1132 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001133 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001134 esac
1135fi
1136echo "$ac_t""$LINKCC" 1>&6
1137
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001138echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001139echo "configure:1140: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001140
1141# NeXT framework builds require that the 'ar' library be converted into
1142# a bundle using libtool.
1143if test "$with_next_framework"
1144then
1145 LDLIBRARY='libpython$(VERSION).dylib'
1146fi
1147
1148# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001149case $MACHDEP in
1150dguxR4)
1151 LDLIBRARY='libpython$(VERSION).so'
1152 OPT="$OPT -pic"
1153 ;;
1154beos*)
1155 LDLIBRARY='libpython$(VERSION).so'
1156 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001157cygwin*)
1158 LDLIBRARY='libpython$(VERSION).dll.a'
Guido van Rossumca563f22001-01-23 01:52:44 +00001159 DLLLIBRARY='$(basename $(LDLIBRARY))'
Guido van Rossumaef734b2001-01-10 21:09:12 +00001160 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001161esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001162echo "$ac_t""$LDLIBRARY" 1>&6
1163
1164# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1165if test -z "$LDLIBRARY"
1166then
1167 LDLIBRARY='libpython$(VERSION).a'
1168 MAKE_LDLIBRARY="true"
1169else
Guido van Rossumaef734b2001-01-10 21:09:12 +00001170 case $MACHDEP in
1171 cygwin*) MAKE_LDLIBRARY='$(MAKE) -C Modules ../$(DLLLIBRARY)';;
1172 *) MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)';;
1173 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001174fi
1175
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176# Extract the first word of "ranlib", so it can be a program name with args.
1177set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001178echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001179echo "configure:1180: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001180if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001181 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001182else
1183 if test -n "$RANLIB"; then
1184 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1185else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001186 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1187 ac_dummy="$PATH"
1188 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189 test -z "$ac_dir" && ac_dir=.
1190 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001192 break
1193 fi
1194 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001197fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198fi
1199RANLIB="$ac_cv_prog_RANLIB"
1200if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001201 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001202else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001203 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001205
1206
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207for ac_prog in ar aal
1208do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001209# Extract the first word of "$ac_prog", so it can be a program name with args.
1210set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001211echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001212echo "configure:1213: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001213if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001214 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215else
1216 if test -n "$AR"; then
1217 ac_cv_prog_AR="$AR" # Let the user override the test.
1218else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001219 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1220 ac_dummy="$PATH"
1221 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222 test -z "$ac_dir" && ac_dir=.
1223 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225 break
1226 fi
1227 done
1228 IFS="$ac_save_ifs"
1229fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001230fi
1231AR="$ac_cv_prog_AR"
1232if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001233 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001234else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001235 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001236fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
1238test -n "$AR" && break
1239done
1240test -n "$AR" || AR="ar"
1241
1242
Guido van Rossumda88dad1995-01-26 00:46:29 +00001243
1244
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001245# Install just never works :-(
1246if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001247then
1248 INSTALL=cp
1249 INSTALL_PROGRAM=cp
1250 INSTALL_DATA=cp
1251else
1252 INSTALL_PROGRAM="$INSTALL"
1253 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001254fi
1255
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001256# Not every filesystem supports hard links
1257
1258if test -z "$LN" ; then
1259 case $ac_sys_system in
1260 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001261 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001262 *) LN=ln;;
1263 esac
1264fi
1265
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001266# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001267
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001268if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001269then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001270 case $GCC in
1271 yes)
1272 case $ac_cv_prog_cc_g in
Greg Warda1c4da22000-11-07 15:44:21 +00001273 yes) OPT="-g -O2 -Wall -Wstrict-prototypes -fPIC";;
1274 *) OPT="-O2 -Wall -Wstrict-prototypes -fPIC";;
Guido van Rossumedca74a1997-07-18 23:29:40 +00001275 esac
1276 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001277 *) OPT="-O";;
1278 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001279fi
1280
Trent Mick635f6fb2000-08-23 21:33:05 +00001281# The current (beta) Monterey compiler dies with optimizations
1282case $ac_sys_system in
1283Monterey*) OPT="";;
1284esac
1285
Guido van Rossumaef734b2001-01-10 21:09:12 +00001286# Cygwin does not need PIC compiler option so remove it to prevent warnings
1287case $ac_sys_system in
1288CYGWIN*) OPT="`echo $OPT | sed 's/ *-fPIC//'`";;
1289esac
1290
Guido van Rossum563e7081996-09-10 18:20:48 +00001291if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001292then
1293 OPT="$OPT $ac_arch_flags"
1294fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001296echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001297echo "configure:1298: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001298# On Suns, sometimes $CPP names a directory.
1299if test -n "$CPP" && test -d "$CPP"; then
1300 CPP=
1301fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302if test -z "$CPP"; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001303if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001304 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305else
1306 # This must be in double quotes, not single quotes, because CPP may get
1307 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001309 # On the NeXT, cc -E runs the code through the compiler's parser,
1310 # not just through cpp.
1311 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001312#line 1313 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001313#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001314#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001315Syntax Error
1316EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001317ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumca563f22001-01-23 01:52:44 +00001318{ (eval echo configure:1319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001319ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1320if test -z "$ac_err"; then
1321 :
1322else
1323 echo "$ac_err" >&5
1324 echo "configure: failed program was:" >&5
1325 cat conftest.$ac_ext >&5
1326 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001327 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001328 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001329#line 1330 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001330#include "confdefs.h"
1331#include <assert.h>
1332Syntax Error
1333EOF
1334ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumca563f22001-01-23 01:52:44 +00001335{ (eval echo configure:1336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001336ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001337if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001338 :
1339else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001340 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001341 echo "configure: failed program was:" >&5
1342 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001343 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001344 CPP="${CC-cc} -nologo -E"
1345 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001346#line 1347 "configure"
Guido van Rossumff555e32000-09-22 15:38:21 +00001347#include "confdefs.h"
1348#include <assert.h>
1349Syntax Error
1350EOF
1351ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumca563f22001-01-23 01:52:44 +00001352{ (eval echo configure:1353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumff555e32000-09-22 15:38:21 +00001353ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1354if test -z "$ac_err"; then
1355 :
1356else
1357 echo "$ac_err" >&5
1358 echo "configure: failed program was:" >&5
1359 cat conftest.$ac_ext >&5
1360 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001361 CPP=/lib/cpp
1362fi
1363rm -f conftest*
1364fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001365rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001366fi
1367rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001368 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001369fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001370 CPP="$ac_cv_prog_CPP"
1371else
1372 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001373fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001374echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001375
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001376echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001377echo "configure:1378: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001378cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001379#line 1380 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001380#include "confdefs.h"
1381#ifdef _AIX
1382 yes
1383#endif
1384
1385EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001386if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1387 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001388 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001389 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001390#define _ALL_SOURCE 1
1391EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001392
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001393else
1394 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001395 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001396fi
1397rm -f conftest*
1398
1399
Guido van Rossumf78abae1997-01-21 22:02:36 +00001400ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001401echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001402echo "configure:1403: checking for minix/config.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001403if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001404 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001405else
1406 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001407#line 1408 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001408#include "confdefs.h"
1409#include <minix/config.h>
1410EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001411ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumca563f22001-01-23 01:52:44 +00001412{ (eval echo configure:1413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001413ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001414if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001415 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001416 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001417else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001418 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001419 echo "configure: failed program was:" >&5
1420 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001421 rm -rf conftest*
1422 eval "ac_cv_header_$ac_safe=no"
1423fi
1424rm -f conftest*
1425fi
1426if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001427 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001428 MINIX=yes
1429else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001430 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001431MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001432fi
1433
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001434if test "$MINIX" = yes; then
1435 cat >> confdefs.h <<\EOF
1436#define _POSIX_SOURCE 1
1437EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001438
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001439 cat >> confdefs.h <<\EOF
1440#define _POSIX_1_SOURCE 2
1441EOF
1442
1443 cat >> confdefs.h <<\EOF
1444#define _MINIX 1
1445EOF
1446
1447fi
1448
Guido van Rossumda88dad1995-01-26 00:46:29 +00001449
Guido van Rossum91922671997-10-09 20:24:13 +00001450echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001451echo "configure:1452: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001452if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001453 echo $ac_n "(cached) $ac_c" 1>&6
1454else
1455 ac_save_cc="$CC"
1456CC="$CC -OPT:Olimit=0"
1457if test "$cross_compiling" = yes; then
1458 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1459else
1460 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001461#line 1462 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001462#include "confdefs.h"
1463int main() { return 0; }
1464EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001465if { (eval echo configure:1466: \"$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 +00001466then
1467 ac_cv_opt_olimit_ok=yes
1468else
1469 echo "configure: failed program was:" >&5
1470 cat conftest.$ac_ext >&5
1471 rm -fr conftest*
1472 ac_cv_opt_olimit_ok=no
1473fi
1474rm -fr conftest*
1475fi
1476
1477CC="$ac_save_cc"
1478fi
1479
1480echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001481if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001482 case $ac_sys_system in
1483 Darwin*) OPT="$OPT" ;;
1484 *) OPT="$OPT -OPT:Olimit=0";;
1485 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001486else
1487 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001488echo "configure:1489: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001489 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001490 echo $ac_n "(cached) $ac_c" 1>&6
1491else
1492 ac_save_cc="$CC"
1493 CC="$CC -Olimit 1500"
1494 if test "$cross_compiling" = yes; then
1495 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1496else
1497 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001498#line 1499 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001499#include "confdefs.h"
1500int main() { return 0; }
1501EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001502if { (eval echo configure:1503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001503then
1504 ac_cv_olimit_ok=yes
1505else
1506 echo "configure: failed program was:" >&5
1507 cat conftest.$ac_ext >&5
1508 rm -fr conftest*
1509 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001510fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001511rm -fr conftest*
1512fi
1513
1514 CC="$ac_save_cc"
1515fi
1516
1517 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1518 if test $ac_cv_olimit_ok = yes; then
1519 OPT="$OPT -Olimit 1500"
1520 fi
1521fi
1522
Guido van Rossum84e7b241996-08-19 21:59:00 +00001523
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001524# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001525echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001526echo "configure:1527: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001527if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001528 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001529else
1530 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001531#line 1532 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001532#include "confdefs.h"
1533#include <stdlib.h>
1534#include <stdarg.h>
1535#include <string.h>
1536#include <float.h>
1537EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001538ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumca563f22001-01-23 01:52:44 +00001539{ (eval echo configure:1540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001540ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001541if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001542 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001543 ac_cv_header_stdc=yes
1544else
1545 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001546 echo "configure: failed program was:" >&5
1547 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001548 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001549 ac_cv_header_stdc=no
1550fi
1551rm -f conftest*
1552
1553if test $ac_cv_header_stdc = yes; then
1554 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1555cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001556#line 1557 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001557#include "confdefs.h"
1558#include <string.h>
1559EOF
1560if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1561 egrep "memchr" >/dev/null 2>&1; then
1562 :
1563else
1564 rm -rf conftest*
1565 ac_cv_header_stdc=no
1566fi
1567rm -f conftest*
1568
1569fi
1570
1571if test $ac_cv_header_stdc = yes; then
1572 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1573cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001574#line 1575 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001575#include "confdefs.h"
1576#include <stdlib.h>
1577EOF
1578if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1579 egrep "free" >/dev/null 2>&1; then
1580 :
1581else
1582 rm -rf conftest*
1583 ac_cv_header_stdc=no
1584fi
1585rm -f conftest*
1586
1587fi
1588
1589if test $ac_cv_header_stdc = yes; then
1590 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1591if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001592 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001593else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001594 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001595#line 1596 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001596#include "confdefs.h"
1597#include <ctype.h>
1598#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1599#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001600#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001601int main () { int i; for (i = 0; i < 256; i++)
1602if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1603exit (0); }
1604
1605EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001606if { (eval echo configure:1607: \"$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 +00001607then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001608 :
1609else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001610 echo "configure: failed program was:" >&5
1611 cat conftest.$ac_ext >&5
1612 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001613 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001614fi
1615rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001616fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001617
1618fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001619fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001620
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001621echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001622if test $ac_cv_header_stdc = yes; then
1623 cat >> confdefs.h <<\EOF
1624#define STDC_HEADERS 1
1625EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001626
1627fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001628
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00001629for 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 +00001630signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakea50d6ec2000-08-31 16:13:20 +00001631sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001632sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00001633sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
1634ndbm.h db1/ndbm.h gdbm/ndbm.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001635do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001636ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001637echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001638echo "configure:1639: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001639if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001640 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001641else
1642 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001643#line 1644 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001644#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001645#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001646EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001647ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumca563f22001-01-23 01:52:44 +00001648{ (eval echo configure:1649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001649ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001650if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001651 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001652 eval "ac_cv_header_$ac_safe=yes"
1653else
1654 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001655 echo "configure: failed program was:" >&5
1656 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001657 rm -rf conftest*
1658 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001659fi
1660rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001661fi
1662if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001663 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001664 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001665 cat >> confdefs.h <<EOF
1666#define $ac_tr_hdr 1
1667EOF
1668
1669else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001670 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001671fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001672done
1673
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001674ac_header_dirent=no
1675for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1676do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001677ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001678echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001679echo "configure:1680: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001680if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001681 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001682else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001683 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001684#line 1685 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685#include "confdefs.h"
1686#include <sys/types.h>
1687#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001688int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689DIR *dirp = 0;
1690; return 0; }
1691EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001692if { (eval echo configure:1693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001693 rm -rf conftest*
1694 eval "ac_cv_header_dirent_$ac_safe=yes"
1695else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001696 echo "configure: failed program was:" >&5
1697 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001698 rm -rf conftest*
1699 eval "ac_cv_header_dirent_$ac_safe=no"
1700fi
1701rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001702fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001704 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001705 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706 cat >> confdefs.h <<EOF
1707#define $ac_tr_hdr 1
1708EOF
1709 ac_header_dirent=$ac_hdr; break
1710else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001711 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712fi
1713done
1714# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1715if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001716echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001717echo "configure:1718: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001718ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001719if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001720 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001721else
1722 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001723LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001724cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001725#line 1726 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001726#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001727/* Override any gcc2 internal prototype to avoid an error. */
1728/* We use char because int might match the return type of a gcc2
1729 builtin and then its argument prototype would still apply. */
1730char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001731
Guido van Rossumf78abae1997-01-21 22:02:36 +00001732int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001733opendir()
1734; return 0; }
1735EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001736if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001737 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001738 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001739else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001740 echo "configure: failed program was:" >&5
1741 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001742 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001743 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001744fi
1745rm -f conftest*
1746LIBS="$ac_save_LIBS"
1747
1748fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001749if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001750 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001751 LIBS="$LIBS -ldir"
1752else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001753 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001754fi
1755
1756else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001757echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001758echo "configure:1759: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001759ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001760if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001761 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001762else
1763 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001764LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001765cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001766#line 1767 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001767#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001768/* Override any gcc2 internal prototype to avoid an error. */
1769/* We use char because int might match the return type of a gcc2
1770 builtin and then its argument prototype would still apply. */
1771char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001772
Guido van Rossumf78abae1997-01-21 22:02:36 +00001773int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001774opendir()
1775; return 0; }
1776EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001777if { (eval echo configure:1778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001778 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001779 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001780else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001781 echo "configure: failed program was:" >&5
1782 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001783 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001784 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001785fi
1786rm -f conftest*
1787LIBS="$ac_save_LIBS"
1788
1789fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001790if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001791 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001792 LIBS="$LIBS -lx"
1793else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001794 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001795fi
1796
1797fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001798
1799
1800# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001801was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001802echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001803echo "configure:1804: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001804cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001805#line 1806 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001806#include "confdefs.h"
1807#include <time.h>
1808EOF
1809if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1810 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001811 rm -rf conftest*
1812 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001813else
1814 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001815 cat >> confdefs.h <<\EOF
1816#define clock_t long
1817EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001818
1819fi
1820rm -f conftest*
1821
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001822echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001823
Guido van Rossum84e7b241996-08-19 21:59:00 +00001824# Add some code to confdefs.h so that the test for off_t works on SCO
1825cat >> confdefs.h <<\EOF
1826#if defined(SCO_DS)
1827#undef _OFF_T
1828#endif
1829EOF
1830
Guido van Rossumef2255b2000-03-10 22:30:29 +00001831# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001832echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001833echo "configure:1834: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001834if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001835 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001836else
1837 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001838#line 1839 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001839#include "confdefs.h"
1840#include <sys/types.h>
1841#if STDC_HEADERS
1842#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001843#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001844#endif
1845EOF
1846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001847 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 +00001848 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001849 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001850else
1851 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001852 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001853fi
1854rm -f conftest*
1855
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001856fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001857echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1858if test $ac_cv_type_mode_t = no; then
1859 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001860#define mode_t int
1861EOF
1862
1863fi
1864
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001865echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001866echo "configure:1867: checking for off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001867if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001868 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001869else
1870 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001871#line 1872 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001872#include "confdefs.h"
1873#include <sys/types.h>
1874#if STDC_HEADERS
1875#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001876#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001877#endif
1878EOF
1879if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001880 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 +00001881 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001882 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001883else
1884 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001885 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001886fi
1887rm -f conftest*
1888
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001889fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001890echo "$ac_t""$ac_cv_type_off_t" 1>&6
1891if test $ac_cv_type_off_t = no; then
1892 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001893#define off_t long
1894EOF
1895
1896fi
1897
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001898echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001899echo "configure:1900: checking for pid_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001900if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001901 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001902else
1903 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001904#line 1905 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001905#include "confdefs.h"
1906#include <sys/types.h>
1907#if STDC_HEADERS
1908#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001909#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001910#endif
1911EOF
1912if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001913 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 +00001914 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001915 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001916else
1917 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001918 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001919fi
1920rm -f conftest*
1921
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001922fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001923echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1924if test $ac_cv_type_pid_t = no; then
1925 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001926#define pid_t int
1927EOF
1928
1929fi
1930
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001931echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001932echo "configure:1933: checking return type of signal handlers" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001933if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001934 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001935else
1936 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001937#line 1938 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001938#include "confdefs.h"
1939#include <sys/types.h>
1940#include <signal.h>
1941#ifdef signal
1942#undef signal
1943#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001944#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001945extern "C" void (*signal (int, void (*)(int)))(int);
1946#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001947void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001948#endif
1949
Guido van Rossumf78abae1997-01-21 22:02:36 +00001950int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001951int i;
1952; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001953EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001954if { (eval echo configure:1955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001955 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001956 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001957else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001958 echo "configure: failed program was:" >&5
1959 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001960 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001961 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001962fi
1963rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001964fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001965
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001966echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001967cat >> confdefs.h <<EOF
1968#define RETSIGTYPE $ac_cv_type_signal
1969EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001970
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001971
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001972echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00001973echo "configure:1974: checking for size_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001974if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001975 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001976else
1977 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00001978#line 1979 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001979#include "confdefs.h"
1980#include <sys/types.h>
1981#if STDC_HEADERS
1982#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001983#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001984#endif
1985EOF
1986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001987 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 +00001988 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001989 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001990else
1991 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001992 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001993fi
1994rm -f conftest*
1995
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001996fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001997echo "$ac_t""$ac_cv_type_size_t" 1>&6
1998if test $ac_cv_type_size_t = no; then
1999 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002000#define size_t unsigned
2001EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002002
2003fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002004
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002005echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002006echo "configure:2007: checking for uid_t in sys/types.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002007if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002008 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002009else
2010 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002011#line 2012 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002012#include "confdefs.h"
2013#include <sys/types.h>
2014EOF
2015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2016 egrep "uid_t" >/dev/null 2>&1; then
2017 rm -rf conftest*
2018 ac_cv_type_uid_t=yes
2019else
2020 rm -rf conftest*
2021 ac_cv_type_uid_t=no
2022fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002023rm -f conftest*
2024
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002025fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002026
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002027echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002028if test $ac_cv_type_uid_t = no; then
2029 cat >> confdefs.h <<\EOF
2030#define uid_t int
2031EOF
2032
2033 cat >> confdefs.h <<\EOF
2034#define gid_t int
2035EOF
2036
2037fi
2038
Guido van Rossum627b2d71993-12-24 10:39:16 +00002039
Guido van Rossumef2255b2000-03-10 22:30:29 +00002040# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002041echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002042echo "configure:2043: checking size of int" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002043if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002044 echo $ac_n "(cached) $ac_c" 1>&6
2045else
2046 if test "$cross_compiling" = yes; then
2047 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2048else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002049 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002050#line 2051 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002051#include "confdefs.h"
2052#include <stdio.h>
2053main()
2054{
2055 FILE *f=fopen("conftestval", "w");
2056 if (!f) exit(1);
2057 fprintf(f, "%d\n", sizeof(int));
2058 exit(0);
2059}
2060EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002061if { (eval echo configure:2062: \"$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 +00002062then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002063 ac_cv_sizeof_int=`cat conftestval`
2064else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002065 echo "configure: failed program was:" >&5
2066 cat conftest.$ac_ext >&5
2067 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002068 ac_cv_sizeof_int=0
2069fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002070rm -fr conftest*
2071fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002072
2073fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002074echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2075cat >> confdefs.h <<EOF
2076#define SIZEOF_INT $ac_cv_sizeof_int
2077EOF
2078
2079
2080echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002081echo "configure:2082: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002082if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002083 echo $ac_n "(cached) $ac_c" 1>&6
2084else
2085 if test "$cross_compiling" = yes; then
2086 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2087else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002088 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002089#line 2090 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002090#include "confdefs.h"
2091#include <stdio.h>
2092main()
2093{
2094 FILE *f=fopen("conftestval", "w");
2095 if (!f) exit(1);
2096 fprintf(f, "%d\n", sizeof(long));
2097 exit(0);
2098}
2099EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002100if { (eval echo configure:2101: \"$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 +00002101then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002102 ac_cv_sizeof_long=`cat conftestval`
2103else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002104 echo "configure: failed program was:" >&5
2105 cat conftest.$ac_ext >&5
2106 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002107 ac_cv_sizeof_long=0
2108fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002109rm -fr conftest*
2110fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002111
2112fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002113echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2114cat >> confdefs.h <<EOF
2115#define SIZEOF_LONG $ac_cv_sizeof_long
2116EOF
2117
2118
Guido van Rossumad678af1998-10-02 14:42:15 +00002119echo $ac_n "checking size of void *""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002120echo "configure:2121: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002121if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002122 echo $ac_n "(cached) $ac_c" 1>&6
2123else
2124 if test "$cross_compiling" = yes; then
2125 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2126else
2127 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002128#line 2129 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002129#include "confdefs.h"
2130#include <stdio.h>
2131main()
2132{
2133 FILE *f=fopen("conftestval", "w");
2134 if (!f) exit(1);
2135 fprintf(f, "%d\n", sizeof(void *));
2136 exit(0);
2137}
2138EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002139if { (eval echo configure:2140: \"$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 +00002140then
2141 ac_cv_sizeof_void_p=`cat conftestval`
2142else
2143 echo "configure: failed program was:" >&5
2144 cat conftest.$ac_ext >&5
2145 rm -fr conftest*
2146 ac_cv_sizeof_void_p=0
2147fi
2148rm -fr conftest*
2149fi
2150
2151fi
2152echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2153cat >> confdefs.h <<EOF
2154#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2155EOF
2156
2157
Guido van Rossumef2255b2000-03-10 22:30:29 +00002158echo $ac_n "checking size of char""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002159echo "configure:2160: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002160if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002161 echo $ac_n "(cached) $ac_c" 1>&6
2162else
2163 if test "$cross_compiling" = yes; then
2164 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2165else
2166 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002167#line 2168 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002168#include "confdefs.h"
2169#include <stdio.h>
2170main()
2171{
2172 FILE *f=fopen("conftestval", "w");
2173 if (!f) exit(1);
2174 fprintf(f, "%d\n", sizeof(char));
2175 exit(0);
2176}
2177EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002178if { (eval echo configure:2179: \"$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 +00002179then
2180 ac_cv_sizeof_char=`cat conftestval`
2181else
2182 echo "configure: failed program was:" >&5
2183 cat conftest.$ac_ext >&5
2184 rm -fr conftest*
2185 ac_cv_sizeof_char=0
2186fi
2187rm -fr conftest*
2188fi
2189
2190fi
2191echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2192cat >> confdefs.h <<EOF
2193#define SIZEOF_CHAR $ac_cv_sizeof_char
2194EOF
2195
2196
2197echo $ac_n "checking size of short""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002198echo "configure:2199: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002199if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002200 echo $ac_n "(cached) $ac_c" 1>&6
2201else
2202 if test "$cross_compiling" = yes; then
2203 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2204else
2205 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002206#line 2207 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002207#include "confdefs.h"
2208#include <stdio.h>
2209main()
2210{
2211 FILE *f=fopen("conftestval", "w");
2212 if (!f) exit(1);
2213 fprintf(f, "%d\n", sizeof(short));
2214 exit(0);
2215}
2216EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002217if { (eval echo configure:2218: \"$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 +00002218then
2219 ac_cv_sizeof_short=`cat conftestval`
2220else
2221 echo "configure: failed program was:" >&5
2222 cat conftest.$ac_ext >&5
2223 rm -fr conftest*
2224 ac_cv_sizeof_short=0
2225fi
2226rm -fr conftest*
2227fi
2228
2229fi
2230echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2231cat >> confdefs.h <<EOF
2232#define SIZEOF_SHORT $ac_cv_sizeof_short
2233EOF
2234
2235
2236echo $ac_n "checking size of float""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002237echo "configure:2238: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002238if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002239 echo $ac_n "(cached) $ac_c" 1>&6
2240else
2241 if test "$cross_compiling" = yes; then
2242 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2243else
2244 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002245#line 2246 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002246#include "confdefs.h"
2247#include <stdio.h>
2248main()
2249{
2250 FILE *f=fopen("conftestval", "w");
2251 if (!f) exit(1);
2252 fprintf(f, "%d\n", sizeof(float));
2253 exit(0);
2254}
2255EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002256if { (eval echo configure:2257: \"$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 +00002257then
2258 ac_cv_sizeof_float=`cat conftestval`
2259else
2260 echo "configure: failed program was:" >&5
2261 cat conftest.$ac_ext >&5
2262 rm -fr conftest*
2263 ac_cv_sizeof_float=0
2264fi
2265rm -fr conftest*
2266fi
2267
2268fi
2269echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2270cat >> confdefs.h <<EOF
2271#define SIZEOF_FLOAT $ac_cv_sizeof_float
2272EOF
2273
2274
2275echo $ac_n "checking size of double""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002276echo "configure:2277: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002277if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002278 echo $ac_n "(cached) $ac_c" 1>&6
2279else
2280 if test "$cross_compiling" = yes; then
2281 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2282else
2283 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002284#line 2285 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002285#include "confdefs.h"
2286#include <stdio.h>
2287main()
2288{
2289 FILE *f=fopen("conftestval", "w");
2290 if (!f) exit(1);
2291 fprintf(f, "%d\n", sizeof(double));
2292 exit(0);
2293}
2294EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002295if { (eval echo configure:2296: \"$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 +00002296then
2297 ac_cv_sizeof_double=`cat conftestval`
2298else
2299 echo "configure: failed program was:" >&5
2300 cat conftest.$ac_ext >&5
2301 rm -fr conftest*
2302 ac_cv_sizeof_double=0
2303fi
2304rm -fr conftest*
2305fi
2306
2307fi
2308echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2309cat >> confdefs.h <<EOF
2310#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2311EOF
2312
2313
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002314echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002315echo "configure:2316: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002316if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002317 echo $ac_n "(cached) $ac_c" 1>&6
2318else
2319 if test "$cross_compiling" = yes; then
2320 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2321else
2322 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002323#line 2324 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002324#include "confdefs.h"
2325#include <stdio.h>
2326main()
2327{
2328 FILE *f=fopen("conftestval", "w");
2329 if (!f) exit(1);
2330 fprintf(f, "%d\n", sizeof(fpos_t));
2331 exit(0);
2332}
2333EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002334if { (eval echo configure:2335: \"$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 +00002335then
2336 ac_cv_sizeof_fpos_t=`cat conftestval`
2337else
2338 echo "configure: failed program was:" >&5
2339 cat conftest.$ac_ext >&5
2340 rm -fr conftest*
2341 ac_cv_sizeof_fpos_t=0
2342fi
2343rm -fr conftest*
2344fi
2345
2346fi
2347echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2348cat >> confdefs.h <<EOF
2349#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2350EOF
2351
2352
Guido van Rossum0a516c91994-09-12 10:58:40 +00002353
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002354echo $ac_n "checking for long long support""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002355echo "configure:2356: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002356have_long_long=no
2357cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002358#line 2359 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002359#include "confdefs.h"
2360
2361int main() {
2362long long x; x = (long long)0;
2363; return 0; }
2364EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002365if { (eval echo configure:2366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002366 rm -rf conftest*
2367 cat >> confdefs.h <<\EOF
2368#define HAVE_LONG_LONG 1
2369EOF
2370 have_long_long=yes
2371else
2372 echo "configure: failed program was:" >&5
2373 cat conftest.$ac_ext >&5
2374fi
2375rm -f conftest*
2376echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002377if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002378echo $ac_n "checking size of long long""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002379echo "configure:2380: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002380if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002381 echo $ac_n "(cached) $ac_c" 1>&6
2382else
2383 if test "$cross_compiling" = yes; then
2384 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2385else
2386 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002387#line 2388 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002388#include "confdefs.h"
2389#include <stdio.h>
2390main()
2391{
2392 FILE *f=fopen("conftestval", "w");
2393 if (!f) exit(1);
2394 fprintf(f, "%d\n", sizeof(long long));
2395 exit(0);
2396}
2397EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002398if { (eval echo configure:2399: \"$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 +00002399then
2400 ac_cv_sizeof_long_long=`cat conftestval`
2401else
2402 echo "configure: failed program was:" >&5
2403 cat conftest.$ac_ext >&5
2404 rm -fr conftest*
2405 ac_cv_sizeof_long_long=0
2406fi
2407rm -fr conftest*
2408fi
2409
2410fi
2411echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2412cat >> confdefs.h <<EOF
2413#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2414EOF
2415
2416
2417fi
2418
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002419echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002420echo "configure:2421: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002421have_uintptr_t=no
2422cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002423#line 2424 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002424#include "confdefs.h"
2425
2426int main() {
2427uintptr_t x; x = (uintptr_t)0;
2428; return 0; }
2429EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002430if { (eval echo configure:2431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002431 rm -rf conftest*
2432 cat >> confdefs.h <<\EOF
2433#define HAVE_UINTPTR_T 1
2434EOF
2435 have_uintptr_t=yes
2436else
2437 echo "configure: failed program was:" >&5
2438 cat conftest.$ac_ext >&5
2439fi
2440rm -f conftest*
2441echo "$ac_t""$have_uintptr_t" 1>&6
2442if test "$have_uintptr_t" = yes ; then
2443echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002444echo "configure:2445: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002445if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002446 echo $ac_n "(cached) $ac_c" 1>&6
2447else
2448 if test "$cross_compiling" = yes; then
2449 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2450else
2451 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002452#line 2453 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002453#include "confdefs.h"
2454#include <stdio.h>
2455main()
2456{
2457 FILE *f=fopen("conftestval", "w");
2458 if (!f) exit(1);
2459 fprintf(f, "%d\n", sizeof(uintptr_t));
2460 exit(0);
2461}
2462EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002463if { (eval echo configure:2464: \"$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 +00002464then
2465 ac_cv_sizeof_uintptr_t=`cat conftestval`
2466else
2467 echo "configure: failed program was:" >&5
2468 cat conftest.$ac_ext >&5
2469 rm -fr conftest*
2470 ac_cv_sizeof_uintptr_t=0
2471fi
2472rm -fr conftest*
2473fi
2474
2475fi
2476echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2477cat >> confdefs.h <<EOF
2478#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2479EOF
2480
2481
2482fi
2483
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002484# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2485echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002486echo "configure:2487: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002487if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002488 echo $ac_n "(cached) $ac_c" 1>&6
2489else
2490 if test "$cross_compiling" = yes; then
2491 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2492else
2493 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002494#line 2495 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002495#include "confdefs.h"
2496#include <stdio.h>
2497#include <sys/types.h>
2498main()
2499{
2500 FILE *f=fopen("conftestval", "w");
2501 if (!f) exit(1);
2502 fprintf(f, "%d\n", sizeof(off_t));
2503 exit(0);
2504}
2505EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002506if { (eval echo configure:2507: \"$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 +00002507then
2508 ac_cv_sizeof_off_t=`cat conftestval`
2509else
2510 echo "configure: failed program was:" >&5
2511 cat conftest.$ac_ext >&5
2512 rm -fr conftest*
2513 ac_cv_sizeof_off_t=0
2514fi
2515rm -fr conftest*
2516fi
2517
2518
2519fi
2520
2521echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2522cat >> confdefs.h <<EOF
2523#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2524EOF
2525
2526
2527echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002528echo "configure:2529: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002529if test "$have_long_long" = yes -a \
2530 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2531 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002532 cat >> confdefs.h <<\EOF
2533#define HAVE_LARGEFILE_SUPPORT 1
2534EOF
2535
2536 echo "$ac_t""yes" 1>&6
2537else
2538 echo "$ac_t""no" 1>&6
2539fi
2540
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002541# AC_CHECK_SIZEOF() doesn't include <time.h>.
2542echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002543echo "configure:2544: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002544if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002545 echo $ac_n "(cached) $ac_c" 1>&6
2546else
2547 if test "$cross_compiling" = yes; then
2548 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2549else
2550 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002551#line 2552 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002552#include "confdefs.h"
2553#include <stdio.h>
2554#include <time.h>
2555main()
2556{
2557 FILE *f=fopen("conftestval", "w");
2558 if (!f) exit(1);
2559 fprintf(f, "%d\n", sizeof(time_t));
2560 exit(0);
2561}
2562EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002563if { (eval echo configure:2564: \"$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 +00002564then
2565 ac_cv_sizeof_time_t=`cat conftestval`
2566else
2567 echo "configure: failed program was:" >&5
2568 cat conftest.$ac_ext >&5
2569 rm -fr conftest*
2570 ac_cv_sizeof_time_t=0
2571fi
2572rm -fr conftest*
2573fi
2574
2575
2576fi
2577
2578echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2579cat >> confdefs.h <<EOF
2580#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2581EOF
2582
2583
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002584
Trent Mick635f6fb2000-08-23 21:33:05 +00002585# if have pthread_t then define SIZEOF_PTHREAD_T
2586echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002587echo "configure:2588: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002588have_pthread_t=no
2589cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002590#line 2591 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002591#include "confdefs.h"
2592#include <pthread.h>
2593int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002594pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002595; return 0; }
2596EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002597if { (eval echo configure:2598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002598 rm -rf conftest*
2599 have_pthread_t=yes
2600else
2601 echo "configure: failed program was:" >&5
2602 cat conftest.$ac_ext >&5
2603fi
2604rm -f conftest*
2605echo "$ac_t""$have_pthread_t" 1>&6
2606if test "$have_pthread_t" = yes ; then
2607 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2608 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002609echo "configure:2610: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002610 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002611 echo $ac_n "(cached) $ac_c" 1>&6
2612else
2613 if test "$cross_compiling" = yes; then
2614 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2615else
2616 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002617#line 2618 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002618#include "confdefs.h"
2619#include <stdio.h>
2620 #include <pthread.h>
2621 main()
2622 {
2623 FILE *f=fopen("conftestval", "w");
2624 if (!f) exit(1);
2625 fprintf(f, "%d\n", sizeof(pthread_t));
2626 exit(0);
2627 }
2628EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002629if { (eval echo configure:2630: \"$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 +00002630then
2631 ac_cv_sizeof_pthread_t=`cat conftestval`
2632else
2633 echo "configure: failed program was:" >&5
2634 cat conftest.$ac_ext >&5
2635 rm -fr conftest*
2636 ac_cv_sizeof_pthread_t=0
2637fi
2638rm -fr conftest*
2639fi
2640
2641
2642fi
2643
2644 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2645 cat >> confdefs.h <<EOF
2646#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2647EOF
2648
2649fi
2650
2651
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002652# Minor variations in building a framework between NextStep versions 4 and 5
2653
2654case $ac_sys_system/$ac_sys_release in
Guido van Rossum5839e582000-10-09 19:52:35 +00002655 Darwin/*)
2656 ns_undef_sym='_environ'
2657 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002658 next/4*)
2659 ns_undef_sym='__environ'
2660 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2661 next/5*)
2662 ns_undef_sym='_environ'
2663 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2664esac
2665
2666echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002667echo "configure:2668: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002668if test "$with_next_framework"
2669then
2670 OPT="$OPT -fno-common"
2671 # -U __environ is needed since bundles don't have access
2672 # to crt0 when built but will always be linked against it
2673 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2674 cat >> confdefs.h <<\EOF
2675#define WITH_NEXT_FRAMEWORK 1
2676EOF
2677
2678 echo "$ac_t""yes" 1>&6
2679else
2680 echo "$ac_t""no" 1>&6
2681fi
2682
2683echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002684echo "configure:2685: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002685if test "$with_next_framework" -o "$with_dyld"
2686then
2687 if test "$with_dyld"
2688 then
2689 echo "$ac_t""yes" 1>&6
2690 else
2691 echo "$ac_t""required for framework build" 1>&6
2692 fi
2693 cat >> confdefs.h <<\EOF
2694#define WITH_DYLD 1
2695EOF
2696
2697 ns_dyld='set'
2698else
2699 echo "$ac_t""no" 1>&6
2700fi
2701
Guido van Rossum0a516c91994-09-12 10:58:40 +00002702# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002703
2704
2705
2706
Guido van Rossum0a516c91994-09-12 10:58:40 +00002707# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00002708# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002709echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002710echo "configure:2711: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002711if test -z "$SO"
2712then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002713 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002714 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00002715 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00002716 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002717 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002718fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002719echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002720# LDSHARED is the ld *command* used to create shared library
2721# -- "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 +00002722# (Shared libraries in this instance are shared modules to be loaded into
2723# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002724echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002725echo "configure:2726: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002726if test -z "$LDSHARED"
2727then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002728 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002729 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002730 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002731 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002732 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002733 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00002734 SunOS/5*)
2735 if test "$GCC" = "yes"
Greg Warda1c4da22000-11-07 15:44:21 +00002736 then LDSHARED='$(CC) -shared'
Greg Ward57c9a6632000-05-26 12:22:54 +00002737 else LDSHARED="ld -G";
2738 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002739 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002740 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2741 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002742 Darwin/*|next/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002743 if test "$ns_dyld"
Guido van Rossumacb14c72001-01-10 21:41:16 +00002744 then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002745 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2746 fi
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002747 if test "$with_next_framework" ; then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002748 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2749 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002750 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002751 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002752 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002753 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002754 NetBSD*)
2755 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2756 then
2757 LDSHARED="cc -shared"
2758 else
2759 LDSHARED="ld -Bshareable"
2760 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002761 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00002762 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00002763 then
2764 LDSHARED="cc -shared ${LDFLAGS}"
2765 else
2766 LDSHARED="ld -Bshareable ${LDFLAGS}"
2767 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002768 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002769 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00002770 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002771 *) LDSHARED="ld";;
2772 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002773fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002774echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002775# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002776# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002777echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002778echo "configure:2779: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002779if test -z "$CCSHARED"
2780then
Guido van Rossum07397971997-04-29 21:49:50 +00002781 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002782 hp*|HP*) if test "$GCC" = yes;
2783 then CCSHARED="-fpic";
2784 else CCSHARED="+z";
2785 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002786 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002787 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002788 OpenBSD*) CCSHARED="-fpic";;
2789 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002790 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002791 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002792 IRIX*/6*) case $CC in
2793 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002794 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002795 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00002796 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002797 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002798fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002799echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002800# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002801# the python executable -- this is only needed for a few systems
2802echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002803echo "configure:2804: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002804if test -z "$LINKFORSHARED"
2805then
Guido van Rossum07397971997-04-29 21:49:50 +00002806 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002807 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002808 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002809 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002810 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002811 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002812 # -u libsys_s pulls in all symbols in libsys
2813 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2814 # -u __dummy makes the linker aware of the objc runtime
2815 # in System.framework; otherwise, __objcInit (referenced in
2816 # crt1.o) gets erroneously defined as common, which breaks dynamic
2817 # loading of any modules which reference it in System.framework
2818 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossumacb14c72001-01-10 21:41:16 +00002819 Darwin/*) LINKFORSHARED="-u __dummy -framework System -framework Foundation" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002820 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00002821 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002822 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00002823 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2824 then
2825 LINKFORSHARED="-Wl,--export-dynamic"
2826 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002827 SunOS/5*) case $CC in
2828 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002829 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002830 then
2831 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002832 fi;;
2833 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002834 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002835fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002836echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002837
Guido van Rossum627b2d71993-12-24 10:39:16 +00002838# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002839echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002840echo "configure:2841: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002841ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002842if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002843 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002844else
2845 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002846LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002847cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002848#line 2849 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002849#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002850/* Override any gcc2 internal prototype to avoid an error. */
2851/* We use char because int might match the return type of a gcc2
2852 builtin and then its argument prototype would still apply. */
2853char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002854
Guido van Rossumf78abae1997-01-21 22:02:36 +00002855int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002856dlopen()
2857; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002858EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002859if { (eval echo configure:2860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002860 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002861 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002862else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002863 echo "configure: failed program was:" >&5
2864 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002865 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002866 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002867fi
2868rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002869LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002870
Guido van Rossum627b2d71993-12-24 10:39:16 +00002871fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002872if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002873 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002874 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2875 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002876 cat >> confdefs.h <<EOF
2877#define $ac_tr_lib 1
2878EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002879
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002880 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002881
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002882else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002883 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002884fi
2885 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002886echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002887echo "configure:2888: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002888ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002889if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002890 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002891else
2892 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002893LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002894cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002895#line 2896 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002896#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002897/* Override any gcc2 internal prototype to avoid an error. */
2898/* We use char because int might match the return type of a gcc2
2899 builtin and then its argument prototype would still apply. */
2900char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002901
Guido van Rossumf78abae1997-01-21 22:02:36 +00002902int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002903shl_load()
2904; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002905EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002906if { (eval echo configure:2907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002907 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002908 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002909else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002910 echo "configure: failed program was:" >&5
2911 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002912 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002913 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002914fi
2915rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002916LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002917
Guido van Rossum627b2d71993-12-24 10:39:16 +00002918fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002919if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002920 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002921 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2922 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002923 cat >> confdefs.h <<EOF
2924#define $ac_tr_lib 1
2925EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002926
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002927 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002928
2929else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002930 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002931fi
2932 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002933
Skip Montanarocb853262000-08-30 22:29:48 +00002934# Check for --with-pydebug
2935echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002936echo "configure:2937: checking for --with-pydebug" >&5
Skip Montanarocb853262000-08-30 22:29:48 +00002937# Check whether --with-pydebug or --without-pydebug was given.
2938if test "${with_pydebug+set}" = set; then
2939 withval="$with_pydebug"
2940
2941if test "$withval" != no
2942then cat >> confdefs.h <<\EOF
2943#define Py_DEBUG 1
2944EOF
2945 echo "$ac_t""yes" 1>&6
2946else echo "$ac_t""no" 1>&6
2947fi
2948else
2949 echo "$ac_t""no" 1>&6
2950fi
2951
2952
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002953# checks for system dependent C++ extensions support
2954case "$ac_sys_system" in
2955 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002956echo "configure:2957: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002957 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002958#line 2959 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002959#include "confdefs.h"
2960#include "/usr/lpp/xlC/include/load.h"
2961int main() {
2962loadAndInit("", 0, "")
2963; return 0; }
2964EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002965if { (eval echo configure:2966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002966 rm -rf conftest*
2967 cat >> confdefs.h <<\EOF
2968#define AIX_GENUINE_CPLUSPLUS 1
2969EOF
2970
2971 echo "$ac_t""yes" 1>&6
2972else
2973 echo "configure: failed program was:" >&5
2974 cat conftest.$ac_ext >&5
2975 rm -rf conftest*
2976 echo "$ac_t""no" 1>&6
2977fi
2978rm -f conftest*;;
2979 *) ;;
2980esac
2981
Guido van Rossum70c7f481998-03-26 18:44:10 +00002982# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2983# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002984# BeOS' sockets are stashed in libnet.
2985case "$ac_sys_system" in
2986IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002987*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002988echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00002989echo "configure:2990: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002990ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002991if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002992 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002993else
2994 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002995LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002996cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00002997#line 2998 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002998#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002999/* Override any gcc2 internal prototype to avoid an error. */
3000/* We use char because int might match the return type of a gcc2
3001 builtin and then its argument prototype would still apply. */
3002char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003003
Guido van Rossumf78abae1997-01-21 22:02:36 +00003004int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003005t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003006; return 0; }
3007EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003008if { (eval echo configure:3009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003009 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003010 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003011else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003012 echo "configure: failed program was:" >&5
3013 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003014 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003015 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003016fi
3017rm -f conftest*
3018LIBS="$ac_save_LIBS"
3019
3020fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003021if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003022 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003023 LIBS="-lnsl $LIBS"
3024else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003025 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003026fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003027 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003028echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003029echo "configure:3030: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003030ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003031if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003032 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003033else
3034 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003035LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003036cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003037#line 3038 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003038#include "confdefs.h"
3039/* Override any gcc2 internal prototype to avoid an error. */
3040/* We use char because int might match the return type of a gcc2
3041 builtin and then its argument prototype would still apply. */
3042char socket();
3043
3044int main() {
3045socket()
3046; return 0; }
3047EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003048if { (eval echo configure:3049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003049 rm -rf conftest*
3050 eval "ac_cv_lib_$ac_lib_var=yes"
3051else
3052 echo "configure: failed program was:" >&5
3053 cat conftest.$ac_ext >&5
3054 rm -rf conftest*
3055 eval "ac_cv_lib_$ac_lib_var=no"
3056fi
3057rm -f conftest*
3058LIBS="$ac_save_LIBS"
3059
3060fi
3061if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3062 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003063 LIBS="-lsocket $LIBS"
3064else
3065 echo "$ac_t""no" 1>&6
3066fi
3067 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003068;;
3069esac
3070case "$ac_sys_system" in
3071BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003072echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003073echo "configure:3074: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003074ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003075if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003076 echo $ac_n "(cached) $ac_c" 1>&6
3077else
3078 ac_save_LIBS="$LIBS"
3079LIBS="-lnet $LIBS $LIBS"
3080cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003081#line 3082 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003082#include "confdefs.h"
3083/* Override any gcc2 internal prototype to avoid an error. */
3084/* We use char because int might match the return type of a gcc2
3085 builtin and then its argument prototype would still apply. */
3086char socket();
3087
3088int main() {
3089socket()
3090; return 0; }
3091EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003092if { (eval echo configure:3093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003093 rm -rf conftest*
3094 eval "ac_cv_lib_$ac_lib_var=yes"
3095else
3096 echo "configure: failed program was:" >&5
3097 cat conftest.$ac_ext >&5
3098 rm -rf conftest*
3099 eval "ac_cv_lib_$ac_lib_var=no"
3100fi
3101rm -f conftest*
3102LIBS="$ac_save_LIBS"
3103
3104fi
3105if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3106 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003107 LIBS="-lnet $LIBS"
3108else
3109 echo "$ac_t""no" 1>&6
3110fi
3111 # BeOS
3112;;
3113esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003114
Guido van Rossuma68acba1996-07-31 17:36:39 +00003115echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003116echo "configure:3117: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003117# Check whether --with-libs or --without-libs was given.
3118if test "${with_libs+set}" = set; then
3119 withval="$with_libs"
3120
3121echo "$ac_t""$withval" 1>&6
3122LIBS="$withval $LIBS"
3123
3124else
3125 echo "$ac_t""no" 1>&6
3126fi
3127
Guido van Rossum7f43da71994-08-01 12:15:30 +00003128
Eric S. Raymonda8885402001-01-17 08:25:11 +00003129#
3130# These are used to generate Setup.config. They autoconfigure several
3131# features that are otherwise severe pains in the butt.
3132#
3133# ncurses
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003134
3135echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003136echo "configure:3137: checking for initscr in -lncurses" >&5
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003137ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
3138if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3139 echo $ac_n "(cached) $ac_c" 1>&6
3140else
3141 ac_save_LIBS="$LIBS"
3142LIBS="-lncurses -ltermcap $LIBS"
3143cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003144#line 3145 "configure"
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003145#include "confdefs.h"
3146/* Override any gcc2 internal prototype to avoid an error. */
3147/* We use char because int might match the return type of a gcc2
3148 builtin and then its argument prototype would still apply. */
3149char initscr();
3150
3151int main() {
3152initscr()
3153; return 0; }
3154EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003155if { (eval echo configure:3156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003156 rm -rf conftest*
3157 eval "ac_cv_lib_$ac_lib_var=yes"
3158else
3159 echo "configure: failed program was:" >&5
3160 cat conftest.$ac_ext >&5
3161 rm -rf conftest*
3162 eval "ac_cv_lib_$ac_lib_var=no"
3163fi
3164rm -f conftest*
3165LIBS="$ac_save_LIBS"
3166
3167fi
3168if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3169 echo "$ac_t""yes" 1>&6
3170 USE_NCURSES_MODULE=""
3171else
3172 echo "$ac_t""no" 1>&6
3173USE_NCURSES_MODULE="#"
3174fi
3175
Eric S. Raymonda8885402001-01-17 08:25:11 +00003176# GNU readline
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003177
3178echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003179echo "configure:3180: checking for readline in -lreadline" >&5
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003180ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
3181if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3182 echo $ac_n "(cached) $ac_c" 1>&6
3183else
3184 ac_save_LIBS="$LIBS"
3185LIBS="-lreadline -ltermcap $LIBS"
3186cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003187#line 3188 "configure"
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003188#include "confdefs.h"
3189/* Override any gcc2 internal prototype to avoid an error. */
3190/* We use char because int might match the return type of a gcc2
3191 builtin and then its argument prototype would still apply. */
3192char readline();
3193
3194int main() {
3195readline()
3196; return 0; }
3197EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003198if { (eval echo configure:3199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003199 rm -rf conftest*
3200 eval "ac_cv_lib_$ac_lib_var=yes"
3201else
3202 echo "configure: failed program was:" >&5
3203 cat conftest.$ac_ext >&5
3204 rm -rf conftest*
3205 eval "ac_cv_lib_$ac_lib_var=no"
3206fi
3207rm -f conftest*
3208LIBS="$ac_save_LIBS"
3209
3210fi
3211if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3212 echo "$ac_t""yes" 1>&6
3213 USE_READLINE_MODULE=""
3214else
3215 echo "$ac_t""no" 1>&6
3216USE_READLINE_MODULE="#"
3217fi
3218
Eric S. Raymonda8885402001-01-17 08:25:11 +00003219# gdbm(3)
3220
3221
3222echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003223echo "configure:3224: checking for gdbm_open in -lgdbm" >&5
Eric S. Raymonda8885402001-01-17 08:25:11 +00003224ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-%__p_%'`
3225if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3226 echo $ac_n "(cached) $ac_c" 1>&6
3227else
3228 ac_save_LIBS="$LIBS"
3229LIBS="-lgdbm $LIBS"
3230cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003231#line 3232 "configure"
Eric S. Raymonda8885402001-01-17 08:25:11 +00003232#include "confdefs.h"
3233/* Override any gcc2 internal prototype to avoid an error. */
3234/* We use char because int might match the return type of a gcc2
3235 builtin and then its argument prototype would still apply. */
3236char gdbm_open();
3237
3238int main() {
3239gdbm_open()
3240; return 0; }
3241EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003242if { (eval echo configure:3243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Eric S. Raymonda8885402001-01-17 08:25:11 +00003243 rm -rf conftest*
3244 eval "ac_cv_lib_$ac_lib_var=yes"
3245else
3246 echo "configure: failed program was:" >&5
3247 cat conftest.$ac_ext >&5
3248 rm -rf conftest*
3249 eval "ac_cv_lib_$ac_lib_var=no"
3250fi
3251rm -f conftest*
3252LIBS="$ac_save_LIBS"
3253
3254fi
3255if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3256 echo "$ac_t""yes" 1>&6
3257 USE_GDBM_MODULE=""
3258 HAVE_LIBGDBM=-lgdbm
3259else
3260 echo "$ac_t""no" 1>&6
3261USE_GDBM_MODULE="#"
3262 HAVE_LIBGDBM=""
3263fi
3264
3265# ndbm(3)
3266
3267
3268echo $ac_n "checking for ndbm_open in -lndbm""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003269echo "configure:3270: checking for ndbm_open in -lndbm" >&5
Eric S. Raymonda8885402001-01-17 08:25:11 +00003270ac_lib_var=`echo ndbm'_'ndbm_open | sed 'y%./+-%__p_%'`
3271if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3272 echo $ac_n "(cached) $ac_c" 1>&6
3273else
3274 ac_save_LIBS="$LIBS"
3275LIBS="-lndbm $LIBS"
3276cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003277#line 3278 "configure"
Eric S. Raymonda8885402001-01-17 08:25:11 +00003278#include "confdefs.h"
3279/* Override any gcc2 internal prototype to avoid an error. */
3280/* We use char because int might match the return type of a gcc2
3281 builtin and then its argument prototype would still apply. */
3282char ndbm_open();
3283
3284int main() {
3285ndbm_open()
3286; return 0; }
3287EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003288if { (eval echo configure:3289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Eric S. Raymonda8885402001-01-17 08:25:11 +00003289 rm -rf conftest*
3290 eval "ac_cv_lib_$ac_lib_var=yes"
3291else
3292 echo "configure: failed program was:" >&5
3293 cat conftest.$ac_ext >&5
3294 rm -rf conftest*
3295 eval "ac_cv_lib_$ac_lib_var=no"
3296fi
3297rm -f conftest*
3298LIBS="$ac_save_LIBS"
3299
3300fi
3301if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3302 echo "$ac_t""yes" 1>&6
3303 USE_NDBM_MODULE=""
3304 HAVE_LIBNDBM=-lndbm
3305else
3306 echo "$ac_t""no" 1>&6
3307USE_NDBM_MODULE="#"
3308 HAVE_LIBNDBM=""
3309fi
3310
3311# crypt(3)
3312
3313
3314echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003315echo "configure:3316: checking for crypt in -lcrypt" >&5
Eric S. Raymonda8885402001-01-17 08:25:11 +00003316ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
3317if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3318 echo $ac_n "(cached) $ac_c" 1>&6
3319else
3320 ac_save_LIBS="$LIBS"
3321LIBS="-lcrypt $LIBS"
3322cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003323#line 3324 "configure"
Eric S. Raymonda8885402001-01-17 08:25:11 +00003324#include "confdefs.h"
3325/* Override any gcc2 internal prototype to avoid an error. */
3326/* We use char because int might match the return type of a gcc2
3327 builtin and then its argument prototype would still apply. */
3328char crypt();
3329
3330int main() {
3331crypt()
3332; return 0; }
3333EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003334if { (eval echo configure:3335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Eric S. Raymonda8885402001-01-17 08:25:11 +00003335 rm -rf conftest*
3336 eval "ac_cv_lib_$ac_lib_var=yes"
3337else
3338 echo "configure: failed program was:" >&5
3339 cat conftest.$ac_ext >&5
3340 rm -rf conftest*
3341 eval "ac_cv_lib_$ac_lib_var=no"
3342fi
3343rm -f conftest*
3344LIBS="$ac_save_LIBS"
3345
3346fi
3347if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3348 echo "$ac_t""yes" 1>&6
3349 USE_CRYPT_MODULE=""
3350 HAVE_LIBCRYPT=-lcrypt
3351else
3352 echo "$ac_t""no" 1>&6
3353USE_CRYPT_MODULE="#"
3354 HAVE_LIBCRYPT=""
3355fi
3356
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003357
3358# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003359
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003360USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003361
Guido van Rossumec2f0731997-01-22 20:54:01 +00003362echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003363echo "configure:3364: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003364
3365# Check whether --with-dec-threads or --without-dec-threads was given.
3366if test "${with_dec_threads+set}" = set; then
3367 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003368
3369echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003370LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003371if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003372 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003373fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003374else
3375 echo "$ac_t""no" 1>&6
3376fi
3377
3378
3379echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003380echo "configure:3381: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003381# Check whether --with-threads or --without-threads was given.
3382if test "${with_threads+set}" = set; then
3383 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003384 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003385fi
3386
3387
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003388# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003389# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003390if test "${with_thread+set}" = set; then
3391 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003392
3393with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003394fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003395
3396
3397if test -z "$with_threads"
3398then with_threads="yes"
3399fi
3400echo "$ac_t""$with_threads" 1>&6
3401
3402if test "$with_threads" = "no"
3403then
3404 USE_THREAD_MODULE="#"
3405else
Guido van Rossum40951012000-10-07 16:21:27 +00003406 if test ! -z "$with_threads" -a -d "$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003407 then LDFLAGS="$LDFLAGS -L$with_threads"
3408 fi
Guido van Rossum40951012000-10-07 16:21:27 +00003409 if test ! -z "$withval" -a -d "$withval"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003410 then LDFLAGS="$LDFLAGS -L$withval"
3411 fi
3412 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003413#define _REENTRANT 1
3414EOF
3415
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003416 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003417echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003418echo "configure:3419: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003419if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003420 echo $ac_n "(cached) $ac_c" 1>&6
3421else
3422 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003423#line 3424 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003424#include "confdefs.h"
3425#include <mach/cthreads.h>
3426EOF
3427ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumca563f22001-01-23 01:52:44 +00003428{ (eval echo configure:3429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003429ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003430if test -z "$ac_err"; then
3431 rm -rf conftest*
3432 eval "ac_cv_header_$ac_safe=yes"
3433else
3434 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003435 echo "configure: failed program was:" >&5
3436 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003437 rm -rf conftest*
3438 eval "ac_cv_header_$ac_safe=no"
3439fi
3440rm -f conftest*
3441fi
3442if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3443 echo "$ac_t""yes" 1>&6
3444 cat >> confdefs.h <<\EOF
3445#define WITH_THREAD 1
3446EOF
3447
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003448 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003449#define C_THREADS 1
3450EOF
3451
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003452 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003453else
3454 echo "$ac_t""no" 1>&6
3455
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003456 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003457echo "configure:3458: checking for --with-pth" >&5
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003458 # Check whether --with-pth or --without-pth was given.
3459if test "${with_pth+set}" = set; then
3460 withval="$with_pth"
3461
3462 echo "$ac_t""$withval" 1>&6
3463 cat >> confdefs.h <<\EOF
3464#define WITH_THREAD 1
3465EOF
3466
3467 cat >> confdefs.h <<\EOF
3468#define HAVE_PTH 1
3469EOF
3470
3471 LIBS="-lpth $LIBS"
3472 LIBOBJS="$LIBOBJS thread.o"
3473else
3474
3475 echo "$ac_t""no" 1>&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003476 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003477echo "configure:3478: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003478ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003479if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003480 echo $ac_n "(cached) $ac_c" 1>&6
3481else
3482 ac_save_LIBS="$LIBS"
3483LIBS="-lpthread $LIBS"
3484cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003485#line 3486 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003486#include "confdefs.h"
3487/* Override any gcc2 internal prototype to avoid an error. */
3488/* We use char because int might match the return type of a gcc2
3489 builtin and then its argument prototype would still apply. */
3490char pthread_create();
3491
3492int main() {
3493pthread_create()
3494; return 0; }
3495EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003496if { (eval echo configure:3497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003497 rm -rf conftest*
3498 eval "ac_cv_lib_$ac_lib_var=yes"
3499else
3500 echo "configure: failed program was:" >&5
3501 cat conftest.$ac_ext >&5
3502 rm -rf conftest*
3503 eval "ac_cv_lib_$ac_lib_var=no"
3504fi
3505rm -f conftest*
3506LIBS="$ac_save_LIBS"
3507
3508fi
3509if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3510 echo "$ac_t""yes" 1>&6
3511 cat >> confdefs.h <<\EOF
3512#define WITH_THREAD 1
3513EOF
3514
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003515 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003516#define _POSIX_THREADS 1
3517EOF
3518
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003519 LIBS="-lpthread $LIBS"
3520 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003521else
3522 echo "$ac_t""no" 1>&6
3523
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003524 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003525echo "configure:3526: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003526if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003527 echo $ac_n "(cached) $ac_c" 1>&6
3528else
3529 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003530#line 3531 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003531#include "confdefs.h"
3532/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003533 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003534#include <assert.h>
3535/* Override any gcc2 internal prototype to avoid an error. */
3536/* We use char because int might match the return type of a gcc2
3537 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003538char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003539
3540int main() {
3541
3542/* The GNU C library defines this for functions which it implements
3543 to always fail with ENOSYS. Some functions are actually named
3544 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003545#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003546choke me
3547#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003548pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003549#endif
3550
3551; return 0; }
3552EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003553if { (eval echo configure:3554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003554 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003555 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003556else
3557 echo "configure: failed program was:" >&5
3558 cat conftest.$ac_ext >&5
3559 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003560 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003561fi
3562rm -f conftest*
3563fi
3564
Guido van Rossumea516321998-12-17 18:08:55 +00003565if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003566 echo "$ac_t""yes" 1>&6
3567 cat >> confdefs.h <<\EOF
3568#define WITH_THREAD 1
3569EOF
3570
Guido van Rossum5839e582000-10-09 19:52:35 +00003571 case $ac_sys_system in
3572 Darwin*) ;;
3573 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003574#define _POSIX_THREADS 1
3575EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003576;;
3577 esac
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003578 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003579else
3580 echo "$ac_t""no" 1>&6
3581
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003582 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003583echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003584echo "configure:3585: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003585if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003586 echo $ac_n "(cached) $ac_c" 1>&6
3587else
3588 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003589#line 3590 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003590#include "confdefs.h"
3591#include <kernel/OS.h>
3592EOF
3593ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumca563f22001-01-23 01:52:44 +00003594{ (eval echo configure:3595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003595ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003596if test -z "$ac_err"; then
3597 rm -rf conftest*
3598 eval "ac_cv_header_$ac_safe=yes"
3599else
3600 echo "$ac_err" >&5
3601 echo "configure: failed program was:" >&5
3602 cat conftest.$ac_ext >&5
3603 rm -rf conftest*
3604 eval "ac_cv_header_$ac_safe=no"
3605fi
3606rm -f conftest*
3607fi
3608if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3609 echo "$ac_t""yes" 1>&6
3610 cat >> confdefs.h <<\EOF
3611#define WITH_THREAD 1
3612EOF
3613
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003614 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003615#define BEOS_THREADS 1
3616EOF
3617
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003618 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003619else
3620 echo "$ac_t""no" 1>&6
3621
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003622 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003623echo "configure:3624: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003624ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003625if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003626 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003627else
3628 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003629LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003630cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003631#line 3632 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003632#include "confdefs.h"
3633/* Override any gcc2 internal prototype to avoid an error. */
3634/* We use char because int might match the return type of a gcc2
3635 builtin and then its argument prototype would still apply. */
3636char pthread_create();
3637
3638int main() {
3639pthread_create()
3640; return 0; }
3641EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003642if { (eval echo configure:3643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003643 rm -rf conftest*
3644 eval "ac_cv_lib_$ac_lib_var=yes"
3645else
3646 echo "configure: failed program was:" >&5
3647 cat conftest.$ac_ext >&5
3648 rm -rf conftest*
3649 eval "ac_cv_lib_$ac_lib_var=no"
3650fi
3651rm -f conftest*
3652LIBS="$ac_save_LIBS"
3653
3654fi
3655if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3656 echo "$ac_t""yes" 1>&6
3657 cat >> confdefs.h <<\EOF
3658#define WITH_THREAD 1
3659EOF
3660
3661 cat >> confdefs.h <<\EOF
3662#define _POSIX_THREADS 1
3663EOF
3664
3665 LIBS="$LIBS -lpthreads"
3666 LIBOBJS="$LIBOBJS thread.o"
3667else
3668 echo "$ac_t""no" 1>&6
3669
3670 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003671echo "configure:3672: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003672ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003673if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003674 echo $ac_n "(cached) $ac_c" 1>&6
3675else
3676 ac_save_LIBS="$LIBS"
3677LIBS="-lc_r $LIBS"
3678cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003679#line 3680 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003680#include "confdefs.h"
3681/* Override any gcc2 internal prototype to avoid an error. */
3682/* We use char because int might match the return type of a gcc2
3683 builtin and then its argument prototype would still apply. */
3684char pthread_create();
3685
3686int main() {
3687pthread_create()
3688; return 0; }
3689EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003690if { (eval echo configure:3691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003691 rm -rf conftest*
3692 eval "ac_cv_lib_$ac_lib_var=yes"
3693else
3694 echo "configure: failed program was:" >&5
3695 cat conftest.$ac_ext >&5
3696 rm -rf conftest*
3697 eval "ac_cv_lib_$ac_lib_var=no"
3698fi
3699rm -f conftest*
3700LIBS="$ac_save_LIBS"
3701
3702fi
3703if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3704 echo "$ac_t""yes" 1>&6
3705 cat >> confdefs.h <<\EOF
3706#define WITH_THREAD 1
3707EOF
3708
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003709 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003710#define _POSIX_THREADS 1
3711EOF
3712
Greg Steinadf63d62000-07-05 10:38:09 +00003713 LIBS="$LIBS -lc_r"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003714 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003715else
3716 echo "$ac_t""no" 1>&6
3717
Greg Steinadf63d62000-07-05 10:38:09 +00003718 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003719echo "configure:3720: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003720ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003721if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003722 echo $ac_n "(cached) $ac_c" 1>&6
3723else
3724 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003725LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003726cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003727#line 3728 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003728#include "confdefs.h"
3729/* Override any gcc2 internal prototype to avoid an error. */
3730/* We use char because int might match the return type of a gcc2
3731 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003732char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003733
3734int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003735__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003736; return 0; }
3737EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003738if { (eval echo configure:3739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003739 rm -rf conftest*
3740 eval "ac_cv_lib_$ac_lib_var=yes"
3741else
3742 echo "configure: failed program was:" >&5
3743 cat conftest.$ac_ext >&5
3744 rm -rf conftest*
3745 eval "ac_cv_lib_$ac_lib_var=no"
3746fi
3747rm -f conftest*
3748LIBS="$ac_save_LIBS"
3749
3750fi
3751if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3752 echo "$ac_t""yes" 1>&6
3753 cat >> confdefs.h <<\EOF
3754#define WITH_THREAD 1
3755EOF
3756
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003757 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003758#define _POSIX_THREADS 1
3759EOF
3760
Greg Steinadf63d62000-07-05 10:38:09 +00003761 LIBS="$LIBS -lthread"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003762 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003763else
3764 echo "$ac_t""no" 1>&6
3765
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003766 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003767echo "configure:3768: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003768ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
3769if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3770 echo $ac_n "(cached) $ac_c" 1>&6
3771else
3772 ac_save_LIBS="$LIBS"
3773LIBS="-lpthread $LIBS"
3774cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003775#line 3776 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003776#include "confdefs.h"
3777/* Override any gcc2 internal prototype to avoid an error. */
3778/* We use char because int might match the return type of a gcc2
3779 builtin and then its argument prototype would still apply. */
3780char __pthread_create_system();
3781
3782int main() {
3783__pthread_create_system()
3784; return 0; }
3785EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003786if { (eval echo configure:3787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003787 rm -rf conftest*
3788 eval "ac_cv_lib_$ac_lib_var=yes"
3789else
3790 echo "configure: failed program was:" >&5
3791 cat conftest.$ac_ext >&5
3792 rm -rf conftest*
3793 eval "ac_cv_lib_$ac_lib_var=no"
3794fi
3795rm -f conftest*
3796LIBS="$ac_save_LIBS"
3797
3798fi
3799if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3800 echo "$ac_t""yes" 1>&6
3801 cat >> confdefs.h <<\EOF
3802#define WITH_THREAD 1
3803EOF
3804
3805 cat >> confdefs.h <<\EOF
3806#define _POSIX_THREADS 1
3807EOF
3808
3809 LIBS="$LIBS -lpthread"
3810 LIBOBJS="$LIBOBJS thread.o"
3811else
3812 echo "$ac_t""no" 1>&6
3813
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003814 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003815echo "configure:3816: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003816ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003817if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003818 echo $ac_n "(cached) $ac_c" 1>&6
3819else
3820 ac_save_LIBS="$LIBS"
3821LIBS="-lcma $LIBS"
3822cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003823#line 3824 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003824#include "confdefs.h"
3825/* Override any gcc2 internal prototype to avoid an error. */
3826/* We use char because int might match the return type of a gcc2
3827 builtin and then its argument prototype would still apply. */
3828char pthread_create();
3829
3830int main() {
3831pthread_create()
3832; return 0; }
3833EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003834if { (eval echo configure:3835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003835 rm -rf conftest*
3836 eval "ac_cv_lib_$ac_lib_var=yes"
3837else
3838 echo "configure: failed program was:" >&5
3839 cat conftest.$ac_ext >&5
3840 rm -rf conftest*
3841 eval "ac_cv_lib_$ac_lib_var=no"
3842fi
3843rm -f conftest*
3844LIBS="$ac_save_LIBS"
3845
3846fi
3847if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3848 echo "$ac_t""yes" 1>&6
3849 cat >> confdefs.h <<\EOF
3850#define WITH_THREAD 1
3851EOF
3852
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003853 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003854#define _POSIX_THREADS 1
3855EOF
3856
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003857 LIBS="$LIBS -lcma"
3858 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003859else
3860 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003861
3862 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003863fi
3864
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003865
Guido van Rossum627b2d71993-12-24 10:39:16 +00003866fi
3867
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003868fi
3869
Guido van Rossum0be3e491997-05-22 20:33:33 +00003870fi
3871
Guido van Rossum49545951997-12-02 19:28:29 +00003872fi
3873
Guido van Rossumb93a8621998-05-07 13:27:32 +00003874fi
3875
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003876fi
3877
Guido van Rossumad678af1998-10-02 14:42:15 +00003878fi
3879
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003880fi
3881
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003882fi
3883
Guido van Rossum0be3e491997-05-22 20:33:33 +00003884
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003885 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003886echo "configure:3887: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003887ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003888if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003889 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003890else
3891 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003892LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003893cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003894#line 3895 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003895#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003896/* Override any gcc2 internal prototype to avoid an error. */
3897/* We use char because int might match the return type of a gcc2
3898 builtin and then its argument prototype would still apply. */
3899char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003900
Guido van Rossumf78abae1997-01-21 22:02:36 +00003901int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003902usconfig()
3903; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003904EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003905if { (eval echo configure:3906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003906 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003907 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003908else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003909 echo "configure: failed program was:" >&5
3910 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003911 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003912 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003913fi
3914rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003915LIBS="$ac_save_LIBS"
3916
3917fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003918if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003919 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003920 cat >> confdefs.h <<\EOF
3921#define WITH_THREAD 1
3922EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003923
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003924 LIBS="$LIBS -lmpc"
3925 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003926 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003927else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003928 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003929fi
3930
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003931 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003932echo "configure:3933: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003933ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003934if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003935 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003936else
3937 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003938LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003939cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003940#line 3941 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003941#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003942/* Override any gcc2 internal prototype to avoid an error. */
3943/* We use char because int might match the return type of a gcc2
3944 builtin and then its argument prototype would still apply. */
3945char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003946
Guido van Rossumf78abae1997-01-21 22:02:36 +00003947int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003948thr_create()
3949; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003950EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00003951if { (eval echo configure:3952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003952 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003953 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003954else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003955 echo "configure: failed program was:" >&5
3956 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003957 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003958 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003959fi
3960rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003961LIBS="$ac_save_LIBS"
3962
3963fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003964if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003965 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003966 cat >> confdefs.h <<\EOF
3967#define WITH_THREAD 1
3968EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003969
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003970 LIBS="$LIBS -lthread"
3971 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003972 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003973else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003974 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003975fi
3976
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00003977
3978 if test "$USE_THREAD_MODULE" != "#"
3979 then
3980 # If the above checks didn't disable threads, (at least) OSF1
3981 # needs this '-threads' argument during linking.
3982 case $ac_sys_system in
3983 OSF1) LDLAST=-threads;;
3984 esac
3985 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003986fi
3987
Barry Warsawef82cd72000-06-30 16:21:01 +00003988# Check for GC support
3989
3990USE_GC_MODULE=""
3991echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00003992echo "configure:3993: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003993# Check whether --with-cycle-gc or --without-cycle-gc was given.
3994if test "${with_cycle_gc+set}" = set; then
3995 withval="$with_cycle_gc"
3996 :
3997fi
3998
3999
4000if test -z "$with_cycle_gc"
4001then with_cycle_gc="yes"
4002fi
4003if test "$with_cycle_gc" = "no"
4004then
4005 USE_GC_MODULE="#"
4006else
4007 cat >> confdefs.h <<\EOF
4008#define WITH_CYCLE_GC 1
4009EOF
4010
4011fi
4012echo "$ac_t""$with_cycle_gc" 1>&6
4013
Barry Warsawa57b89b2001-01-15 17:07:21 +00004014# Check for DBM support
4015
4016USE_DBM_MODULE=""
4017echo $ac_n "checking for --with-dbm""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004018echo "configure:4019: checking for --with-dbm" >&5
Barry Warsawa57b89b2001-01-15 17:07:21 +00004019# Check whether --with-dbm or --without-dbm was given.
4020if test "${with_dbm+set}" = set; then
4021 withval="$with_dbm"
4022 :
4023fi
4024
4025
4026# enabled by default but one of the dbm.h files must be found
Sjoerd Mullender124698c2001-01-17 09:42:21 +00004027if test "$ac_cv_header_ndbm_h" = "yes" -o "$ac_cv_header_db1_ndbm_h" = "yes" -o "$ac_cv_header_gdbm_ndbm_h" = "yes"
Barry Warsawa57b89b2001-01-15 17:07:21 +00004028then
4029 if test "$with_dbm" != "no"
4030 then with_dbm="yes"
4031 fi
4032else
4033 # make sure user knows why dbm support wasn't enabled even though
4034 # s/he requested it
4035 if test "$with_dbm" = "yes"
Eric S. Raymonda8885402001-01-17 08:25:11 +00004036 then echo $ac_n "(requested but no ndbm.h was found) $ac_c"
Barry Warsawa57b89b2001-01-15 17:07:21 +00004037 fi
4038 with_dbm="no"
4039fi
4040
4041if test "$with_dbm" = "no"
4042then
4043 USE_DBM_MODULE="#"
4044else
4045 cat >> confdefs.h <<\EOF
4046#define WITH_LIBNDBM 1
4047EOF
4048
4049fi
4050echo "$ac_t""$with_dbm" 1>&6
4051
4052if test "$with_dbm" = "yes"
4053then
4054 # check for libndbm
4055
4056 echo $ac_n "checking for dbmopen""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004057echo "configure:4058: checking for dbmopen" >&5
Barry Warsawa57b89b2001-01-15 17:07:21 +00004058if eval "test \"`echo '$''{'ac_cv_func_dbmopen'+set}'`\" = set"; then
4059 echo $ac_n "(cached) $ac_c" 1>&6
4060else
4061 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004062#line 4063 "configure"
Barry Warsawa57b89b2001-01-15 17:07:21 +00004063#include "confdefs.h"
4064/* System header to define __stub macros and hopefully few prototypes,
4065 which can conflict with char dbmopen(); below. */
4066#include <assert.h>
4067/* Override any gcc2 internal prototype to avoid an error. */
4068/* We use char because int might match the return type of a gcc2
4069 builtin and then its argument prototype would still apply. */
4070char dbmopen();
4071
4072int main() {
4073
4074/* The GNU C library defines this for functions which it implements
4075 to always fail with ENOSYS. Some functions are actually named
4076 something starting with __ and the normal name is an alias. */
4077#if defined (__stub_dbmopen) || defined (__stub___dbmopen)
4078choke me
4079#else
4080dbmopen();
4081#endif
4082
4083; return 0; }
4084EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004085if { (eval echo configure:4086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Barry Warsawa57b89b2001-01-15 17:07:21 +00004086 rm -rf conftest*
4087 eval "ac_cv_func_dbmopen=yes"
4088else
4089 echo "configure: failed program was:" >&5
4090 cat conftest.$ac_ext >&5
4091 rm -rf conftest*
4092 eval "ac_cv_func_dbmopen=no"
4093fi
4094rm -f conftest*
4095fi
4096
4097if eval "test \"`echo '$ac_cv_func_'dbmopen`\" = yes"; then
4098 echo "$ac_t""yes" 1>&6
4099 HAVE_LIBNDBM=
4100else
4101 echo "$ac_t""no" 1>&6
4102HAVE_LIBNDBM=-lndbm
4103fi
4104
4105fi
4106
Fred Drakea50d6ec2000-08-31 16:13:20 +00004107# Check for LIBDB support
4108# either --with-libdb or, in its absence, the presence of db.h
4109
4110USE_BSDDB_MODULE=""
4111echo $ac_n "checking for --with-libdb""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004112echo "configure:4113: checking for --with-libdb" >&5
Fred Drakea50d6ec2000-08-31 16:13:20 +00004113# Check whether --with-libdb or --without-libdb was given.
4114if test "${with_libdb+set}" = set; then
4115 withval="$with_libdb"
4116 :
4117fi
4118
4119
Skip Montanarob89f41e2000-09-04 04:06:05 +00004120# enabled by default, but db.h must be found
4121if test "$ac_cv_header_db_h" = "yes"
4122then
4123 if test "$with_libdb" != "no"
4124 then with_libdb="yes"
4125 fi
4126else
Fred Drake5790be12000-10-09 17:06:13 +00004127 # make sure user knows why bsddb support wasn't enabled even
Skip Montanarob89f41e2000-09-04 04:06:05 +00004128 # though s/he requested it
4129 if test "$with_libdb" = "yes"
4130 then echo $ac_n "(requested, but db.h was not found) $ac_c"
4131 fi
4132 with_libdb="no"
Fred Drakea50d6ec2000-08-31 16:13:20 +00004133fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00004134
Fred Drakea50d6ec2000-08-31 16:13:20 +00004135if test "$with_libdb" = "no"
4136then
4137 USE_BSDDB_MODULE="#"
4138else
4139 cat >> confdefs.h <<\EOF
4140#define WITH_LIBDB 1
4141EOF
4142
4143fi
4144echo "$ac_t""$with_libdb" 1>&6
4145
Skip Montanaroed33c9a2000-09-08 02:17:15 +00004146if test "$with_libdb" = "yes"
4147then
4148 # check for libdb; BSD systems have the DB routines in libc --tg
4149
Martin v. Löwis05a65d62000-09-24 19:40:25 +00004150 # If dbopen is not in libc, then checking whether it is in libdb
4151 # is difficult: db_185.h may #define it as __db185_open
Fred Drake02706f52000-09-25 15:08:46 +00004152 # Instead, we just trust it is in libdb; linking will fail if it
4153 # is not.
Skip Montanaroed33c9a2000-09-08 02:17:15 +00004154 echo $ac_n "checking for dbopen""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004155echo "configure:4156: checking for dbopen" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004156if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00004157 echo $ac_n "(cached) $ac_c" 1>&6
4158else
4159 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004160#line 4161 "configure"
Skip Montanaroed33c9a2000-09-08 02:17:15 +00004161#include "confdefs.h"
4162/* System header to define __stub macros and hopefully few prototypes,
4163 which can conflict with char dbopen(); below. */
4164#include <assert.h>
4165/* Override any gcc2 internal prototype to avoid an error. */
4166/* We use char because int might match the return type of a gcc2
4167 builtin and then its argument prototype would still apply. */
4168char dbopen();
Skip Montanaroed33c9a2000-09-08 02:17:15 +00004169
4170int main() {
4171
4172/* The GNU C library defines this for functions which it implements
4173 to always fail with ENOSYS. Some functions are actually named
4174 something starting with __ and the normal name is an alias. */
4175#if defined (__stub_dbopen) || defined (__stub___dbopen)
4176choke me
4177#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004178dbopen();
Skip Montanaroed33c9a2000-09-08 02:17:15 +00004179#endif
4180
4181; return 0; }
4182EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004183if { (eval echo configure:4184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00004184 rm -rf conftest*
4185 eval "ac_cv_func_dbopen=yes"
4186else
4187 echo "configure: failed program was:" >&5
4188 cat conftest.$ac_ext >&5
4189 rm -rf conftest*
4190 eval "ac_cv_func_dbopen=no"
4191fi
4192rm -f conftest*
4193fi
4194
4195if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
4196 echo "$ac_t""yes" 1>&6
4197 HAVE_LIBDB=
4198else
4199 echo "$ac_t""no" 1>&6
Martin v. Löwis05a65d62000-09-24 19:40:25 +00004200HAVE_LIBDB=-ldb
Skip Montanaroed33c9a2000-09-08 02:17:15 +00004201fi
4202
4203fi
4204
Barry Warsawef82cd72000-06-30 16:21:01 +00004205# Check for --with-wctype-functions
4206echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004207echo "configure:4208: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004208# Check whether --with-wctype-functions or --without-wctype-functions was given.
4209if test "${with_wctype_functions+set}" = set; then
4210 withval="$with_wctype_functions"
4211
4212if test "$withval" != no
4213then cat >> confdefs.h <<\EOF
4214#define WANT_WCTYPE_FUNCTIONS 1
4215EOF
4216 echo "$ac_t""yes" 1>&6
4217else echo "$ac_t""no" 1>&6
4218fi
4219else
4220 echo "$ac_t""no" 1>&6
4221fi
4222
4223
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004224# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004225
4226DLINCLDIR=/
4227
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004228echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004229echo "configure:4230: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004230# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004231if test "${with_sgi_dl+set}" = set; then
4232 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004233
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004234echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004235cat >> confdefs.h <<\EOF
4236#define WITH_SGI_DL 1
4237EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004238
Guido van Rossume97ee181999-12-20 21:27:22 +00004239DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004240dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004241if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004242then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004243else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004244fi
4245DLINCLDIR=${dldir}
4246LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004247else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004248 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004249fi
4250
4251
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004252echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004253echo "configure:4254: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004255if test "${with_dl_dld+set}" = set; then
4256 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004257
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004258echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004259cat >> confdefs.h <<\EOF
4260#define WITH_DL_DLD 1
4261EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004262
Guido van Rossume97ee181999-12-20 21:27:22 +00004263DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004264dldir=`echo "$withval" | sed 's/,.*//'`
4265dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004266if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004267then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004269fi
4270DLINCLDIR=${dldir}
4271LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004272else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004273 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004274fi
4275
4276
Guido van Rossume97ee181999-12-20 21:27:22 +00004277# the dlopen() function means we might want to use dynload_shlib.o. some
4278# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004279for ac_func in dlopen
4280do
4281echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004282echo "configure:4283: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004283if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004284 echo $ac_n "(cached) $ac_c" 1>&6
4285else
4286 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004287#line 4288 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004288#include "confdefs.h"
4289/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004290 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004291#include <assert.h>
4292/* Override any gcc2 internal prototype to avoid an error. */
4293/* We use char because int might match the return type of a gcc2
4294 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004295char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004296
4297int main() {
4298
4299/* The GNU C library defines this for functions which it implements
4300 to always fail with ENOSYS. Some functions are actually named
4301 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004302#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004303choke me
4304#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004305$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004306#endif
4307
4308; return 0; }
4309EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004310if { (eval echo configure:4311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004311 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004312 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004313else
4314 echo "configure: failed program was:" >&5
4315 cat conftest.$ac_ext >&5
4316 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004317 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004318fi
4319rm -f conftest*
4320fi
4321
Thomas Wouters3a584202000-08-05 23:28:51 +00004322if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004323 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004324 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4325 cat >> confdefs.h <<EOF
4326#define $ac_tr_func 1
4327EOF
4328
Guido van Rossume97ee181999-12-20 21:27:22 +00004329else
4330 echo "$ac_t""no" 1>&6
4331fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004332done
Guido van Rossume97ee181999-12-20 21:27:22 +00004333
4334
4335# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4336# loading of modules.
4337
4338echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004339echo "configure:4340: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004340if test -z "$DYNLOADFILE"
4341then
4342 case $ac_sys_system/$ac_sys_release in
4343 AIX*) DYNLOADFILE="dynload_aix.o";;
4344 BeOS*) DYNLOADFILE="dynload_beos.o";;
4345 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossum5839e582000-10-09 19:52:35 +00004346 Darwin/*|next/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004347 *)
4348 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4349 # out any dynamic loading
4350 if test "$ac_cv_func_dlopen" = yes
4351 then DYNLOADFILE="dynload_shlib.o"
4352 else DYNLOADFILE="dynload_stub.o"
4353 fi
4354 ;;
4355 esac
4356fi
4357echo "$ac_t""$DYNLOADFILE" 1>&6
4358if test "$DYNLOADFILE" != "dynload_stub.o"
4359then
4360 cat >> confdefs.h <<\EOF
4361#define HAVE_DYNAMIC_LOADING 1
4362EOF
4363
4364fi
4365
Guido van Rossum627b2d71993-12-24 10:39:16 +00004366# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00004367for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004368 flock fork fsync fdatasync fpathconf ftime ftruncate \
Andrew M. Kuchlinga9586c72001-01-08 17:58:56 +00004369 getgroups getlogin getpeername getpid getpwent getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00004370 kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004371 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004372 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004373 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00004374 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00004375 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004376 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters70c21a12000-07-14 14:28:33 +00004377 truncate uname waitpid _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004378do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004379echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004380echo "configure:4381: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004381if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004382 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004383else
4384 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004385#line 4386 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004386#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004387/* System header to define __stub macros and hopefully few prototypes,
4388 which can conflict with char $ac_func(); below. */
4389#include <assert.h>
4390/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004391/* We use char because int might match the return type of a gcc2
4392 builtin and then its argument prototype would still apply. */
4393char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004394
Guido van Rossumf78abae1997-01-21 22:02:36 +00004395int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004396
Guido van Rossum627b2d71993-12-24 10:39:16 +00004397/* The GNU C library defines this for functions which it implements
4398 to always fail with ENOSYS. Some functions are actually named
4399 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004400#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004401choke me
4402#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004403$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004404#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004405
Guido van Rossum7f43da71994-08-01 12:15:30 +00004406; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004407EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004408if { (eval echo configure:4409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004409 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004410 eval "ac_cv_func_$ac_func=yes"
4411else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004412 echo "configure: failed program was:" >&5
4413 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004414 rm -rf conftest*
4415 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004416fi
4417rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004418fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004419
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004420if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004421 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004422 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004423 cat >> confdefs.h <<EOF
4424#define $ac_tr_func 1
4425EOF
4426
4427else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004428 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004429fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004430done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004431
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004432
Fred Drake8cef4cf2000-06-28 16:40:38 +00004433# check for openpty and forkpty
4434
4435for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004436do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004437echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004438echo "configure:4439: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004439if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004440 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004441else
4442 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004443#line 4444 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004444#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004445/* System header to define __stub macros and hopefully few prototypes,
4446 which can conflict with char $ac_func(); below. */
4447#include <assert.h>
4448/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004449/* We use char because int might match the return type of a gcc2
4450 builtin and then its argument prototype would still apply. */
4451char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004452
Guido van Rossumf78abae1997-01-21 22:02:36 +00004453int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004454
Guido van Rossum627b2d71993-12-24 10:39:16 +00004455/* The GNU C library defines this for functions which it implements
4456 to always fail with ENOSYS. Some functions are actually named
4457 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004458#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004459choke me
4460#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004461$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004462#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004463
Guido van Rossum7f43da71994-08-01 12:15:30 +00004464; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004465EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004466if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004467 rm -rf conftest*
4468 eval "ac_cv_func_$ac_func=yes"
4469else
4470 echo "configure: failed program was:" >&5
4471 cat conftest.$ac_ext >&5
4472 rm -rf conftest*
4473 eval "ac_cv_func_$ac_func=no"
4474fi
4475rm -f conftest*
4476fi
4477
4478if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4479 echo "$ac_t""yes" 1>&6
4480 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4481 cat >> confdefs.h <<EOF
4482#define $ac_tr_func 1
4483EOF
4484
4485else
4486 echo "$ac_t""no" 1>&6
4487echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004488echo "configure:4489: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004489ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004490if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004491 echo $ac_n "(cached) $ac_c" 1>&6
4492else
4493 ac_save_LIBS="$LIBS"
4494LIBS="-lutil $LIBS"
4495cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004496#line 4497 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004497#include "confdefs.h"
4498/* Override any gcc2 internal prototype to avoid an error. */
4499/* We use char because int might match the return type of a gcc2
4500 builtin and then its argument prototype would still apply. */
4501char openpty();
4502
4503int main() {
4504openpty()
4505; return 0; }
4506EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004507if { (eval echo configure:4508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004508 rm -rf conftest*
4509 eval "ac_cv_lib_$ac_lib_var=yes"
4510else
4511 echo "configure: failed program was:" >&5
4512 cat conftest.$ac_ext >&5
4513 rm -rf conftest*
4514 eval "ac_cv_lib_$ac_lib_var=no"
4515fi
4516rm -f conftest*
4517LIBS="$ac_save_LIBS"
4518
4519fi
4520if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4521 echo "$ac_t""yes" 1>&6
4522 cat >> confdefs.h <<\EOF
4523#define HAVE_OPENPTY 1
4524EOF
4525 LIBS="$LIBS -lutil"
4526else
4527 echo "$ac_t""no" 1>&6
4528fi
4529
4530fi
4531done
4532
4533for ac_func in forkpty
4534do
4535echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004536echo "configure:4537: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004537if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004538 echo $ac_n "(cached) $ac_c" 1>&6
4539else
4540 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004541#line 4542 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004542#include "confdefs.h"
4543/* System header to define __stub macros and hopefully few prototypes,
4544 which can conflict with char $ac_func(); below. */
4545#include <assert.h>
4546/* Override any gcc2 internal prototype to avoid an error. */
4547/* We use char because int might match the return type of a gcc2
4548 builtin and then its argument prototype would still apply. */
4549char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004550
4551int main() {
4552
4553/* The GNU C library defines this for functions which it implements
4554 to always fail with ENOSYS. Some functions are actually named
4555 something starting with __ and the normal name is an alias. */
4556#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4557choke me
4558#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004559$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004560#endif
4561
4562; return 0; }
4563EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004564if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004565 rm -rf conftest*
4566 eval "ac_cv_func_$ac_func=yes"
4567else
4568 echo "configure: failed program was:" >&5
4569 cat conftest.$ac_ext >&5
4570 rm -rf conftest*
4571 eval "ac_cv_func_$ac_func=no"
4572fi
4573rm -f conftest*
4574fi
4575
4576if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4577 echo "$ac_t""yes" 1>&6
4578 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4579 cat >> confdefs.h <<EOF
4580#define $ac_tr_func 1
4581EOF
4582
4583else
4584 echo "$ac_t""no" 1>&6
4585echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004586echo "configure:4587: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004587ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004588if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004589 echo $ac_n "(cached) $ac_c" 1>&6
4590else
4591 ac_save_LIBS="$LIBS"
4592LIBS="-lutil $LIBS"
4593cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004594#line 4595 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004595#include "confdefs.h"
4596/* Override any gcc2 internal prototype to avoid an error. */
4597/* We use char because int might match the return type of a gcc2
4598 builtin and then its argument prototype would still apply. */
4599char forkpty();
4600
4601int main() {
4602forkpty()
4603; return 0; }
4604EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004605if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004606 rm -rf conftest*
4607 eval "ac_cv_lib_$ac_lib_var=yes"
4608else
4609 echo "configure: failed program was:" >&5
4610 cat conftest.$ac_ext >&5
4611 rm -rf conftest*
4612 eval "ac_cv_lib_$ac_lib_var=no"
4613fi
4614rm -f conftest*
4615LIBS="$ac_save_LIBS"
4616
4617fi
4618if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4619 echo "$ac_t""yes" 1>&6
4620 cat >> confdefs.h <<\EOF
4621#define HAVE_FORKPTY 1
4622EOF
4623 LIBS="$LIBS -lutil"
4624else
4625 echo "$ac_t""no" 1>&6
4626fi
4627
4628fi
4629done
4630
4631
4632# check for long file support functions
4633for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4634do
4635echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004636echo "configure:4637: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004637if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004638 echo $ac_n "(cached) $ac_c" 1>&6
4639else
4640 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004641#line 4642 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004642#include "confdefs.h"
4643/* System header to define __stub macros and hopefully few prototypes,
4644 which can conflict with char $ac_func(); below. */
4645#include <assert.h>
4646/* Override any gcc2 internal prototype to avoid an error. */
4647/* We use char because int might match the return type of a gcc2
4648 builtin and then its argument prototype would still apply. */
4649char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004650
4651int main() {
4652
4653/* The GNU C library defines this for functions which it implements
4654 to always fail with ENOSYS. Some functions are actually named
4655 something starting with __ and the normal name is an alias. */
4656#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4657choke me
4658#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004659$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004660#endif
4661
4662; return 0; }
4663EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004664if { (eval echo configure:4665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004665 rm -rf conftest*
4666 eval "ac_cv_func_$ac_func=yes"
4667else
4668 echo "configure: failed program was:" >&5
4669 cat conftest.$ac_ext >&5
4670 rm -rf conftest*
4671 eval "ac_cv_func_$ac_func=no"
4672fi
4673rm -f conftest*
4674fi
4675
4676if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4677 echo "$ac_t""yes" 1>&6
4678 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4679 cat >> confdefs.h <<EOF
4680#define $ac_tr_func 1
4681EOF
4682
4683else
4684 echo "$ac_t""no" 1>&6
4685fi
4686done
4687
4688
4689for ac_func in dup2 getcwd strdup strerror memmove
4690do
4691echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004692echo "configure:4693: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004693if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004694 echo $ac_n "(cached) $ac_c" 1>&6
4695else
4696 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004697#line 4698 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004698#include "confdefs.h"
4699/* System header to define __stub macros and hopefully few prototypes,
4700 which can conflict with char $ac_func(); below. */
4701#include <assert.h>
4702/* Override any gcc2 internal prototype to avoid an error. */
4703/* We use char because int might match the return type of a gcc2
4704 builtin and then its argument prototype would still apply. */
4705char $ac_func();
4706
4707int main() {
4708
4709/* The GNU C library defines this for functions which it implements
4710 to always fail with ENOSYS. Some functions are actually named
4711 something starting with __ and the normal name is an alias. */
4712#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4713choke me
4714#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004715$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004716#endif
4717
4718; return 0; }
4719EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004720if { (eval echo configure:4721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004721 rm -rf conftest*
4722 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004723else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004724 echo "configure: failed program was:" >&5
4725 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004726 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004727 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004728fi
4729rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004730fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004731
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004732if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004733 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004734 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4735 cat >> confdefs.h <<EOF
4736#define $ac_tr_func 1
4737EOF
4738
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004739else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004740 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004741LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004742fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004743done
4744
Guido van Rossumf78abae1997-01-21 22:02:36 +00004745
Thomas Wouters3a584202000-08-05 23:28:51 +00004746for ac_func in getpgrp
4747do
4748echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004749echo "configure:4750: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004750if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004751 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004752else
4753 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004754#line 4755 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004755#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004756/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004757 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004758#include <assert.h>
4759/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004760/* We use char because int might match the return type of a gcc2
4761 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004762char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004763
Guido van Rossumf78abae1997-01-21 22:02:36 +00004764int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004765
Guido van Rossum627b2d71993-12-24 10:39:16 +00004766/* The GNU C library defines this for functions which it implements
4767 to always fail with ENOSYS. Some functions are actually named
4768 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004769#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004770choke me
4771#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004772$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004773#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004774
4775; return 0; }
4776EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004777if { (eval echo configure:4778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004778 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004779 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004780else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004781 echo "configure: failed program was:" >&5
4782 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004783 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004784 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004785fi
4786rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004787fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004788
Thomas Wouters3a584202000-08-05 23:28:51 +00004789if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004790 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004791 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4792 cat >> confdefs.h <<EOF
4793#define $ac_tr_func 1
4794EOF
4795 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004796#line 4797 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004797#include "confdefs.h"
4798#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004799int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004800getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004801; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004802EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004803if { (eval echo configure:4804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004804 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004805 cat >> confdefs.h <<\EOF
4806#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004807EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004808
Guido van Rossumf78abae1997-01-21 22:02:36 +00004809else
4810 echo "configure: failed program was:" >&5
4811 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004812fi
4813rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004814else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004815 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004816fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004817done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004818
Thomas Wouters3a584202000-08-05 23:28:51 +00004819for ac_func in setpgrp
4820do
4821echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004822echo "configure:4823: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004823if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004824 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004825else
4826 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004827#line 4828 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004828#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004829/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004830 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004831#include <assert.h>
4832/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004833/* We use char because int might match the return type of a gcc2
4834 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004835char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004836
Guido van Rossumf78abae1997-01-21 22:02:36 +00004837int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004838
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004839/* The GNU C library defines this for functions which it implements
4840 to always fail with ENOSYS. Some functions are actually named
4841 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004842#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004843choke me
4844#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004845$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004846#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004847
4848; return 0; }
4849EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004850if { (eval echo configure:4851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004851 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004852 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004853else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004854 echo "configure: failed program was:" >&5
4855 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004856 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004857 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004858fi
4859rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004860fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004861
Thomas Wouters3a584202000-08-05 23:28:51 +00004862if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004863 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004864 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4865 cat >> confdefs.h <<EOF
4866#define $ac_tr_func 1
4867EOF
4868 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004869#line 4870 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004870#include "confdefs.h"
4871#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004872int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004873setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004874; return 0; }
4875EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004876if { (eval echo configure:4877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004877 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004878 cat >> confdefs.h <<\EOF
4879#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004880EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004881
Guido van Rossumf78abae1997-01-21 22:02:36 +00004882else
4883 echo "configure: failed program was:" >&5
4884 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004885fi
4886rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004887else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004888 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004889fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004890done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004891
Thomas Wouters3a584202000-08-05 23:28:51 +00004892for ac_func in gettimeofday
4893do
4894echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004895echo "configure:4896: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004896if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004897 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004898else
4899 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004900#line 4901 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004901#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004902/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004903 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004904#include <assert.h>
4905/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004906/* We use char because int might match the return type of a gcc2
4907 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004908char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004909
Guido van Rossumf78abae1997-01-21 22:02:36 +00004910int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004911
4912/* The GNU C library defines this for functions which it implements
4913 to always fail with ENOSYS. Some functions are actually named
4914 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004915#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004916choke me
4917#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004918$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004919#endif
4920
4921; return 0; }
4922EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004923if { (eval echo configure:4924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004924 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004925 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004926else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004927 echo "configure: failed program was:" >&5
4928 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004929 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004930 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004931fi
4932rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004933fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004934
Thomas Wouters3a584202000-08-05 23:28:51 +00004935if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004936 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004937 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4938 cat >> confdefs.h <<EOF
4939#define $ac_tr_func 1
4940EOF
4941 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004942#line 4943 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004943#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004944#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004945int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004946gettimeofday((struct timeval*)0,(struct timezone*)0);
4947; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004948EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004949if { (eval echo configure:4950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004950 :
4951else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004952 echo "configure: failed program was:" >&5
4953 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004954 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004955 cat >> confdefs.h <<\EOF
4956#define GETTIMEOFDAY_NO_TZ 1
4957EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004958
4959fi
4960rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004961else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004962 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004963fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004964done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004965
4966
4967# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004968echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00004969echo "configure:4970: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004970if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004971 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004972else
4973 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004974#line 4975 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004975#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004976#include <sys/types.h>
4977#include <sys/time.h>
4978#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004979int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004980struct tm *tp;
4981; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004982EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00004983if { (eval echo configure:4984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004984 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004985 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004986else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004987 echo "configure: failed program was:" >&5
4988 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004989 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004990 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004991fi
4992rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004993fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004994
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004995echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004996if test $ac_cv_header_time = yes; then
4997 cat >> confdefs.h <<\EOF
4998#define TIME_WITH_SYS_TIME 1
4999EOF
5000
5001fi
5002
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005003echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005004echo "configure:5005: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005005if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005006 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005007else
5008 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005009#line 5010 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005010#include "confdefs.h"
5011#include <sys/types.h>
5012#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005013int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005014struct tm *tp; tp->tm_sec;
5015; return 0; }
5016EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005017if { (eval echo configure:5018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005018 rm -rf conftest*
5019 ac_cv_struct_tm=time.h
5020else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005021 echo "configure: failed program was:" >&5
5022 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005023 rm -rf conftest*
5024 ac_cv_struct_tm=sys/time.h
5025fi
5026rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005027fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005028
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005029echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005030if test $ac_cv_struct_tm = sys/time.h; then
5031 cat >> confdefs.h <<\EOF
5032#define TM_IN_SYS_TIME 1
5033EOF
5034
5035fi
5036
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005037echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005038echo "configure:5039: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005039if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005040 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005041else
5042 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005043#line 5044 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005044#include "confdefs.h"
5045#include <sys/types.h>
5046#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005047int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005048struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005049; return 0; }
5050EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005051if { (eval echo configure:5052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005052 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005053 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005054else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005055 echo "configure: failed program was:" >&5
5056 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005057 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005058 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005059fi
5060rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005061fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005062
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005063echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5064if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005065 cat >> confdefs.h <<\EOF
5066#define HAVE_TM_ZONE 1
5067EOF
5068
5069else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005070 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005071echo "configure:5072: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005072if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005073 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005074else
5075 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005076#line 5077 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005077#include "confdefs.h"
5078#include <time.h>
5079#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005080extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005081#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00005082int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005083atoi(*tzname);
5084; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005085EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005086if { (eval echo configure:5087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005087 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005088 ac_cv_var_tzname=yes
5089else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005090 echo "configure: failed program was:" >&5
5091 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005092 rm -rf conftest*
5093 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005094fi
5095rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005096fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005097
5098echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005099 if test $ac_cv_var_tzname = yes; then
5100 cat >> confdefs.h <<\EOF
5101#define HAVE_TZNAME 1
5102EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005103
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005104 fi
5105fi
5106
5107
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005108echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005109echo "configure:5110: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005110if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005111 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005112else
5113 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005114#line 5115 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005115#include "confdefs.h"
5116#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005117int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005118return altzone;
5119; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005120EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005121if { (eval echo configure:5122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005122 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005123 ac_cv_header_time_altzone=yes
5124else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005125 echo "configure: failed program was:" >&5
5126 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005127 rm -rf conftest*
5128 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005129fi
5130rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005131fi
5132
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005133echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005134if test $ac_cv_header_time_altzone = yes; then
5135 cat >> confdefs.h <<\EOF
5136#define HAVE_ALTZONE 1
5137EOF
5138
5139fi
5140
Guido van Rossumda88dad1995-01-26 00:46:29 +00005141was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005142echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005143echo "configure:5144: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005144cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005145#line 5146 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005146#include "confdefs.h"
5147
5148#include <sys/types.h>
5149#include <sys/select.h>
5150#include <sys/time.h>
5151
Guido van Rossumf78abae1997-01-21 22:02:36 +00005152int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005153;
5154; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005155EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005156if { (eval echo configure:5157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005157 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005158 cat >> confdefs.h <<\EOF
5159#define SYS_SELECT_WITH_SYS_TIME 1
5160EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005161 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005162else
5163 echo "configure: failed program was:" >&5
5164 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005165fi
5166rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005167echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005168
5169# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00005170
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005171echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005172echo "configure:5173: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005173if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005174 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005175else
5176 if test "$GCC" = yes; then
5177 # GCC predefines this symbol on systems where it applies.
5178cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005179#line 5180 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005180#include "confdefs.h"
5181#ifdef __CHAR_UNSIGNED__
5182 yes
5183#endif
5184
5185EOF
5186if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5187 egrep "yes" >/dev/null 2>&1; then
5188 rm -rf conftest*
5189 ac_cv_c_char_unsigned=yes
5190else
5191 rm -rf conftest*
5192 ac_cv_c_char_unsigned=no
5193fi
5194rm -f conftest*
5195
5196else
5197if test "$cross_compiling" = yes; then
5198 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5199else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005200 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005201#line 5202 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005202#include "confdefs.h"
5203/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005204#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00005205#define volatile
5206#endif
5207main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00005208 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005209}
5210EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005211if { (eval echo configure:5212: \"$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 +00005212then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005213 ac_cv_c_char_unsigned=yes
5214else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005215 echo "configure: failed program was:" >&5
5216 cat conftest.$ac_ext >&5
5217 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005218 ac_cv_c_char_unsigned=no
5219fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005220rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005221fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005222
5223fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005224fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005225
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005226echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005227if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5228 cat >> confdefs.h <<\EOF
5229#define __CHAR_UNSIGNED__ 1
5230EOF
5231
5232fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005233
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005234echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005235echo "configure:5236: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005236if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005237 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005238else
5239 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005240#line 5241 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005241#include "confdefs.h"
5242
Guido van Rossumf78abae1997-01-21 22:02:36 +00005243int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005244
5245/* Ultrix mips cc rejects this. */
Guido van Rossumca563f22001-01-23 01:52:44 +00005246typedef int charset[2]; const charset x;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005247/* SunOS 4.1.1 cc rejects this. */
5248char const *const *ccp;
5249char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005250/* NEC SVR4.0.2 mips cc rejects this. */
5251struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005252static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005253/* AIX XL C 1.02.0.0 rejects this.
5254 It does not let you subtract one const X* pointer from another in an arm
5255 of an if-expression whose if-part is not a constant expression */
5256const char *g = "string";
5257ccp = &g + (g ? g-g : 0);
5258/* HPUX 7.0 cc rejects these. */
5259++ccp;
5260p = (char**) ccp;
5261ccp = (char const *const *) p;
5262{ /* SCO 3.2v4 cc rejects this. */
5263 char *t;
5264 char const *s = 0 ? (char *) 0 : (char const *) 0;
5265
5266 *t++ = 0;
5267}
5268{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005269 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005270 const int *foo = &x[0];
5271 ++foo;
5272}
5273{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5274 typedef const int *iptr;
5275 iptr p = 0;
5276 ++p;
5277}
5278{ /* AIX XL C 1.02.0.0 rejects this saying
5279 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5280 struct s { int j; const int *ap[3]; };
5281 struct s *b; b->j = 5;
5282}
5283{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5284 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005285}
5286
5287; return 0; }
5288EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005289if { (eval echo configure:5290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005290 rm -rf conftest*
5291 ac_cv_c_const=yes
5292else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005293 echo "configure: failed program was:" >&5
5294 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005295 rm -rf conftest*
5296 ac_cv_c_const=no
5297fi
5298rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005299fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005300
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005301echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005302if test $ac_cv_c_const = no; then
5303 cat >> confdefs.h <<\EOF
5304#define const
5305EOF
5306
5307fi
5308
5309
Guido van Rossumda88dad1995-01-26 00:46:29 +00005310works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005311echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005312echo "configure:5313: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005313cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005314#line 5315 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005315#include "confdefs.h"
5316
Guido van Rossumf78abae1997-01-21 22:02:36 +00005317int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005318volatile int x; x = 0;
5319; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005320EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005321if { (eval echo configure:5322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005322 rm -rf conftest*
5323 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005324else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005325 echo "configure: failed program was:" >&5
5326 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005327 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005328 cat >> confdefs.h <<\EOF
5329#define volatile
5330EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005331
5332fi
5333rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005334echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005335
Guido van Rossumda88dad1995-01-26 00:46:29 +00005336works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005337echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005338echo "configure:5339: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005339cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005340#line 5341 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005341#include "confdefs.h"
5342
Guido van Rossumf78abae1997-01-21 22:02:36 +00005343int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005344signed char c;
5345; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005346EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005347if { (eval echo configure:5348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005348 rm -rf conftest*
5349 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005350else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005351 echo "configure: failed program was:" >&5
5352 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005353 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005354 cat >> confdefs.h <<\EOF
5355#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00005356EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005357
5358fi
5359rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005360echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005361
Guido van Rossumda88dad1995-01-26 00:46:29 +00005362have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005363echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005364echo "configure:5365: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005365cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005366#line 5367 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005367#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005368int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005369int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005370return foo(10);
5371; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005372EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005373if { (eval echo configure:5374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005374 rm -rf conftest*
5375 cat >> confdefs.h <<\EOF
5376#define HAVE_PROTOTYPES 1
5377EOF
5378 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005379else
5380 echo "configure: failed program was:" >&5
5381 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005382fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005383rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005384echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005385
Guido van Rossumda88dad1995-01-26 00:46:29 +00005386works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005387echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005388echo "configure:5389: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005389cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005390#line 5391 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005391#include "confdefs.h"
5392
5393#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00005394int foo(int x, ...) {
5395 va_list va;
5396 va_start(va, x);
5397 va_arg(va, int);
5398 va_arg(va, char *);
5399 va_arg(va, double);
5400 return 0;
5401}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005402
Guido van Rossumf78abae1997-01-21 22:02:36 +00005403int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005404return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005405; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005406EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005407if { (eval echo configure:5408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005408 rm -rf conftest*
5409 cat >> confdefs.h <<\EOF
5410#define HAVE_STDARG_PROTOTYPES 1
5411EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005412 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005413else
5414 echo "configure: failed program was:" >&5
5415 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005416fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005417rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005418echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005419
Guido van Rossumda88dad1995-01-26 00:46:29 +00005420if test "$have_prototypes" = yes; then
5421bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005422echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005423echo "configure:5424: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005424cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005425#line 5426 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005426#include "confdefs.h"
5427#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005428int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005429char **t;execve("@",t,t);
5430; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005431EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005432if { (eval echo configure:5433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005433 :
5434else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005435 echo "configure: failed program was:" >&5
5436 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005437 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005438 cat >> confdefs.h <<\EOF
5439#define BAD_EXEC_PROTOTYPES 1
5440EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005441 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005442fi
5443rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005444echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005445fi
5446
Guido van Rossumda88dad1995-01-26 00:46:29 +00005447bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005448echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005449echo "configure:5450: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005450if test "$cross_compiling" = yes; then
5451 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5452else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005453 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005454#line 5455 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005455#include "confdefs.h"
5456
5457struct s { int a; int b; };
5458static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005459int foobar() {
5460 static int random;
5461 random = (int) &foo;
5462 return random;
5463}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005464static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005465main() {
5466 exit(!((int)&foo == foobar()));
5467}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005468
5469EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005470if { (eval echo configure:5471: \"$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 +00005471then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005472 :
5473else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005474 echo "configure: failed program was:" >&5
5475 cat conftest.$ac_ext >&5
5476 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005477 cat >> confdefs.h <<\EOF
5478#define BAD_STATIC_FORWARD 1
5479EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005480 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005481fi
5482rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005483fi
5484
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005485echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005486
Guido van Rossumda88dad1995-01-26 00:46:29 +00005487va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005488echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005489echo "configure:5490: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005490cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005491#line 5492 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005492#include "confdefs.h"
5493
5494#ifdef HAVE_STDARG_PROTOTYPES
5495#include <stdarg.h>
5496#else
5497#include <varargs.h>
5498#endif
5499
Guido van Rossumf78abae1997-01-21 22:02:36 +00005500int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005501va_list list1, list2; list1 = list2;
5502; return 0; }
5503EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005504if { (eval echo configure:5505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005505 :
5506else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005507 echo "configure: failed program was:" >&5
5508 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005509 rm -rf conftest*
5510 cat >> confdefs.h <<\EOF
5511#define VA_LIST_IS_ARRAY 1
5512EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005513 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005514fi
5515rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005516echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005517
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005518# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5519echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005520echo "configure:5521: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005521if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005522 echo $ac_n "(cached) $ac_c" 1>&6
5523else
5524 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005525#line 5526 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005526#include "confdefs.h"
5527/* System header to define __stub macros and hopefully few prototypes,
5528 which can conflict with char gethostbyname_r(); below. */
5529#include <assert.h>
5530/* Override any gcc2 internal prototype to avoid an error. */
5531/* We use char because int might match the return type of a gcc2
5532 builtin and then its argument prototype would still apply. */
5533char gethostbyname_r();
5534
5535int main() {
5536
5537/* The GNU C library defines this for functions which it implements
5538 to always fail with ENOSYS. Some functions are actually named
5539 something starting with __ and the normal name is an alias. */
5540#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5541choke me
5542#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005543gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005544#endif
5545
5546; return 0; }
5547EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005548if { (eval echo configure:5549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005549 rm -rf conftest*
5550 eval "ac_cv_func_gethostbyname_r=yes"
5551else
5552 echo "configure: failed program was:" >&5
5553 cat conftest.$ac_ext >&5
5554 rm -rf conftest*
5555 eval "ac_cv_func_gethostbyname_r=no"
5556fi
5557rm -f conftest*
5558fi
5559
5560if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5561 echo "$ac_t""yes" 1>&6
5562
5563 cat >> confdefs.h <<\EOF
5564#define HAVE_GETHOSTBYNAME_R 1
5565EOF
5566
5567 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005568echo "configure:5569: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005569 OLD_CFLAGS=$CFLAGS
5570 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
5571 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005572#line 5573 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005573#include "confdefs.h"
5574
5575# include <netdb.h>
5576
5577int main() {
5578
5579 char *name;
5580 struct hostent *he, *res;
5581 char buffer[2048];
5582 int buflen = 2048;
5583 int h_errnop;
5584
5585 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
5586
5587; return 0; }
5588EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005589if { (eval echo configure:5590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005590 rm -rf conftest*
5591
5592 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005593#define HAVE_GETHOSTBYNAME_R 1
5594EOF
5595
5596 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005597#define HAVE_GETHOSTBYNAME_R_6_ARG 1
5598EOF
5599
5600 echo "$ac_t""yes" 1>&6
5601
5602else
5603 echo "configure: failed program was:" >&5
5604 cat conftest.$ac_ext >&5
5605 rm -rf conftest*
5606
5607 echo "$ac_t""no" 1>&6
5608 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005609echo "configure:5610: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005610 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005611#line 5612 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005612#include "confdefs.h"
5613
5614# include <netdb.h>
5615
5616int main() {
5617
5618 char *name;
5619 struct hostent *he;
5620 char buffer[2048];
5621 int buflen = 2048;
5622 int h_errnop;
5623
5624 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
5625
5626; return 0; }
5627EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005628if { (eval echo configure:5629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005629 rm -rf conftest*
5630
5631 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005632#define HAVE_GETHOSTBYNAME_R 1
5633EOF
5634
5635 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005636#define HAVE_GETHOSTBYNAME_R_5_ARG 1
5637EOF
5638
5639 echo "$ac_t""yes" 1>&6
5640
5641else
5642 echo "configure: failed program was:" >&5
5643 cat conftest.$ac_ext >&5
5644 rm -rf conftest*
5645
5646 echo "$ac_t""no" 1>&6
5647 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005648echo "configure:5649: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005649 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005650#line 5651 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005651#include "confdefs.h"
5652
5653# include <netdb.h>
5654
5655int main() {
5656
5657 char *name;
5658 struct hostent *he;
5659 struct hostent_data data;
5660
5661 (void) gethostbyname_r(name, he, &data);
5662
5663; return 0; }
5664EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005665if { (eval echo configure:5666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005666 rm -rf conftest*
5667
5668 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005669#define HAVE_GETHOSTBYNAME_R 1
5670EOF
5671
5672 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005673#define HAVE_GETHOSTBYNAME_R_3_ARG 1
5674EOF
5675
5676 echo "$ac_t""yes" 1>&6
5677
5678else
5679 echo "configure: failed program was:" >&5
5680 cat conftest.$ac_ext >&5
5681 rm -rf conftest*
5682
5683 echo "$ac_t""no" 1>&6
5684
5685fi
5686rm -f conftest*
5687
5688fi
5689rm -f conftest*
5690
5691fi
5692rm -f conftest*
5693 CFLAGS=$OLD_CFLAGS
5694
5695else
5696 echo "$ac_t""no" 1>&6
5697
Thomas Wouters3a584202000-08-05 23:28:51 +00005698 for ac_func in gethostbyname
5699do
5700echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005701echo "configure:5702: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005702if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005703 echo $ac_n "(cached) $ac_c" 1>&6
5704else
5705 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005706#line 5707 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005707#include "confdefs.h"
5708/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005709 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005710#include <assert.h>
5711/* Override any gcc2 internal prototype to avoid an error. */
5712/* We use char because int might match the return type of a gcc2
5713 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005714char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005715
5716int main() {
5717
5718/* The GNU C library defines this for functions which it implements
5719 to always fail with ENOSYS. Some functions are actually named
5720 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005721#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005722choke me
5723#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005724$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005725#endif
5726
5727; return 0; }
5728EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005729if { (eval echo configure:5730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005730 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005731 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005732else
5733 echo "configure: failed program was:" >&5
5734 cat conftest.$ac_ext >&5
5735 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005736 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005737fi
5738rm -f conftest*
5739fi
5740
Thomas Wouters3a584202000-08-05 23:28:51 +00005741if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005742 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005743 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5744 cat >> confdefs.h <<EOF
5745#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005746EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00005747
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005748else
5749 echo "$ac_t""no" 1>&6
5750fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005751done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005752
5753
5754fi
5755
5756
5757
5758
5759
5760
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005761
Guido van Rossum627b2d71993-12-24 10:39:16 +00005762# checks for system services
5763# (none yet)
5764
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005765# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005766echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005767echo "configure:5768: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005768if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005769 echo $ac_n "(cached) $ac_c" 1>&6
5770else
5771 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005772#line 5773 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005773#include "confdefs.h"
5774/* System header to define __stub macros and hopefully few prototypes,
5775 which can conflict with char __fpu_control(); below. */
5776#include <assert.h>
5777/* Override any gcc2 internal prototype to avoid an error. */
5778/* We use char because int might match the return type of a gcc2
5779 builtin and then its argument prototype would still apply. */
5780char __fpu_control();
5781
5782int main() {
5783
5784/* The GNU C library defines this for functions which it implements
5785 to always fail with ENOSYS. Some functions are actually named
5786 something starting with __ and the normal name is an alias. */
5787#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5788choke me
5789#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005790__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005791#endif
5792
5793; return 0; }
5794EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005795if { (eval echo configure:5796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005796 rm -rf conftest*
5797 eval "ac_cv_func___fpu_control=yes"
5798else
5799 echo "configure: failed program was:" >&5
5800 cat conftest.$ac_ext >&5
5801 rm -rf conftest*
5802 eval "ac_cv_func___fpu_control=no"
5803fi
5804rm -f conftest*
5805fi
5806
5807if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5808 echo "$ac_t""yes" 1>&6
5809 :
5810else
5811 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005812echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005813echo "configure:5814: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005814ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005815if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005816 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005817else
5818 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005819LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005820cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005821#line 5822 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005822#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005823/* Override any gcc2 internal prototype to avoid an error. */
5824/* We use char because int might match the return type of a gcc2
5825 builtin and then its argument prototype would still apply. */
5826char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005827
Guido van Rossumf78abae1997-01-21 22:02:36 +00005828int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005829__fpu_control()
5830; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005831EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005832if { (eval echo configure:5833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005833 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005834 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005835else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005836 echo "configure: failed program was:" >&5
5837 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005838 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005839 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005840fi
5841rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005842LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005843
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005844fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005845if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005846 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005847 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5848 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005849 cat >> confdefs.h <<EOF
5850#define $ac_tr_lib 1
5851EOF
5852
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005853 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005854
5855else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005856 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005857fi
5858
5859
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005860fi
5861
5862
Guido van Rossum7f253911997-05-09 02:42:48 +00005863# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005864echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005865echo "configure:5866: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005866# Check whether --with-fpectl or --without-fpectl was given.
5867if test "${with_fpectl+set}" = set; then
5868 withval="$with_fpectl"
5869
5870if test "$withval" != no
5871then cat >> confdefs.h <<\EOF
5872#define WANT_SIGFPE_HANDLER 1
5873EOF
5874 echo "$ac_t""yes" 1>&6
5875else echo "$ac_t""no" 1>&6
5876fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005877else
5878 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005879fi
5880
5881
Guido van Rossum7f43da71994-08-01 12:15:30 +00005882# check for --with-libm=...
5883
Guido van Rossum563e7081996-09-10 18:20:48 +00005884case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00005885Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005886next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005887BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005888*) LIBM=-lm
5889esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005890echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005891echo "configure:5892: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005892# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005893if test "${with_libm+set}" = set; then
5894 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005895
Guido van Rossum7f253911997-05-09 02:42:48 +00005896if test "$withval" = no
5897then LIBM=
5898 echo "$ac_t""force LIBM empty" 1>&6
5899elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005900then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005901 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005902else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005903fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005904else
5905 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005906fi
5907
5908
5909# check for --with-libc=...
5910
Guido van Rossum7f253911997-05-09 02:42:48 +00005911echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005912echo "configure:5913: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005913# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005914if test "${with_libc+set}" = set; then
5915 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005916
Guido van Rossum7f253911997-05-09 02:42:48 +00005917if test "$withval" = no
5918then LIBC=
5919 echo "$ac_t""force LIBC empty" 1>&6
5920elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005921then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005922 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005923else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005924fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005925else
5926 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005927fi
5928
5929
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005930# check for --with-check-import-case
5931# Check whether --with-check-import-case or --without-check-import-case was given.
5932if test "${with_check_import_case+set}" = set; then
5933 withval="$with_check_import_case"
5934 :
5935fi
5936
5937echo $ac_n "checking for --with-check-import-case""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005938echo "configure:5939: checking for --with-check-import-case" >&5
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005939if test "$with_check_import_case"
5940then
5941 cat >> confdefs.h <<\EOF
5942#define CHECK_IMPORT_CASE 1
5943EOF
5944
5945 echo "$ac_t""yes" 1>&6
5946else
5947 echo "$ac_t""no" 1>&6
5948fi
5949
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005950# check for hypot() in math library
5951LIBS_SAVE=$LIBS
5952LIBS="$LIBS $LIBM"
5953for ac_func in hypot
5954do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005955echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00005956echo "configure:5957: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005957if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005958 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005959else
5960 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005961#line 5962 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005962#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005963/* System header to define __stub macros and hopefully few prototypes,
5964 which can conflict with char $ac_func(); below. */
5965#include <assert.h>
5966/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005967/* We use char because int might match the return type of a gcc2
5968 builtin and then its argument prototype would still apply. */
5969char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005970
Guido van Rossumf78abae1997-01-21 22:02:36 +00005971int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005972
5973/* The GNU C library defines this for functions which it implements
5974 to always fail with ENOSYS. Some functions are actually named
5975 something starting with __ and the normal name is an alias. */
5976#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5977choke me
5978#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005979$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005980#endif
5981
5982; return 0; }
5983EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00005984if { (eval echo configure:5985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005985 rm -rf conftest*
5986 eval "ac_cv_func_$ac_func=yes"
5987else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005988 echo "configure: failed program was:" >&5
5989 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005990 rm -rf conftest*
5991 eval "ac_cv_func_$ac_func=no"
5992fi
5993rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005994fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005995
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005996if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5997 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005998 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5999 cat >> confdefs.h <<EOF
6000#define $ac_tr_func 1
6001EOF
6002
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006003else
6004 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006005LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006006fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006007done
6008
Guido van Rossumf78abae1997-01-21 22:02:36 +00006009
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006010LIBS=$LIBS_SAVE
6011
Guido van Rossumad713701997-07-10 22:42:38 +00006012# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00006013echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00006014echo "configure:6015: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006015if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00006016 echo $ac_n "(cached) $ac_c" 1>&6
6017else
6018 if test "$cross_compiling" = yes; then
6019 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6020else
6021 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00006022#line 6023 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006023#include "confdefs.h"
6024#include <stdio.h>
6025#ifdef HAVE_STDLIB
6026#include <stdlib.h>
6027#else
6028char *malloc(), *realloc();
6029int *free();
6030#endif
6031main() {
6032 char *p;
6033 p = malloc(0);
6034 if (p == NULL) exit(1);
6035 p = realloc(p, 0);
6036 if (p == NULL) exit(1);
6037 free(p);
6038 exit(0);
6039}
6040EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00006041if { (eval echo configure:6042: \"$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 +00006042then
6043 ac_cv_malloc_zero=nonnull
6044else
6045 echo "configure: failed program was:" >&5
6046 cat conftest.$ac_ext >&5
6047 rm -fr conftest*
6048 ac_cv_malloc_zero=null
6049fi
6050rm -fr conftest*
6051fi
6052
6053fi
6054
6055echo "$ac_t""$ac_cv_malloc_zero" 1>&6
6056if test "$ac_cv_malloc_zero" = null
6057then
6058 cat >> confdefs.h <<\EOF
6059#define MALLOC_ZERO_RETURNS_NULL 1
6060EOF
6061
6062fi
6063
Guido van Rossumef2255b2000-03-10 22:30:29 +00006064# check for wchar.h
6065ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6066echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00006067echo "configure:6068: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006068if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006069 echo $ac_n "(cached) $ac_c" 1>&6
6070else
6071 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00006072#line 6073 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006073#include "confdefs.h"
6074#include <wchar.h>
6075EOF
6076ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumca563f22001-01-23 01:52:44 +00006077{ (eval echo configure:6078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006078ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6079if test -z "$ac_err"; then
6080 rm -rf conftest*
6081 eval "ac_cv_header_$ac_safe=yes"
6082else
6083 echo "$ac_err" >&5
6084 echo "configure: failed program was:" >&5
6085 cat conftest.$ac_ext >&5
6086 rm -rf conftest*
6087 eval "ac_cv_header_$ac_safe=no"
6088fi
6089rm -f conftest*
6090fi
6091if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6092 echo "$ac_t""yes" 1>&6
6093 cat >> confdefs.h <<\EOF
6094#define HAVE_WCHAR_H 1
6095EOF
6096 wchar_h="yes"
6097else
6098 echo "$ac_t""no" 1>&6
6099wchar_h="no"
6100
6101fi
6102
6103
6104# check for usable wchar_t
6105usable_wchar_t="unkown"
6106echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00006107echo "configure:6108: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00006108if test "$cross_compiling" = yes; then
6109 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6110else
6111 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00006112#line 6113 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006113#include "confdefs.h"
6114
6115#include "wchar.h"
6116#include "wctype.h"
6117main() {
6118 wchar_t s;
6119 if (sizeof(s) == 2)
6120 exit(0);
6121 else
6122 exit(1);
6123}
6124
6125EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00006126if { (eval echo configure:6127: \"$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 +00006127then
6128 cat >> confdefs.h <<\EOF
6129#define HAVE_USABLE_WCHAR_T 1
6130EOF
6131 usable_wchar_t="yes"
6132else
6133 echo "configure: failed program was:" >&5
6134 cat conftest.$ac_ext >&5
6135 rm -fr conftest*
6136 usable_wchar_t="no"
6137fi
6138rm -fr conftest*
6139fi
6140
6141echo "$ac_t""$usable_wchar_t" 1>&6
6142
6143# check for endianness
6144echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00006145echo "configure:6146: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006146if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006147 echo $ac_n "(cached) $ac_c" 1>&6
6148else
6149 ac_cv_c_bigendian=unknown
6150# See if sys/param.h defines the BYTE_ORDER macro.
6151cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00006152#line 6153 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006153#include "confdefs.h"
6154#include <sys/types.h>
6155#include <sys/param.h>
6156int main() {
6157
6158#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6159 bogus endian macros
6160#endif
6161; return 0; }
6162EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00006163if { (eval echo configure:6164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006164 rm -rf conftest*
6165 # It does; now see whether it defined to BIG_ENDIAN or not.
6166cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00006167#line 6168 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006168#include "confdefs.h"
6169#include <sys/types.h>
6170#include <sys/param.h>
6171int main() {
6172
6173#if BYTE_ORDER != BIG_ENDIAN
6174 not big endian
6175#endif
6176; return 0; }
6177EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00006178if { (eval echo configure:6179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006179 rm -rf conftest*
6180 ac_cv_c_bigendian=yes
6181else
6182 echo "configure: failed program was:" >&5
6183 cat conftest.$ac_ext >&5
6184 rm -rf conftest*
6185 ac_cv_c_bigendian=no
6186fi
6187rm -f conftest*
6188else
6189 echo "configure: failed program was:" >&5
6190 cat conftest.$ac_ext >&5
6191fi
6192rm -f conftest*
6193if test $ac_cv_c_bigendian = unknown; then
6194if test "$cross_compiling" = yes; then
6195 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6196else
6197 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00006198#line 6199 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006199#include "confdefs.h"
6200main () {
6201 /* Are we little or big endian? From Harbison&Steele. */
6202 union
6203 {
6204 long l;
6205 char c[sizeof (long)];
6206 } u;
6207 u.l = 1;
6208 exit (u.c[sizeof (long) - 1] == 1);
6209}
6210EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00006211if { (eval echo configure:6212: \"$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 +00006212then
6213 ac_cv_c_bigendian=no
6214else
6215 echo "configure: failed program was:" >&5
6216 cat conftest.$ac_ext >&5
6217 rm -fr conftest*
6218 ac_cv_c_bigendian=yes
6219fi
6220rm -fr conftest*
6221fi
6222
6223fi
6224fi
6225
6226echo "$ac_t""$ac_cv_c_bigendian" 1>&6
6227if test $ac_cv_c_bigendian = yes; then
6228 cat >> confdefs.h <<\EOF
6229#define WORDS_BIGENDIAN 1
6230EOF
6231
6232fi
6233
6234
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006235# Check whether right shifting a negative integer extends the sign bit
6236# or fills with zeros (like the Cray J90, according to Tim Peters).
6237echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00006238echo "configure:6239: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006239if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00006240 echo $ac_n "(cached) $ac_c" 1>&6
6241else
6242
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006243if test "$cross_compiling" = yes; then
6244 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6245else
6246 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00006247#line 6248 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006248#include "confdefs.h"
6249
6250int main()
6251{
Vladimir Marangozova6180282000-07-12 05:05:06 +00006252 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006253}
6254
6255EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00006256if { (eval echo configure:6257: \"$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 +00006257then
6258 ac_cv_rshift_extends_sign=yes
6259else
6260 echo "configure: failed program was:" >&5
6261 cat conftest.$ac_ext >&5
6262 rm -fr conftest*
6263 ac_cv_rshift_extends_sign=no
6264fi
6265rm -fr conftest*
6266fi
6267
6268fi
6269
6270echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
6271if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006272then
6273 cat >> confdefs.h <<\EOF
6274#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
6275EOF
6276
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006277fi
6278
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006279# check for getc_unlocked and related locking functions
6280echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00006281echo "configure:6282: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006282if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
6283 echo $ac_n "(cached) $ac_c" 1>&6
6284else
6285
6286cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00006287#line 6288 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006288#include "confdefs.h"
6289#include <stdio.h>
6290int main() {
6291
6292 FILE *f = fopen("/dev/null", "r");
6293 flockfile(f);
6294 getc_unlocked(f);
6295 funlockfile(f);
6296
6297; return 0; }
6298EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00006299if { (eval echo configure:6300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006300 rm -rf conftest*
6301 ac_cv_have_getc_unlocked=yes
6302else
6303 echo "configure: failed program was:" >&5
6304 cat conftest.$ac_ext >&5
6305 rm -rf conftest*
6306 ac_cv_have_getc_unlocked=no
6307fi
6308rm -f conftest*
6309fi
6310
6311echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
6312if test "$ac_cv_have_getc_unlocked" = yes
6313then
6314 cat >> confdefs.h <<\EOF
6315#define HAVE_GETC_UNLOCKED 1
6316EOF
6317
6318fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006319
Guido van Rossum95713eb2000-05-18 20:53:31 +00006320# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
6321# Add sys/socket.h to confdefs.h
6322cat >> confdefs.h <<\EOF
6323#ifdef HAVE_SYS_SOCKET_H
6324#include <sys/socket.h>
6325#endif
6326EOF
6327echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00006328echo "configure:6329: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006329if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00006330 echo $ac_n "(cached) $ac_c" 1>&6
6331else
6332 cat > conftest.$ac_ext <<EOF
Guido van Rossumca563f22001-01-23 01:52:44 +00006333#line 6334 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00006334#include "confdefs.h"
6335#include <sys/types.h>
6336#if STDC_HEADERS
6337#include <stdlib.h>
6338#include <stddef.h>
6339#endif
6340EOF
6341if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6342 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6343 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006344 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00006345else
6346 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006347 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00006348fi
6349rm -f conftest*
6350
6351fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006352echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
6353if test $ac_cv_type_socklen_t = no; then
6354 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00006355#define socklen_t int
6356EOF
6357
6358fi
6359
6360
Fred Drake036144d2000-10-26 17:09:35 +00006361echo $ac_n "checking for Modules/Setup""... $ac_c" 1>&6
Guido van Rossumca563f22001-01-23 01:52:44 +00006362echo "configure:6363: checking for Modules/Setup" >&5
Fred Drake036144d2000-10-26 17:09:35 +00006363if test ! -f Modules/Setup ; then
Guido van Rossum262cf202000-11-02 19:33:53 +00006364 if test ! -d Modules ; then
6365 mkdir Modules
6366 fi
Fred Drake036144d2000-10-26 17:09:35 +00006367 cp "$srcdir/Modules/Setup.dist" Modules/Setup
6368 echo "$ac_t""creating" 1>&6
6369else
6370 echo "$ac_t""already exists" 1>&6
6371fi
6372
Guido van Rossum627b2d71993-12-24 10:39:16 +00006373# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006374trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006375cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006376# This file is a shell script that caches the results of configure
6377# tests run on this system so they can be shared between configure
6378# scripts and configure runs. It is not useful on other systems.
6379# If it contains results you don't want to keep, you may remove or edit it.
6380#
6381# By default, configure uses ./config.cache as the cache file,
6382# creating it if it does not exist already. You can give configure
6383# the --cache-file=FILE option to use a different cache file; that is
6384# what configure does when it calls configure scripts in
6385# subdirectories, so they share the cache.
6386# Giving --cache-file=/dev/null disables caching, for debugging configure.
6387# config.status only pays attention to the cache file if you give it the
6388# --recheck option to rerun configure.
6389#
6390EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006391# The following way of writing the cache mishandles newlines in values,
6392# but we know of no workaround that is simple, portable, and efficient.
6393# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006394# Ultrix sh set writes to stderr and can't be redirected directly,
6395# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006396(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006397 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006398 *ac_space=\ *)
6399 # `set' does not quote correctly, so add quotes (double-quote substitution
6400 # turns \\\\ into \\, and sed turns \\ into \).
6401 sed -n \
6402 -e "s/'/'\\\\''/g" \
6403 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6404 ;;
6405 *)
6406 # `set' quotes correctly as required by POSIX, so do not add quotes.
6407 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6408 ;;
6409 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006410if cmp -s $cache_file confcache; then
6411 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006412else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006413 if test -w $cache_file; then
6414 echo "updating cache $cache_file"
6415 cat confcache > $cache_file
6416 else
6417 echo "not updating unwritable cache $cache_file"
6418 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006419fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006420rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00006421
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006422trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006423
6424test "x$prefix" = xNONE && prefix=$ac_default_prefix
6425# Let make expand exec_prefix.
6426test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00006427
Guido van Rossum7f43da71994-08-01 12:15:30 +00006428# Any assignment to VPATH causes Sun make to only execute
6429# the first set of double-colon rules, so remove it if not needed.
6430# If there is a colon in the path, we need to keep it.
6431if test "x$srcdir" = x.; then
6432 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6433fi
6434
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006435trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00006436
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006437DEFS=-DHAVE_CONFIG_H
6438
6439# Without the "./", some shells look in PATH for config.status.
6440: ${CONFIG_STATUS=./config.status}
6441
6442echo creating $CONFIG_STATUS
6443rm -f $CONFIG_STATUS
6444cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006445#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00006446# Generated automatically by configure.
6447# Run this file to recreate the current configuration.
6448# This directory was configured as follows,
6449# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6450#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006451# $0 $ac_configure_args
6452#
6453# Compiler output produced by configure, useful for debugging
6454# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00006455
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006456ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006457for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00006458do
Guido van Rossum7f43da71994-08-01 12:15:30 +00006459 case "\$ac_option" in
6460 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006461 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6462 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00006463 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006464 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006465 exit 0 ;;
6466 -help | --help | --hel | --he | --h)
6467 echo "\$ac_cs_usage"; exit 0 ;;
6468 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006469 esac
6470done
6471
Guido van Rossum7f43da71994-08-01 12:15:30 +00006472ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00006473
Andrew M. Kuchlingb226b0c2001-01-17 15:24:57 +00006474trap 'rm -fr `echo "Makefile setup.cfg \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006475 Objects/Makefile \
6476 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006477 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006478 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006479 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006480 Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006481EOF
6482cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006483
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006484# Protect against being on the right side of a sed subst in config.status.
6485sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6486 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006487$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00006488$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006489s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006490s%@CFLAGS@%$CFLAGS%g
6491s%@CPPFLAGS@%$CPPFLAGS%g
6492s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006493s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006494s%@DEFS@%$DEFS%g
6495s%@LDFLAGS@%$LDFLAGS%g
6496s%@LIBS@%$LIBS%g
6497s%@exec_prefix@%$exec_prefix%g
6498s%@prefix@%$prefix%g
6499s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006500s%@bindir@%$bindir%g
6501s%@sbindir@%$sbindir%g
6502s%@libexecdir@%$libexecdir%g
6503s%@datadir@%$datadir%g
6504s%@sysconfdir@%$sysconfdir%g
6505s%@sharedstatedir@%$sharedstatedir%g
6506s%@localstatedir@%$localstatedir%g
6507s%@libdir@%$libdir%g
6508s%@includedir@%$includedir%g
6509s%@oldincludedir@%$oldincludedir%g
6510s%@infodir@%$infodir%g
6511s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00006512s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006513s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00006514s%@SGI_ABI@%$SGI_ABI%g
Martin v. Löwis22352952000-12-13 17:37:02 +00006515s%@CXX@%$CXX%g
Guido van Rossumca563f22001-01-23 01:52:44 +00006516s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006517s%@CC@%$CC%g
Guido van Rossumff555e32000-09-22 15:38:21 +00006518s%@EXE@%$EXE%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006519s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
6520s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumca563f22001-01-23 01:52:44 +00006521s%@DLLLIBRARY@%$DLLLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00006522s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006523s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006524s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006525s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006526s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6527s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006528s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006529s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006530s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006531s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006532s%@SO@%$SO%g
6533s%@LDSHARED@%$LDSHARED%g
6534s%@CCSHARED@%$CCSHARED%g
6535s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum3d15bd82001-01-10 18:53:48 +00006536s%@USE_NCURSES_MODULE@%$USE_NCURSES_MODULE%g
6537s%@USE_READLINE_MODULE@%$USE_READLINE_MODULE%g
Eric S. Raymonda8885402001-01-17 08:25:11 +00006538s%@USE_GDBM_MODULE@%$USE_GDBM_MODULE%g
6539s%@HAVE_LIBGDBM@%$HAVE_LIBGDBM%g
6540s%@USE_NDBM_MODULE@%$USE_NDBM_MODULE%g
6541s%@HAVE_LIBNDBM@%$HAVE_LIBNDBM%g
6542s%@USE_CRYPT_MODULE@%$USE_CRYPT_MODULE%g
6543s%@HAVE_LIBCRYPT@%$HAVE_LIBCRYPT%g
Guido van Rossum009f7871997-12-04 00:51:42 +00006544s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00006545s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00006546s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Barry Warsawa57b89b2001-01-15 17:07:21 +00006547s%@USE_DBM_MODULE@%$USE_DBM_MODULE%g
Fred Drakea50d6ec2000-08-31 16:13:20 +00006548s%@USE_BSDDB_MODULE@%$USE_BSDDB_MODULE%g
Skip Montanaroed33c9a2000-09-08 02:17:15 +00006549s%@HAVE_LIBDB@%$HAVE_LIBDB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006550s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00006551s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006552s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006553s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
6554s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
6555s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006556s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006557s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006558s%@LIBM@%$LIBM%g
6559s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006560
6561CEOF
6562EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006563
6564cat >> $CONFIG_STATUS <<\EOF
6565
6566# Split the substitutions into bite-sized pieces for seds with
6567# small command number limits, like on Digital OSF/1 and HP-UX.
6568ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6569ac_file=1 # Number of current file.
6570ac_beg=1 # First line for current file.
6571ac_end=$ac_max_sed_cmds # Line after last line for current file.
6572ac_more_lines=:
6573ac_sed_cmds=""
6574while $ac_more_lines; do
6575 if test $ac_beg -gt 1; then
6576 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6577 else
6578 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6579 fi
6580 if test ! -s conftest.s$ac_file; then
6581 ac_more_lines=false
6582 rm -f conftest.s$ac_file
6583 else
6584 if test -z "$ac_sed_cmds"; then
6585 ac_sed_cmds="sed -f conftest.s$ac_file"
6586 else
6587 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6588 fi
6589 ac_file=`expr $ac_file + 1`
6590 ac_beg=$ac_end
6591 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6592 fi
6593done
6594if test -z "$ac_sed_cmds"; then
6595 ac_sed_cmds=cat
6596fi
6597EOF
6598
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006599cat >> $CONFIG_STATUS <<EOF
6600
Andrew M. Kuchlingb226b0c2001-01-17 15:24:57 +00006601CONFIG_FILES=\${CONFIG_FILES-"Makefile setup.cfg \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006602 Objects/Makefile \
6603 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006604 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006605 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006606 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006607 Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006608EOF
6609cat >> $CONFIG_STATUS <<\EOF
6610for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006611 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006612 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006613 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006614 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6615 *) ac_file_in="${ac_file}.in" ;;
6616 esac
6617
Guido van Rossumf78abae1997-01-21 22:02:36 +00006618 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006619
6620 # Remove last slash and all that follows it. Not all systems have dirname.
6621 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6622 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6623 # The file is in a subdirectory.
6624 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006625 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006626 # A "../" for each directory in $ac_dir_suffix.
6627 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6628 else
6629 ac_dir_suffix= ac_dots=
6630 fi
6631
6632 case "$ac_given_srcdir" in
6633 .) srcdir=.
6634 if test -z "$ac_dots"; then top_srcdir=.
6635 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6636 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6637 *) # Relative path.
6638 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6639 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6640 esac
6641
Guido van Rossumf78abae1997-01-21 22:02:36 +00006642
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006643 echo creating "$ac_file"
6644 rm -f "$ac_file"
6645 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6646 case "$ac_file" in
6647 *Makefile*) ac_comsub="1i\\
6648# $configure_input" ;;
6649 *) ac_comsub= ;;
6650 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006651
6652 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 +00006653 sed -e "$ac_comsub
6654s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006655s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006656s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00006657" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00006658fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00006659rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006660
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006661# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6662# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00006663#
6664# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006665ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6666ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006667ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006668ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006669# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006670ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6671ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006672ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006673ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006674# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006675ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6676ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006677ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006678ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006679
Guido van Rossumf78abae1997-01-21 22:02:36 +00006680if test "${CONFIG_HEADERS+set}" != set; then
6681EOF
6682cat >> $CONFIG_STATUS <<EOF
6683 CONFIG_HEADERS="config.h"
6684EOF
6685cat >> $CONFIG_STATUS <<\EOF
6686fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006687for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006688 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006689 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006690 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006691 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6692 *) ac_file_in="${ac_file}.in" ;;
6693 esac
6694
Guido van Rossum7f43da71994-08-01 12:15:30 +00006695 echo creating $ac_file
6696
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006697 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006698 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6699 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006700
6701EOF
6702
6703# Transform confdefs.h into a sed script conftest.vals that substitutes
6704# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006705# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006706# Protect against being in an unquoted here document in config.status.
6707rm -f conftest.vals
6708cat > conftest.hdr <<\EOF
6709s/[\\&%]/\\&/g
6710s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006711s%#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 +00006712s%ac_d%ac_u%gp
6713s%ac_u%ac_e%gp
6714EOF
6715sed -n -f conftest.hdr confdefs.h > conftest.vals
6716rm -f conftest.hdr
6717
6718# This sed command replaces #undef with comments. This is necessary, for
6719# example, in the case of _POSIX_SOURCE, which is predefined and required
6720# on some systems where configure will not decide to define it.
6721cat >> conftest.vals <<\EOF
6722s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6723EOF
6724
6725# Break up conftest.vals because some shells have a limit on
6726# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006727
6728rm -f conftest.tail
6729while :
6730do
6731 ac_lines=`grep -c . conftest.vals`
6732 # grep -c gives empty output for an empty file on some AIX systems.
6733 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6734 # Write a limited-size here document to conftest.frag.
6735 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6736 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6737 echo 'CEOF
6738 sed -f conftest.frag conftest.in > conftest.out
6739 rm -f conftest.in
6740 mv conftest.out conftest.in
6741' >> $CONFIG_STATUS
6742 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6743 rm -f conftest.vals
6744 mv conftest.tail conftest.vals
6745done
6746rm -f conftest.vals
6747
6748cat >> $CONFIG_STATUS <<\EOF
6749 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006750 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006751 cat conftest.in >> conftest.h
6752 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006753 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006754 echo "$ac_file is unchanged"
6755 rm -f conftest.h
6756 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006757 # Remove last slash and all that follows it. Not all systems have dirname.
6758 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6759 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6760 # The file is in a subdirectory.
6761 test ! -d "$ac_dir" && mkdir "$ac_dir"
6762 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006763 rm -f $ac_file
6764 mv conftest.h $ac_file
6765 fi
6766fi; done
6767
Guido van Rossumf78abae1997-01-21 22:02:36 +00006768EOF
6769cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006770
Guido van Rossumf78abae1997-01-21 22:02:36 +00006771EOF
6772cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006773
6774exit 0
6775EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006776chmod +x $CONFIG_STATUS
6777rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006778test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006779