blob: a6d0f1b032d48cbfd061da7b2c60a75b2174770e [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003# From configure.in Revision: 1.165
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.
Jeremy Hylton1bac6452000-09-26 16:57:37 +00006# Generated automatically using autoconf version 2.13
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000011
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# Defaults:
13ac_help=
14ac_default_prefix=/usr/local
15# Any additions from configure.in:
16ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000017 --with-next-archs='arch1 arch2 ..' build MAB binary"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000018ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000019 --with-next-framework Build (OpenStep|Rhapsody|MacOSX) framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000020ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000021 --with-dyld Use (OpenStep|Rhapsody|MacOSX) dynamic linker"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000022ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000023 --without-gcc never use gcc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000025 --with-cxx=<compiler> enable C++ support"
Guido van Rossum95012191999-12-16 17:50:52 +000026ac_help="$ac_help
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
Fred Drakea50d6ec2000-08-31 16:13:20 +000043 --with(out)-libdb disable/enable bsddb module"
44ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000045 --with-wctype-functions use wctype.h functions"
46ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000047 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000048ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000049 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000050ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000051 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000052ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000053 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000054ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000055 --with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000056
Guido van Rossum7f43da71994-08-01 12:15:30 +000057# Initialize some variables set by options.
58# The variables have the same names as the options, with
59# dashes changed to underlines.
60build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000061cache_file=./config.cache
62exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000063host=NONE
64no_create=
65nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000066no_recursion=
67prefix=NONE
68program_prefix=NONE
69program_suffix=NONE
70program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000071silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000072site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000073srcdir=
74target=NONE
75verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000076x_includes=NONE
77x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000078bindir='${exec_prefix}/bin'
79sbindir='${exec_prefix}/sbin'
80libexecdir='${exec_prefix}/libexec'
81datadir='${prefix}/share'
82sysconfdir='${prefix}/etc'
83sharedstatedir='${prefix}/com'
84localstatedir='${prefix}/var'
85libdir='${exec_prefix}/lib'
86includedir='${prefix}/include'
87oldincludedir='/usr/include'
88infodir='${prefix}/info'
89mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000090
91# Initialize some other variables.
92subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000093MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000094SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +000095# Maximum number of lines to put in a shell here document.
96ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +000097
98ac_prev=
99for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000100do
Guido van Rossum627b2d71993-12-24 10:39:16 +0000101
Guido van Rossum7f43da71994-08-01 12:15:30 +0000102 # If the previous option needs an argument, assign it.
103 if test -n "$ac_prev"; then
104 eval "$ac_prev=\$ac_option"
105 ac_prev=
106 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000107 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000108
Guido van Rossum7f43da71994-08-01 12:15:30 +0000109 case "$ac_option" in
110 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
111 *) ac_optarg= ;;
112 esac
113
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000114 # Accept the important Cygnus configure options, so we can diagnose typos.
115
Guido van Rossum7f43da71994-08-01 12:15:30 +0000116 case "$ac_option" in
117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000118 -bindir | --bindir | --bindi | --bind | --bin | --bi)
119 ac_prev=bindir ;;
120 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
121 bindir="$ac_optarg" ;;
122
123 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000124 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000125 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000126 build="$ac_optarg" ;;
127
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000128 -cache-file | --cache-file | --cache-fil | --cache-fi \
129 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
130 ac_prev=cache_file ;;
131 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
132 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
133 cache_file="$ac_optarg" ;;
134
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000135 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
136 ac_prev=datadir ;;
137 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
138 | --da=*)
139 datadir="$ac_optarg" ;;
140
Guido van Rossum7f43da71994-08-01 12:15:30 +0000141 -disable-* | --disable-*)
142 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000143 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000144 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000145 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000146 fi
147 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
148 eval "enable_${ac_feature}=no" ;;
149
150 -enable-* | --enable-*)
151 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000152 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000153 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000154 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000155 fi
156 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
157 case "$ac_option" in
158 *=*) ;;
159 *) ac_optarg=yes ;;
160 esac
161 eval "enable_${ac_feature}='$ac_optarg'" ;;
162
Guido van Rossum7f43da71994-08-01 12:15:30 +0000163 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
164 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
165 | --exec | --exe | --ex)
166 ac_prev=exec_prefix ;;
167 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
168 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
169 | --exec=* | --exe=* | --ex=*)
170 exec_prefix="$ac_optarg" ;;
171
172 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000173 # Obsolete; use --with-gas.
174 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000175
176 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000177 # Omit some internal or obsolete options to make the list less imposing.
178 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000179 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000180Usage: configure [options] [host]
181Options: [defaults in brackets after descriptions]
182Configuration:
183 --cache-file=FILE cache test results in FILE
184 --help print this message
185 --no-create do not create output files
186 --quiet, --silent do not print \`checking...' messages
187 --version print the version of autoconf that created configure
188Directory and file names:
189 --prefix=PREFIX install architecture-independent files in PREFIX
190 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000191 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000192 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000193 --bindir=DIR user executables in DIR [EPREFIX/bin]
194 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
195 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
196 --datadir=DIR read-only architecture-independent data in DIR
197 [PREFIX/share]
198 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
199 --sharedstatedir=DIR modifiable architecture-independent data in DIR
200 [PREFIX/com]
201 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
202 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
203 --includedir=DIR C header files in DIR [PREFIX/include]
204 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
205 --infodir=DIR info documentation in DIR [PREFIX/info]
206 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000207 --srcdir=DIR find the sources in DIR [configure dir or ..]
208 --program-prefix=PREFIX prepend PREFIX to installed program names
209 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000210 --program-transform-name=PROGRAM
211 run sed PROGRAM on installed program names
212EOF
213 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000214Host type:
215 --build=BUILD configure for building on BUILD [BUILD=HOST]
216 --host=HOST configure for HOST [guessed]
217 --target=TARGET configure for TARGET [TARGET=HOST]
218Features and packages:
219 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
220 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
221 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
222 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
223 --x-includes=DIR X include files are in DIR
224 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000225EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000226 if test -n "$ac_help"; then
227 echo "--enable and --with options recognized:$ac_help"
228 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000229 exit 0 ;;
230
231 -host | --host | --hos | --ho)
232 ac_prev=host ;;
233 -host=* | --host=* | --hos=* | --ho=*)
234 host="$ac_optarg" ;;
235
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000236 -includedir | --includedir | --includedi | --included | --include \
237 | --includ | --inclu | --incl | --inc)
238 ac_prev=includedir ;;
239 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
240 | --includ=* | --inclu=* | --incl=* | --inc=*)
241 includedir="$ac_optarg" ;;
242
243 -infodir | --infodir | --infodi | --infod | --info | --inf)
244 ac_prev=infodir ;;
245 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
246 infodir="$ac_optarg" ;;
247
248 -libdir | --libdir | --libdi | --libd)
249 ac_prev=libdir ;;
250 -libdir=* | --libdir=* | --libdi=* | --libd=*)
251 libdir="$ac_optarg" ;;
252
253 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
254 | --libexe | --libex | --libe)
255 ac_prev=libexecdir ;;
256 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
257 | --libexe=* | --libex=* | --libe=*)
258 libexecdir="$ac_optarg" ;;
259
260 -localstatedir | --localstatedir | --localstatedi | --localstated \
261 | --localstate | --localstat | --localsta | --localst \
262 | --locals | --local | --loca | --loc | --lo)
263 ac_prev=localstatedir ;;
264 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
265 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
266 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
267 localstatedir="$ac_optarg" ;;
268
269 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
270 ac_prev=mandir ;;
271 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
272 mandir="$ac_optarg" ;;
273
Guido van Rossum7f43da71994-08-01 12:15:30 +0000274 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000275 # Obsolete; use --without-fp.
276 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000277
278 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
279 | --no-cr | --no-c)
280 no_create=yes ;;
281
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000282 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
283 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
284 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000285
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000286 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
287 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
288 | --oldin | --oldi | --old | --ol | --o)
289 ac_prev=oldincludedir ;;
290 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
291 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
292 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
293 oldincludedir="$ac_optarg" ;;
294
Guido van Rossum7f43da71994-08-01 12:15:30 +0000295 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
296 ac_prev=prefix ;;
297 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
298 prefix="$ac_optarg" ;;
299
300 -program-prefix | --program-prefix | --program-prefi | --program-pref \
301 | --program-pre | --program-pr | --program-p)
302 ac_prev=program_prefix ;;
303 -program-prefix=* | --program-prefix=* | --program-prefi=* \
304 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
305 program_prefix="$ac_optarg" ;;
306
307 -program-suffix | --program-suffix | --program-suffi | --program-suff \
308 | --program-suf | --program-su | --program-s)
309 ac_prev=program_suffix ;;
310 -program-suffix=* | --program-suffix=* | --program-suffi=* \
311 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
312 program_suffix="$ac_optarg" ;;
313
314 -program-transform-name | --program-transform-name \
315 | --program-transform-nam | --program-transform-na \
316 | --program-transform-n | --program-transform- \
317 | --program-transform | --program-transfor \
318 | --program-transfo | --program-transf \
319 | --program-trans | --program-tran \
320 | --progr-tra | --program-tr | --program-t)
321 ac_prev=program_transform_name ;;
322 -program-transform-name=* | --program-transform-name=* \
323 | --program-transform-nam=* | --program-transform-na=* \
324 | --program-transform-n=* | --program-transform-=* \
325 | --program-transform=* | --program-transfor=* \
326 | --program-transfo=* | --program-transf=* \
327 | --program-trans=* | --program-tran=* \
328 | --progr-tra=* | --program-tr=* | --program-t=*)
329 program_transform_name="$ac_optarg" ;;
330
331 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
332 | -silent | --silent | --silen | --sile | --sil)
333 silent=yes ;;
334
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000335 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
336 ac_prev=sbindir ;;
337 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
338 | --sbi=* | --sb=*)
339 sbindir="$ac_optarg" ;;
340
341 -sharedstatedir | --sharedstatedir | --sharedstatedi \
342 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
343 | --sharedst | --shareds | --shared | --share | --shar \
344 | --sha | --sh)
345 ac_prev=sharedstatedir ;;
346 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
347 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
348 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
349 | --sha=* | --sh=*)
350 sharedstatedir="$ac_optarg" ;;
351
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000352 -site | --site | --sit)
353 ac_prev=site ;;
354 -site=* | --site=* | --sit=*)
355 site="$ac_optarg" ;;
356
Guido van Rossum7f43da71994-08-01 12:15:30 +0000357 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
358 ac_prev=srcdir ;;
359 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
360 srcdir="$ac_optarg" ;;
361
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
363 | --syscon | --sysco | --sysc | --sys | --sy)
364 ac_prev=sysconfdir ;;
365 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
366 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
367 sysconfdir="$ac_optarg" ;;
368
Guido van Rossum7f43da71994-08-01 12:15:30 +0000369 -target | --target | --targe | --targ | --tar | --ta | --t)
370 ac_prev=target ;;
371 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
372 target="$ac_optarg" ;;
373
374 -v | -verbose | --verbose | --verbos | --verbo | --verb)
375 verbose=yes ;;
376
377 -version | --version | --versio | --versi | --vers)
Jeremy Hylton1bac6452000-09-26 16:57:37 +0000378 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000379 exit 0 ;;
380
381 -with-* | --with-*)
382 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000384 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000385 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000386 fi
387 ac_package=`echo $ac_package| sed 's/-/_/g'`
388 case "$ac_option" in
389 *=*) ;;
390 *) ac_optarg=yes ;;
391 esac
392 eval "with_${ac_package}='$ac_optarg'" ;;
393
394 -without-* | --without-*)
395 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000396 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000397 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000398 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 fi
400 ac_package=`echo $ac_package| sed 's/-/_/g'`
401 eval "with_${ac_package}=no" ;;
402
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000403 --x)
404 # Obsolete; use --with-x.
405 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000406
407 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
408 | --x-incl | --x-inc | --x-in | --x-i)
409 ac_prev=x_includes ;;
410 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
411 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
412 x_includes="$ac_optarg" ;;
413
414 -x-libraries | --x-libraries | --x-librarie | --x-librari \
415 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
416 ac_prev=x_libraries ;;
417 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
418 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
419 x_libraries="$ac_optarg" ;;
420
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000421 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422 ;;
423
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000424 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000425 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000426 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000428 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000429 { 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 +0000430 fi
431 nonopt="$ac_option"
432 ;;
433
434 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000435done
436
Guido van Rossum7f43da71994-08-01 12:15:30 +0000437if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000438 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000439fi
440
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000441trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000442
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000443# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000444# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000445# 1 file creation
446# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000447# 3 some systems may open it to /dev/tty
448# 4 used on the Kubota Titan
449# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000450# 5 compiler messages saved in config.log
451if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000452 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000453else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000454 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000455fi
456exec 5>./config.log
457
458echo "\
459This file contains any messages produced by compilers while
460running configure, to aid debugging if configure makes a mistake.
461" 1>&5
462
463# Strip out --no-create and --no-recursion so they do not pile up.
464# Also quote any args containing shell metacharacters.
465ac_configure_args=
466for ac_arg
467do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000468 case "$ac_arg" in
469 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
470 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000471 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
472 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
473 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
474 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
475 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000476 esac
477done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000478
479# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000480# Only set these to C if already set. These must not be set unconditionally
481# because not all systems understand e.g. LANG=C (notably SCO).
482# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
483# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000484if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000485if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
486if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
487if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000488
Guido van Rossum7f43da71994-08-01 12:15:30 +0000489# confdefs.h avoids OS command line length limits that DEFS can exceed.
490rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000491# AIX cpp loses on an empty file, so make sure it contains at least a newline.
492echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000493
494# A filename unique to this package, relative to the directory that
495# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000496ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000497
498# Find the source files, if location was not specified.
499if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000500 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000501 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000502 ac_prog=$0
503 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
504 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
505 srcdir=$ac_confdir
506 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000507 srcdir=..
508 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000509else
510 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000511fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000512if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000513 if test "$ac_srcdir_defaulted" = yes; then
514 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000515 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000516 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000517 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000518fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000519srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
520
521# Prefer explicitly selected file to automatically selected ones.
522if test -z "$CONFIG_SITE"; then
523 if test "x$prefix" != xNONE; then
524 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
525 else
526 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
527 fi
528fi
529for ac_site_file in $CONFIG_SITE; do
530 if test -r "$ac_site_file"; then
531 echo "loading site script $ac_site_file"
532 . "$ac_site_file"
533 fi
534done
535
536if test -r "$cache_file"; then
537 echo "loading cache $cache_file"
Jeremy Hylton1bac6452000-09-26 16:57:37 +0000538 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000539else
540 echo "creating cache $cache_file"
541 > $cache_file
542fi
543
Guido van Rossum7f43da71994-08-01 12:15:30 +0000544ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000545# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000546ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000547ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000548ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000549cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000550
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000551ac_exeext=
552ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000553if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
554 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
555 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
556 ac_n= ac_c='
557' ac_t=' '
558 else
559 ac_n=-n ac_c= ac_t=
560 fi
561else
562 ac_n= ac_c='\c' ac_t=
563fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000564
Guido van Rossum0a516c91994-09-12 10:58:40 +0000565
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000566
Guido van Rossum627b2d71993-12-24 10:39:16 +0000567
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000568# Set VERSION so we only need to edit in one place (i.e., here)
569
Guido van Rossumb9a22a12000-06-30 02:48:53 +0000570VERSION=2.0
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000571
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000572# NEXTSTEP stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000573if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000574
575 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000576echo "configure:577: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000577 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000578if test "${with_next_archs+set}" = set; then
579 withval="$with_next_archs"
580
Guido van Rossum563e7081996-09-10 18:20:48 +0000581 if test -n "$withval"; then
582 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
583 # GCC does not currently support multi archs on the NeXT
584 with_gcc=no
585 fi
586 echo "$ac_t""$with_next_archs" 1>&6
587
588else
589 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000590fi
591
Guido van Rossum563e7081996-09-10 18:20:48 +0000592
593 if test -z "$MACHDEP"
594 then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000595 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum563e7081996-09-10 18:20:48 +0000596 sed -e 's/://' -e 's/\./_/'` && \
597 ac_sys_system=next && ac_sys_release=$4
598
Guido van Rossumb97ef171997-09-28 05:44:03 +0000599 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000600 fi
601fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000602
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000603# Check whether --with-next-framework or --without-next-framework was given.
604if test "${with_next_framework+set}" = set; then
605 withval="$with_next_framework"
606 :
607fi
608
609# Check whether --with-dyld or --without-dyld was given.
610if test "${with_dyld+set}" = set; then
611 withval="$with_dyld"
612 :
613fi
614
Guido van Rossum91922671997-10-09 20:24:13 +0000615
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000616# Set name for machine-dependent library files
617
618echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000619echo "configure:620: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000620if test -z "$MACHDEP"
621then
Guido van Rossum563e7081996-09-10 18:20:48 +0000622 ac_sys_system=`uname -s`
Trent Mick635f6fb2000-08-23 21:33:05 +0000623 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000624 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000625 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000626 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000627 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000628 ac_md_system=`echo $ac_sys_system |
629 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
630 ac_md_release=`echo $ac_sys_release |
631 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000632 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000633
Guido van Rossum07397971997-04-29 21:49:50 +0000634 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000635 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000636 esac
637fi
Guido van Rossum91922671997-10-09 20:24:13 +0000638
639#
640# SGI compilers allow the specification of the both the ABI and the
641# ISA on the command line. Depending on the values of these switches,
642# different and often incompatable code will be generated.
643#
644# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
645# thus supply support for various ABI/ISA combinations. The MACHDEP
646# variable is also adjusted.
647#
648
649if test ! -z "$SGI_ABI"
650then
651 CC="cc $SGI_ABI"
652 LDFLAGS="$SGI_ABI $LDFLAGS"
653 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
654fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000655echo "$ac_t""$MACHDEP" 1>&6
656
Guido van Rossum91922671997-10-09 20:24:13 +0000657#
658# CCC is the command that compiles C++ programs
659#
660# Not all make programs have this predefined.
661#
Guido van Rossum95012191999-12-16 17:50:52 +0000662#AC_SUBST(SET_CCC)
663#AC_MSG_CHECKING(CCC)
664#if test -z "$CCC"
665#then
666# case $ac_sys_system in
667# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
668# Linux*) SET_CCC="CCC= g++";;
669# *) SET_CCC=""
670# esac
671#else
672# SET_CCC="CCC= ${CCC}"
673#fi
674#AC_MSG_RESULT($SET_CCC)
Guido van Rossum91922671997-10-09 20:24:13 +0000675
676
Guido van Rossum627b2d71993-12-24 10:39:16 +0000677# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000678echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000679echo "configure:680: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000680# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000681if test "${with_gcc+set}" = set; then
682 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000683
684 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000685 no) CC=cc
686 without_gcc=yes;;
687 yes) CC=gcc
688 without_gcc=no;;
689 *) CC=$withval
690 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000691 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000692else
Guido van Rossume77438c1995-09-13 18:59:59 +0000693
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000694 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000695 OSF1) CC=cc
696 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000697 BeOS*)
698 # Dunno if it's a good idea to get this over with all at once, or
699 # to handle it in with the other goodies.
700 MACHDEP=beos
701
702 case $BE_HOST_CPU in
703 ppc)
Guido van Rossum81376801999-04-06 15:50:51 +0000704 CC="mwcc -I$PWD/BeOS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000705 without_gcc=yes
Guido van Rossum6b9da451999-03-24 17:48:12 +0000706 case `uname -r` in
707 4.0*) OPT="-DUSE_DL_EXPORT -O7 -opt schedule604 -export pragma" ;;
708 *) OPT="-DUSE_DL_EXPORT -O2 -proc 604e -export pragma" ;;
709 esac
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000710 CCSHARED=-UUSE_DL_EXPORT
711 LDFLAGS="$LDFLAGS -nodup"
712
713 AR="$PWD/BeOS/ar-fake"
714 RANLIB=:
715
716 cat >> confdefs.h <<\EOF
717#define DL_EXPORT_HEADER "dl_export.h"
718EOF
719
720 ;;
721 x86)
722 CC="gcc -I$PWD/BeOS"
723 without_gcc=no
Guido van Rossum32000e82000-05-22 21:31:50 +0000724 OPT="-DUSE_DL_EXPORT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000725 CCSHARED=-UUSE_DL_EXPORT
726
727 AR="$PWD/BeOS/ar-fake"
728 RANLIB=:
729
730 cat >> confdefs.h <<\EOF
731#define DL_EXPORT_HEADER "dl_export.h"
732EOF
733
734 ;;
735 *)
736 { echo "configure: error: Your BeOS system isn't PowerPC or x86... neat" 1>&2; exit 1; }
737 ;;
738 esac
739 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000740 Monterey*)
741 RANLIB=:
742 without_gcc=;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000743 *) without_gcc=no;;
744 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000745fi
746
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000747echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000748
Guido van Rossum95012191999-12-16 17:50:52 +0000749
750
751MAINOBJ=python.o
752echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000753echo "configure:754: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000754# Check whether --with-cxx or --without-cxx was given.
755if test "${with_cxx+set}" = set; then
756 withval="$with_cxx"
757
758 case $withval in
759 no) CXX=
760 with_cxx=no;;
761 *) CXX=$withval
762 MAINOBJ=ccpython.o
763 with_cxx=$withval;;
764 esac
765else
766
767 with_cxx=no
768
769fi
770
771echo "$ac_t""$with_cxx" 1>&6
Guido van Rossume1262332000-09-22 19:41:56 +0000772SET_CXX="CXX=$CXX"
Guido van Rossum95012191999-12-16 17:50:52 +0000773
774#AC_MSG_CHECKING(CCC)
775#if test -z "$CCC"
776#then
777# case $ac_sys_system in
778# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
779# Linux*) SET_CCC="CCC= g++";;
780# *) SET_CCC=""
781# esac
782#else
783# SET_CCC="CCC= ${CCC}"
784#fi
785#AC_MSG_RESULT($SET_CCC)
786
Guido van Rossum8b131c51995-03-09 14:10:13 +0000787# If the user switches compilers, we can't believe the cache
788if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
789then
790 { echo "configure: error: cached CC is different -- throw away $cache_file
791(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
792fi
793
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794# Extract the first word of "gcc", so it can be a program name with args.
795set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000796echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000797echo "configure:798: checking for $ac_word" >&5
Jeremy Hylton1bac6452000-09-26 16:57:37 +0000798if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000799 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000800else
801 if test -n "$CC"; then
802 ac_cv_prog_CC="$CC" # Let the user override the test.
803else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000804 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
805 ac_dummy="$PATH"
806 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000807 test -z "$ac_dir" && ac_dir=.
808 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000809 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000810 break
811 fi
812 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000814fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815fi
816CC="$ac_cv_prog_CC"
817if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000818 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000819else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000820 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000821fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000822
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823if test -z "$CC"; then
824 # Extract the first word of "cc", so it can be a program name with args.
825set dummy cc; ac_word=$2
826echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000827echo "configure:828: checking for $ac_word" >&5
Jeremy Hylton1bac6452000-09-26 16:57:37 +0000828if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000829 echo $ac_n "(cached) $ac_c" 1>&6
830else
831 if test -n "$CC"; then
832 ac_cv_prog_CC="$CC" # Let the user override the test.
833else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000834 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000835 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000836 ac_dummy="$PATH"
837 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838 test -z "$ac_dir" && ac_dir=.
839 if test -f $ac_dir/$ac_word; then
840 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
841 ac_prog_rejected=yes
842 continue
843 fi
844 ac_cv_prog_CC="cc"
845 break
846 fi
847 done
848 IFS="$ac_save_ifs"
849if test $ac_prog_rejected = yes; then
850 # We found a bogon in the path, so make sure we never use it.
851 set dummy $ac_cv_prog_CC
852 shift
853 if test $# -gt 0; then
854 # We chose a different compiler from the bogus one.
855 # However, it has the same basename, so the bogon will be chosen
856 # first if we set CC to just the basename; use the full file name.
857 shift
858 set dummy "$ac_dir/$ac_word" "$@"
859 shift
860 ac_cv_prog_CC="$@"
861 fi
862fi
863fi
864fi
865CC="$ac_cv_prog_CC"
866if test -n "$CC"; then
867 echo "$ac_t""$CC" 1>&6
868else
869 echo "$ac_t""no" 1>&6
870fi
871
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000872 if test -z "$CC"; then
873 case "`uname -s`" in
Jeremy Hylton1bac6452000-09-26 16:57:37 +0000874 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000875 # Extract the first word of "cl", so it can be a program name with args.
876set dummy cl; ac_word=$2
877echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000878echo "configure:879: checking for $ac_word" >&5
Jeremy Hylton1bac6452000-09-26 16:57:37 +0000879if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000880 echo $ac_n "(cached) $ac_c" 1>&6
881else
882 if test -n "$CC"; then
883 ac_cv_prog_CC="$CC" # Let the user override the test.
884else
885 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
886 ac_dummy="$PATH"
887 for ac_dir in $ac_dummy; do
888 test -z "$ac_dir" && ac_dir=.
889 if test -f $ac_dir/$ac_word; then
890 ac_cv_prog_CC="cl"
891 break
892 fi
893 done
894 IFS="$ac_save_ifs"
895fi
896fi
897CC="$ac_cv_prog_CC"
898if test -n "$CC"; then
899 echo "$ac_t""$CC" 1>&6
900else
901 echo "$ac_t""no" 1>&6
902fi
903 ;;
904 esac
905 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
907fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908
Jeremy Hylton1bac6452000-09-26 16:57:37 +0000909echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
910echo "configure:911: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000911
912ac_ext=c
913# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
914ac_cpp='$CPP $CPPFLAGS'
915ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000916ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000917cross_compiling=$ac_cv_prog_cc_cross
918
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000919cat > conftest.$ac_ext << EOF
920
Guido van Rossumff555e32000-09-22 15:38:21 +0000921#line 922 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000922#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000923
Guido van Rossumf78abae1997-01-21 22:02:36 +0000924main(){return(0);}
925EOF
Guido van Rossumff555e32000-09-22 15:38:21 +0000926if { (eval echo configure:927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000927 ac_cv_prog_cc_works=yes
928 # If we can't run a trivial program, we are probably using a cross compiler.
929 if (./conftest; exit) 2>/dev/null; then
930 ac_cv_prog_cc_cross=no
931 else
932 ac_cv_prog_cc_cross=yes
933 fi
934else
935 echo "configure: failed program was:" >&5
936 cat conftest.$ac_ext >&5
937 ac_cv_prog_cc_works=no
938fi
939rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000940ac_ext=c
941# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
942ac_cpp='$CPP $CPPFLAGS'
943ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
944ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
945cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000946
947echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
948if test $ac_cv_prog_cc_works = no; then
949 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
950fi
Jeremy Hylton1bac6452000-09-26 16:57:37 +0000951echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
952echo "configure:953: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000953echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
954cross_compiling=$ac_cv_prog_cc_cross
955
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000956echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000957echo "configure:958: checking whether we are using GNU C" >&5
Jeremy Hylton1bac6452000-09-26 16:57:37 +0000958if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000959 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960else
961 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000962#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000964#endif
965EOF
Guido van Rossumff555e32000-09-22 15:38:21 +0000966if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967 ac_cv_prog_gcc=yes
968else
969 ac_cv_prog_gcc=no
970fi
971fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000973echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000974
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000975if test $ac_cv_prog_gcc = yes; then
976 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000977else
978 GCC=
979fi
980
981ac_test_CFLAGS="${CFLAGS+set}"
982ac_save_CFLAGS="$CFLAGS"
983CFLAGS=
984echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000985echo "configure:986: checking whether ${CC-cc} accepts -g" >&5
Jeremy Hylton1bac6452000-09-26 16:57:37 +0000986if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000987 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988else
989 echo 'void f(){}' > conftest.c
990if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000991 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000993 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000994fi
995rm -f conftest*
996
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000997fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000998
Guido van Rossumf78abae1997-01-21 22:02:36 +0000999echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001000if test "$ac_test_CFLAGS" = set; then
1001 CFLAGS="$ac_save_CFLAGS"
1002elif test $ac_cv_prog_cc_g = yes; then
1003 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001004 CFLAGS="-g -O2"
1005 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001006 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001007 fi
1008else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001009 if test "$GCC" = yes; then
1010 CFLAGS="-O2"
1011 else
1012 CFLAGS=
1013 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001014fi
1015
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001016
Guido van Rossumff555e32000-09-22 15:38:21 +00001017echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
1018echo "configure:1019: checking for --with-suffix" >&5
1019# Check whether --with-suffix or --without-suffix was given.
1020if test "${with_suffix+set}" = set; then
1021 withval="$with_suffix"
1022
1023 case $withval in
1024 no) EXE=;;
1025 yes) EXE=.exe;;
1026 *) EXE=$withval;;
1027 esac
1028fi
1029
1030echo "$ac_t""$EXE" 1>&6
1031
Guido van Rossumdd997f71998-10-07 19:58:26 +00001032case $MACHDEP in
1033bsdos*)
1034 case $CC in
1035 gcc) CC="$CC -D_HAVE_BSDI";;
1036 esac;;
1037esac
1038
Guido van Rossum24b1e751997-08-21 02:29:16 +00001039case $ac_sys_system in
1040hp*|HP*)
1041 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001042 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001043 esac;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001044BeOS*)
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001045 case $CC in
1046 cc) CC=cc;;
1047 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001048Monterey*)
1049 case $CC in
1050 cc) CC="$CC -Wl,-Bexport";;
1051 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001052esac
1053
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001054# LDLIBRARY is the name of the library to link against (as opposed to the
1055# name of the library into which to insert object files). On systems
1056# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
1057# the Makefiles).
1058
1059
1060LDLIBRARY=''
1061
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001062# LINKCC is the command that links the python executable -- default is $(CC).
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001063# This is altered for AIX and BeOS in order to build the export list before
1064# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001065
1066echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001067echo "configure:1068: checking LINKCC" >&5
Guido van Rossum95012191999-12-16 17:50:52 +00001068if test -z "$LINKCC" -a ! -z "$CXX"
1069then
1070 LINKCC="$CXX"
1071fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001072if test -z "$LINKCC"
1073then
1074 case $ac_sys_system in
1075 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001076 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001077 BeOS*)
Guido van Rossumea516321998-12-17 18:08:55 +00001078 LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001079 LDLIBRARY='libpython$(VERSION).so';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001080 dgux*)
1081 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001082 Monterey64*)
1083 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001084 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001085 esac
1086fi
1087echo "$ac_t""$LINKCC" 1>&6
1088
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001089echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001090echo "configure:1091: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001091
1092# NeXT framework builds require that the 'ar' library be converted into
1093# a bundle using libtool.
1094if test "$with_next_framework"
1095then
1096 LDLIBRARY='libpython$(VERSION).dylib'
1097fi
1098
1099# DG/UX requires some fancy ld contortions to produce a .so from an .a
1100if test "$MACHDEP" = "dguxR4"
1101then
1102 LDLIBRARY='libpython$(VERSION).so'
1103 OPT="$OPT -pic"
1104fi
1105echo "$ac_t""$LDLIBRARY" 1>&6
1106
1107# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1108if test -z "$LDLIBRARY"
1109then
1110 LDLIBRARY='libpython$(VERSION).a'
1111 MAKE_LDLIBRARY="true"
1112else
1113 MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
1114fi
1115
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001116# Extract the first word of "ranlib", so it can be a program name with args.
1117set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001118echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001119echo "configure:1120: checking for $ac_word" >&5
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001120if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001121 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001122else
1123 if test -n "$RANLIB"; then
1124 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1125else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001126 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1127 ac_dummy="$PATH"
1128 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129 test -z "$ac_dir" && ac_dir=.
1130 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001131 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001132 break
1133 fi
1134 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001137fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138fi
1139RANLIB="$ac_cv_prog_RANLIB"
1140if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001141 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001143 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001145
1146
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147for ac_prog in ar aal
1148do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001149# Extract the first word of "$ac_prog", so it can be a program name with args.
1150set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001151echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001152echo "configure:1153: checking for $ac_word" >&5
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001153if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001154 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001155else
1156 if test -n "$AR"; then
1157 ac_cv_prog_AR="$AR" # Let the user override the test.
1158else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001159 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1160 ac_dummy="$PATH"
1161 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162 test -z "$ac_dir" && ac_dir=.
1163 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001164 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165 break
1166 fi
1167 done
1168 IFS="$ac_save_ifs"
1169fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170fi
1171AR="$ac_cv_prog_AR"
1172if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001173 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001175 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
1178test -n "$AR" && break
1179done
1180test -n "$AR" || AR="ar"
1181
1182
Guido van Rossumda88dad1995-01-26 00:46:29 +00001183
1184
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001185# Install just never works :-(
1186if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001187then
1188 INSTALL=cp
1189 INSTALL_PROGRAM=cp
1190 INSTALL_DATA=cp
1191else
1192 INSTALL_PROGRAM="$INSTALL"
1193 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001194fi
1195
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001196# Not every filesystem supports hard links
1197
1198if test -z "$LN" ; then
1199 case $ac_sys_system in
1200 BeOS*) LN="ln -s";;
1201 *) LN=ln;;
1202 esac
1203fi
1204
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001205# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001206
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001207if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001208then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001209 case $GCC in
1210 yes)
1211 case $ac_cv_prog_cc_g in
1212 yes) OPT="-g -O2";;
1213 *) OPT="-O2";;
1214 esac
1215 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001216 *) OPT="-O";;
1217 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001218fi
1219
Trent Mick635f6fb2000-08-23 21:33:05 +00001220# The current (beta) Monterey compiler dies with optimizations
1221case $ac_sys_system in
1222Monterey*) OPT="";;
1223esac
1224
Guido van Rossum563e7081996-09-10 18:20:48 +00001225if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001226then
1227 OPT="$OPT $ac_arch_flags"
1228fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001229# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001230echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001231echo "configure:1232: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001232# On Suns, sometimes $CPP names a directory.
1233if test -n "$CPP" && test -d "$CPP"; then
1234 CPP=
1235fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001236if test -z "$CPP"; then
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001237if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001238 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001239else
1240 # This must be in double quotes, not single quotes, because CPP may get
1241 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001242 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001243 # On the NeXT, cc -E runs the code through the compiler's parser,
1244 # not just through cpp.
1245 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001246#line 1247 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001248#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249Syntax Error
1250EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001251ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001252{ (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001253ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1254if test -z "$ac_err"; then
1255 :
1256else
1257 echo "$ac_err" >&5
1258 echo "configure: failed program was:" >&5
1259 cat conftest.$ac_ext >&5
1260 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001261 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001262 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001263#line 1264 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001264#include "confdefs.h"
1265#include <assert.h>
1266Syntax Error
1267EOF
1268ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001269{ (eval echo configure:1270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001270ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272 :
1273else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001274 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001275 echo "configure: failed program was:" >&5
1276 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001278 CPP="${CC-cc} -nologo -E"
1279 cat > conftest.$ac_ext <<EOF
1280#line 1281 "configure"
1281#include "confdefs.h"
1282#include <assert.h>
1283Syntax Error
1284EOF
1285ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1286{ (eval echo configure:1287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1287ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1288if test -z "$ac_err"; then
1289 :
1290else
1291 echo "$ac_err" >&5
1292 echo "configure: failed program was:" >&5
1293 cat conftest.$ac_ext >&5
1294 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295 CPP=/lib/cpp
1296fi
1297rm -f conftest*
1298fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001299rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001300fi
1301rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001302 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001303fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001304 CPP="$ac_cv_prog_CPP"
1305else
1306 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001307fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001308echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001310echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001311echo "configure:1312: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001313#line 1314 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314#include "confdefs.h"
1315#ifdef _AIX
1316 yes
1317#endif
1318
1319EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001320if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1321 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001323 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001324#define _ALL_SOURCE 1
1325EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001327else
1328 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001329 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330fi
1331rm -f conftest*
1332
1333
Guido van Rossumf78abae1997-01-21 22:02:36 +00001334ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001335echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001336echo "configure:1337: checking for minix/config.h" >&5
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001337if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001338 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001339else
1340 cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001341#line 1342 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001342#include "confdefs.h"
1343#include <minix/config.h>
1344EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001345ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumff555e32000-09-22 15:38:21 +00001346{ (eval echo configure:1347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001347ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001348if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001349 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001350 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001351else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001352 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001353 echo "configure: failed program was:" >&5
1354 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001355 rm -rf conftest*
1356 eval "ac_cv_header_$ac_safe=no"
1357fi
1358rm -f conftest*
1359fi
1360if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001361 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001362 MINIX=yes
1363else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001364 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001365MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001366fi
1367
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001368if test "$MINIX" = yes; then
1369 cat >> confdefs.h <<\EOF
1370#define _POSIX_SOURCE 1
1371EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001373 cat >> confdefs.h <<\EOF
1374#define _POSIX_1_SOURCE 2
1375EOF
1376
1377 cat >> confdefs.h <<\EOF
1378#define _MINIX 1
1379EOF
1380
1381fi
1382
Guido van Rossumda88dad1995-01-26 00:46:29 +00001383
Guido van Rossum91922671997-10-09 20:24:13 +00001384echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001385echo "configure:1386: checking whether $CC accepts -OPT:Olimit=0" >&5
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001386if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001387 echo $ac_n "(cached) $ac_c" 1>&6
1388else
1389 ac_save_cc="$CC"
1390CC="$CC -OPT:Olimit=0"
1391if test "$cross_compiling" = yes; then
1392 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1393else
1394 cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001395#line 1396 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001396#include "confdefs.h"
1397int main() { return 0; }
1398EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001399if { (eval echo configure:1400: \"$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 +00001400then
1401 ac_cv_opt_olimit_ok=yes
1402else
1403 echo "configure: failed program was:" >&5
1404 cat conftest.$ac_ext >&5
1405 rm -fr conftest*
1406 ac_cv_opt_olimit_ok=no
1407fi
1408rm -fr conftest*
1409fi
1410
1411CC="$ac_save_cc"
1412fi
1413
1414echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001415if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001416 OPT="$OPT -OPT:Olimit=0"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001417else
1418 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001419echo "configure:1420: checking whether $CC accepts -Olimit 1500" >&5
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001420 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001421 echo $ac_n "(cached) $ac_c" 1>&6
1422else
1423 ac_save_cc="$CC"
1424 CC="$CC -Olimit 1500"
1425 if test "$cross_compiling" = yes; then
1426 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1427else
1428 cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001429#line 1430 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001430#include "confdefs.h"
1431int main() { return 0; }
1432EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001433if { (eval echo configure:1434: \"$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 +00001434then
1435 ac_cv_olimit_ok=yes
1436else
1437 echo "configure: failed program was:" >&5
1438 cat conftest.$ac_ext >&5
1439 rm -fr conftest*
1440 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001441fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001442rm -fr conftest*
1443fi
1444
1445 CC="$ac_save_cc"
1446fi
1447
1448 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1449 if test $ac_cv_olimit_ok = yes; then
1450 OPT="$OPT -Olimit 1500"
1451 fi
1452fi
1453
Guido van Rossum84e7b241996-08-19 21:59:00 +00001454
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001455# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001456echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001457echo "configure:1458: checking for ANSI C header files" >&5
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001458if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001459 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001460else
1461 cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001462#line 1463 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001463#include "confdefs.h"
1464#include <stdlib.h>
1465#include <stdarg.h>
1466#include <string.h>
1467#include <float.h>
1468EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001469ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumff555e32000-09-22 15:38:21 +00001470{ (eval echo configure:1471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001471ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001472if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001473 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001474 ac_cv_header_stdc=yes
1475else
1476 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001477 echo "configure: failed program was:" >&5
1478 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001479 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001480 ac_cv_header_stdc=no
1481fi
1482rm -f conftest*
1483
1484if test $ac_cv_header_stdc = yes; then
1485 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1486cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001487#line 1488 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001488#include "confdefs.h"
1489#include <string.h>
1490EOF
1491if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1492 egrep "memchr" >/dev/null 2>&1; then
1493 :
1494else
1495 rm -rf conftest*
1496 ac_cv_header_stdc=no
1497fi
1498rm -f conftest*
1499
1500fi
1501
1502if test $ac_cv_header_stdc = yes; then
1503 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1504cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001505#line 1506 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001506#include "confdefs.h"
1507#include <stdlib.h>
1508EOF
1509if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1510 egrep "free" >/dev/null 2>&1; then
1511 :
1512else
1513 rm -rf conftest*
1514 ac_cv_header_stdc=no
1515fi
1516rm -f conftest*
1517
1518fi
1519
1520if test $ac_cv_header_stdc = yes; then
1521 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1522if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001523 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001524else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001525 cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001526#line 1527 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001527#include "confdefs.h"
1528#include <ctype.h>
1529#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1530#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001531#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001532int main () { int i; for (i = 0; i < 256; i++)
1533if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1534exit (0); }
1535
1536EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001537if { (eval echo configure:1538: \"$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 +00001538then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001539 :
1540else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001541 echo "configure: failed program was:" >&5
1542 cat conftest.$ac_ext >&5
1543 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001544 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001545fi
1546rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001547fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001548
1549fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001550fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001551
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001552echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001553if test $ac_cv_header_stdc = yes; then
1554 cat >> confdefs.h <<\EOF
1555#define STDC_HEADERS 1
1556EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001557
1558fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001559
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00001560for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h poll.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001561signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Fred Drakea50d6ec2000-08-31 16:13:20 +00001562sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001563sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00001564sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
1565ndbm.h db1/ndbm.h gdbm/ndbm.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001566do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001567ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001568echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001569echo "configure:1570: checking for $ac_hdr" >&5
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001570if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001571 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001572else
1573 cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001574#line 1575 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001575#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001576#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001577EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001578ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumff555e32000-09-22 15:38:21 +00001579{ (eval echo configure:1580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001580ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001581if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001582 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001583 eval "ac_cv_header_$ac_safe=yes"
1584else
1585 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001586 echo "configure: failed program was:" >&5
1587 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001588 rm -rf conftest*
1589 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001590fi
1591rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001592fi
1593if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001594 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001595 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001596 cat >> confdefs.h <<EOF
1597#define $ac_tr_hdr 1
1598EOF
1599
1600else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001601 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001602fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001603done
1604
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001605ac_header_dirent=no
1606for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1607do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001608ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001609echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001610echo "configure:1611: checking for $ac_hdr that defines DIR" >&5
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001611if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001612 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001613else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001614 cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001615#line 1616 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001616#include "confdefs.h"
1617#include <sys/types.h>
1618#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001619int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001620DIR *dirp = 0;
1621; return 0; }
1622EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001623if { (eval echo configure:1624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001624 rm -rf conftest*
1625 eval "ac_cv_header_dirent_$ac_safe=yes"
1626else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001627 echo "configure: failed program was:" >&5
1628 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001629 rm -rf conftest*
1630 eval "ac_cv_header_dirent_$ac_safe=no"
1631fi
1632rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001633fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001634if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001635 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001636 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001637 cat >> confdefs.h <<EOF
1638#define $ac_tr_hdr 1
1639EOF
1640 ac_header_dirent=$ac_hdr; break
1641else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001642 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001643fi
1644done
1645# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1646if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001647echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001648echo "configure:1649: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001649ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001650if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001651 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001652else
1653 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001654LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001655cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001656#line 1657 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001657#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001658/* Override any gcc2 internal prototype to avoid an error. */
1659/* We use char because int might match the return type of a gcc2
1660 builtin and then its argument prototype would still apply. */
1661char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001662
Guido van Rossumf78abae1997-01-21 22:02:36 +00001663int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001664opendir()
1665; return 0; }
1666EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001667if { (eval echo configure:1668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001668 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001669 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001670else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001671 echo "configure: failed program was:" >&5
1672 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001673 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001674 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001675fi
1676rm -f conftest*
1677LIBS="$ac_save_LIBS"
1678
1679fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001680if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001681 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001682 LIBS="$LIBS -ldir"
1683else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001684 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685fi
1686
1687else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001688echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001689echo "configure:1690: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001690ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001691if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001692 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001693else
1694 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001695LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001696cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001697#line 1698 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001698#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001699/* Override any gcc2 internal prototype to avoid an error. */
1700/* We use char because int might match the return type of a gcc2
1701 builtin and then its argument prototype would still apply. */
1702char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703
Guido van Rossumf78abae1997-01-21 22:02:36 +00001704int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001705opendir()
1706; return 0; }
1707EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001708if { (eval echo configure:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001709 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001710 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001711else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001712 echo "configure: failed program was:" >&5
1713 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001714 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001715 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001716fi
1717rm -f conftest*
1718LIBS="$ac_save_LIBS"
1719
1720fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001721if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001722 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001723 LIBS="$LIBS -lx"
1724else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001725 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001726fi
1727
1728fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001729
1730
1731# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001732was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001733echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001734echo "configure:1735: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001735cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001736#line 1737 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001737#include "confdefs.h"
1738#include <time.h>
1739EOF
1740if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1741 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001742 rm -rf conftest*
1743 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001744else
1745 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001746 cat >> confdefs.h <<\EOF
1747#define clock_t long
1748EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001749
1750fi
1751rm -f conftest*
1752
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001753echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001754
Guido van Rossum84e7b241996-08-19 21:59:00 +00001755# Add some code to confdefs.h so that the test for off_t works on SCO
1756cat >> confdefs.h <<\EOF
1757#if defined(SCO_DS)
1758#undef _OFF_T
1759#endif
1760EOF
1761
Guido van Rossumef2255b2000-03-10 22:30:29 +00001762# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001763echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001764echo "configure:1765: checking for mode_t" >&5
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001765if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001766 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001767else
1768 cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001769#line 1770 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001770#include "confdefs.h"
1771#include <sys/types.h>
1772#if STDC_HEADERS
1773#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001774#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001775#endif
1776EOF
1777if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001778 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 +00001779 rm -rf conftest*
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001780 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001781else
1782 rm -rf conftest*
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001783 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001784fi
1785rm -f conftest*
1786
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001787fi
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001788echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1789if test $ac_cv_type_mode_t = no; then
1790 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001791#define mode_t int
1792EOF
1793
1794fi
1795
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001796echo $ac_n "checking for off_t""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001797echo "configure:1798: checking for off_t" >&5
1798if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001799 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001800else
1801 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001802#line 1803 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001803#include "confdefs.h"
1804#include <sys/types.h>
1805#if STDC_HEADERS
1806#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001807#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001808#endif
1809EOF
1810if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001811 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 +00001812 rm -rf conftest*
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001813 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001814else
1815 rm -rf conftest*
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001816 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001817fi
1818rm -f conftest*
1819
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001820fi
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001821echo "$ac_t""$ac_cv_type_off_t" 1>&6
1822if test $ac_cv_type_off_t = no; then
1823 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001824#define off_t long
1825EOF
1826
1827fi
1828
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001829echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001830echo "configure:1831: checking for pid_t" >&5
1831if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001832 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001833else
1834 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001835#line 1836 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001836#include "confdefs.h"
1837#include <sys/types.h>
1838#if STDC_HEADERS
1839#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001840#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001841#endif
1842EOF
1843if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001844 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 +00001845 rm -rf conftest*
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001846 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001847else
1848 rm -rf conftest*
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001849 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001850fi
1851rm -f conftest*
1852
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001853fi
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001854echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1855if test $ac_cv_type_pid_t = no; then
1856 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001857#define pid_t int
1858EOF
1859
1860fi
1861
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001862echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001863echo "configure:1864: checking return type of signal handlers" >&5
1864if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001865 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001866else
1867 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001868#line 1869 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001869#include "confdefs.h"
1870#include <sys/types.h>
1871#include <signal.h>
1872#ifdef signal
1873#undef signal
1874#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001875#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001876extern "C" void (*signal (int, void (*)(int)))(int);
1877#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001878void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001879#endif
1880
Guido van Rossumf78abae1997-01-21 22:02:36 +00001881int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001882int i;
1883; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001884EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001885if { (eval echo configure:1886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001886 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001887 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001888else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001889 echo "configure: failed program was:" >&5
1890 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001891 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001892 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001893fi
1894rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001895fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001896
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001897echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001898cat >> confdefs.h <<EOF
1899#define RETSIGTYPE $ac_cv_type_signal
1900EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001901
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001902
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001903echo $ac_n "checking for size_t""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001904echo "configure:1905: checking for size_t" >&5
1905if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001906 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001907else
1908 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001909#line 1910 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001910#include "confdefs.h"
1911#include <sys/types.h>
1912#if STDC_HEADERS
1913#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001914#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001915#endif
1916EOF
1917if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001918 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 +00001919 rm -rf conftest*
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001920 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001921else
1922 rm -rf conftest*
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001923 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001924fi
1925rm -f conftest*
1926
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001927fi
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001928echo "$ac_t""$ac_cv_type_size_t" 1>&6
1929if test $ac_cv_type_size_t = no; then
1930 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001931#define size_t unsigned
1932EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001933
1934fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001935
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001936echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001937echo "configure:1938: checking for uid_t in sys/types.h" >&5
1938if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001939 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001940else
1941 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001942#line 1943 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001943#include "confdefs.h"
1944#include <sys/types.h>
1945EOF
1946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1947 egrep "uid_t" >/dev/null 2>&1; then
1948 rm -rf conftest*
1949 ac_cv_type_uid_t=yes
1950else
1951 rm -rf conftest*
1952 ac_cv_type_uid_t=no
1953fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001954rm -f conftest*
1955
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001956fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001957
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001958echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001959if test $ac_cv_type_uid_t = no; then
1960 cat >> confdefs.h <<\EOF
1961#define uid_t int
1962EOF
1963
1964 cat >> confdefs.h <<\EOF
1965#define gid_t int
1966EOF
1967
1968fi
1969
Guido van Rossum627b2d71993-12-24 10:39:16 +00001970
Guido van Rossumef2255b2000-03-10 22:30:29 +00001971# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001972echo $ac_n "checking size of int""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001973echo "configure:1974: checking size of int" >&5
1974if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001975 echo $ac_n "(cached) $ac_c" 1>&6
1976else
1977 if test "$cross_compiling" = yes; then
1978 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1979else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001980 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001981#line 1982 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001982#include "confdefs.h"
1983#include <stdio.h>
1984main()
1985{
1986 FILE *f=fopen("conftestval", "w");
1987 if (!f) exit(1);
1988 fprintf(f, "%d\n", sizeof(int));
1989 exit(0);
1990}
1991EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00001992if { (eval echo configure:1993: \"$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 +00001993then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001994 ac_cv_sizeof_int=`cat conftestval`
1995else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001996 echo "configure: failed program was:" >&5
1997 cat conftest.$ac_ext >&5
1998 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001999 ac_cv_sizeof_int=0
2000fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002001rm -fr conftest*
2002fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002003
2004fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002005echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2006cat >> confdefs.h <<EOF
2007#define SIZEOF_INT $ac_cv_sizeof_int
2008EOF
2009
2010
2011echo $ac_n "checking size of long""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002012echo "configure:2013: checking size of long" >&5
2013if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002014 echo $ac_n "(cached) $ac_c" 1>&6
2015else
2016 if test "$cross_compiling" = yes; then
2017 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2018else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002019 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002020#line 2021 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002021#include "confdefs.h"
2022#include <stdio.h>
2023main()
2024{
2025 FILE *f=fopen("conftestval", "w");
2026 if (!f) exit(1);
2027 fprintf(f, "%d\n", sizeof(long));
2028 exit(0);
2029}
2030EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002031if { (eval echo configure:2032: \"$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 +00002032then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002033 ac_cv_sizeof_long=`cat conftestval`
2034else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002035 echo "configure: failed program was:" >&5
2036 cat conftest.$ac_ext >&5
2037 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002038 ac_cv_sizeof_long=0
2039fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002040rm -fr conftest*
2041fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002042
2043fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002044echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2045cat >> confdefs.h <<EOF
2046#define SIZEOF_LONG $ac_cv_sizeof_long
2047EOF
2048
2049
Guido van Rossumad678af1998-10-02 14:42:15 +00002050echo $ac_n "checking size of void *""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002051echo "configure:2052: checking size of void *" >&5
2052if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002053 echo $ac_n "(cached) $ac_c" 1>&6
2054else
2055 if test "$cross_compiling" = yes; then
2056 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2057else
2058 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002059#line 2060 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002060#include "confdefs.h"
2061#include <stdio.h>
2062main()
2063{
2064 FILE *f=fopen("conftestval", "w");
2065 if (!f) exit(1);
2066 fprintf(f, "%d\n", sizeof(void *));
2067 exit(0);
2068}
2069EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002070if { (eval echo configure:2071: \"$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 +00002071then
2072 ac_cv_sizeof_void_p=`cat conftestval`
2073else
2074 echo "configure: failed program was:" >&5
2075 cat conftest.$ac_ext >&5
2076 rm -fr conftest*
2077 ac_cv_sizeof_void_p=0
2078fi
2079rm -fr conftest*
2080fi
2081
2082fi
2083echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2084cat >> confdefs.h <<EOF
2085#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2086EOF
2087
2088
Guido van Rossumef2255b2000-03-10 22:30:29 +00002089echo $ac_n "checking size of char""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002090echo "configure:2091: checking size of char" >&5
2091if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002092 echo $ac_n "(cached) $ac_c" 1>&6
2093else
2094 if test "$cross_compiling" = yes; then
2095 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2096else
2097 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002098#line 2099 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002099#include "confdefs.h"
2100#include <stdio.h>
2101main()
2102{
2103 FILE *f=fopen("conftestval", "w");
2104 if (!f) exit(1);
2105 fprintf(f, "%d\n", sizeof(char));
2106 exit(0);
2107}
2108EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002109if { (eval echo configure:2110: \"$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 +00002110then
2111 ac_cv_sizeof_char=`cat conftestval`
2112else
2113 echo "configure: failed program was:" >&5
2114 cat conftest.$ac_ext >&5
2115 rm -fr conftest*
2116 ac_cv_sizeof_char=0
2117fi
2118rm -fr conftest*
2119fi
2120
2121fi
2122echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2123cat >> confdefs.h <<EOF
2124#define SIZEOF_CHAR $ac_cv_sizeof_char
2125EOF
2126
2127
2128echo $ac_n "checking size of short""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002129echo "configure:2130: checking size of short" >&5
2130if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002131 echo $ac_n "(cached) $ac_c" 1>&6
2132else
2133 if test "$cross_compiling" = yes; then
2134 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2135else
2136 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002137#line 2138 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002138#include "confdefs.h"
2139#include <stdio.h>
2140main()
2141{
2142 FILE *f=fopen("conftestval", "w");
2143 if (!f) exit(1);
2144 fprintf(f, "%d\n", sizeof(short));
2145 exit(0);
2146}
2147EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002148if { (eval echo configure:2149: \"$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 +00002149then
2150 ac_cv_sizeof_short=`cat conftestval`
2151else
2152 echo "configure: failed program was:" >&5
2153 cat conftest.$ac_ext >&5
2154 rm -fr conftest*
2155 ac_cv_sizeof_short=0
2156fi
2157rm -fr conftest*
2158fi
2159
2160fi
2161echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2162cat >> confdefs.h <<EOF
2163#define SIZEOF_SHORT $ac_cv_sizeof_short
2164EOF
2165
2166
2167echo $ac_n "checking size of float""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002168echo "configure:2169: checking size of float" >&5
2169if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002170 echo $ac_n "(cached) $ac_c" 1>&6
2171else
2172 if test "$cross_compiling" = yes; then
2173 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2174else
2175 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002176#line 2177 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002177#include "confdefs.h"
2178#include <stdio.h>
2179main()
2180{
2181 FILE *f=fopen("conftestval", "w");
2182 if (!f) exit(1);
2183 fprintf(f, "%d\n", sizeof(float));
2184 exit(0);
2185}
2186EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002187if { (eval echo configure:2188: \"$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 +00002188then
2189 ac_cv_sizeof_float=`cat conftestval`
2190else
2191 echo "configure: failed program was:" >&5
2192 cat conftest.$ac_ext >&5
2193 rm -fr conftest*
2194 ac_cv_sizeof_float=0
2195fi
2196rm -fr conftest*
2197fi
2198
2199fi
2200echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2201cat >> confdefs.h <<EOF
2202#define SIZEOF_FLOAT $ac_cv_sizeof_float
2203EOF
2204
2205
2206echo $ac_n "checking size of double""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002207echo "configure:2208: checking size of double" >&5
2208if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002209 echo $ac_n "(cached) $ac_c" 1>&6
2210else
2211 if test "$cross_compiling" = yes; then
2212 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2213else
2214 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002215#line 2216 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002216#include "confdefs.h"
2217#include <stdio.h>
2218main()
2219{
2220 FILE *f=fopen("conftestval", "w");
2221 if (!f) exit(1);
2222 fprintf(f, "%d\n", sizeof(double));
2223 exit(0);
2224}
2225EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002226if { (eval echo configure:2227: \"$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 +00002227then
2228 ac_cv_sizeof_double=`cat conftestval`
2229else
2230 echo "configure: failed program was:" >&5
2231 cat conftest.$ac_ext >&5
2232 rm -fr conftest*
2233 ac_cv_sizeof_double=0
2234fi
2235rm -fr conftest*
2236fi
2237
2238fi
2239echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2240cat >> confdefs.h <<EOF
2241#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2242EOF
2243
2244
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002245echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002246echo "configure:2247: checking size of fpos_t" >&5
2247if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002248 echo $ac_n "(cached) $ac_c" 1>&6
2249else
2250 if test "$cross_compiling" = yes; then
2251 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2252else
2253 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002254#line 2255 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002255#include "confdefs.h"
2256#include <stdio.h>
2257main()
2258{
2259 FILE *f=fopen("conftestval", "w");
2260 if (!f) exit(1);
2261 fprintf(f, "%d\n", sizeof(fpos_t));
2262 exit(0);
2263}
2264EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002265if { (eval echo configure:2266: \"$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 +00002266then
2267 ac_cv_sizeof_fpos_t=`cat conftestval`
2268else
2269 echo "configure: failed program was:" >&5
2270 cat conftest.$ac_ext >&5
2271 rm -fr conftest*
2272 ac_cv_sizeof_fpos_t=0
2273fi
2274rm -fr conftest*
2275fi
2276
2277fi
2278echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2279cat >> confdefs.h <<EOF
2280#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2281EOF
2282
2283
Guido van Rossum0a516c91994-09-12 10:58:40 +00002284
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002285echo $ac_n "checking for long long support""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002286echo "configure:2287: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002287have_long_long=no
2288cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002289#line 2290 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002290#include "confdefs.h"
2291
2292int main() {
2293long long x; x = (long long)0;
2294; return 0; }
2295EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002296if { (eval echo configure:2297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002297 rm -rf conftest*
2298 cat >> confdefs.h <<\EOF
2299#define HAVE_LONG_LONG 1
2300EOF
2301 have_long_long=yes
2302else
2303 echo "configure: failed program was:" >&5
2304 cat conftest.$ac_ext >&5
2305fi
2306rm -f conftest*
2307echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002308if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002309echo $ac_n "checking size of long long""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002310echo "configure:2311: checking size of long long" >&5
2311if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002312 echo $ac_n "(cached) $ac_c" 1>&6
2313else
2314 if test "$cross_compiling" = yes; then
2315 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2316else
2317 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002318#line 2319 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002319#include "confdefs.h"
2320#include <stdio.h>
2321main()
2322{
2323 FILE *f=fopen("conftestval", "w");
2324 if (!f) exit(1);
2325 fprintf(f, "%d\n", sizeof(long long));
2326 exit(0);
2327}
2328EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002329if { (eval echo configure:2330: \"$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 +00002330then
2331 ac_cv_sizeof_long_long=`cat conftestval`
2332else
2333 echo "configure: failed program was:" >&5
2334 cat conftest.$ac_ext >&5
2335 rm -fr conftest*
2336 ac_cv_sizeof_long_long=0
2337fi
2338rm -fr conftest*
2339fi
2340
2341fi
2342echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2343cat >> confdefs.h <<EOF
2344#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2345EOF
2346
2347
2348fi
2349
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002350echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002351echo "configure:2352: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002352have_uintptr_t=no
2353cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002354#line 2355 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002355#include "confdefs.h"
2356
2357int main() {
2358uintptr_t x; x = (uintptr_t)0;
2359; return 0; }
2360EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002361if { (eval echo configure:2362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002362 rm -rf conftest*
2363 cat >> confdefs.h <<\EOF
2364#define HAVE_UINTPTR_T 1
2365EOF
2366 have_uintptr_t=yes
2367else
2368 echo "configure: failed program was:" >&5
2369 cat conftest.$ac_ext >&5
2370fi
2371rm -f conftest*
2372echo "$ac_t""$have_uintptr_t" 1>&6
2373if test "$have_uintptr_t" = yes ; then
2374echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002375echo "configure:2376: checking size of uintptr_t" >&5
2376if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002377 echo $ac_n "(cached) $ac_c" 1>&6
2378else
2379 if test "$cross_compiling" = yes; then
2380 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2381else
2382 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002383#line 2384 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002384#include "confdefs.h"
2385#include <stdio.h>
2386main()
2387{
2388 FILE *f=fopen("conftestval", "w");
2389 if (!f) exit(1);
2390 fprintf(f, "%d\n", sizeof(uintptr_t));
2391 exit(0);
2392}
2393EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002394if { (eval echo configure:2395: \"$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 +00002395then
2396 ac_cv_sizeof_uintptr_t=`cat conftestval`
2397else
2398 echo "configure: failed program was:" >&5
2399 cat conftest.$ac_ext >&5
2400 rm -fr conftest*
2401 ac_cv_sizeof_uintptr_t=0
2402fi
2403rm -fr conftest*
2404fi
2405
2406fi
2407echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2408cat >> confdefs.h <<EOF
2409#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2410EOF
2411
2412
2413fi
2414
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002415# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2416echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002417echo "configure:2418: checking size of off_t" >&5
2418if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002419 echo $ac_n "(cached) $ac_c" 1>&6
2420else
2421 if test "$cross_compiling" = yes; then
2422 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2423else
2424 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002425#line 2426 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002426#include "confdefs.h"
2427#include <stdio.h>
2428#include <sys/types.h>
2429main()
2430{
2431 FILE *f=fopen("conftestval", "w");
2432 if (!f) exit(1);
2433 fprintf(f, "%d\n", sizeof(off_t));
2434 exit(0);
2435}
2436EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002437if { (eval echo configure:2438: \"$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 +00002438then
2439 ac_cv_sizeof_off_t=`cat conftestval`
2440else
2441 echo "configure: failed program was:" >&5
2442 cat conftest.$ac_ext >&5
2443 rm -fr conftest*
2444 ac_cv_sizeof_off_t=0
2445fi
2446rm -fr conftest*
2447fi
2448
2449
2450fi
2451
2452echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2453cat >> confdefs.h <<EOF
2454#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2455EOF
2456
2457
2458echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002459echo "configure:2460: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002460if test "$have_long_long" = yes -a \
2461 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2462 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002463 cat >> confdefs.h <<\EOF
2464#define HAVE_LARGEFILE_SUPPORT 1
2465EOF
2466
2467 echo "$ac_t""yes" 1>&6
2468else
2469 echo "$ac_t""no" 1>&6
2470fi
2471
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002472# AC_CHECK_SIZEOF() doesn't include <time.h>.
2473echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002474echo "configure:2475: checking size of time_t" >&5
2475if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002476 echo $ac_n "(cached) $ac_c" 1>&6
2477else
2478 if test "$cross_compiling" = yes; then
2479 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2480else
2481 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002482#line 2483 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002483#include "confdefs.h"
2484#include <stdio.h>
2485#include <time.h>
2486main()
2487{
2488 FILE *f=fopen("conftestval", "w");
2489 if (!f) exit(1);
2490 fprintf(f, "%d\n", sizeof(time_t));
2491 exit(0);
2492}
2493EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002494if { (eval echo configure:2495: \"$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 +00002495then
2496 ac_cv_sizeof_time_t=`cat conftestval`
2497else
2498 echo "configure: failed program was:" >&5
2499 cat conftest.$ac_ext >&5
2500 rm -fr conftest*
2501 ac_cv_sizeof_time_t=0
2502fi
2503rm -fr conftest*
2504fi
2505
2506
2507fi
2508
2509echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2510cat >> confdefs.h <<EOF
2511#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2512EOF
2513
2514
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002515
Trent Mick635f6fb2000-08-23 21:33:05 +00002516# if have pthread_t then define SIZEOF_PTHREAD_T
2517echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002518echo "configure:2519: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002519have_pthread_t=no
2520cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002521#line 2522 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002522#include "confdefs.h"
2523#include <pthread.h>
2524int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002525pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002526; return 0; }
2527EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002528if { (eval echo configure:2529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002529 rm -rf conftest*
2530 have_pthread_t=yes
2531else
2532 echo "configure: failed program was:" >&5
2533 cat conftest.$ac_ext >&5
2534fi
2535rm -f conftest*
2536echo "$ac_t""$have_pthread_t" 1>&6
2537if test "$have_pthread_t" = yes ; then
2538 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2539 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002540echo "configure:2541: checking size of pthread_t" >&5
2541 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002542 echo $ac_n "(cached) $ac_c" 1>&6
2543else
2544 if test "$cross_compiling" = yes; then
2545 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2546else
2547 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002548#line 2549 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002549#include "confdefs.h"
2550#include <stdio.h>
2551 #include <pthread.h>
2552 main()
2553 {
2554 FILE *f=fopen("conftestval", "w");
2555 if (!f) exit(1);
2556 fprintf(f, "%d\n", sizeof(pthread_t));
2557 exit(0);
2558 }
2559EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002560if { (eval echo configure:2561: \"$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 +00002561then
2562 ac_cv_sizeof_pthread_t=`cat conftestval`
2563else
2564 echo "configure: failed program was:" >&5
2565 cat conftest.$ac_ext >&5
2566 rm -fr conftest*
2567 ac_cv_sizeof_pthread_t=0
2568fi
2569rm -fr conftest*
2570fi
2571
2572
2573fi
2574
2575 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2576 cat >> confdefs.h <<EOF
2577#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2578EOF
2579
2580fi
2581
2582
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002583# Minor variations in building a framework between NextStep versions 4 and 5
2584
2585case $ac_sys_system/$ac_sys_release in
2586 next/4*)
2587 ns_undef_sym='__environ'
2588 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2589 next/5*)
2590 ns_undef_sym='_environ'
2591 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2592esac
2593
2594echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002595echo "configure:2596: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002596if test "$with_next_framework"
2597then
2598 OPT="$OPT -fno-common"
2599 # -U __environ is needed since bundles don't have access
2600 # to crt0 when built but will always be linked against it
2601 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2602 cat >> confdefs.h <<\EOF
2603#define WITH_NEXT_FRAMEWORK 1
2604EOF
2605
2606 echo "$ac_t""yes" 1>&6
2607else
2608 echo "$ac_t""no" 1>&6
2609fi
2610
2611echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002612echo "configure:2613: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002613if test "$with_next_framework" -o "$with_dyld"
2614then
2615 if test "$with_dyld"
2616 then
2617 echo "$ac_t""yes" 1>&6
2618 else
2619 echo "$ac_t""required for framework build" 1>&6
2620 fi
2621 cat >> confdefs.h <<\EOF
2622#define WITH_DYLD 1
2623EOF
2624
2625 ns_dyld='set'
2626else
2627 echo "$ac_t""no" 1>&6
2628fi
2629
Guido van Rossum0a516c91994-09-12 10:58:40 +00002630# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002631
2632
2633
2634
Guido van Rossum0a516c91994-09-12 10:58:40 +00002635# SO is the extension of shared libraries `(including the dot!)
2636# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002637echo $ac_n "checking SO""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002638echo "configure:2639: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002639if test -z "$SO"
2640then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002641 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002642 hp*|HP*) SO=.sl;;
2643 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002644 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002645fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002646echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002647# LDSHARED is the ld *command* used to create shared library
2648# -- "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 +00002649# (Shared libraries in this instance are shared modules to be loaded into
2650# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002651echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002652echo "configure:2653: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002653if test -z "$LDSHARED"
2654then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002655 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002656 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002657 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002658 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002659 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002660 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00002661 SunOS/5*)
2662 if test "$GCC" = "yes"
2663 then LDSHARED='$(CC) -G'
2664 else LDSHARED="ld -G";
2665 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002666 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002667 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2668 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002669 next/*)
2670 if test "$ns_dyld"
2671 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2672 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2673 fi
2674 if test "$with_next_framework" ; then
2675 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2676 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002677 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002678 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002679 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002680 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002681 NetBSD*)
2682 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2683 then
2684 LDSHARED="cc -shared"
2685 else
2686 LDSHARED="ld -Bshareable"
2687 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002688 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00002689 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00002690 then
2691 LDSHARED="cc -shared ${LDFLAGS}"
2692 else
2693 LDSHARED="ld -Bshareable ${LDFLAGS}"
2694 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002695 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002696 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002697 *) LDSHARED="ld";;
2698 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002699fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002700echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002701# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002702# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002703echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002704echo "configure:2705: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002705if test -z "$CCSHARED"
2706then
Guido van Rossum07397971997-04-29 21:49:50 +00002707 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002708 hp*|HP*) if test "$GCC" = yes;
2709 then CCSHARED="-fpic";
2710 else CCSHARED="+z";
2711 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002712 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002713 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002714 OpenBSD*) CCSHARED="-fpic";;
2715 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002716 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002717 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002718 IRIX*/6*) case $CC in
2719 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002720 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002721 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002722 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002723fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002724echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002725# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002726# the python executable -- this is only needed for a few systems
2727echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002728echo "configure:2729: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002729if test -z "$LINKFORSHARED"
2730then
Guido van Rossum07397971997-04-29 21:49:50 +00002731 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002732 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002733 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002734 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002735 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002736 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002737 # -u libsys_s pulls in all symbols in libsys
2738 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2739 # -u __dummy makes the linker aware of the objc runtime
2740 # in System.framework; otherwise, __objcInit (referenced in
2741 # crt1.o) gets erroneously defined as common, which breaks dynamic
2742 # loading of any modules which reference it in System.framework
2743 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002744 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00002745 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002746 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00002747 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2748 then
2749 LINKFORSHARED="-Wl,--export-dynamic"
2750 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002751 SunOS/5*) case $CC in
2752 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002753 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002754 then
2755 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002756 fi;;
2757 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002758 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002759fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002760echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002761
Guido van Rossum627b2d71993-12-24 10:39:16 +00002762# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002763echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002764echo "configure:2765: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002765ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002766if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002767 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002768else
2769 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002770LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002771cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002772#line 2773 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002773#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002774/* Override any gcc2 internal prototype to avoid an error. */
2775/* We use char because int might match the return type of a gcc2
2776 builtin and then its argument prototype would still apply. */
2777char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002778
Guido van Rossumf78abae1997-01-21 22:02:36 +00002779int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002780dlopen()
2781; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002782EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002783if { (eval echo configure:2784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002784 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002785 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002786else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002787 echo "configure: failed program was:" >&5
2788 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002789 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002790 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002791fi
2792rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002793LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002794
Guido van Rossum627b2d71993-12-24 10:39:16 +00002795fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002796if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002797 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002798 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2799 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002800 cat >> confdefs.h <<EOF
2801#define $ac_tr_lib 1
2802EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002803
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002804 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002805
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002806else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002807 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002808fi
2809 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002810echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002811echo "configure:2812: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002812ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002813if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002814 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002815else
2816 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002817LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002818cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002819#line 2820 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002820#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002821/* Override any gcc2 internal prototype to avoid an error. */
2822/* We use char because int might match the return type of a gcc2
2823 builtin and then its argument prototype would still apply. */
2824char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002825
Guido van Rossumf78abae1997-01-21 22:02:36 +00002826int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002827shl_load()
2828; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002829EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002830if { (eval echo configure:2831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002831 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002832 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002833else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002834 echo "configure: failed program was:" >&5
2835 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002836 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002837 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002838fi
2839rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002840LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002841
Guido van Rossum627b2d71993-12-24 10:39:16 +00002842fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002843if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002844 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002845 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2846 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002847 cat >> confdefs.h <<EOF
2848#define $ac_tr_lib 1
2849EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002850
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002851 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002852
2853else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002854 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002855fi
2856 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002857
Skip Montanarocb853262000-08-30 22:29:48 +00002858# Check for --with-pydebug
2859echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002860echo "configure:2861: checking for --with-pydebug" >&5
Skip Montanarocb853262000-08-30 22:29:48 +00002861# Check whether --with-pydebug or --without-pydebug was given.
2862if test "${with_pydebug+set}" = set; then
2863 withval="$with_pydebug"
2864
2865if test "$withval" != no
2866then cat >> confdefs.h <<\EOF
2867#define Py_DEBUG 1
2868EOF
2869 echo "$ac_t""yes" 1>&6
2870else echo "$ac_t""no" 1>&6
2871fi
2872else
2873 echo "$ac_t""no" 1>&6
2874fi
2875
2876
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002877# checks for system dependent C++ extensions support
2878case "$ac_sys_system" in
2879 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002880echo "configure:2881: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002881 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002882#line 2883 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002883#include "confdefs.h"
2884#include "/usr/lpp/xlC/include/load.h"
2885int main() {
2886loadAndInit("", 0, "")
2887; return 0; }
2888EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002889if { (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002890 rm -rf conftest*
2891 cat >> confdefs.h <<\EOF
2892#define AIX_GENUINE_CPLUSPLUS 1
2893EOF
2894
2895 echo "$ac_t""yes" 1>&6
2896else
2897 echo "configure: failed program was:" >&5
2898 cat conftest.$ac_ext >&5
2899 rm -rf conftest*
2900 echo "$ac_t""no" 1>&6
2901fi
2902rm -f conftest*;;
2903 *) ;;
2904esac
2905
Guido van Rossum70c7f481998-03-26 18:44:10 +00002906# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2907# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002908# BeOS' sockets are stashed in libnet.
2909case "$ac_sys_system" in
2910IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002911*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002912echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002913echo "configure:2914: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002914ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002915if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002916 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002917else
2918 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002919LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002920cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002921#line 2922 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002922#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002923/* Override any gcc2 internal prototype to avoid an error. */
2924/* We use char because int might match the return type of a gcc2
2925 builtin and then its argument prototype would still apply. */
2926char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002927
Guido van Rossumf78abae1997-01-21 22:02:36 +00002928int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002929t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002930; return 0; }
2931EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002932if { (eval echo configure:2933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002933 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002934 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002935else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002936 echo "configure: failed program was:" >&5
2937 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002938 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002939 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002940fi
2941rm -f conftest*
2942LIBS="$ac_save_LIBS"
2943
2944fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002945if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002946 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002947 LIBS="-lnsl $LIBS"
2948else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002949 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002950fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002951 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002952echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002953echo "configure:2954: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002954ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002955if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002956 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002957else
2958 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002959LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002960cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002961#line 2962 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002962#include "confdefs.h"
2963/* Override any gcc2 internal prototype to avoid an error. */
2964/* We use char because int might match the return type of a gcc2
2965 builtin and then its argument prototype would still apply. */
2966char socket();
2967
2968int main() {
2969socket()
2970; return 0; }
2971EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002972if { (eval echo configure:2973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002973 rm -rf conftest*
2974 eval "ac_cv_lib_$ac_lib_var=yes"
2975else
2976 echo "configure: failed program was:" >&5
2977 cat conftest.$ac_ext >&5
2978 rm -rf conftest*
2979 eval "ac_cv_lib_$ac_lib_var=no"
2980fi
2981rm -f conftest*
2982LIBS="$ac_save_LIBS"
2983
2984fi
2985if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2986 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002987 LIBS="-lsocket $LIBS"
2988else
2989 echo "$ac_t""no" 1>&6
2990fi
2991 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00002992;;
2993esac
2994case "$ac_sys_system" in
2995BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00002996echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002997echo "configure:2998: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002998ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Jeremy Hylton1bac6452000-09-26 16:57:37 +00002999if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003000 echo $ac_n "(cached) $ac_c" 1>&6
3001else
3002 ac_save_LIBS="$LIBS"
3003LIBS="-lnet $LIBS $LIBS"
3004cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003005#line 3006 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003006#include "confdefs.h"
3007/* Override any gcc2 internal prototype to avoid an error. */
3008/* We use char because int might match the return type of a gcc2
3009 builtin and then its argument prototype would still apply. */
3010char socket();
3011
3012int main() {
3013socket()
3014; return 0; }
3015EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003016if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003017 rm -rf conftest*
3018 eval "ac_cv_lib_$ac_lib_var=yes"
3019else
3020 echo "configure: failed program was:" >&5
3021 cat conftest.$ac_ext >&5
3022 rm -rf conftest*
3023 eval "ac_cv_lib_$ac_lib_var=no"
3024fi
3025rm -f conftest*
3026LIBS="$ac_save_LIBS"
3027
3028fi
3029if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3030 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003031 LIBS="-lnet $LIBS"
3032else
3033 echo "$ac_t""no" 1>&6
3034fi
3035 # BeOS
3036;;
3037esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003038
Guido van Rossuma68acba1996-07-31 17:36:39 +00003039echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003040echo "configure:3041: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003041# Check whether --with-libs or --without-libs was given.
3042if test "${with_libs+set}" = set; then
3043 withval="$with_libs"
3044
3045echo "$ac_t""$withval" 1>&6
3046LIBS="$withval $LIBS"
3047
3048else
3049 echo "$ac_t""no" 1>&6
3050fi
3051
Guido van Rossum7f43da71994-08-01 12:15:30 +00003052
Guido van Rossum009f7871997-12-04 00:51:42 +00003053
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003054USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003055
Guido van Rossumec2f0731997-01-22 20:54:01 +00003056echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003057echo "configure:3058: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003058
3059# Check whether --with-dec-threads or --without-dec-threads was given.
3060if test "${with_dec_threads+set}" = set; then
3061 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003062
3063echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003064LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003065if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003066 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003067fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003068else
3069 echo "$ac_t""no" 1>&6
3070fi
3071
3072
3073echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003074echo "configure:3075: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003075# Check whether --with-threads or --without-threads was given.
3076if test "${with_threads+set}" = set; then
3077 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003078 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003079fi
3080
3081
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003082# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003083# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003084if test "${with_thread+set}" = set; then
3085 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003086
3087with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003088fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003089
3090
3091if test -z "$with_threads"
3092then with_threads="yes"
3093fi
3094echo "$ac_t""$with_threads" 1>&6
3095
3096if test "$with_threads" = "no"
3097then
3098 USE_THREAD_MODULE="#"
3099else
3100 if test -d "$with_threads"
3101 then LDFLAGS="$LDFLAGS -L$with_threads"
3102 fi
3103 if test -d "$withval"
3104 then LDFLAGS="$LDFLAGS -L$withval"
3105 fi
3106 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003107#define _REENTRANT 1
3108EOF
3109
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003110 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003111echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003112echo "configure:3113: checking for mach/cthreads.h" >&5
3113if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003114 echo $ac_n "(cached) $ac_c" 1>&6
3115else
3116 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003117#line 3118 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003118#include "confdefs.h"
3119#include <mach/cthreads.h>
3120EOF
3121ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003122{ (eval echo configure:3123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003123ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003124if test -z "$ac_err"; then
3125 rm -rf conftest*
3126 eval "ac_cv_header_$ac_safe=yes"
3127else
3128 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003129 echo "configure: failed program was:" >&5
3130 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003131 rm -rf conftest*
3132 eval "ac_cv_header_$ac_safe=no"
3133fi
3134rm -f conftest*
3135fi
3136if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3137 echo "$ac_t""yes" 1>&6
3138 cat >> confdefs.h <<\EOF
3139#define WITH_THREAD 1
3140EOF
3141
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003142 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003143#define C_THREADS 1
3144EOF
3145
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003146 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003147else
3148 echo "$ac_t""no" 1>&6
3149
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003150 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003151echo "configure:3152: checking for --with-pth" >&5
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003152 # Check whether --with-pth or --without-pth was given.
3153if test "${with_pth+set}" = set; then
3154 withval="$with_pth"
3155
3156 echo "$ac_t""$withval" 1>&6
3157 cat >> confdefs.h <<\EOF
3158#define WITH_THREAD 1
3159EOF
3160
3161 cat >> confdefs.h <<\EOF
3162#define HAVE_PTH 1
3163EOF
3164
3165 LIBS="-lpth $LIBS"
3166 LIBOBJS="$LIBOBJS thread.o"
3167else
3168
3169 echo "$ac_t""no" 1>&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003170 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003171echo "configure:3172: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003172ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003173if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003174 echo $ac_n "(cached) $ac_c" 1>&6
3175else
3176 ac_save_LIBS="$LIBS"
3177LIBS="-lpthread $LIBS"
3178cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003179#line 3180 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003180#include "confdefs.h"
3181/* Override any gcc2 internal prototype to avoid an error. */
3182/* We use char because int might match the return type of a gcc2
3183 builtin and then its argument prototype would still apply. */
3184char pthread_create();
3185
3186int main() {
3187pthread_create()
3188; return 0; }
3189EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003190if { (eval echo configure:3191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003191 rm -rf conftest*
3192 eval "ac_cv_lib_$ac_lib_var=yes"
3193else
3194 echo "configure: failed program was:" >&5
3195 cat conftest.$ac_ext >&5
3196 rm -rf conftest*
3197 eval "ac_cv_lib_$ac_lib_var=no"
3198fi
3199rm -f conftest*
3200LIBS="$ac_save_LIBS"
3201
3202fi
3203if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3204 echo "$ac_t""yes" 1>&6
3205 cat >> confdefs.h <<\EOF
3206#define WITH_THREAD 1
3207EOF
3208
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003209 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003210#define _POSIX_THREADS 1
3211EOF
3212
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003213 LIBS="-lpthread $LIBS"
3214 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003215else
3216 echo "$ac_t""no" 1>&6
3217
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003218 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003219echo "configure:3220: checking for pthread_detach" >&5
3220if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003221 echo $ac_n "(cached) $ac_c" 1>&6
3222else
3223 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003224#line 3225 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003225#include "confdefs.h"
3226/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003227 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003228#include <assert.h>
3229/* Override any gcc2 internal prototype to avoid an error. */
3230/* We use char because int might match the return type of a gcc2
3231 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003232char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003233
3234int main() {
3235
3236/* The GNU C library defines this for functions which it implements
3237 to always fail with ENOSYS. Some functions are actually named
3238 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003239#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003240choke me
3241#else
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003242pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003243#endif
3244
3245; return 0; }
3246EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003247if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003248 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003249 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003250else
3251 echo "configure: failed program was:" >&5
3252 cat conftest.$ac_ext >&5
3253 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003254 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003255fi
3256rm -f conftest*
3257fi
3258
Guido van Rossumea516321998-12-17 18:08:55 +00003259if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003260 echo "$ac_t""yes" 1>&6
3261 cat >> confdefs.h <<\EOF
3262#define WITH_THREAD 1
3263EOF
3264
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003265 cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003266#define _POSIX_THREADS 1
3267EOF
3268
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003269 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003270else
3271 echo "$ac_t""no" 1>&6
3272
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003273 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003274echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003275echo "configure:3276: checking for kernel/OS.h" >&5
3276if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003277 echo $ac_n "(cached) $ac_c" 1>&6
3278else
3279 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003280#line 3281 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003281#include "confdefs.h"
3282#include <kernel/OS.h>
3283EOF
3284ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003285{ (eval echo configure:3286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003286ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003287if test -z "$ac_err"; then
3288 rm -rf conftest*
3289 eval "ac_cv_header_$ac_safe=yes"
3290else
3291 echo "$ac_err" >&5
3292 echo "configure: failed program was:" >&5
3293 cat conftest.$ac_ext >&5
3294 rm -rf conftest*
3295 eval "ac_cv_header_$ac_safe=no"
3296fi
3297rm -f conftest*
3298fi
3299if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3300 echo "$ac_t""yes" 1>&6
3301 cat >> confdefs.h <<\EOF
3302#define WITH_THREAD 1
3303EOF
3304
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003305 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003306#define BEOS_THREADS 1
3307EOF
3308
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003309 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003310else
3311 echo "$ac_t""no" 1>&6
3312
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003313 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003314echo "configure:3315: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003315ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003316if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003317 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003318else
3319 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003320LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003321cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003322#line 3323 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003323#include "confdefs.h"
3324/* Override any gcc2 internal prototype to avoid an error. */
3325/* We use char because int might match the return type of a gcc2
3326 builtin and then its argument prototype would still apply. */
3327char pthread_create();
3328
3329int main() {
3330pthread_create()
3331; return 0; }
3332EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003333if { (eval echo configure:3334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003334 rm -rf conftest*
3335 eval "ac_cv_lib_$ac_lib_var=yes"
3336else
3337 echo "configure: failed program was:" >&5
3338 cat conftest.$ac_ext >&5
3339 rm -rf conftest*
3340 eval "ac_cv_lib_$ac_lib_var=no"
3341fi
3342rm -f conftest*
3343LIBS="$ac_save_LIBS"
3344
3345fi
3346if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3347 echo "$ac_t""yes" 1>&6
3348 cat >> confdefs.h <<\EOF
3349#define WITH_THREAD 1
3350EOF
3351
3352 cat >> confdefs.h <<\EOF
3353#define _POSIX_THREADS 1
3354EOF
3355
3356 LIBS="$LIBS -lpthreads"
3357 LIBOBJS="$LIBOBJS thread.o"
3358else
3359 echo "$ac_t""no" 1>&6
3360
3361 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003362echo "configure:3363: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003363ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003364if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003365 echo $ac_n "(cached) $ac_c" 1>&6
3366else
3367 ac_save_LIBS="$LIBS"
3368LIBS="-lc_r $LIBS"
3369cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003370#line 3371 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003371#include "confdefs.h"
3372/* Override any gcc2 internal prototype to avoid an error. */
3373/* We use char because int might match the return type of a gcc2
3374 builtin and then its argument prototype would still apply. */
3375char pthread_create();
3376
3377int main() {
3378pthread_create()
3379; return 0; }
3380EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003381if { (eval echo configure:3382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003382 rm -rf conftest*
3383 eval "ac_cv_lib_$ac_lib_var=yes"
3384else
3385 echo "configure: failed program was:" >&5
3386 cat conftest.$ac_ext >&5
3387 rm -rf conftest*
3388 eval "ac_cv_lib_$ac_lib_var=no"
3389fi
3390rm -f conftest*
3391LIBS="$ac_save_LIBS"
3392
3393fi
3394if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3395 echo "$ac_t""yes" 1>&6
3396 cat >> confdefs.h <<\EOF
3397#define WITH_THREAD 1
3398EOF
3399
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003400 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003401#define _POSIX_THREADS 1
3402EOF
3403
Greg Steinadf63d62000-07-05 10:38:09 +00003404 LIBS="$LIBS -lc_r"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003405 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003406else
3407 echo "$ac_t""no" 1>&6
3408
Greg Steinadf63d62000-07-05 10:38:09 +00003409 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003410echo "configure:3411: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003411ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003412if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003413 echo $ac_n "(cached) $ac_c" 1>&6
3414else
3415 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003416LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003417cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003418#line 3419 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003419#include "confdefs.h"
3420/* Override any gcc2 internal prototype to avoid an error. */
3421/* We use char because int might match the return type of a gcc2
3422 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003423char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003424
3425int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003426__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003427; return 0; }
3428EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003429if { (eval echo configure:3430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003430 rm -rf conftest*
3431 eval "ac_cv_lib_$ac_lib_var=yes"
3432else
3433 echo "configure: failed program was:" >&5
3434 cat conftest.$ac_ext >&5
3435 rm -rf conftest*
3436 eval "ac_cv_lib_$ac_lib_var=no"
3437fi
3438rm -f conftest*
3439LIBS="$ac_save_LIBS"
3440
3441fi
3442if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = 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 Rossum07bd90e2000-05-08 13:41:38 +00003449#define _POSIX_THREADS 1
3450EOF
3451
Greg Steinadf63d62000-07-05 10:38:09 +00003452 LIBS="$LIBS -lthread"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003453 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003454else
3455 echo "$ac_t""no" 1>&6
3456
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003457 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003458echo "configure:3459: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003459ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003460if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003461 echo $ac_n "(cached) $ac_c" 1>&6
3462else
3463 ac_save_LIBS="$LIBS"
3464LIBS="-lcma $LIBS"
3465cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003466#line 3467 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003467#include "confdefs.h"
3468/* Override any gcc2 internal prototype to avoid an error. */
3469/* We use char because int might match the return type of a gcc2
3470 builtin and then its argument prototype would still apply. */
3471char pthread_create();
3472
3473int main() {
3474pthread_create()
3475; return 0; }
3476EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003477if { (eval echo configure:3478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003478 rm -rf conftest*
3479 eval "ac_cv_lib_$ac_lib_var=yes"
3480else
3481 echo "configure: failed program was:" >&5
3482 cat conftest.$ac_ext >&5
3483 rm -rf conftest*
3484 eval "ac_cv_lib_$ac_lib_var=no"
3485fi
3486rm -f conftest*
3487LIBS="$ac_save_LIBS"
3488
3489fi
3490if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3491 echo "$ac_t""yes" 1>&6
3492 cat >> confdefs.h <<\EOF
3493#define WITH_THREAD 1
3494EOF
3495
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003496 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003497#define _POSIX_THREADS 1
3498EOF
3499
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003500 LIBS="$LIBS -lcma"
3501 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003502else
3503 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003504
3505 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003506fi
3507
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003508
Guido van Rossum627b2d71993-12-24 10:39:16 +00003509fi
3510
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003511fi
3512
Guido van Rossum0be3e491997-05-22 20:33:33 +00003513fi
3514
Guido van Rossum49545951997-12-02 19:28:29 +00003515fi
3516
Guido van Rossumb93a8621998-05-07 13:27:32 +00003517fi
3518
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003519fi
3520
Guido van Rossumad678af1998-10-02 14:42:15 +00003521fi
3522
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003523fi
3524
Guido van Rossum0be3e491997-05-22 20:33:33 +00003525
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003526 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003527echo "configure:3528: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003528ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003529if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003530 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003531else
3532 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003533LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003534cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003535#line 3536 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003536#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003537/* Override any gcc2 internal prototype to avoid an error. */
3538/* We use char because int might match the return type of a gcc2
3539 builtin and then its argument prototype would still apply. */
3540char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003541
Guido van Rossumf78abae1997-01-21 22:02:36 +00003542int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003543usconfig()
3544; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003545EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003546if { (eval echo configure:3547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003547 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003548 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003549else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003550 echo "configure: failed program was:" >&5
3551 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003552 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003553 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003554fi
3555rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003556LIBS="$ac_save_LIBS"
3557
3558fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003559if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003560 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003561 cat >> confdefs.h <<\EOF
3562#define WITH_THREAD 1
3563EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003564
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003565 LIBS="$LIBS -lmpc"
3566 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003567 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003568else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003569 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003570fi
3571
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003572 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003573echo "configure:3574: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003574ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003575if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003576 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003577else
3578 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003579LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003580cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003581#line 3582 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003582#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003583/* Override any gcc2 internal prototype to avoid an error. */
3584/* We use char because int might match the return type of a gcc2
3585 builtin and then its argument prototype would still apply. */
3586char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003587
Guido van Rossumf78abae1997-01-21 22:02:36 +00003588int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003589thr_create()
3590; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003591EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003592if { (eval echo configure:3593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003593 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003594 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003595else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003596 echo "configure: failed program was:" >&5
3597 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003598 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003599 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003600fi
3601rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003602LIBS="$ac_save_LIBS"
3603
3604fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003605if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003606 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003607 cat >> confdefs.h <<\EOF
3608#define WITH_THREAD 1
3609EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003610
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003611 LIBS="$LIBS -lthread"
3612 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003613 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003614else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003615 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003616fi
3617
Guido van Rossum627b2d71993-12-24 10:39:16 +00003618fi
3619
Barry Warsawef82cd72000-06-30 16:21:01 +00003620# Check for GC support
3621
3622USE_GC_MODULE=""
3623echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003624echo "configure:3625: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003625# Check whether --with-cycle-gc or --without-cycle-gc was given.
3626if test "${with_cycle_gc+set}" = set; then
3627 withval="$with_cycle_gc"
3628 :
3629fi
3630
3631
3632if test -z "$with_cycle_gc"
3633then with_cycle_gc="yes"
3634fi
3635if test "$with_cycle_gc" = "no"
3636then
3637 USE_GC_MODULE="#"
3638else
3639 cat >> confdefs.h <<\EOF
3640#define WITH_CYCLE_GC 1
3641EOF
3642
3643fi
3644echo "$ac_t""$with_cycle_gc" 1>&6
3645
Fred Drakea50d6ec2000-08-31 16:13:20 +00003646# Check for LIBDB support
3647# either --with-libdb or, in its absence, the presence of db.h
3648
3649USE_BSDDB_MODULE=""
3650echo $ac_n "checking for --with-libdb""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003651echo "configure:3652: checking for --with-libdb" >&5
Fred Drakea50d6ec2000-08-31 16:13:20 +00003652# Check whether --with-libdb or --without-libdb was given.
3653if test "${with_libdb+set}" = set; then
3654 withval="$with_libdb"
3655 :
3656fi
3657
3658
Skip Montanarob89f41e2000-09-04 04:06:05 +00003659# enabled by default, but db.h must be found
3660if test "$ac_cv_header_db_h" = "yes"
3661then
3662 if test "$with_libdb" != "no"
3663 then with_libdb="yes"
3664 fi
3665else
3666 # make sure user knows why bsddb support wasn't enabled event
3667 # though s/he requested it
3668 if test "$with_libdb" = "yes"
3669 then echo $ac_n "(requested, but db.h was not found) $ac_c"
3670 fi
3671 with_libdb="no"
Fred Drakea50d6ec2000-08-31 16:13:20 +00003672fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00003673
Fred Drakea50d6ec2000-08-31 16:13:20 +00003674if test "$with_libdb" = "no"
3675then
3676 USE_BSDDB_MODULE="#"
3677else
3678 cat >> confdefs.h <<\EOF
3679#define WITH_LIBDB 1
3680EOF
3681
3682fi
3683echo "$ac_t""$with_libdb" 1>&6
3684
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003685if test "$with_libdb" = "yes"
3686then
3687 # check for libdb; BSD systems have the DB routines in libc --tg
3688
Martin v. Löwis05a65d62000-09-24 19:40:25 +00003689 # If dbopen is not in libc, then checking whether it is in libdb
3690 # is difficult: db_185.h may #define it as __db185_open
Fred Drake02706f52000-09-25 15:08:46 +00003691 # Instead, we just trust it is in libdb; linking will fail if it
3692 # is not.
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003693 echo $ac_n "checking for dbopen""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003694echo "configure:3695: checking for dbopen" >&5
3695if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003696 echo $ac_n "(cached) $ac_c" 1>&6
3697else
3698 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003699#line 3700 "configure"
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003700#include "confdefs.h"
3701/* System header to define __stub macros and hopefully few prototypes,
3702 which can conflict with char dbopen(); below. */
3703#include <assert.h>
3704/* Override any gcc2 internal prototype to avoid an error. */
3705/* We use char because int might match the return type of a gcc2
3706 builtin and then its argument prototype would still apply. */
3707char dbopen();
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003708
3709int main() {
3710
3711/* The GNU C library defines this for functions which it implements
3712 to always fail with ENOSYS. Some functions are actually named
3713 something starting with __ and the normal name is an alias. */
3714#if defined (__stub_dbopen) || defined (__stub___dbopen)
3715choke me
3716#else
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003717dbopen();
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003718#endif
3719
3720; return 0; }
3721EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003722if { (eval echo configure:3723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003723 rm -rf conftest*
3724 eval "ac_cv_func_dbopen=yes"
3725else
3726 echo "configure: failed program was:" >&5
3727 cat conftest.$ac_ext >&5
3728 rm -rf conftest*
3729 eval "ac_cv_func_dbopen=no"
3730fi
3731rm -f conftest*
3732fi
3733
3734if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
3735 echo "$ac_t""yes" 1>&6
3736 HAVE_LIBDB=
3737else
3738 echo "$ac_t""no" 1>&6
Martin v. Löwis05a65d62000-09-24 19:40:25 +00003739HAVE_LIBDB=-ldb
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003740fi
3741
3742fi
3743
Barry Warsawef82cd72000-06-30 16:21:01 +00003744# Check for --with-wctype-functions
3745echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003746echo "configure:3747: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003747# Check whether --with-wctype-functions or --without-wctype-functions was given.
3748if test "${with_wctype_functions+set}" = set; then
3749 withval="$with_wctype_functions"
3750
3751if test "$withval" != no
3752then cat >> confdefs.h <<\EOF
3753#define WANT_WCTYPE_FUNCTIONS 1
3754EOF
3755 echo "$ac_t""yes" 1>&6
3756else echo "$ac_t""no" 1>&6
3757fi
3758else
3759 echo "$ac_t""no" 1>&6
3760fi
3761
3762
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003763# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00003764
3765DLINCLDIR=/
3766
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003767echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003768echo "configure:3769: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003769# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003770if test "${with_sgi_dl+set}" = set; then
3771 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003772
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003773echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003774cat >> confdefs.h <<\EOF
3775#define WITH_SGI_DL 1
3776EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003777
Guido van Rossume97ee181999-12-20 21:27:22 +00003778DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003779dldir=$withval
3780if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003781then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003782else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003783fi
3784DLINCLDIR=${dldir}
3785LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003786else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003787 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003788fi
3789
3790
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003791echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003792echo "configure:3793: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003793# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003794if test "${with_dl_dld+set}" = set; then
3795 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003796
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003797echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003798cat >> confdefs.h <<\EOF
3799#define WITH_DL_DLD 1
3800EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003801
Guido van Rossume97ee181999-12-20 21:27:22 +00003802DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003803dldir=`echo "$withval" | sed 's/,.*//'`
3804dlddir=`echo "$withval" | sed 's/.*,//'`
3805if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003806then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003807else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003808fi
3809DLINCLDIR=${dldir}
3810LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003811else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003812 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003813fi
3814
3815
Guido van Rossume97ee181999-12-20 21:27:22 +00003816# the dlopen() function means we might want to use dynload_shlib.o. some
3817# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00003818for ac_func in dlopen
3819do
3820echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003821echo "configure:3822: checking for $ac_func" >&5
3822if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003823 echo $ac_n "(cached) $ac_c" 1>&6
3824else
3825 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003826#line 3827 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00003827#include "confdefs.h"
3828/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00003829 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00003830#include <assert.h>
3831/* Override any gcc2 internal prototype to avoid an error. */
3832/* We use char because int might match the return type of a gcc2
3833 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003834char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00003835
3836int main() {
3837
3838/* The GNU C library defines this for functions which it implements
3839 to always fail with ENOSYS. Some functions are actually named
3840 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003841#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00003842choke me
3843#else
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003844$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00003845#endif
3846
3847; return 0; }
3848EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003849if { (eval echo configure:3850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003850 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003851 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00003852else
3853 echo "configure: failed program was:" >&5
3854 cat conftest.$ac_ext >&5
3855 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003856 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00003857fi
3858rm -f conftest*
3859fi
3860
Thomas Wouters3a584202000-08-05 23:28:51 +00003861if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003862 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00003863 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3864 cat >> confdefs.h <<EOF
3865#define $ac_tr_func 1
3866EOF
3867
Guido van Rossume97ee181999-12-20 21:27:22 +00003868else
3869 echo "$ac_t""no" 1>&6
3870fi
Thomas Wouters3a584202000-08-05 23:28:51 +00003871done
Guido van Rossume97ee181999-12-20 21:27:22 +00003872
3873
3874# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3875# loading of modules.
3876
3877echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003878echo "configure:3879: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00003879if test -z "$DYNLOADFILE"
3880then
3881 case $ac_sys_system/$ac_sys_release in
3882 AIX*) DYNLOADFILE="dynload_aix.o";;
3883 BeOS*) DYNLOADFILE="dynload_beos.o";;
3884 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
3885 next/*) DYNLOADFILE="dynload_next.o";;
3886 *)
3887 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
3888 # out any dynamic loading
3889 if test "$ac_cv_func_dlopen" = yes
3890 then DYNLOADFILE="dynload_shlib.o"
3891 else DYNLOADFILE="dynload_stub.o"
3892 fi
3893 ;;
3894 esac
3895fi
3896echo "$ac_t""$DYNLOADFILE" 1>&6
3897if test "$DYNLOADFILE" != "dynload_stub.o"
3898then
3899 cat >> confdefs.h <<\EOF
3900#define HAVE_DYNAMIC_LOADING 1
3901EOF
3902
3903fi
3904
Guido van Rossum627b2d71993-12-24 10:39:16 +00003905# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00003906for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00003907 flock fork fsync fdatasync fpathconf ftime ftruncate \
Thomas Wouters3a584202000-08-05 23:28:51 +00003908 getgroups getlogin getpeername getpid getpwent getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00003909 kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00003910 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00003911 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003912 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00003913 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00003914 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00003915 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters70c21a12000-07-14 14:28:33 +00003916 truncate uname waitpid _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003917do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003918echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003919echo "configure:3920: checking for $ac_func" >&5
3920if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003921 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003922else
3923 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003924#line 3925 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003925#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003926/* System header to define __stub macros and hopefully few prototypes,
3927 which can conflict with char $ac_func(); below. */
3928#include <assert.h>
3929/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003930/* We use char because int might match the return type of a gcc2
3931 builtin and then its argument prototype would still apply. */
3932char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003933
Guido van Rossumf78abae1997-01-21 22:02:36 +00003934int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003935
Guido van Rossum627b2d71993-12-24 10:39:16 +00003936/* The GNU C library defines this for functions which it implements
3937 to always fail with ENOSYS. Some functions are actually named
3938 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003939#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003940choke me
3941#else
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003942$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003943#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003944
Guido van Rossum7f43da71994-08-01 12:15:30 +00003945; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003946EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003947if { (eval echo configure:3948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003948 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003949 eval "ac_cv_func_$ac_func=yes"
3950else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003951 echo "configure: failed program was:" >&5
3952 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003953 rm -rf conftest*
3954 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003955fi
3956rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003957fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003958
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003959if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003960 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003961 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003962 cat >> confdefs.h <<EOF
3963#define $ac_tr_func 1
3964EOF
3965
3966else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003967 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003968fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003969done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003970
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003971
Fred Drake8cef4cf2000-06-28 16:40:38 +00003972# check for openpty and forkpty
3973
3974for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003975do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003976echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003977echo "configure:3978: checking for $ac_func" >&5
3978if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003979 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003980else
3981 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00003982#line 3983 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003983#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003984/* System header to define __stub macros and hopefully few prototypes,
3985 which can conflict with char $ac_func(); below. */
3986#include <assert.h>
3987/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003988/* We use char because int might match the return type of a gcc2
3989 builtin and then its argument prototype would still apply. */
3990char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003991
Guido van Rossumf78abae1997-01-21 22:02:36 +00003992int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003993
Guido van Rossum627b2d71993-12-24 10:39:16 +00003994/* The GNU C library defines this for functions which it implements
3995 to always fail with ENOSYS. Some functions are actually named
3996 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003997#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003998choke me
3999#else
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004000$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004001#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004002
Guido van Rossum7f43da71994-08-01 12:15:30 +00004003; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004004EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004005if { (eval echo configure:4006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004006 rm -rf conftest*
4007 eval "ac_cv_func_$ac_func=yes"
4008else
4009 echo "configure: failed program was:" >&5
4010 cat conftest.$ac_ext >&5
4011 rm -rf conftest*
4012 eval "ac_cv_func_$ac_func=no"
4013fi
4014rm -f conftest*
4015fi
4016
4017if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4018 echo "$ac_t""yes" 1>&6
4019 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4020 cat >> confdefs.h <<EOF
4021#define $ac_tr_func 1
4022EOF
4023
4024else
4025 echo "$ac_t""no" 1>&6
4026echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004027echo "configure:4028: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004028ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004029if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004030 echo $ac_n "(cached) $ac_c" 1>&6
4031else
4032 ac_save_LIBS="$LIBS"
4033LIBS="-lutil $LIBS"
4034cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004035#line 4036 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004036#include "confdefs.h"
4037/* Override any gcc2 internal prototype to avoid an error. */
4038/* We use char because int might match the return type of a gcc2
4039 builtin and then its argument prototype would still apply. */
4040char openpty();
4041
4042int main() {
4043openpty()
4044; return 0; }
4045EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004046if { (eval echo configure:4047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004047 rm -rf conftest*
4048 eval "ac_cv_lib_$ac_lib_var=yes"
4049else
4050 echo "configure: failed program was:" >&5
4051 cat conftest.$ac_ext >&5
4052 rm -rf conftest*
4053 eval "ac_cv_lib_$ac_lib_var=no"
4054fi
4055rm -f conftest*
4056LIBS="$ac_save_LIBS"
4057
4058fi
4059if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4060 echo "$ac_t""yes" 1>&6
4061 cat >> confdefs.h <<\EOF
4062#define HAVE_OPENPTY 1
4063EOF
4064 LIBS="$LIBS -lutil"
4065else
4066 echo "$ac_t""no" 1>&6
4067fi
4068
4069fi
4070done
4071
4072for ac_func in forkpty
4073do
4074echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004075echo "configure:4076: checking for $ac_func" >&5
4076if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004077 echo $ac_n "(cached) $ac_c" 1>&6
4078else
4079 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004080#line 4081 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004081#include "confdefs.h"
4082/* System header to define __stub macros and hopefully few prototypes,
4083 which can conflict with char $ac_func(); below. */
4084#include <assert.h>
4085/* Override any gcc2 internal prototype to avoid an error. */
4086/* We use char because int might match the return type of a gcc2
4087 builtin and then its argument prototype would still apply. */
4088char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004089
4090int main() {
4091
4092/* The GNU C library defines this for functions which it implements
4093 to always fail with ENOSYS. Some functions are actually named
4094 something starting with __ and the normal name is an alias. */
4095#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4096choke me
4097#else
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004098$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004099#endif
4100
4101; return 0; }
4102EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004103if { (eval echo configure:4104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004104 rm -rf conftest*
4105 eval "ac_cv_func_$ac_func=yes"
4106else
4107 echo "configure: failed program was:" >&5
4108 cat conftest.$ac_ext >&5
4109 rm -rf conftest*
4110 eval "ac_cv_func_$ac_func=no"
4111fi
4112rm -f conftest*
4113fi
4114
4115if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4116 echo "$ac_t""yes" 1>&6
4117 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4118 cat >> confdefs.h <<EOF
4119#define $ac_tr_func 1
4120EOF
4121
4122else
4123 echo "$ac_t""no" 1>&6
4124echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004125echo "configure:4126: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004126ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004127if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004128 echo $ac_n "(cached) $ac_c" 1>&6
4129else
4130 ac_save_LIBS="$LIBS"
4131LIBS="-lutil $LIBS"
4132cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004133#line 4134 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004134#include "confdefs.h"
4135/* Override any gcc2 internal prototype to avoid an error. */
4136/* We use char because int might match the return type of a gcc2
4137 builtin and then its argument prototype would still apply. */
4138char forkpty();
4139
4140int main() {
4141forkpty()
4142; return 0; }
4143EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004144if { (eval echo configure:4145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004145 rm -rf conftest*
4146 eval "ac_cv_lib_$ac_lib_var=yes"
4147else
4148 echo "configure: failed program was:" >&5
4149 cat conftest.$ac_ext >&5
4150 rm -rf conftest*
4151 eval "ac_cv_lib_$ac_lib_var=no"
4152fi
4153rm -f conftest*
4154LIBS="$ac_save_LIBS"
4155
4156fi
4157if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4158 echo "$ac_t""yes" 1>&6
4159 cat >> confdefs.h <<\EOF
4160#define HAVE_FORKPTY 1
4161EOF
4162 LIBS="$LIBS -lutil"
4163else
4164 echo "$ac_t""no" 1>&6
4165fi
4166
4167fi
4168done
4169
4170
4171# check for long file support functions
4172for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4173do
4174echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004175echo "configure:4176: checking for $ac_func" >&5
4176if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004177 echo $ac_n "(cached) $ac_c" 1>&6
4178else
4179 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004180#line 4181 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004181#include "confdefs.h"
4182/* System header to define __stub macros and hopefully few prototypes,
4183 which can conflict with char $ac_func(); below. */
4184#include <assert.h>
4185/* Override any gcc2 internal prototype to avoid an error. */
4186/* We use char because int might match the return type of a gcc2
4187 builtin and then its argument prototype would still apply. */
4188char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004189
4190int main() {
4191
4192/* The GNU C library defines this for functions which it implements
4193 to always fail with ENOSYS. Some functions are actually named
4194 something starting with __ and the normal name is an alias. */
4195#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4196choke me
4197#else
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004198$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004199#endif
4200
4201; return 0; }
4202EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004203if { (eval echo configure:4204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004204 rm -rf conftest*
4205 eval "ac_cv_func_$ac_func=yes"
4206else
4207 echo "configure: failed program was:" >&5
4208 cat conftest.$ac_ext >&5
4209 rm -rf conftest*
4210 eval "ac_cv_func_$ac_func=no"
4211fi
4212rm -f conftest*
4213fi
4214
4215if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4216 echo "$ac_t""yes" 1>&6
4217 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4218 cat >> confdefs.h <<EOF
4219#define $ac_tr_func 1
4220EOF
4221
4222else
4223 echo "$ac_t""no" 1>&6
4224fi
4225done
4226
4227
4228for ac_func in dup2 getcwd strdup strerror memmove
4229do
4230echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004231echo "configure:4232: checking for $ac_func" >&5
4232if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004233 echo $ac_n "(cached) $ac_c" 1>&6
4234else
4235 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004236#line 4237 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004237#include "confdefs.h"
4238/* System header to define __stub macros and hopefully few prototypes,
4239 which can conflict with char $ac_func(); below. */
4240#include <assert.h>
4241/* Override any gcc2 internal prototype to avoid an error. */
4242/* We use char because int might match the return type of a gcc2
4243 builtin and then its argument prototype would still apply. */
4244char $ac_func();
4245
4246int main() {
4247
4248/* The GNU C library defines this for functions which it implements
4249 to always fail with ENOSYS. Some functions are actually named
4250 something starting with __ and the normal name is an alias. */
4251#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4252choke me
4253#else
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004254$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004255#endif
4256
4257; return 0; }
4258EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004259if { (eval echo configure:4260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004260 rm -rf conftest*
4261 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004262else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004263 echo "configure: failed program was:" >&5
4264 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004265 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004266 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004267fi
4268rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004269fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004270
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004271if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004272 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004273 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4274 cat >> confdefs.h <<EOF
4275#define $ac_tr_func 1
4276EOF
4277
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004278else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004279 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004280LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004281fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004282done
4283
Guido van Rossumf78abae1997-01-21 22:02:36 +00004284
Thomas Wouters3a584202000-08-05 23:28:51 +00004285for ac_func in getpgrp
4286do
4287echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004288echo "configure:4289: checking for $ac_func" >&5
4289if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004290 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004291else
4292 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004293#line 4294 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004294#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004295/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004296 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004297#include <assert.h>
4298/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004299/* We use char because int might match the return type of a gcc2
4300 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004301char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004302
Guido van Rossumf78abae1997-01-21 22:02:36 +00004303int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004304
Guido van Rossum627b2d71993-12-24 10:39:16 +00004305/* The GNU C library defines this for functions which it implements
4306 to always fail with ENOSYS. Some functions are actually named
4307 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004308#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004309choke me
4310#else
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004311$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004312#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004313
4314; return 0; }
4315EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004316if { (eval echo configure:4317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004317 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004318 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004319else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004320 echo "configure: failed program was:" >&5
4321 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004322 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004323 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004324fi
4325rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004326fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004327
Thomas Wouters3a584202000-08-05 23:28:51 +00004328if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004329 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004330 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4331 cat >> confdefs.h <<EOF
4332#define $ac_tr_func 1
4333EOF
4334 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004335#line 4336 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004336#include "confdefs.h"
4337#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004338int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004339getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004340; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004341EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004342if { (eval echo configure:4343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004343 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004344 cat >> confdefs.h <<\EOF
4345#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004346EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004347
Guido van Rossumf78abae1997-01-21 22:02:36 +00004348else
4349 echo "configure: failed program was:" >&5
4350 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004351fi
4352rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004353else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004354 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004355fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004356done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004357
Thomas Wouters3a584202000-08-05 23:28:51 +00004358for ac_func in setpgrp
4359do
4360echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004361echo "configure:4362: checking for $ac_func" >&5
4362if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004363 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004364else
4365 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004366#line 4367 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004367#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004368/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004369 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004370#include <assert.h>
4371/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004372/* We use char because int might match the return type of a gcc2
4373 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004374char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004375
Guido van Rossumf78abae1997-01-21 22:02:36 +00004376int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004377
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004378/* The GNU C library defines this for functions which it implements
4379 to always fail with ENOSYS. Some functions are actually named
4380 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004381#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004382choke me
4383#else
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004384$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004385#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004386
4387; return 0; }
4388EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004389if { (eval echo configure:4390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004390 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004391 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004392else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004393 echo "configure: failed program was:" >&5
4394 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004395 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004396 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004397fi
4398rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004399fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004400
Thomas Wouters3a584202000-08-05 23:28:51 +00004401if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004402 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004403 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4404 cat >> confdefs.h <<EOF
4405#define $ac_tr_func 1
4406EOF
4407 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004408#line 4409 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004409#include "confdefs.h"
4410#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004411int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004412setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004413; return 0; }
4414EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004415if { (eval echo configure:4416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004416 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004417 cat >> confdefs.h <<\EOF
4418#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004419EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004420
Guido van Rossumf78abae1997-01-21 22:02:36 +00004421else
4422 echo "configure: failed program was:" >&5
4423 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004424fi
4425rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004426else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004427 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004428fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004429done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004430
Thomas Wouters3a584202000-08-05 23:28:51 +00004431for ac_func in gettimeofday
4432do
4433echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004434echo "configure:4435: checking for $ac_func" >&5
4435if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004436 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004437else
4438 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004439#line 4440 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004440#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004441/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004442 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004443#include <assert.h>
4444/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004445/* We use char because int might match the return type of a gcc2
4446 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004447char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004448
Guido van Rossumf78abae1997-01-21 22:02:36 +00004449int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004450
4451/* The GNU C library defines this for functions which it implements
4452 to always fail with ENOSYS. Some functions are actually named
4453 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004454#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004455choke me
4456#else
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004457$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004458#endif
4459
4460; return 0; }
4461EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004462if { (eval echo configure:4463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004463 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004464 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004465else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004466 echo "configure: failed program was:" >&5
4467 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004468 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004469 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004470fi
4471rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004472fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004473
Thomas Wouters3a584202000-08-05 23:28:51 +00004474if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004475 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004476 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4477 cat >> confdefs.h <<EOF
4478#define $ac_tr_func 1
4479EOF
4480 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004481#line 4482 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004482#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004483#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004484int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004485gettimeofday((struct timeval*)0,(struct timezone*)0);
4486; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004487EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004488if { (eval echo configure:4489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004489 :
4490else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004491 echo "configure: failed program was:" >&5
4492 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004493 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004494 cat >> confdefs.h <<\EOF
4495#define GETTIMEOFDAY_NO_TZ 1
4496EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004497
4498fi
4499rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004500else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004501 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004502fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004503done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004504
4505
4506# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004507echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004508echo "configure:4509: checking whether time.h and sys/time.h may both be included" >&5
4509if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004510 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004511else
4512 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004513#line 4514 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004514#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004515#include <sys/types.h>
4516#include <sys/time.h>
4517#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004518int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004519struct tm *tp;
4520; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004521EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004522if { (eval echo configure:4523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004523 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004524 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004525else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004526 echo "configure: failed program was:" >&5
4527 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004528 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004529 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004530fi
4531rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004532fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004533
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004534echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004535if test $ac_cv_header_time = yes; then
4536 cat >> confdefs.h <<\EOF
4537#define TIME_WITH_SYS_TIME 1
4538EOF
4539
4540fi
4541
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004542echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004543echo "configure:4544: checking whether struct tm is in sys/time.h or time.h" >&5
4544if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004545 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004546else
4547 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004548#line 4549 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004549#include "confdefs.h"
4550#include <sys/types.h>
4551#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004552int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004553struct tm *tp; tp->tm_sec;
4554; return 0; }
4555EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004556if { (eval echo configure:4557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004557 rm -rf conftest*
4558 ac_cv_struct_tm=time.h
4559else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004560 echo "configure: failed program was:" >&5
4561 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004562 rm -rf conftest*
4563 ac_cv_struct_tm=sys/time.h
4564fi
4565rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004566fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004567
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004568echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004569if test $ac_cv_struct_tm = sys/time.h; then
4570 cat >> confdefs.h <<\EOF
4571#define TM_IN_SYS_TIME 1
4572EOF
4573
4574fi
4575
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004576echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4577echo "configure:4578: checking for tm_zone in struct tm" >&5
4578if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004579 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004580else
4581 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004582#line 4583 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004583#include "confdefs.h"
4584#include <sys/types.h>
4585#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004586int main() {
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004587struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004588; return 0; }
4589EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004590if { (eval echo configure:4591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004591 rm -rf conftest*
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004592 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004593else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004594 echo "configure: failed program was:" >&5
4595 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004596 rm -rf conftest*
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004597 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004598fi
4599rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004600fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004601
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004602echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4603if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004604 cat >> confdefs.h <<\EOF
4605#define HAVE_TM_ZONE 1
4606EOF
4607
4608else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004609 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004610echo "configure:4611: checking for tzname" >&5
4611if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004612 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004613else
4614 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004615#line 4616 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004616#include "confdefs.h"
4617#include <time.h>
4618#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004619extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004620#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004621int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004622atoi(*tzname);
4623; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004624EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004625if { (eval echo configure:4626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004626 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004627 ac_cv_var_tzname=yes
4628else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004629 echo "configure: failed program was:" >&5
4630 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004631 rm -rf conftest*
4632 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004633fi
4634rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004635fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004636
4637echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004638 if test $ac_cv_var_tzname = yes; then
4639 cat >> confdefs.h <<\EOF
4640#define HAVE_TZNAME 1
4641EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004642
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004643 fi
4644fi
4645
4646
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004647echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004648echo "configure:4649: checking for time.h that defines altzone" >&5
4649if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004650 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004651else
4652 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004653#line 4654 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004654#include "confdefs.h"
4655#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004656int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004657return altzone;
4658; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004659EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004660if { (eval echo configure:4661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004661 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004662 ac_cv_header_time_altzone=yes
4663else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004664 echo "configure: failed program was:" >&5
4665 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004666 rm -rf conftest*
4667 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004668fi
4669rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004670fi
4671
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004672echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004673if test $ac_cv_header_time_altzone = yes; then
4674 cat >> confdefs.h <<\EOF
4675#define HAVE_ALTZONE 1
4676EOF
4677
4678fi
4679
Guido van Rossumda88dad1995-01-26 00:46:29 +00004680was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004681echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004682echo "configure:4683: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004683cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004684#line 4685 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004685#include "confdefs.h"
4686
4687#include <sys/types.h>
4688#include <sys/select.h>
4689#include <sys/time.h>
4690
Guido van Rossumf78abae1997-01-21 22:02:36 +00004691int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004692;
4693; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004694EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004695if { (eval echo configure:4696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004696 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004697 cat >> confdefs.h <<\EOF
4698#define SYS_SELECT_WITH_SYS_TIME 1
4699EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004700 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004701else
4702 echo "configure: failed program was:" >&5
4703 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004704fi
4705rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004706echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004707
4708# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004709
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004710echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004711echo "configure:4712: checking whether char is unsigned" >&5
4712if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004713 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004714else
4715 if test "$GCC" = yes; then
4716 # GCC predefines this symbol on systems where it applies.
4717cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004718#line 4719 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004719#include "confdefs.h"
4720#ifdef __CHAR_UNSIGNED__
4721 yes
4722#endif
4723
4724EOF
4725if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4726 egrep "yes" >/dev/null 2>&1; then
4727 rm -rf conftest*
4728 ac_cv_c_char_unsigned=yes
4729else
4730 rm -rf conftest*
4731 ac_cv_c_char_unsigned=no
4732fi
4733rm -f conftest*
4734
4735else
4736if test "$cross_compiling" = yes; then
4737 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4738else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004739 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004740#line 4741 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004741#include "confdefs.h"
4742/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004743#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00004744#define volatile
4745#endif
4746main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00004747 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004748}
4749EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004750if { (eval echo configure:4751: \"$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 +00004751then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004752 ac_cv_c_char_unsigned=yes
4753else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004754 echo "configure: failed program was:" >&5
4755 cat conftest.$ac_ext >&5
4756 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004757 ac_cv_c_char_unsigned=no
4758fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004759rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004760fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004761
4762fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004763fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004764
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004765echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004766if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
4767 cat >> confdefs.h <<\EOF
4768#define __CHAR_UNSIGNED__ 1
4769EOF
4770
4771fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004772
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004773echo $ac_n "checking for working const""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004774echo "configure:4775: checking for working const" >&5
4775if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004776 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004777else
4778 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004779#line 4780 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004780#include "confdefs.h"
4781
Guido van Rossumf78abae1997-01-21 22:02:36 +00004782int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004783
4784/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004785typedef int charset[2]; const charset x;
4786/* SunOS 4.1.1 cc rejects this. */
4787char const *const *ccp;
4788char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004789/* NEC SVR4.0.2 mips cc rejects this. */
4790struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004791static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004792/* AIX XL C 1.02.0.0 rejects this.
4793 It does not let you subtract one const X* pointer from another in an arm
4794 of an if-expression whose if-part is not a constant expression */
4795const char *g = "string";
4796ccp = &g + (g ? g-g : 0);
4797/* HPUX 7.0 cc rejects these. */
4798++ccp;
4799p = (char**) ccp;
4800ccp = (char const *const *) p;
4801{ /* SCO 3.2v4 cc rejects this. */
4802 char *t;
4803 char const *s = 0 ? (char *) 0 : (char const *) 0;
4804
4805 *t++ = 0;
4806}
4807{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004808 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004809 const int *foo = &x[0];
4810 ++foo;
4811}
4812{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4813 typedef const int *iptr;
4814 iptr p = 0;
4815 ++p;
4816}
4817{ /* AIX XL C 1.02.0.0 rejects this saying
4818 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4819 struct s { int j; const int *ap[3]; };
4820 struct s *b; b->j = 5;
4821}
4822{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4823 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004824}
4825
4826; return 0; }
4827EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004828if { (eval echo configure:4829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004829 rm -rf conftest*
4830 ac_cv_c_const=yes
4831else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004832 echo "configure: failed program was:" >&5
4833 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004834 rm -rf conftest*
4835 ac_cv_c_const=no
4836fi
4837rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004838fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004839
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004840echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004841if test $ac_cv_c_const = no; then
4842 cat >> confdefs.h <<\EOF
4843#define const
4844EOF
4845
4846fi
4847
Guido van Rossumef2255b2000-03-10 22:30:29 +00004848echo $ac_n "checking for inline""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004849echo "configure:4850: checking for inline" >&5
4850if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004851 echo $ac_n "(cached) $ac_c" 1>&6
4852else
4853 ac_cv_c_inline=no
4854for ac_kw in inline __inline__ __inline; do
4855 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004856#line 4857 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00004857#include "confdefs.h"
4858
4859int main() {
4860} $ac_kw foo() {
4861; return 0; }
4862EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004863if { (eval echo configure:4864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004864 rm -rf conftest*
4865 ac_cv_c_inline=$ac_kw; break
4866else
4867 echo "configure: failed program was:" >&5
4868 cat conftest.$ac_ext >&5
4869fi
4870rm -f conftest*
4871done
4872
4873fi
4874
4875echo "$ac_t""$ac_cv_c_inline" 1>&6
4876case "$ac_cv_c_inline" in
4877 inline | yes) ;;
4878 no) cat >> confdefs.h <<\EOF
4879#define inline
4880EOF
4881 ;;
4882 *) cat >> confdefs.h <<EOF
4883#define inline $ac_cv_c_inline
4884EOF
4885 ;;
4886esac
4887
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004888
Guido van Rossumda88dad1995-01-26 00:46:29 +00004889works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004890echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004891echo "configure:4892: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004892cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004893#line 4894 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004894#include "confdefs.h"
4895
Guido van Rossumf78abae1997-01-21 22:02:36 +00004896int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004897volatile int x; x = 0;
4898; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004899EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004900if { (eval echo configure:4901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004901 rm -rf conftest*
4902 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004903else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004904 echo "configure: failed program was:" >&5
4905 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004906 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004907 cat >> confdefs.h <<\EOF
4908#define volatile
4909EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004910
4911fi
4912rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004913echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004914
Guido van Rossumda88dad1995-01-26 00:46:29 +00004915works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004916echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004917echo "configure:4918: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004918cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004919#line 4920 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004920#include "confdefs.h"
4921
Guido van Rossumf78abae1997-01-21 22:02:36 +00004922int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004923signed char c;
4924; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004925EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004926if { (eval echo configure:4927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004927 rm -rf conftest*
4928 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004929else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004930 echo "configure: failed program was:" >&5
4931 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004932 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004933 cat >> confdefs.h <<\EOF
4934#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00004935EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004936
4937fi
4938rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004939echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004940
Guido van Rossumda88dad1995-01-26 00:46:29 +00004941have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004942echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004943echo "configure:4944: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004944cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004945#line 4946 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004946#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004947int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00004948int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004949return foo(10);
4950; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004951EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004952if { (eval echo configure:4953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004953 rm -rf conftest*
4954 cat >> confdefs.h <<\EOF
4955#define HAVE_PROTOTYPES 1
4956EOF
4957 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004958else
4959 echo "configure: failed program was:" >&5
4960 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004961fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004962rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004963echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004964
Guido van Rossumda88dad1995-01-26 00:46:29 +00004965works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004966echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004967echo "configure:4968: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004968cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004969#line 4970 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004970#include "confdefs.h"
4971
4972#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00004973int foo(int x, ...) {
4974 va_list va;
4975 va_start(va, x);
4976 va_arg(va, int);
4977 va_arg(va, char *);
4978 va_arg(va, double);
4979 return 0;
4980}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004981
Guido van Rossumf78abae1997-01-21 22:02:36 +00004982int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00004983return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004984; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004985EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00004986if { (eval echo configure:4987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004987 rm -rf conftest*
4988 cat >> confdefs.h <<\EOF
4989#define HAVE_STDARG_PROTOTYPES 1
4990EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004991 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004992else
4993 echo "configure: failed program was:" >&5
4994 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004995fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004996rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004997echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004998
Guido van Rossumda88dad1995-01-26 00:46:29 +00004999if test "$have_prototypes" = yes; then
5000bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005001echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005002echo "configure:5003: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005003cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005004#line 5005 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005005#include "confdefs.h"
5006#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005007int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005008char **t;execve("@",t,t);
5009; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005010EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005011if { (eval echo configure:5012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005012 :
5013else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005014 echo "configure: failed program was:" >&5
5015 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005016 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005017 cat >> confdefs.h <<\EOF
5018#define BAD_EXEC_PROTOTYPES 1
5019EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005020 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005021fi
5022rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005023echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005024fi
5025
Guido van Rossumda88dad1995-01-26 00:46:29 +00005026bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005027echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005028echo "configure:5029: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005029if test "$cross_compiling" = yes; then
5030 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5031else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005032 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005033#line 5034 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005034#include "confdefs.h"
5035
5036struct s { int a; int b; };
5037static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005038int foobar() {
5039 static int random;
5040 random = (int) &foo;
5041 return random;
5042}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005043static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005044main() {
5045 exit(!((int)&foo == foobar()));
5046}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005047
5048EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005049if { (eval echo configure:5050: \"$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 +00005050then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005051 :
5052else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005053 echo "configure: failed program was:" >&5
5054 cat conftest.$ac_ext >&5
5055 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005056 cat >> confdefs.h <<\EOF
5057#define BAD_STATIC_FORWARD 1
5058EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005059 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005060fi
5061rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005062fi
5063
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005064echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005065
Guido van Rossumda88dad1995-01-26 00:46:29 +00005066va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005067echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005068echo "configure:5069: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005069cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005070#line 5071 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005071#include "confdefs.h"
5072
5073#ifdef HAVE_STDARG_PROTOTYPES
5074#include <stdarg.h>
5075#else
5076#include <varargs.h>
5077#endif
5078
Guido van Rossumf78abae1997-01-21 22:02:36 +00005079int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005080va_list list1, list2; list1 = list2;
5081; return 0; }
5082EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005083if { (eval echo configure:5084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005084 :
5085else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005086 echo "configure: failed program was:" >&5
5087 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005088 rm -rf conftest*
5089 cat >> confdefs.h <<\EOF
5090#define VA_LIST_IS_ARRAY 1
5091EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005092 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005093fi
5094rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005095echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005096
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005097# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5098echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005099echo "configure:5100: checking for gethostbyname_r" >&5
5100if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005101 echo $ac_n "(cached) $ac_c" 1>&6
5102else
5103 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005104#line 5105 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005105#include "confdefs.h"
5106/* System header to define __stub macros and hopefully few prototypes,
5107 which can conflict with char gethostbyname_r(); below. */
5108#include <assert.h>
5109/* Override any gcc2 internal prototype to avoid an error. */
5110/* We use char because int might match the return type of a gcc2
5111 builtin and then its argument prototype would still apply. */
5112char gethostbyname_r();
5113
5114int main() {
5115
5116/* The GNU C library defines this for functions which it implements
5117 to always fail with ENOSYS. Some functions are actually named
5118 something starting with __ and the normal name is an alias. */
5119#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5120choke me
5121#else
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005122gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005123#endif
5124
5125; return 0; }
5126EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005127if { (eval echo configure:5128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005128 rm -rf conftest*
5129 eval "ac_cv_func_gethostbyname_r=yes"
5130else
5131 echo "configure: failed program was:" >&5
5132 cat conftest.$ac_ext >&5
5133 rm -rf conftest*
5134 eval "ac_cv_func_gethostbyname_r=no"
5135fi
5136rm -f conftest*
5137fi
5138
5139if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5140 echo "$ac_t""yes" 1>&6
5141
5142 cat >> confdefs.h <<\EOF
5143#define HAVE_GETHOSTBYNAME_R 1
5144EOF
5145
5146 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005147echo "configure:5148: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005148 OLD_CFLAGS=$CFLAGS
5149 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
5150 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005151#line 5152 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005152#include "confdefs.h"
5153
5154# include <netdb.h>
5155
5156int main() {
5157
5158 char *name;
5159 struct hostent *he, *res;
5160 char buffer[2048];
5161 int buflen = 2048;
5162 int h_errnop;
5163
5164 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
5165
5166; return 0; }
5167EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005168if { (eval echo configure:5169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005169 rm -rf conftest*
5170
5171 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005172#define HAVE_GETHOSTBYNAME_R 1
5173EOF
5174
5175 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005176#define HAVE_GETHOSTBYNAME_R_6_ARG 1
5177EOF
5178
5179 echo "$ac_t""yes" 1>&6
5180
5181else
5182 echo "configure: failed program was:" >&5
5183 cat conftest.$ac_ext >&5
5184 rm -rf conftest*
5185
5186 echo "$ac_t""no" 1>&6
5187 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005188echo "configure:5189: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005189 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005190#line 5191 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005191#include "confdefs.h"
5192
5193# include <netdb.h>
5194
5195int main() {
5196
5197 char *name;
5198 struct hostent *he;
5199 char buffer[2048];
5200 int buflen = 2048;
5201 int h_errnop;
5202
5203 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
5204
5205; return 0; }
5206EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005207if { (eval echo configure:5208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005208 rm -rf conftest*
5209
5210 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005211#define HAVE_GETHOSTBYNAME_R 1
5212EOF
5213
5214 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005215#define HAVE_GETHOSTBYNAME_R_5_ARG 1
5216EOF
5217
5218 echo "$ac_t""yes" 1>&6
5219
5220else
5221 echo "configure: failed program was:" >&5
5222 cat conftest.$ac_ext >&5
5223 rm -rf conftest*
5224
5225 echo "$ac_t""no" 1>&6
5226 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005227echo "configure:5228: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005228 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005229#line 5230 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005230#include "confdefs.h"
5231
5232# include <netdb.h>
5233
5234int main() {
5235
5236 char *name;
5237 struct hostent *he;
5238 struct hostent_data data;
5239
5240 (void) gethostbyname_r(name, he, &data);
5241
5242; return 0; }
5243EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005244if { (eval echo configure:5245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005245 rm -rf conftest*
5246
5247 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005248#define HAVE_GETHOSTBYNAME_R 1
5249EOF
5250
5251 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005252#define HAVE_GETHOSTBYNAME_R_3_ARG 1
5253EOF
5254
5255 echo "$ac_t""yes" 1>&6
5256
5257else
5258 echo "configure: failed program was:" >&5
5259 cat conftest.$ac_ext >&5
5260 rm -rf conftest*
5261
5262 echo "$ac_t""no" 1>&6
5263
5264fi
5265rm -f conftest*
5266
5267fi
5268rm -f conftest*
5269
5270fi
5271rm -f conftest*
5272 CFLAGS=$OLD_CFLAGS
5273
5274else
5275 echo "$ac_t""no" 1>&6
5276
Thomas Wouters3a584202000-08-05 23:28:51 +00005277 for ac_func in gethostbyname
5278do
5279echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005280echo "configure:5281: checking for $ac_func" >&5
5281if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005282 echo $ac_n "(cached) $ac_c" 1>&6
5283else
5284 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005285#line 5286 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005286#include "confdefs.h"
5287/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005288 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005289#include <assert.h>
5290/* Override any gcc2 internal prototype to avoid an error. */
5291/* We use char because int might match the return type of a gcc2
5292 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005293char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005294
5295int main() {
5296
5297/* The GNU C library defines this for functions which it implements
5298 to always fail with ENOSYS. Some functions are actually named
5299 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005300#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005301choke me
5302#else
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005303$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005304#endif
5305
5306; return 0; }
5307EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005308if { (eval echo configure:5309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005309 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005310 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005311else
5312 echo "configure: failed program was:" >&5
5313 cat conftest.$ac_ext >&5
5314 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005315 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005316fi
5317rm -f conftest*
5318fi
5319
Thomas Wouters3a584202000-08-05 23:28:51 +00005320if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005321 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005322 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5323 cat >> confdefs.h <<EOF
5324#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005325EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00005326
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005327else
5328 echo "$ac_t""no" 1>&6
5329fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005330done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005331
5332
5333fi
5334
5335
5336
5337
5338
5339
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005340
Guido van Rossum627b2d71993-12-24 10:39:16 +00005341# checks for system services
5342# (none yet)
5343
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005344# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005345echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005346echo "configure:5347: checking for __fpu_control" >&5
5347if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005348 echo $ac_n "(cached) $ac_c" 1>&6
5349else
5350 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005351#line 5352 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005352#include "confdefs.h"
5353/* System header to define __stub macros and hopefully few prototypes,
5354 which can conflict with char __fpu_control(); below. */
5355#include <assert.h>
5356/* Override any gcc2 internal prototype to avoid an error. */
5357/* We use char because int might match the return type of a gcc2
5358 builtin and then its argument prototype would still apply. */
5359char __fpu_control();
5360
5361int main() {
5362
5363/* The GNU C library defines this for functions which it implements
5364 to always fail with ENOSYS. Some functions are actually named
5365 something starting with __ and the normal name is an alias. */
5366#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5367choke me
5368#else
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005369__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005370#endif
5371
5372; return 0; }
5373EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005374if { (eval echo configure:5375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005375 rm -rf conftest*
5376 eval "ac_cv_func___fpu_control=yes"
5377else
5378 echo "configure: failed program was:" >&5
5379 cat conftest.$ac_ext >&5
5380 rm -rf conftest*
5381 eval "ac_cv_func___fpu_control=no"
5382fi
5383rm -f conftest*
5384fi
5385
5386if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5387 echo "$ac_t""yes" 1>&6
5388 :
5389else
5390 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005391echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005392echo "configure:5393: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005393ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005394if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005395 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005396else
5397 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005398LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005399cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005400#line 5401 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005401#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005402/* Override any gcc2 internal prototype to avoid an error. */
5403/* We use char because int might match the return type of a gcc2
5404 builtin and then its argument prototype would still apply. */
5405char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005406
Guido van Rossumf78abae1997-01-21 22:02:36 +00005407int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005408__fpu_control()
5409; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005410EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005411if { (eval echo configure:5412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005412 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005413 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005414else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005415 echo "configure: failed program was:" >&5
5416 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005417 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005418 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005419fi
5420rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005421LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005422
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005423fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005424if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005425 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005426 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5427 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005428 cat >> confdefs.h <<EOF
5429#define $ac_tr_lib 1
5430EOF
5431
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005432 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005433
5434else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005435 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005436fi
5437
5438
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005439fi
5440
5441
Guido van Rossum7f253911997-05-09 02:42:48 +00005442# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005443echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005444echo "configure:5445: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005445# Check whether --with-fpectl or --without-fpectl was given.
5446if test "${with_fpectl+set}" = set; then
5447 withval="$with_fpectl"
5448
5449if test "$withval" != no
5450then cat >> confdefs.h <<\EOF
5451#define WANT_SIGFPE_HANDLER 1
5452EOF
5453 echo "$ac_t""yes" 1>&6
5454else echo "$ac_t""no" 1>&6
5455fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005456else
5457 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005458fi
5459
5460
Guido van Rossum7f43da71994-08-01 12:15:30 +00005461# check for --with-libm=...
5462
Guido van Rossum563e7081996-09-10 18:20:48 +00005463case $ac_sys_system in
5464next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005465BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005466*) LIBM=-lm
5467esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005468echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005469echo "configure:5470: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005470# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005471if test "${with_libm+set}" = set; then
5472 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005473
Guido van Rossum7f253911997-05-09 02:42:48 +00005474if test "$withval" = no
5475then LIBM=
5476 echo "$ac_t""force LIBM empty" 1>&6
5477elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005478then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005479 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005480else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005481fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005482else
5483 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005484fi
5485
5486
5487# check for --with-libc=...
5488
Guido van Rossum7f253911997-05-09 02:42:48 +00005489echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005490echo "configure:5491: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005491# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005492if test "${with_libc+set}" = set; then
5493 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005494
Guido van Rossum7f253911997-05-09 02:42:48 +00005495if test "$withval" = no
5496then LIBC=
5497 echo "$ac_t""force LIBC empty" 1>&6
5498elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005499then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005500 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005501else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005502fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005503else
5504 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005505fi
5506
5507
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005508# check for hypot() in math library
5509LIBS_SAVE=$LIBS
5510LIBS="$LIBS $LIBM"
5511for ac_func in hypot
5512do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005513echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005514echo "configure:5515: checking for $ac_func" >&5
5515if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005516 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005517else
5518 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005519#line 5520 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005520#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005521/* System header to define __stub macros and hopefully few prototypes,
5522 which can conflict with char $ac_func(); below. */
5523#include <assert.h>
5524/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005525/* We use char because int might match the return type of a gcc2
5526 builtin and then its argument prototype would still apply. */
5527char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005528
Guido van Rossumf78abae1997-01-21 22:02:36 +00005529int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005530
5531/* The GNU C library defines this for functions which it implements
5532 to always fail with ENOSYS. Some functions are actually named
5533 something starting with __ and the normal name is an alias. */
5534#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5535choke me
5536#else
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005537$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005538#endif
5539
5540; return 0; }
5541EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005542if { (eval echo configure:5543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005543 rm -rf conftest*
5544 eval "ac_cv_func_$ac_func=yes"
5545else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005546 echo "configure: failed program was:" >&5
5547 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005548 rm -rf conftest*
5549 eval "ac_cv_func_$ac_func=no"
5550fi
5551rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005552fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005553
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005554if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5555 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005556 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5557 cat >> confdefs.h <<EOF
5558#define $ac_tr_func 1
5559EOF
5560
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005561else
5562 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005563LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005564fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005565done
5566
Guido van Rossumf78abae1997-01-21 22:02:36 +00005567
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005568LIBS=$LIBS_SAVE
5569
Guido van Rossumda88dad1995-01-26 00:46:29 +00005570# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005571echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005572echo "configure:5573: checking for genuine getopt" >&5
5573if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005574 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005575else
5576 if test "$cross_compiling" = yes; then
5577 ac_cv_func_getopt=no
5578else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005579 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005580#line 5581 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00005581#include "confdefs.h"
5582#include <stdio.h>
5583extern int optind, opterr, getopt();
5584extern char* optarg;
5585int main() {
5586 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
5587 opterr = 0;
5588 if (getopt(3, av, "f:") == 'f') { exit(1); }
5589 exit(0);
5590}
5591EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005592if { (eval echo configure:5593: \"$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 +00005593then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005594 ac_cv_func_getopt=yes
5595else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005596 echo "configure: failed program was:" >&5
5597 cat conftest.$ac_ext >&5
5598 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00005599 ac_cv_func_getopt=no
5600fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00005601rm -fr conftest*
5602fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005603
5604fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005605echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005606test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
5607
Guido van Rossumad713701997-07-10 22:42:38 +00005608# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005609echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005610echo "configure:5611: checking what malloc(0) returns" >&5
5611if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005612 echo $ac_n "(cached) $ac_c" 1>&6
5613else
5614 if test "$cross_compiling" = yes; then
5615 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5616else
5617 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005618#line 5619 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005619#include "confdefs.h"
5620#include <stdio.h>
5621#ifdef HAVE_STDLIB
5622#include <stdlib.h>
5623#else
5624char *malloc(), *realloc();
5625int *free();
5626#endif
5627main() {
5628 char *p;
5629 p = malloc(0);
5630 if (p == NULL) exit(1);
5631 p = realloc(p, 0);
5632 if (p == NULL) exit(1);
5633 free(p);
5634 exit(0);
5635}
5636EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005637if { (eval echo configure:5638: \"$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 +00005638then
5639 ac_cv_malloc_zero=nonnull
5640else
5641 echo "configure: failed program was:" >&5
5642 cat conftest.$ac_ext >&5
5643 rm -fr conftest*
5644 ac_cv_malloc_zero=null
5645fi
5646rm -fr conftest*
5647fi
5648
5649fi
5650
5651echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5652if test "$ac_cv_malloc_zero" = null
5653then
5654 cat >> confdefs.h <<\EOF
5655#define MALLOC_ZERO_RETURNS_NULL 1
5656EOF
5657
5658fi
5659
Guido van Rossumef2255b2000-03-10 22:30:29 +00005660# check for wchar.h
5661ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5662echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005663echo "configure:5664: checking for wchar.h" >&5
5664if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005665 echo $ac_n "(cached) $ac_c" 1>&6
5666else
5667 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005668#line 5669 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005669#include "confdefs.h"
5670#include <wchar.h>
5671EOF
5672ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005673{ (eval echo configure:5674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005674ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5675if test -z "$ac_err"; then
5676 rm -rf conftest*
5677 eval "ac_cv_header_$ac_safe=yes"
5678else
5679 echo "$ac_err" >&5
5680 echo "configure: failed program was:" >&5
5681 cat conftest.$ac_ext >&5
5682 rm -rf conftest*
5683 eval "ac_cv_header_$ac_safe=no"
5684fi
5685rm -f conftest*
5686fi
5687if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5688 echo "$ac_t""yes" 1>&6
5689 cat >> confdefs.h <<\EOF
5690#define HAVE_WCHAR_H 1
5691EOF
5692 wchar_h="yes"
5693else
5694 echo "$ac_t""no" 1>&6
5695wchar_h="no"
5696
5697fi
5698
5699
5700# check for usable wchar_t
5701usable_wchar_t="unkown"
5702echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005703echo "configure:5704: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005704if test "$cross_compiling" = yes; then
5705 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5706else
5707 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005708#line 5709 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005709#include "confdefs.h"
5710
5711#include "wchar.h"
5712#include "wctype.h"
5713main() {
5714 wchar_t s;
5715 if (sizeof(s) == 2)
5716 exit(0);
5717 else
5718 exit(1);
5719}
5720
5721EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005722if { (eval echo configure:5723: \"$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 +00005723then
5724 cat >> confdefs.h <<\EOF
5725#define HAVE_USABLE_WCHAR_T 1
5726EOF
5727 usable_wchar_t="yes"
5728else
5729 echo "configure: failed program was:" >&5
5730 cat conftest.$ac_ext >&5
5731 rm -fr conftest*
5732 usable_wchar_t="no"
5733fi
5734rm -fr conftest*
5735fi
5736
5737echo "$ac_t""$usable_wchar_t" 1>&6
5738
5739# check for endianness
5740echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005741echo "configure:5742: checking whether byte ordering is bigendian" >&5
5742if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005743 echo $ac_n "(cached) $ac_c" 1>&6
5744else
5745 ac_cv_c_bigendian=unknown
5746# See if sys/param.h defines the BYTE_ORDER macro.
5747cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005748#line 5749 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005749#include "confdefs.h"
5750#include <sys/types.h>
5751#include <sys/param.h>
5752int main() {
5753
5754#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5755 bogus endian macros
5756#endif
5757; return 0; }
5758EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005759if { (eval echo configure:5760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005760 rm -rf conftest*
5761 # It does; now see whether it defined to BIG_ENDIAN or not.
5762cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005763#line 5764 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005764#include "confdefs.h"
5765#include <sys/types.h>
5766#include <sys/param.h>
5767int main() {
5768
5769#if BYTE_ORDER != BIG_ENDIAN
5770 not big endian
5771#endif
5772; return 0; }
5773EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005774if { (eval echo configure:5775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005775 rm -rf conftest*
5776 ac_cv_c_bigendian=yes
5777else
5778 echo "configure: failed program was:" >&5
5779 cat conftest.$ac_ext >&5
5780 rm -rf conftest*
5781 ac_cv_c_bigendian=no
5782fi
5783rm -f conftest*
5784else
5785 echo "configure: failed program was:" >&5
5786 cat conftest.$ac_ext >&5
5787fi
5788rm -f conftest*
5789if test $ac_cv_c_bigendian = unknown; then
5790if test "$cross_compiling" = yes; then
5791 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5792else
5793 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005794#line 5795 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005795#include "confdefs.h"
5796main () {
5797 /* Are we little or big endian? From Harbison&Steele. */
5798 union
5799 {
5800 long l;
5801 char c[sizeof (long)];
5802 } u;
5803 u.l = 1;
5804 exit (u.c[sizeof (long) - 1] == 1);
5805}
5806EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005807if { (eval echo configure:5808: \"$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 +00005808then
5809 ac_cv_c_bigendian=no
5810else
5811 echo "configure: failed program was:" >&5
5812 cat conftest.$ac_ext >&5
5813 rm -fr conftest*
5814 ac_cv_c_bigendian=yes
5815fi
5816rm -fr conftest*
5817fi
5818
5819fi
5820fi
5821
5822echo "$ac_t""$ac_cv_c_bigendian" 1>&6
5823if test $ac_cv_c_bigendian = yes; then
5824 cat >> confdefs.h <<\EOF
5825#define WORDS_BIGENDIAN 1
5826EOF
5827
5828fi
5829
5830
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005831# Check whether right shifting a negative integer extends the sign bit
5832# or fills with zeros (like the Cray J90, according to Tim Peters).
5833echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005834echo "configure:5835: checking whether right shift extends the sign bit" >&5
5835if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00005836 echo $ac_n "(cached) $ac_c" 1>&6
5837else
5838
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005839if test "$cross_compiling" = yes; then
5840 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5841else
5842 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005843#line 5844 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005844#include "confdefs.h"
5845
5846int main()
5847{
Vladimir Marangozova6180282000-07-12 05:05:06 +00005848 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005849}
5850
5851EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005852if { (eval echo configure:5853: \"$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 +00005853then
5854 ac_cv_rshift_extends_sign=yes
5855else
5856 echo "configure: failed program was:" >&5
5857 cat conftest.$ac_ext >&5
5858 rm -fr conftest*
5859 ac_cv_rshift_extends_sign=no
5860fi
5861rm -fr conftest*
5862fi
5863
5864fi
5865
5866echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
5867if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005868then
5869 cat >> confdefs.h <<\EOF
5870#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
5871EOF
5872
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005873fi
5874
5875
Guido van Rossum95713eb2000-05-18 20:53:31 +00005876# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
5877# Add sys/socket.h to confdefs.h
5878cat >> confdefs.h <<\EOF
5879#ifdef HAVE_SYS_SOCKET_H
5880#include <sys/socket.h>
5881#endif
5882EOF
5883echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005884echo "configure:5885: checking for socklen_t" >&5
5885if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00005886 echo $ac_n "(cached) $ac_c" 1>&6
5887else
5888 cat > conftest.$ac_ext <<EOF
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005889#line 5890 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005890#include "confdefs.h"
5891#include <sys/types.h>
5892#if STDC_HEADERS
5893#include <stdlib.h>
5894#include <stddef.h>
5895#endif
5896EOF
5897if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5898 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5899 rm -rf conftest*
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005900 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00005901else
5902 rm -rf conftest*
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005903 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00005904fi
5905rm -f conftest*
5906
5907fi
Jeremy Hylton1bac6452000-09-26 16:57:37 +00005908echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
5909if test $ac_cv_type_socklen_t = no; then
5910 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00005911#define socklen_t int
5912EOF
5913
5914fi
5915
5916
Guido van Rossum627b2d71993-12-24 10:39:16 +00005917# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005918trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005919cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005920# This file is a shell script that caches the results of configure
5921# tests run on this system so they can be shared between configure
5922# scripts and configure runs. It is not useful on other systems.
5923# If it contains results you don't want to keep, you may remove or edit it.
5924#
5925# By default, configure uses ./config.cache as the cache file,
5926# creating it if it does not exist already. You can give configure
5927# the --cache-file=FILE option to use a different cache file; that is
5928# what configure does when it calls configure scripts in
5929# subdirectories, so they share the cache.
5930# Giving --cache-file=/dev/null disables caching, for debugging configure.
5931# config.status only pays attention to the cache file if you give it the
5932# --recheck option to rerun configure.
5933#
5934EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005935# The following way of writing the cache mishandles newlines in values,
5936# but we know of no workaround that is simple, portable, and efficient.
5937# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005938# Ultrix sh set writes to stderr and can't be redirected directly,
5939# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005940(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005941 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005942 *ac_space=\ *)
5943 # `set' does not quote correctly, so add quotes (double-quote substitution
5944 # turns \\\\ into \\, and sed turns \\ into \).
5945 sed -n \
5946 -e "s/'/'\\\\''/g" \
5947 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5948 ;;
5949 *)
5950 # `set' quotes correctly as required by POSIX, so do not add quotes.
5951 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5952 ;;
5953 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005954if cmp -s $cache_file confcache; then
5955 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005956else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005957 if test -w $cache_file; then
5958 echo "updating cache $cache_file"
5959 cat confcache > $cache_file
5960 else
5961 echo "not updating unwritable cache $cache_file"
5962 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005963fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005964rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00005965
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005966trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005967
5968test "x$prefix" = xNONE && prefix=$ac_default_prefix
5969# Let make expand exec_prefix.
5970test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00005971
Guido van Rossum7f43da71994-08-01 12:15:30 +00005972# Any assignment to VPATH causes Sun make to only execute
5973# the first set of double-colon rules, so remove it if not needed.
5974# If there is a colon in the path, we need to keep it.
5975if test "x$srcdir" = x.; then
5976 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5977fi
5978
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005979trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00005980
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005981DEFS=-DHAVE_CONFIG_H
5982
5983# Without the "./", some shells look in PATH for config.status.
5984: ${CONFIG_STATUS=./config.status}
5985
5986echo creating $CONFIG_STATUS
5987rm -f $CONFIG_STATUS
5988cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005989#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00005990# Generated automatically by configure.
5991# Run this file to recreate the current configuration.
5992# This directory was configured as follows,
5993# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5994#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005995# $0 $ac_configure_args
5996#
5997# Compiler output produced by configure, useful for debugging
5998# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00005999
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006000ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006001for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00006002do
Guido van Rossum7f43da71994-08-01 12:15:30 +00006003 case "\$ac_option" in
6004 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006005 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6006 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00006007 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Jeremy Hylton1bac6452000-09-26 16:57:37 +00006008 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006009 exit 0 ;;
6010 -help | --help | --hel | --he | --h)
6011 echo "\$ac_cs_usage"; exit 0 ;;
6012 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006013 esac
6014done
6015
Guido van Rossum7f43da71994-08-01 12:15:30 +00006016ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00006017
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006018trap 'rm -fr `echo "Makefile \
6019 Objects/Makefile \
6020 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006021 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006022 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006023 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006024 Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006025EOF
6026cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006027
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006028# Protect against being on the right side of a sed subst in config.status.
6029sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6030 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006031$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00006032$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006033s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006034s%@CFLAGS@%$CFLAGS%g
6035s%@CPPFLAGS@%$CPPFLAGS%g
6036s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006037s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006038s%@DEFS@%$DEFS%g
6039s%@LDFLAGS@%$LDFLAGS%g
6040s%@LIBS@%$LIBS%g
6041s%@exec_prefix@%$exec_prefix%g
6042s%@prefix@%$prefix%g
6043s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006044s%@bindir@%$bindir%g
6045s%@sbindir@%$sbindir%g
6046s%@libexecdir@%$libexecdir%g
6047s%@datadir@%$datadir%g
6048s%@sysconfdir@%$sysconfdir%g
6049s%@sharedstatedir@%$sharedstatedir%g
6050s%@localstatedir@%$localstatedir%g
6051s%@libdir@%$libdir%g
6052s%@includedir@%$includedir%g
6053s%@oldincludedir@%$oldincludedir%g
6054s%@infodir@%$infodir%g
6055s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00006056s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006057s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00006058s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00006059s%@SET_CXX@%$SET_CXX%g
6060s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006061s%@CC@%$CC%g
Guido van Rossumff555e32000-09-22 15:38:21 +00006062s%@EXE@%$EXE%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006063s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
6064s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00006065s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006066s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006067s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006068s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006069s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6070s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006071s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006072s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006073s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006074s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006075s%@SO@%$SO%g
6076s%@LDSHARED@%$LDSHARED%g
6077s%@CCSHARED@%$CCSHARED%g
6078s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00006079s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00006080s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00006081s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Fred Drakea50d6ec2000-08-31 16:13:20 +00006082s%@USE_BSDDB_MODULE@%$USE_BSDDB_MODULE%g
Skip Montanaroed33c9a2000-09-08 02:17:15 +00006083s%@HAVE_LIBDB@%$HAVE_LIBDB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006084s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00006085s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006086s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006087s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
6088s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
6089s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006090s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006091s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006092s%@LIBM@%$LIBM%g
6093s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006094
6095CEOF
6096EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006097
6098cat >> $CONFIG_STATUS <<\EOF
6099
6100# Split the substitutions into bite-sized pieces for seds with
6101# small command number limits, like on Digital OSF/1 and HP-UX.
6102ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6103ac_file=1 # Number of current file.
6104ac_beg=1 # First line for current file.
6105ac_end=$ac_max_sed_cmds # Line after last line for current file.
6106ac_more_lines=:
6107ac_sed_cmds=""
6108while $ac_more_lines; do
6109 if test $ac_beg -gt 1; then
6110 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6111 else
6112 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6113 fi
6114 if test ! -s conftest.s$ac_file; then
6115 ac_more_lines=false
6116 rm -f conftest.s$ac_file
6117 else
6118 if test -z "$ac_sed_cmds"; then
6119 ac_sed_cmds="sed -f conftest.s$ac_file"
6120 else
6121 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6122 fi
6123 ac_file=`expr $ac_file + 1`
6124 ac_beg=$ac_end
6125 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6126 fi
6127done
6128if test -z "$ac_sed_cmds"; then
6129 ac_sed_cmds=cat
6130fi
6131EOF
6132
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006133cat >> $CONFIG_STATUS <<EOF
6134
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006135CONFIG_FILES=\${CONFIG_FILES-"Makefile \
6136 Objects/Makefile \
6137 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006138 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006139 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006140 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006141 Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006142EOF
6143cat >> $CONFIG_STATUS <<\EOF
6144for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006145 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006146 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006147 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006148 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6149 *) ac_file_in="${ac_file}.in" ;;
6150 esac
6151
Guido van Rossumf78abae1997-01-21 22:02:36 +00006152 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006153
6154 # Remove last slash and all that follows it. Not all systems have dirname.
6155 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6156 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6157 # The file is in a subdirectory.
6158 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006159 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006160 # A "../" for each directory in $ac_dir_suffix.
6161 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6162 else
6163 ac_dir_suffix= ac_dots=
6164 fi
6165
6166 case "$ac_given_srcdir" in
6167 .) srcdir=.
6168 if test -z "$ac_dots"; then top_srcdir=.
6169 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6170 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6171 *) # Relative path.
6172 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6173 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6174 esac
6175
Guido van Rossumf78abae1997-01-21 22:02:36 +00006176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006177 echo creating "$ac_file"
6178 rm -f "$ac_file"
6179 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6180 case "$ac_file" in
6181 *Makefile*) ac_comsub="1i\\
6182# $configure_input" ;;
6183 *) ac_comsub= ;;
6184 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006185
6186 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 +00006187 sed -e "$ac_comsub
6188s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006189s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006190s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00006191" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00006192fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00006193rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006194
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006195# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6196# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00006197#
6198# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006199ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6200ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006201ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006202ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006203# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006204ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6205ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006206ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006207ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006208# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006209ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6210ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006211ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006212ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006213
Guido van Rossumf78abae1997-01-21 22:02:36 +00006214if test "${CONFIG_HEADERS+set}" != set; then
6215EOF
6216cat >> $CONFIG_STATUS <<EOF
6217 CONFIG_HEADERS="config.h"
6218EOF
6219cat >> $CONFIG_STATUS <<\EOF
6220fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006221for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006222 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006223 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006224 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006225 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6226 *) ac_file_in="${ac_file}.in" ;;
6227 esac
6228
Guido van Rossum7f43da71994-08-01 12:15:30 +00006229 echo creating $ac_file
6230
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006231 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006232 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6233 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006234
6235EOF
6236
6237# Transform confdefs.h into a sed script conftest.vals that substitutes
6238# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006239# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006240# Protect against being in an unquoted here document in config.status.
6241rm -f conftest.vals
6242cat > conftest.hdr <<\EOF
6243s/[\\&%]/\\&/g
6244s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006245s%#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 +00006246s%ac_d%ac_u%gp
6247s%ac_u%ac_e%gp
6248EOF
6249sed -n -f conftest.hdr confdefs.h > conftest.vals
6250rm -f conftest.hdr
6251
6252# This sed command replaces #undef with comments. This is necessary, for
6253# example, in the case of _POSIX_SOURCE, which is predefined and required
6254# on some systems where configure will not decide to define it.
6255cat >> conftest.vals <<\EOF
6256s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6257EOF
6258
6259# Break up conftest.vals because some shells have a limit on
6260# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006261
6262rm -f conftest.tail
6263while :
6264do
6265 ac_lines=`grep -c . conftest.vals`
6266 # grep -c gives empty output for an empty file on some AIX systems.
6267 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6268 # Write a limited-size here document to conftest.frag.
6269 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6270 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6271 echo 'CEOF
6272 sed -f conftest.frag conftest.in > conftest.out
6273 rm -f conftest.in
6274 mv conftest.out conftest.in
6275' >> $CONFIG_STATUS
6276 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6277 rm -f conftest.vals
6278 mv conftest.tail conftest.vals
6279done
6280rm -f conftest.vals
6281
6282cat >> $CONFIG_STATUS <<\EOF
6283 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006284 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006285 cat conftest.in >> conftest.h
6286 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006287 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006288 echo "$ac_file is unchanged"
6289 rm -f conftest.h
6290 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006291 # Remove last slash and all that follows it. Not all systems have dirname.
6292 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6293 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6294 # The file is in a subdirectory.
6295 test ! -d "$ac_dir" && mkdir "$ac_dir"
6296 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006297 rm -f $ac_file
6298 mv conftest.h $ac_file
6299 fi
6300fi; done
6301
Guido van Rossumf78abae1997-01-21 22:02:36 +00006302EOF
6303cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006304
Guido van Rossumf78abae1997-01-21 22:02:36 +00006305EOF
6306cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006307
6308exit 0
6309EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006310chmod +x $CONFIG_STATUS
6311rm -fr confdefs* $ac_clean_files
Jeremy Hylton1bac6452000-09-26 16:57:37 +00006312test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006313