blob: 713528d97d0e22d1c329b484ffe5f44bb89bfc97 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Guido van Rossum5839e582000-10-09 19:52:35 +00003# From configure.in Revision: 1.170
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004
Guido van Rossum627b2d71993-12-24 10:39:16 +00005# Guess values for system-dependent variables and create Makefiles.
Guido van Rossum5839e582000-10-09 19:52:35 +00006# Generated automatically using autoconf version 2.13
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000011
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# Defaults:
13ac_help=
14ac_default_prefix=/usr/local
15# Any additions from configure.in:
16ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000017 --with-next-archs='arch1 arch2 ..' build MAB binary"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000018ac_help="$ac_help
Guido van Rossum3dc0a512000-10-05 18:00:06 +000019 --with-next-framework Build (OpenStep|Rhapsody|MacOSX|Darwin) framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000020ac_help="$ac_help
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021 --with-dyld Use (OpenStep|Rhapsody|MacOSX|Darwin) dynamic linker"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000022ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000023 --without-gcc never use gcc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000025 --with-cxx=<compiler> enable C++ support"
Guido van Rossum95012191999-12-16 17:50:52 +000026ac_help="$ac_help
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 Warsawc0d24d82000-06-29 16:12:00 +000031 --with-libs='lib1 ...' link against additional libs"
Guido van Rossuma68acba1996-07-31 17:36:39 +000032ac_help="$ac_help
Barry Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-06-29 16:12:00 +000051 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000052ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000053 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000054ac_help="$ac_help
Barry Warsawc0d24d82000-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)
Guido van Rossum5839e582000-10-09 19:52:35 +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"
Guido van Rossum5839e582000-10-09 19:52:35 +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 Rossum3dc0a512000-10-05 18:00:06 +0000572# NEXTSTEP|MacOSX|Darwin 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 Rossum3dc0a512000-10-05 18:00:06 +0000595 ac_sys_system=`uname -s`
596 if test "$ac_sys_system" = "Darwin" ; then
597 ac_sys_release=`uname -r`
598 else
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000599 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000600 sed -e 's/://' -e 's/\./_/'` && \
601 ac_sys_system=next && ac_sys_release=$4
602 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000603
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000604 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000605 fi
606fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000607
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000608# Check whether --with-next-framework or --without-next-framework was given.
609if test "${with_next_framework+set}" = set; then
610 withval="$with_next_framework"
611 :
612fi
613
614# Check whether --with-dyld or --without-dyld was given.
615if test "${with_dyld+set}" = set; then
616 withval="$with_dyld"
617 :
618fi
619
Guido van Rossum91922671997-10-09 20:24:13 +0000620
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000621# Set name for machine-dependent library files
622
623echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000624echo "configure:625: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000625if test -z "$MACHDEP"
626then
Guido van Rossum563e7081996-09-10 18:20:48 +0000627 ac_sys_system=`uname -s`
Trent Mick635f6fb2000-08-23 21:33:05 +0000628 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000629 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000630 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000631 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000632 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000633 ac_md_system=`echo $ac_sys_system |
634 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
635 ac_md_release=`echo $ac_sys_release |
636 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000637 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000638
Guido van Rossum07397971997-04-29 21:49:50 +0000639 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000640 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000641 esac
642fi
Guido van Rossum91922671997-10-09 20:24:13 +0000643
644#
645# SGI compilers allow the specification of the both the ABI and the
646# ISA on the command line. Depending on the values of these switches,
647# different and often incompatable code will be generated.
648#
649# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
650# thus supply support for various ABI/ISA combinations. The MACHDEP
651# variable is also adjusted.
652#
653
654if test ! -z "$SGI_ABI"
655then
656 CC="cc $SGI_ABI"
657 LDFLAGS="$SGI_ABI $LDFLAGS"
658 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
659fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000660echo "$ac_t""$MACHDEP" 1>&6
661
Guido van Rossum91922671997-10-09 20:24:13 +0000662#
663# CCC is the command that compiles C++ programs
664#
665# Not all make programs have this predefined.
666#
Guido van Rossum95012191999-12-16 17:50:52 +0000667#AC_SUBST(SET_CCC)
668#AC_MSG_CHECKING(CCC)
669#if test -z "$CCC"
670#then
671# case $ac_sys_system in
672# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
673# Linux*) SET_CCC="CCC= g++";;
674# *) SET_CCC=""
675# esac
676#else
677# SET_CCC="CCC= ${CCC}"
678#fi
679#AC_MSG_RESULT($SET_CCC)
Guido van Rossum91922671997-10-09 20:24:13 +0000680
681
Guido van Rossum627b2d71993-12-24 10:39:16 +0000682# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000683echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000684echo "configure:685: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000685# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000686if test "${with_gcc+set}" = set; then
687 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000688
689 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000690 no) CC=cc
691 without_gcc=yes;;
692 yes) CC=gcc
693 without_gcc=no;;
694 *) CC=$withval
695 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000696 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000697else
Guido van Rossume77438c1995-09-13 18:59:59 +0000698
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000699 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000700 OSF1) CC=cc
701 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000702 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000703 case $BE_HOST_CPU in
704 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000705 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000706 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000707 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
708 CCSHARED="UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000709 LDFLAGS="$LDFLAGS -nodup"
710
711 AR="$PWD/BeOS/ar-fake"
712 RANLIB=:
713
714 cat >> confdefs.h <<\EOF
715#define DL_EXPORT_HEADER "dl_export.h"
716EOF
717
718 ;;
719 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000720 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000721 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000722 OPT=-O
723 # Really should use srcdir instead of PWD
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000724 AR="$PWD/BeOS/ar-fake"
725 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000726 ;;
727 *)
Fred Drake5790be12000-10-09 17:06:13 +0000728 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000729 ;;
730 esac
731 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000732 Monterey*)
733 RANLIB=:
734 without_gcc=;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000735 *) without_gcc=no;;
736 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000737fi
738
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000739echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000740
Guido van Rossum95012191999-12-16 17:50:52 +0000741
742
743MAINOBJ=python.o
744echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +0000745echo "configure:746: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000746# Check whether --with-cxx or --without-cxx was given.
747if test "${with_cxx+set}" = set; then
748 withval="$with_cxx"
749
750 case $withval in
751 no) CXX=
752 with_cxx=no;;
753 *) CXX=$withval
754 MAINOBJ=ccpython.o
755 with_cxx=$withval;;
756 esac
757else
758
759 with_cxx=no
760
761fi
762
763echo "$ac_t""$with_cxx" 1>&6
Guido van Rossume1262332000-09-22 19:41:56 +0000764SET_CXX="CXX=$CXX"
Guido van Rossum95012191999-12-16 17:50:52 +0000765
766#AC_MSG_CHECKING(CCC)
767#if test -z "$CCC"
768#then
769# case $ac_sys_system in
770# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
771# Linux*) SET_CCC="CCC= g++";;
772# *) SET_CCC=""
773# esac
774#else
775# SET_CCC="CCC= ${CCC}"
776#fi
777#AC_MSG_RESULT($SET_CCC)
778
Guido van Rossum8b131c51995-03-09 14:10:13 +0000779# If the user switches compilers, we can't believe the cache
780if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
781then
782 { echo "configure: error: cached CC is different -- throw away $cache_file
783(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
784fi
785
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000786# Extract the first word of "gcc", so it can be a program name with args.
787set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000788echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +0000789echo "configure:790: checking for $ac_word" >&5
Guido van Rossum5839e582000-10-09 19:52:35 +0000790if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000791 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792else
793 if test -n "$CC"; then
794 ac_cv_prog_CC="$CC" # Let the user override the test.
795else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000796 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
797 ac_dummy="$PATH"
798 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799 test -z "$ac_dir" && ac_dir=.
800 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000801 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000802 break
803 fi
804 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000806fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000807fi
808CC="$ac_cv_prog_CC"
809if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000810 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000812 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000813fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000814
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000815if test -z "$CC"; then
816 # Extract the first word of "cc", so it can be a program name with args.
817set dummy cc; ac_word=$2
818echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +0000819echo "configure:820: checking for $ac_word" >&5
Guido van Rossum5839e582000-10-09 19:52:35 +0000820if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821 echo $ac_n "(cached) $ac_c" 1>&6
822else
823 if test -n "$CC"; then
824 ac_cv_prog_CC="$CC" # Let the user override the test.
825else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000826 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000828 ac_dummy="$PATH"
829 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000830 test -z "$ac_dir" && ac_dir=.
831 if test -f $ac_dir/$ac_word; then
832 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
833 ac_prog_rejected=yes
834 continue
835 fi
836 ac_cv_prog_CC="cc"
837 break
838 fi
839 done
840 IFS="$ac_save_ifs"
841if test $ac_prog_rejected = yes; then
842 # We found a bogon in the path, so make sure we never use it.
843 set dummy $ac_cv_prog_CC
844 shift
845 if test $# -gt 0; then
846 # We chose a different compiler from the bogus one.
847 # However, it has the same basename, so the bogon will be chosen
848 # first if we set CC to just the basename; use the full file name.
849 shift
850 set dummy "$ac_dir/$ac_word" "$@"
851 shift
852 ac_cv_prog_CC="$@"
853 fi
854fi
855fi
856fi
857CC="$ac_cv_prog_CC"
858if test -n "$CC"; then
859 echo "$ac_t""$CC" 1>&6
860else
861 echo "$ac_t""no" 1>&6
862fi
863
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000864 if test -z "$CC"; then
865 case "`uname -s`" in
Guido van Rossum5839e582000-10-09 19:52:35 +0000866 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000867 # Extract the first word of "cl", so it can be a program name with args.
868set dummy cl; ac_word=$2
869echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +0000870echo "configure:871: checking for $ac_word" >&5
Guido van Rossum5839e582000-10-09 19:52:35 +0000871if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000872 echo $ac_n "(cached) $ac_c" 1>&6
873else
874 if test -n "$CC"; then
875 ac_cv_prog_CC="$CC" # Let the user override the test.
876else
877 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
878 ac_dummy="$PATH"
879 for ac_dir in $ac_dummy; do
880 test -z "$ac_dir" && ac_dir=.
881 if test -f $ac_dir/$ac_word; then
882 ac_cv_prog_CC="cl"
883 break
884 fi
885 done
886 IFS="$ac_save_ifs"
887fi
888fi
889CC="$ac_cv_prog_CC"
890if test -n "$CC"; then
891 echo "$ac_t""$CC" 1>&6
892else
893 echo "$ac_t""no" 1>&6
894fi
895 ;;
896 esac
897 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
899fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000900
Guido van Rossum5839e582000-10-09 19:52:35 +0000901echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
902echo "configure:903: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000903
904ac_ext=c
905# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
906ac_cpp='$CPP $CPPFLAGS'
907ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000908ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000909cross_compiling=$ac_cv_prog_cc_cross
910
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000911cat > conftest.$ac_ext << EOF
912
Fred Drake5790be12000-10-09 17:06:13 +0000913#line 914 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000914#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000915
Guido van Rossumf78abae1997-01-21 22:02:36 +0000916main(){return(0);}
917EOF
Fred Drake5790be12000-10-09 17:06:13 +0000918if { (eval echo configure:919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000919 ac_cv_prog_cc_works=yes
920 # If we can't run a trivial program, we are probably using a cross compiler.
921 if (./conftest; exit) 2>/dev/null; then
922 ac_cv_prog_cc_cross=no
923 else
924 ac_cv_prog_cc_cross=yes
925 fi
926else
927 echo "configure: failed program was:" >&5
928 cat conftest.$ac_ext >&5
929 ac_cv_prog_cc_works=no
930fi
931rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000932ac_ext=c
933# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
934ac_cpp='$CPP $CPPFLAGS'
935ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
936ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
937cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000938
939echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
940if test $ac_cv_prog_cc_works = no; then
941 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
942fi
Guido van Rossum5839e582000-10-09 19:52:35 +0000943echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
944echo "configure:945: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000945echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
946cross_compiling=$ac_cv_prog_cc_cross
947
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000948echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +0000949echo "configure:950: checking whether we are using GNU C" >&5
Guido van Rossum5839e582000-10-09 19:52:35 +0000950if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000951 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952else
953 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000954#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000956#endif
957EOF
Fred Drake5790be12000-10-09 17:06:13 +0000958if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 ac_cv_prog_gcc=yes
960else
961 ac_cv_prog_gcc=no
962fi
963fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000965echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000966
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967if test $ac_cv_prog_gcc = yes; then
968 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000969else
970 GCC=
971fi
972
973ac_test_CFLAGS="${CFLAGS+set}"
974ac_save_CFLAGS="$CFLAGS"
975CFLAGS=
976echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +0000977echo "configure:978: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum5839e582000-10-09 19:52:35 +0000978if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000979 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000980else
981 echo 'void f(){}' > conftest.c
982if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000983 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000985 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000986fi
987rm -f conftest*
988
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000989fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000990
Guido van Rossumf78abae1997-01-21 22:02:36 +0000991echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000992if test "$ac_test_CFLAGS" = set; then
993 CFLAGS="$ac_save_CFLAGS"
994elif test $ac_cv_prog_cc_g = yes; then
995 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000996 CFLAGS="-g -O2"
997 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000998 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000999 fi
1000else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001001 if test "$GCC" = yes; then
1002 CFLAGS="-O2"
1003 else
1004 CFLAGS=
1005 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001006fi
1007
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001008
Guido van Rossumff555e32000-09-22 15:38:21 +00001009echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001010echo "configure:1011: checking for --with-suffix" >&5
Guido van Rossumff555e32000-09-22 15:38:21 +00001011# Check whether --with-suffix or --without-suffix was given.
1012if test "${with_suffix+set}" = set; then
1013 withval="$with_suffix"
1014
1015 case $withval in
1016 no) EXE=;;
1017 yes) EXE=.exe;;
1018 *) EXE=$withval;;
1019 esac
1020fi
1021
1022echo "$ac_t""$EXE" 1>&6
1023
Guido van Rossumdd997f71998-10-07 19:58:26 +00001024case $MACHDEP in
1025bsdos*)
1026 case $CC in
1027 gcc) CC="$CC -D_HAVE_BSDI";;
1028 esac;;
1029esac
1030
Guido van Rossum24b1e751997-08-21 02:29:16 +00001031case $ac_sys_system in
1032hp*|HP*)
1033 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001034 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001035 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001036Monterey*)
1037 case $CC in
1038 cc) CC="$CC -Wl,-Bexport";;
1039 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001040esac
1041
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001042# LDLIBRARY is the name of the library to link against (as opposed to the
1043# name of the library into which to insert object files). On systems
1044# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
1045# the Makefiles).
1046
1047
1048LDLIBRARY=''
1049
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001050# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001051# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001052# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001053
1054echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001055echo "configure:1056: checking LINKCC" >&5
Guido van Rossum95012191999-12-16 17:50:52 +00001056if test -z "$LINKCC" -a ! -z "$CXX"
1057then
1058 LINKCC="$CXX"
1059fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001060if test -z "$LINKCC"
1061then
1062 case $ac_sys_system in
1063 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001064 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001065 dgux*)
1066 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001067 Monterey64*)
1068 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001069 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001070 esac
1071fi
1072echo "$ac_t""$LINKCC" 1>&6
1073
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001074echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001075echo "configure:1076: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001076
1077# NeXT framework builds require that the 'ar' library be converted into
1078# a bundle using libtool.
1079if test "$with_next_framework"
1080then
1081 LDLIBRARY='libpython$(VERSION).dylib'
1082fi
1083
1084# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001085case $MACHDEP in
1086dguxR4)
1087 LDLIBRARY='libpython$(VERSION).so'
1088 OPT="$OPT -pic"
1089 ;;
1090beos*)
1091 LDLIBRARY='libpython$(VERSION).so'
1092 ;;
1093esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001094echo "$ac_t""$LDLIBRARY" 1>&6
1095
1096# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1097if test -z "$LDLIBRARY"
1098then
1099 LDLIBRARY='libpython$(VERSION).a'
1100 MAKE_LDLIBRARY="true"
1101else
1102 MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
1103fi
1104
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105# Extract the first word of "ranlib", so it can be a program name with args.
1106set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001107echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001108echo "configure:1109: checking for $ac_word" >&5
Guido van Rossum5839e582000-10-09 19:52:35 +00001109if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001110 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001111else
1112 if test -n "$RANLIB"; then
1113 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1114else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001115 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1116 ac_dummy="$PATH"
1117 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118 test -z "$ac_dir" && ac_dir=.
1119 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001120 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001121 break
1122 fi
1123 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001125 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001126fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127fi
1128RANLIB="$ac_cv_prog_RANLIB"
1129if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001130 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001131else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001132 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001134
1135
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136for ac_prog in ar aal
1137do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138# Extract the first word of "$ac_prog", so it can be a program name with args.
1139set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001140echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001141echo "configure:1142: checking for $ac_word" >&5
Guido van Rossum5839e582000-10-09 19:52:35 +00001142if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001143 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144else
1145 if test -n "$AR"; then
1146 ac_cv_prog_AR="$AR" # Let the user override the test.
1147else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001148 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1149 ac_dummy="$PATH"
1150 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151 test -z "$ac_dir" && ac_dir=.
1152 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001153 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154 break
1155 fi
1156 done
1157 IFS="$ac_save_ifs"
1158fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001159fi
1160AR="$ac_cv_prog_AR"
1161if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001162 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001163else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001164 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001165fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
1167test -n "$AR" && break
1168done
1169test -n "$AR" || AR="ar"
1170
1171
Guido van Rossumda88dad1995-01-26 00:46:29 +00001172
1173
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001174# Install just never works :-(
1175if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001176then
1177 INSTALL=cp
1178 INSTALL_PROGRAM=cp
1179 INSTALL_DATA=cp
1180else
1181 INSTALL_PROGRAM="$INSTALL"
1182 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001183fi
1184
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001185# Not every filesystem supports hard links
1186
1187if test -z "$LN" ; then
1188 case $ac_sys_system in
1189 BeOS*) LN="ln -s";;
1190 *) LN=ln;;
1191 esac
1192fi
1193
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001194# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001195
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001196if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001197then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001198 case $GCC in
1199 yes)
1200 case $ac_cv_prog_cc_g in
1201 yes) OPT="-g -O2";;
1202 *) OPT="-O2";;
1203 esac
1204 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001205 *) OPT="-O";;
1206 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001207fi
1208
Trent Mick635f6fb2000-08-23 21:33:05 +00001209# The current (beta) Monterey compiler dies with optimizations
1210case $ac_sys_system in
1211Monterey*) OPT="";;
1212esac
1213
Guido van Rossum563e7081996-09-10 18:20:48 +00001214if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001215then
1216 OPT="$OPT $ac_arch_flags"
1217fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001218# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001219echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001220echo "configure:1221: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001221# On Suns, sometimes $CPP names a directory.
1222if test -n "$CPP" && test -d "$CPP"; then
1223 CPP=
1224fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001225if test -z "$CPP"; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001226if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001227 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001228else
1229 # This must be in double quotes, not single quotes, because CPP may get
1230 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001231 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001232 # On the NeXT, cc -E runs the code through the compiler's parser,
1233 # not just through cpp.
1234 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001235#line 1236 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001237#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238Syntax Error
1239EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001240ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake5790be12000-10-09 17:06:13 +00001241{ (eval echo configure:1242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001242ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1243if test -z "$ac_err"; then
1244 :
1245else
1246 echo "$ac_err" >&5
1247 echo "configure: failed program was:" >&5
1248 cat conftest.$ac_ext >&5
1249 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001250 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001251 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001252#line 1253 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001253#include "confdefs.h"
1254#include <assert.h>
1255Syntax Error
1256EOF
1257ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake5790be12000-10-09 17:06:13 +00001258{ (eval echo configure:1259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001259ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001261 :
1262else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001263 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001264 echo "configure: failed program was:" >&5
1265 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001266 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001267 CPP="${CC-cc} -nologo -E"
1268 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001269#line 1270 "configure"
Guido van Rossumff555e32000-09-22 15:38:21 +00001270#include "confdefs.h"
1271#include <assert.h>
1272Syntax Error
1273EOF
1274ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake5790be12000-10-09 17:06:13 +00001275{ (eval echo configure:1276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumff555e32000-09-22 15:38:21 +00001276ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1277if test -z "$ac_err"; then
1278 :
1279else
1280 echo "$ac_err" >&5
1281 echo "configure: failed program was:" >&5
1282 cat conftest.$ac_ext >&5
1283 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001284 CPP=/lib/cpp
1285fi
1286rm -f conftest*
1287fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001288rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001289fi
1290rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001291 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001292fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001293 CPP="$ac_cv_prog_CPP"
1294else
1295 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001296fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001297echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001298
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001299echo $ac_n "checking for AIX""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001300echo "configure:1301: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001301cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001302#line 1303 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303#include "confdefs.h"
1304#ifdef _AIX
1305 yes
1306#endif
1307
1308EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001309if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1310 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001312 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001313#define _ALL_SOURCE 1
1314EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316else
1317 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001318 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319fi
1320rm -f conftest*
1321
1322
Guido van Rossumf78abae1997-01-21 22:02:36 +00001323ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001324echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001325echo "configure:1326: checking for minix/config.h" >&5
Guido van Rossum5839e582000-10-09 19:52:35 +00001326if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001327 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001328else
1329 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001330#line 1331 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001331#include "confdefs.h"
1332#include <minix/config.h>
1333EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001334ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake5790be12000-10-09 17:06:13 +00001335{ (eval echo configure:1336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001336ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001337if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001338 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001339 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001340else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001341 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001342 echo "configure: failed program was:" >&5
1343 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001344 rm -rf conftest*
1345 eval "ac_cv_header_$ac_safe=no"
1346fi
1347rm -f conftest*
1348fi
1349if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001350 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001351 MINIX=yes
1352else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001353 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001354MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001355fi
1356
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001357if test "$MINIX" = yes; then
1358 cat >> confdefs.h <<\EOF
1359#define _POSIX_SOURCE 1
1360EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001361
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001362 cat >> confdefs.h <<\EOF
1363#define _POSIX_1_SOURCE 2
1364EOF
1365
1366 cat >> confdefs.h <<\EOF
1367#define _MINIX 1
1368EOF
1369
1370fi
1371
Guido van Rossumda88dad1995-01-26 00:46:29 +00001372
Guido van Rossum91922671997-10-09 20:24:13 +00001373echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001374echo "configure:1375: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum5839e582000-10-09 19:52:35 +00001375if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001376 echo $ac_n "(cached) $ac_c" 1>&6
1377else
1378 ac_save_cc="$CC"
1379CC="$CC -OPT:Olimit=0"
1380if test "$cross_compiling" = yes; then
1381 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1382else
1383 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001384#line 1385 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001385#include "confdefs.h"
1386int main() { return 0; }
1387EOF
Fred Drake5790be12000-10-09 17:06:13 +00001388if { (eval echo configure:1389: \"$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 +00001389then
1390 ac_cv_opt_olimit_ok=yes
1391else
1392 echo "configure: failed program was:" >&5
1393 cat conftest.$ac_ext >&5
1394 rm -fr conftest*
1395 ac_cv_opt_olimit_ok=no
1396fi
1397rm -fr conftest*
1398fi
1399
1400CC="$ac_save_cc"
1401fi
1402
1403echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001404if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001405 case $ac_sys_system in
1406 Darwin*) OPT="$OPT" ;;
1407 *) OPT="$OPT -OPT:Olimit=0";;
1408 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001409else
1410 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00001411echo "configure:1412: checking whether $CC accepts -Olimit 1500" >&5
1412 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001413 echo $ac_n "(cached) $ac_c" 1>&6
1414else
1415 ac_save_cc="$CC"
1416 CC="$CC -Olimit 1500"
1417 if test "$cross_compiling" = yes; then
1418 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1419else
1420 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001421#line 1422 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001422#include "confdefs.h"
1423int main() { return 0; }
1424EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001425if { (eval echo configure:1426: \"$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 +00001426then
1427 ac_cv_olimit_ok=yes
1428else
1429 echo "configure: failed program was:" >&5
1430 cat conftest.$ac_ext >&5
1431 rm -fr conftest*
1432 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001433fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001434rm -fr conftest*
1435fi
1436
1437 CC="$ac_save_cc"
1438fi
1439
1440 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1441 if test $ac_cv_olimit_ok = yes; then
1442 OPT="$OPT -Olimit 1500"
1443 fi
1444fi
1445
Guido van Rossum84e7b241996-08-19 21:59:00 +00001446
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001447# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001448echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00001449echo "configure:1450: checking for ANSI C header files" >&5
1450if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001451 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001452else
1453 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001454#line 1455 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001455#include "confdefs.h"
1456#include <stdlib.h>
1457#include <stdarg.h>
1458#include <string.h>
1459#include <float.h>
1460EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001461ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum5839e582000-10-09 19:52:35 +00001462{ (eval echo configure:1463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001463ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001464if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001465 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001466 ac_cv_header_stdc=yes
1467else
1468 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001469 echo "configure: failed program was:" >&5
1470 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001471 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001472 ac_cv_header_stdc=no
1473fi
1474rm -f conftest*
1475
1476if test $ac_cv_header_stdc = yes; then
1477 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1478cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001479#line 1480 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001480#include "confdefs.h"
1481#include <string.h>
1482EOF
1483if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1484 egrep "memchr" >/dev/null 2>&1; then
1485 :
1486else
1487 rm -rf conftest*
1488 ac_cv_header_stdc=no
1489fi
1490rm -f conftest*
1491
1492fi
1493
1494if test $ac_cv_header_stdc = yes; then
1495 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1496cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001497#line 1498 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001498#include "confdefs.h"
1499#include <stdlib.h>
1500EOF
1501if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1502 egrep "free" >/dev/null 2>&1; then
1503 :
1504else
1505 rm -rf conftest*
1506 ac_cv_header_stdc=no
1507fi
1508rm -f conftest*
1509
1510fi
1511
1512if test $ac_cv_header_stdc = yes; then
1513 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1514if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001515 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001516else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001517 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001518#line 1519 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001519#include "confdefs.h"
1520#include <ctype.h>
1521#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1522#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001523#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001524int main () { int i; for (i = 0; i < 256; i++)
1525if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1526exit (0); }
1527
1528EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001529if { (eval echo configure:1530: \"$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 +00001530then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001531 :
1532else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001533 echo "configure: failed program was:" >&5
1534 cat conftest.$ac_ext >&5
1535 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001536 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001537fi
1538rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001539fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001540
1541fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001542fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001543
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001544echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001545if test $ac_cv_header_stdc = yes; then
1546 cat >> confdefs.h <<\EOF
1547#define STDC_HEADERS 1
1548EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001549
1550fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001551
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00001552for 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 +00001553signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Fred Drakea50d6ec2000-08-31 16:13:20 +00001554sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001555sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00001556sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
1557ndbm.h db1/ndbm.h gdbm/ndbm.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001558do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001559ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001560echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00001561echo "configure:1562: checking for $ac_hdr" >&5
1562if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001563 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001564else
1565 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001566#line 1567 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001567#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001568#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001569EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001570ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum5839e582000-10-09 19:52:35 +00001571{ (eval echo configure:1572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001572ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001573if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001574 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001575 eval "ac_cv_header_$ac_safe=yes"
1576else
1577 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001578 echo "configure: failed program was:" >&5
1579 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001580 rm -rf conftest*
1581 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001582fi
1583rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001584fi
1585if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001586 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001587 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001588 cat >> confdefs.h <<EOF
1589#define $ac_tr_hdr 1
1590EOF
1591
1592else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001593 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001594fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001595done
1596
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001597ac_header_dirent=no
1598for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1599do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001600ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001601echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00001602echo "configure:1603: checking for $ac_hdr that defines DIR" >&5
1603if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001604 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001605else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001606 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001607#line 1608 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001608#include "confdefs.h"
1609#include <sys/types.h>
1610#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001611int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001612DIR *dirp = 0;
1613; return 0; }
1614EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001615if { (eval echo configure:1616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001616 rm -rf conftest*
1617 eval "ac_cv_header_dirent_$ac_safe=yes"
1618else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001619 echo "configure: failed program was:" >&5
1620 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001621 rm -rf conftest*
1622 eval "ac_cv_header_dirent_$ac_safe=no"
1623fi
1624rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001625fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001626if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001627 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001628 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001629 cat >> confdefs.h <<EOF
1630#define $ac_tr_hdr 1
1631EOF
1632 ac_header_dirent=$ac_hdr; break
1633else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001634 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001635fi
1636done
1637# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1638if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001639echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00001640echo "configure:1641: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001641ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum5839e582000-10-09 19:52:35 +00001642if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001643 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001644else
1645 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001646LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001647cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001648#line 1649 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001649#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001650/* Override any gcc2 internal prototype to avoid an error. */
1651/* We use char because int might match the return type of a gcc2
1652 builtin and then its argument prototype would still apply. */
1653char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001654
Guido van Rossumf78abae1997-01-21 22:02:36 +00001655int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001656opendir()
1657; return 0; }
1658EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001659if { (eval echo configure:1660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001660 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001661 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001662else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001663 echo "configure: failed program was:" >&5
1664 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001665 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001666 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001667fi
1668rm -f conftest*
1669LIBS="$ac_save_LIBS"
1670
1671fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001672if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001673 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001674 LIBS="$LIBS -ldir"
1675else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001676 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001677fi
1678
1679else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001680echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00001681echo "configure:1682: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001682ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum5839e582000-10-09 19:52:35 +00001683if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001684 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685else
1686 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001687LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001688cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001689#line 1690 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001690#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001691/* Override any gcc2 internal prototype to avoid an error. */
1692/* We use char because int might match the return type of a gcc2
1693 builtin and then its argument prototype would still apply. */
1694char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001695
Guido van Rossumf78abae1997-01-21 22:02:36 +00001696int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001697opendir()
1698; return 0; }
1699EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001700if { (eval echo configure:1701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001701 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001702 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001704 echo "configure: failed program was:" >&5
1705 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001707 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708fi
1709rm -f conftest*
1710LIBS="$ac_save_LIBS"
1711
1712fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001713if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001714 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001715 LIBS="$LIBS -lx"
1716else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001717 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001718fi
1719
1720fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001721
1722
1723# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001724was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001725echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00001726echo "configure:1727: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001727cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001728#line 1729 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001729#include "confdefs.h"
1730#include <time.h>
1731EOF
1732if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1733 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001734 rm -rf conftest*
1735 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001736else
1737 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001738 cat >> confdefs.h <<\EOF
1739#define clock_t long
1740EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001741
1742fi
1743rm -f conftest*
1744
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001745echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001746
Guido van Rossum84e7b241996-08-19 21:59:00 +00001747# Add some code to confdefs.h so that the test for off_t works on SCO
1748cat >> confdefs.h <<\EOF
1749#if defined(SCO_DS)
1750#undef _OFF_T
1751#endif
1752EOF
1753
Guido van Rossumef2255b2000-03-10 22:30:29 +00001754# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001755echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00001756echo "configure:1757: checking for mode_t" >&5
1757if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001758 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001759else
1760 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001761#line 1762 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001762#include "confdefs.h"
1763#include <sys/types.h>
1764#if STDC_HEADERS
1765#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001766#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001767#endif
1768EOF
1769if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001770 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 +00001771 rm -rf conftest*
Guido van Rossum5839e582000-10-09 19:52:35 +00001772 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001773else
1774 rm -rf conftest*
Guido van Rossum5839e582000-10-09 19:52:35 +00001775 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001776fi
1777rm -f conftest*
1778
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001779fi
Guido van Rossum5839e582000-10-09 19:52:35 +00001780echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1781if test $ac_cv_type_mode_t = no; then
1782 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001783#define mode_t int
1784EOF
1785
1786fi
1787
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001788echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00001789echo "configure:1790: checking for off_t" >&5
1790if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001791 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001792else
1793 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001794#line 1795 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001795#include "confdefs.h"
1796#include <sys/types.h>
1797#if STDC_HEADERS
1798#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001799#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001800#endif
1801EOF
1802if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001803 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 +00001804 rm -rf conftest*
Guido van Rossum5839e582000-10-09 19:52:35 +00001805 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001806else
1807 rm -rf conftest*
Guido van Rossum5839e582000-10-09 19:52:35 +00001808 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001809fi
1810rm -f conftest*
1811
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001812fi
Guido van Rossum5839e582000-10-09 19:52:35 +00001813echo "$ac_t""$ac_cv_type_off_t" 1>&6
1814if test $ac_cv_type_off_t = no; then
1815 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001816#define off_t long
1817EOF
1818
1819fi
1820
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001821echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00001822echo "configure:1823: checking for pid_t" >&5
1823if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001824 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001825else
1826 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001827#line 1828 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001828#include "confdefs.h"
1829#include <sys/types.h>
1830#if STDC_HEADERS
1831#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001832#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001833#endif
1834EOF
1835if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001836 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 +00001837 rm -rf conftest*
Guido van Rossum5839e582000-10-09 19:52:35 +00001838 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001839else
1840 rm -rf conftest*
Guido van Rossum5839e582000-10-09 19:52:35 +00001841 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001842fi
1843rm -f conftest*
1844
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001845fi
Guido van Rossum5839e582000-10-09 19:52:35 +00001846echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1847if test $ac_cv_type_pid_t = no; then
1848 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001849#define pid_t int
1850EOF
1851
1852fi
1853
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001854echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00001855echo "configure:1856: checking return type of signal handlers" >&5
1856if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001857 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001858else
1859 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001860#line 1861 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001861#include "confdefs.h"
1862#include <sys/types.h>
1863#include <signal.h>
1864#ifdef signal
1865#undef signal
1866#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001867#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001868extern "C" void (*signal (int, void (*)(int)))(int);
1869#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001870void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001871#endif
1872
Guido van Rossumf78abae1997-01-21 22:02:36 +00001873int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001874int i;
1875; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001876EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001877if { (eval echo configure:1878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001878 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001879 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001880else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001881 echo "configure: failed program was:" >&5
1882 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001883 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001884 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001885fi
1886rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001887fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001888
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001889echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001890cat >> confdefs.h <<EOF
1891#define RETSIGTYPE $ac_cv_type_signal
1892EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001893
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001894
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001895echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00001896echo "configure:1897: checking for size_t" >&5
1897if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001898 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001899else
1900 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001901#line 1902 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001902#include "confdefs.h"
1903#include <sys/types.h>
1904#if STDC_HEADERS
1905#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001906#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001907#endif
1908EOF
1909if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001910 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 +00001911 rm -rf conftest*
Guido van Rossum5839e582000-10-09 19:52:35 +00001912 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001913else
1914 rm -rf conftest*
Guido van Rossum5839e582000-10-09 19:52:35 +00001915 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001916fi
1917rm -f conftest*
1918
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001919fi
Guido van Rossum5839e582000-10-09 19:52:35 +00001920echo "$ac_t""$ac_cv_type_size_t" 1>&6
1921if test $ac_cv_type_size_t = no; then
1922 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001923#define size_t unsigned
1924EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001925
1926fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001927
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001928echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00001929echo "configure:1930: checking for uid_t in sys/types.h" >&5
1930if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001931 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001932else
1933 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001934#line 1935 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001935#include "confdefs.h"
1936#include <sys/types.h>
1937EOF
1938if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1939 egrep "uid_t" >/dev/null 2>&1; then
1940 rm -rf conftest*
1941 ac_cv_type_uid_t=yes
1942else
1943 rm -rf conftest*
1944 ac_cv_type_uid_t=no
1945fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001946rm -f conftest*
1947
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001948fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001949
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001950echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001951if test $ac_cv_type_uid_t = no; then
1952 cat >> confdefs.h <<\EOF
1953#define uid_t int
1954EOF
1955
1956 cat >> confdefs.h <<\EOF
1957#define gid_t int
1958EOF
1959
1960fi
1961
Guido van Rossum627b2d71993-12-24 10:39:16 +00001962
Guido van Rossumef2255b2000-03-10 22:30:29 +00001963# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001964echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00001965echo "configure:1966: checking size of int" >&5
1966if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001967 echo $ac_n "(cached) $ac_c" 1>&6
1968else
1969 if test "$cross_compiling" = yes; then
1970 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1971else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001972 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001973#line 1974 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001974#include "confdefs.h"
1975#include <stdio.h>
1976main()
1977{
1978 FILE *f=fopen("conftestval", "w");
1979 if (!f) exit(1);
1980 fprintf(f, "%d\n", sizeof(int));
1981 exit(0);
1982}
1983EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00001984if { (eval echo configure:1985: \"$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 +00001985then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001986 ac_cv_sizeof_int=`cat conftestval`
1987else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001988 echo "configure: failed program was:" >&5
1989 cat conftest.$ac_ext >&5
1990 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001991 ac_cv_sizeof_int=0
1992fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001993rm -fr conftest*
1994fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001995
1996fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001997echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1998cat >> confdefs.h <<EOF
1999#define SIZEOF_INT $ac_cv_sizeof_int
2000EOF
2001
2002
2003echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002004echo "configure:2005: checking size of long" >&5
2005if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002006 echo $ac_n "(cached) $ac_c" 1>&6
2007else
2008 if test "$cross_compiling" = yes; then
2009 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2010else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002011 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002012#line 2013 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002013#include "confdefs.h"
2014#include <stdio.h>
2015main()
2016{
2017 FILE *f=fopen("conftestval", "w");
2018 if (!f) exit(1);
2019 fprintf(f, "%d\n", sizeof(long));
2020 exit(0);
2021}
2022EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002023if { (eval echo configure:2024: \"$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 +00002024then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002025 ac_cv_sizeof_long=`cat conftestval`
2026else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002027 echo "configure: failed program was:" >&5
2028 cat conftest.$ac_ext >&5
2029 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002030 ac_cv_sizeof_long=0
2031fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002032rm -fr conftest*
2033fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002034
2035fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002036echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2037cat >> confdefs.h <<EOF
2038#define SIZEOF_LONG $ac_cv_sizeof_long
2039EOF
2040
2041
Guido van Rossumad678af1998-10-02 14:42:15 +00002042echo $ac_n "checking size of void *""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002043echo "configure:2044: checking size of void *" >&5
2044if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002045 echo $ac_n "(cached) $ac_c" 1>&6
2046else
2047 if test "$cross_compiling" = yes; then
2048 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2049else
2050 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002051#line 2052 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002052#include "confdefs.h"
2053#include <stdio.h>
2054main()
2055{
2056 FILE *f=fopen("conftestval", "w");
2057 if (!f) exit(1);
2058 fprintf(f, "%d\n", sizeof(void *));
2059 exit(0);
2060}
2061EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002062if { (eval echo configure:2063: \"$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 +00002063then
2064 ac_cv_sizeof_void_p=`cat conftestval`
2065else
2066 echo "configure: failed program was:" >&5
2067 cat conftest.$ac_ext >&5
2068 rm -fr conftest*
2069 ac_cv_sizeof_void_p=0
2070fi
2071rm -fr conftest*
2072fi
2073
2074fi
2075echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2076cat >> confdefs.h <<EOF
2077#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2078EOF
2079
2080
Guido van Rossumef2255b2000-03-10 22:30:29 +00002081echo $ac_n "checking size of char""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002082echo "configure:2083: checking size of char" >&5
2083if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002084 echo $ac_n "(cached) $ac_c" 1>&6
2085else
2086 if test "$cross_compiling" = yes; then
2087 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2088else
2089 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002090#line 2091 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002091#include "confdefs.h"
2092#include <stdio.h>
2093main()
2094{
2095 FILE *f=fopen("conftestval", "w");
2096 if (!f) exit(1);
2097 fprintf(f, "%d\n", sizeof(char));
2098 exit(0);
2099}
2100EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002101if { (eval echo configure:2102: \"$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 +00002102then
2103 ac_cv_sizeof_char=`cat conftestval`
2104else
2105 echo "configure: failed program was:" >&5
2106 cat conftest.$ac_ext >&5
2107 rm -fr conftest*
2108 ac_cv_sizeof_char=0
2109fi
2110rm -fr conftest*
2111fi
2112
2113fi
2114echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2115cat >> confdefs.h <<EOF
2116#define SIZEOF_CHAR $ac_cv_sizeof_char
2117EOF
2118
2119
2120echo $ac_n "checking size of short""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002121echo "configure:2122: checking size of short" >&5
2122if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002123 echo $ac_n "(cached) $ac_c" 1>&6
2124else
2125 if test "$cross_compiling" = yes; then
2126 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2127else
2128 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002129#line 2130 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002130#include "confdefs.h"
2131#include <stdio.h>
2132main()
2133{
2134 FILE *f=fopen("conftestval", "w");
2135 if (!f) exit(1);
2136 fprintf(f, "%d\n", sizeof(short));
2137 exit(0);
2138}
2139EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002140if { (eval echo configure:2141: \"$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 +00002141then
2142 ac_cv_sizeof_short=`cat conftestval`
2143else
2144 echo "configure: failed program was:" >&5
2145 cat conftest.$ac_ext >&5
2146 rm -fr conftest*
2147 ac_cv_sizeof_short=0
2148fi
2149rm -fr conftest*
2150fi
2151
2152fi
2153echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2154cat >> confdefs.h <<EOF
2155#define SIZEOF_SHORT $ac_cv_sizeof_short
2156EOF
2157
2158
2159echo $ac_n "checking size of float""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002160echo "configure:2161: checking size of float" >&5
2161if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002162 echo $ac_n "(cached) $ac_c" 1>&6
2163else
2164 if test "$cross_compiling" = yes; then
2165 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2166else
2167 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002168#line 2169 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002169#include "confdefs.h"
2170#include <stdio.h>
2171main()
2172{
2173 FILE *f=fopen("conftestval", "w");
2174 if (!f) exit(1);
2175 fprintf(f, "%d\n", sizeof(float));
2176 exit(0);
2177}
2178EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002179if { (eval echo configure:2180: \"$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 +00002180then
2181 ac_cv_sizeof_float=`cat conftestval`
2182else
2183 echo "configure: failed program was:" >&5
2184 cat conftest.$ac_ext >&5
2185 rm -fr conftest*
2186 ac_cv_sizeof_float=0
2187fi
2188rm -fr conftest*
2189fi
2190
2191fi
2192echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2193cat >> confdefs.h <<EOF
2194#define SIZEOF_FLOAT $ac_cv_sizeof_float
2195EOF
2196
2197
2198echo $ac_n "checking size of double""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002199echo "configure:2200: checking size of double" >&5
2200if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002201 echo $ac_n "(cached) $ac_c" 1>&6
2202else
2203 if test "$cross_compiling" = yes; then
2204 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2205else
2206 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002207#line 2208 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002208#include "confdefs.h"
2209#include <stdio.h>
2210main()
2211{
2212 FILE *f=fopen("conftestval", "w");
2213 if (!f) exit(1);
2214 fprintf(f, "%d\n", sizeof(double));
2215 exit(0);
2216}
2217EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002218if { (eval echo configure:2219: \"$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 +00002219then
2220 ac_cv_sizeof_double=`cat conftestval`
2221else
2222 echo "configure: failed program was:" >&5
2223 cat conftest.$ac_ext >&5
2224 rm -fr conftest*
2225 ac_cv_sizeof_double=0
2226fi
2227rm -fr conftest*
2228fi
2229
2230fi
2231echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2232cat >> confdefs.h <<EOF
2233#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2234EOF
2235
2236
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002237echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002238echo "configure:2239: checking size of fpos_t" >&5
2239if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002240 echo $ac_n "(cached) $ac_c" 1>&6
2241else
2242 if test "$cross_compiling" = yes; then
2243 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2244else
2245 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002246#line 2247 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002247#include "confdefs.h"
2248#include <stdio.h>
2249main()
2250{
2251 FILE *f=fopen("conftestval", "w");
2252 if (!f) exit(1);
2253 fprintf(f, "%d\n", sizeof(fpos_t));
2254 exit(0);
2255}
2256EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002257if { (eval echo configure:2258: \"$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 +00002258then
2259 ac_cv_sizeof_fpos_t=`cat conftestval`
2260else
2261 echo "configure: failed program was:" >&5
2262 cat conftest.$ac_ext >&5
2263 rm -fr conftest*
2264 ac_cv_sizeof_fpos_t=0
2265fi
2266rm -fr conftest*
2267fi
2268
2269fi
2270echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2271cat >> confdefs.h <<EOF
2272#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2273EOF
2274
2275
Guido van Rossum0a516c91994-09-12 10:58:40 +00002276
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002277echo $ac_n "checking for long long support""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002278echo "configure:2279: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002279have_long_long=no
2280cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002281#line 2282 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002282#include "confdefs.h"
2283
2284int main() {
2285long long x; x = (long long)0;
2286; return 0; }
2287EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002288if { (eval echo configure:2289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002289 rm -rf conftest*
2290 cat >> confdefs.h <<\EOF
2291#define HAVE_LONG_LONG 1
2292EOF
2293 have_long_long=yes
2294else
2295 echo "configure: failed program was:" >&5
2296 cat conftest.$ac_ext >&5
2297fi
2298rm -f conftest*
2299echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002300if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002301echo $ac_n "checking size of long long""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002302echo "configure:2303: checking size of long long" >&5
2303if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002304 echo $ac_n "(cached) $ac_c" 1>&6
2305else
2306 if test "$cross_compiling" = yes; then
2307 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2308else
2309 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002310#line 2311 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002311#include "confdefs.h"
2312#include <stdio.h>
2313main()
2314{
2315 FILE *f=fopen("conftestval", "w");
2316 if (!f) exit(1);
2317 fprintf(f, "%d\n", sizeof(long long));
2318 exit(0);
2319}
2320EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002321if { (eval echo configure:2322: \"$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 +00002322then
2323 ac_cv_sizeof_long_long=`cat conftestval`
2324else
2325 echo "configure: failed program was:" >&5
2326 cat conftest.$ac_ext >&5
2327 rm -fr conftest*
2328 ac_cv_sizeof_long_long=0
2329fi
2330rm -fr conftest*
2331fi
2332
2333fi
2334echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2335cat >> confdefs.h <<EOF
2336#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2337EOF
2338
2339
2340fi
2341
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002342echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002343echo "configure:2344: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002344have_uintptr_t=no
2345cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002346#line 2347 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002347#include "confdefs.h"
2348
2349int main() {
2350uintptr_t x; x = (uintptr_t)0;
2351; return 0; }
2352EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002353if { (eval echo configure:2354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002354 rm -rf conftest*
2355 cat >> confdefs.h <<\EOF
2356#define HAVE_UINTPTR_T 1
2357EOF
2358 have_uintptr_t=yes
2359else
2360 echo "configure: failed program was:" >&5
2361 cat conftest.$ac_ext >&5
2362fi
2363rm -f conftest*
2364echo "$ac_t""$have_uintptr_t" 1>&6
2365if test "$have_uintptr_t" = yes ; then
2366echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002367echo "configure:2368: checking size of uintptr_t" >&5
2368if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002369 echo $ac_n "(cached) $ac_c" 1>&6
2370else
2371 if test "$cross_compiling" = yes; then
2372 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2373else
2374 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002375#line 2376 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002376#include "confdefs.h"
2377#include <stdio.h>
2378main()
2379{
2380 FILE *f=fopen("conftestval", "w");
2381 if (!f) exit(1);
2382 fprintf(f, "%d\n", sizeof(uintptr_t));
2383 exit(0);
2384}
2385EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002386if { (eval echo configure:2387: \"$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 +00002387then
2388 ac_cv_sizeof_uintptr_t=`cat conftestval`
2389else
2390 echo "configure: failed program was:" >&5
2391 cat conftest.$ac_ext >&5
2392 rm -fr conftest*
2393 ac_cv_sizeof_uintptr_t=0
2394fi
2395rm -fr conftest*
2396fi
2397
2398fi
2399echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2400cat >> confdefs.h <<EOF
2401#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2402EOF
2403
2404
2405fi
2406
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002407# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2408echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002409echo "configure:2410: checking size of off_t" >&5
2410if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002411 echo $ac_n "(cached) $ac_c" 1>&6
2412else
2413 if test "$cross_compiling" = yes; then
2414 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2415else
2416 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002417#line 2418 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002418#include "confdefs.h"
2419#include <stdio.h>
2420#include <sys/types.h>
2421main()
2422{
2423 FILE *f=fopen("conftestval", "w");
2424 if (!f) exit(1);
2425 fprintf(f, "%d\n", sizeof(off_t));
2426 exit(0);
2427}
2428EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002429if { (eval echo configure:2430: \"$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 +00002430then
2431 ac_cv_sizeof_off_t=`cat conftestval`
2432else
2433 echo "configure: failed program was:" >&5
2434 cat conftest.$ac_ext >&5
2435 rm -fr conftest*
2436 ac_cv_sizeof_off_t=0
2437fi
2438rm -fr conftest*
2439fi
2440
2441
2442fi
2443
2444echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2445cat >> confdefs.h <<EOF
2446#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2447EOF
2448
2449
2450echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002451echo "configure:2452: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002452if test "$have_long_long" = yes -a \
2453 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2454 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002455 cat >> confdefs.h <<\EOF
2456#define HAVE_LARGEFILE_SUPPORT 1
2457EOF
2458
2459 echo "$ac_t""yes" 1>&6
2460else
2461 echo "$ac_t""no" 1>&6
2462fi
2463
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002464# AC_CHECK_SIZEOF() doesn't include <time.h>.
2465echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002466echo "configure:2467: checking size of time_t" >&5
2467if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002468 echo $ac_n "(cached) $ac_c" 1>&6
2469else
2470 if test "$cross_compiling" = yes; then
2471 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2472else
2473 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002474#line 2475 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002475#include "confdefs.h"
2476#include <stdio.h>
2477#include <time.h>
2478main()
2479{
2480 FILE *f=fopen("conftestval", "w");
2481 if (!f) exit(1);
2482 fprintf(f, "%d\n", sizeof(time_t));
2483 exit(0);
2484}
2485EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002486if { (eval echo configure:2487: \"$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 +00002487then
2488 ac_cv_sizeof_time_t=`cat conftestval`
2489else
2490 echo "configure: failed program was:" >&5
2491 cat conftest.$ac_ext >&5
2492 rm -fr conftest*
2493 ac_cv_sizeof_time_t=0
2494fi
2495rm -fr conftest*
2496fi
2497
2498
2499fi
2500
2501echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2502cat >> confdefs.h <<EOF
2503#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2504EOF
2505
2506
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002507
Trent Mick635f6fb2000-08-23 21:33:05 +00002508# if have pthread_t then define SIZEOF_PTHREAD_T
2509echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002510echo "configure:2511: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002511have_pthread_t=no
2512cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002513#line 2514 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002514#include "confdefs.h"
2515#include <pthread.h>
2516int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002517pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002518; return 0; }
2519EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002520if { (eval echo configure:2521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002521 rm -rf conftest*
2522 have_pthread_t=yes
2523else
2524 echo "configure: failed program was:" >&5
2525 cat conftest.$ac_ext >&5
2526fi
2527rm -f conftest*
2528echo "$ac_t""$have_pthread_t" 1>&6
2529if test "$have_pthread_t" = yes ; then
2530 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2531 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002532echo "configure:2533: checking size of pthread_t" >&5
2533 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002534 echo $ac_n "(cached) $ac_c" 1>&6
2535else
2536 if test "$cross_compiling" = yes; then
2537 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2538else
2539 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002540#line 2541 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002541#include "confdefs.h"
2542#include <stdio.h>
2543 #include <pthread.h>
2544 main()
2545 {
2546 FILE *f=fopen("conftestval", "w");
2547 if (!f) exit(1);
2548 fprintf(f, "%d\n", sizeof(pthread_t));
2549 exit(0);
2550 }
2551EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00002552if { (eval echo configure:2553: \"$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 +00002553then
2554 ac_cv_sizeof_pthread_t=`cat conftestval`
2555else
2556 echo "configure: failed program was:" >&5
2557 cat conftest.$ac_ext >&5
2558 rm -fr conftest*
2559 ac_cv_sizeof_pthread_t=0
2560fi
2561rm -fr conftest*
2562fi
2563
2564
2565fi
2566
2567 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2568 cat >> confdefs.h <<EOF
2569#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2570EOF
2571
2572fi
2573
2574
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002575# Minor variations in building a framework between NextStep versions 4 and 5
2576
2577case $ac_sys_system/$ac_sys_release in
Guido van Rossum5839e582000-10-09 19:52:35 +00002578 Darwin/*)
2579 ns_undef_sym='_environ'
2580 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002581 next/4*)
2582 ns_undef_sym='__environ'
2583 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2584 next/5*)
2585 ns_undef_sym='_environ'
2586 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2587esac
2588
2589echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002590echo "configure:2591: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002591if test "$with_next_framework"
2592then
2593 OPT="$OPT -fno-common"
2594 # -U __environ is needed since bundles don't have access
2595 # to crt0 when built but will always be linked against it
2596 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2597 cat >> confdefs.h <<\EOF
2598#define WITH_NEXT_FRAMEWORK 1
2599EOF
2600
2601 echo "$ac_t""yes" 1>&6
2602else
2603 echo "$ac_t""no" 1>&6
2604fi
2605
2606echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002607echo "configure:2608: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002608if test "$with_next_framework" -o "$with_dyld"
2609then
2610 if test "$with_dyld"
2611 then
2612 echo "$ac_t""yes" 1>&6
2613 else
2614 echo "$ac_t""required for framework build" 1>&6
2615 fi
2616 cat >> confdefs.h <<\EOF
2617#define WITH_DYLD 1
2618EOF
2619
2620 ns_dyld='set'
2621else
2622 echo "$ac_t""no" 1>&6
2623fi
2624
Guido van Rossum0a516c91994-09-12 10:58:40 +00002625# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002626
2627
2628
2629
Guido van Rossum0a516c91994-09-12 10:58:40 +00002630# SO is the extension of shared libraries `(including the dot!)
2631# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002632echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002633echo "configure:2634: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002634if test -z "$SO"
2635then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002636 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002637 hp*|HP*) SO=.sl;;
2638 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002639 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002640fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002641echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002642# LDSHARED is the ld *command* used to create shared library
2643# -- "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 +00002644# (Shared libraries in this instance are shared modules to be loaded into
2645# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002646echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002647echo "configure:2648: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002648if test -z "$LDSHARED"
2649then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002650 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002651 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002652 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002653 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002654 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002655 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a662000-05-26 12:22:54 +00002656 SunOS/5*)
2657 if test "$GCC" = "yes"
2658 then LDSHARED='$(CC) -G'
2659 else LDSHARED="ld -G";
2660 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002661 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002662 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2663 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002664 Darwin/*|next/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002665 if test "$ns_dyld"
Guido van Rossum5839e582000-10-09 19:52:35 +00002666 then
2667 if test "$ac_sys_system" = Darwin
2668 then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
2669 else LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2670 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002671 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2672 fi
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002673 if test "$with_next_framework" ; then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002674 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2675 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002676 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002677 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002678 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002679 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002680 NetBSD*)
2681 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2682 then
2683 LDSHARED="cc -shared"
2684 else
2685 LDSHARED="ld -Bshareable"
2686 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002687 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00002688 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00002689 then
2690 LDSHARED="cc -shared ${LDFLAGS}"
2691 else
2692 LDSHARED="ld -Bshareable ${LDFLAGS}"
2693 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002694 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002695 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002696 *) LDSHARED="ld";;
2697 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002698fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002699echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002700# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002701# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002702echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002703echo "configure:2704: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002704if test -z "$CCSHARED"
2705then
Guido van Rossum07397971997-04-29 21:49:50 +00002706 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002707 hp*|HP*) if test "$GCC" = yes;
2708 then CCSHARED="-fpic";
2709 else CCSHARED="+z";
2710 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002711 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002712 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002713 OpenBSD*) CCSHARED="-fpic";;
2714 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002715 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002716 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002717 IRIX*/6*) case $CC in
2718 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002719 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002720 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002721 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002722fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002723echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002724# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002725# the python executable -- this is only needed for a few systems
2726echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00002727echo "configure:2728: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002728if test -z "$LINKFORSHARED"
2729then
Guido van Rossum07397971997-04-29 21:49:50 +00002730 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002731 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002732 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002733 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002734 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002735 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002736 # -u libsys_s pulls in all symbols in libsys
2737 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2738 # -u __dummy makes the linker aware of the objc runtime
2739 # in System.framework; otherwise, __objcInit (referenced in
2740 # crt1.o) gets erroneously defined as common, which breaks dynamic
2741 # loading of any modules which reference it in System.framework
2742 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00002743 Darwin/*) LINKFORSHARED="-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
Guido van Rossum5839e582000-10-09 19:52:35 +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_%'`
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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_%'`
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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_%'`
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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_%'`
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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_%'`
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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 Warsawc0d24d82000-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
Guido van Rossum5839e582000-10-09 19:52:35 +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 Warsawc0d24d82000-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
Guido van Rossum5839e582000-10-09 19:52:35 +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 Warsawc0d24d82000-06-29 16:12:00 +00003078 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003079fi
3080
3081
Barry Warsawc0d24d82000-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 Warsawc0d24d82000-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
Guido van Rossum40951012000-10-07 16:21:27 +00003100 if test ! -z "$with_threads" -a -d "$with_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003101 then LDFLAGS="$LDFLAGS -L$with_threads"
3102 fi
Guido van Rossum40951012000-10-07 16:21:27 +00003103 if test ! -z "$withval" -a -d "$withval"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003104 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 Warsawc0d24d82000-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
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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"
Guido van Rossum5839e582000-10-09 19:52:35 +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 Warsawc0d24d82000-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 Warsawc0d24d82000-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
Guido van Rossum5839e582000-10-09 19:52:35 +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 Warsawc0d24d82000-06-29 16:12:00 +00003170 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +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_%'`
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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 Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-06-29 16:12:00 +00003218 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +00003242pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003243#endif
3244
3245; return 0; }
3246EOF
Guido van Rossum5839e582000-10-09 19:52:35 +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
Guido van Rossum5839e582000-10-09 19:52:35 +00003265 case $ac_sys_system in
3266 Darwin*) ;;
3267 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003268#define _POSIX_THREADS 1
3269EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003270;;
3271 esac
Barry Warsawc0d24d82000-06-29 16:12:00 +00003272 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003273else
3274 echo "$ac_t""no" 1>&6
3275
Barry Warsawc0d24d82000-06-29 16:12:00 +00003276 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003277echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00003278echo "configure:3279: checking for kernel/OS.h" >&5
3279if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003280 echo $ac_n "(cached) $ac_c" 1>&6
3281else
3282 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003283#line 3284 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003284#include "confdefs.h"
3285#include <kernel/OS.h>
3286EOF
3287ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum5839e582000-10-09 19:52:35 +00003288{ (eval echo configure:3289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003289ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003290if test -z "$ac_err"; then
3291 rm -rf conftest*
3292 eval "ac_cv_header_$ac_safe=yes"
3293else
3294 echo "$ac_err" >&5
3295 echo "configure: failed program was:" >&5
3296 cat conftest.$ac_ext >&5
3297 rm -rf conftest*
3298 eval "ac_cv_header_$ac_safe=no"
3299fi
3300rm -f conftest*
3301fi
3302if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3303 echo "$ac_t""yes" 1>&6
3304 cat >> confdefs.h <<\EOF
3305#define WITH_THREAD 1
3306EOF
3307
Barry Warsawc0d24d82000-06-29 16:12:00 +00003308 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003309#define BEOS_THREADS 1
3310EOF
3311
Barry Warsawc0d24d82000-06-29 16:12:00 +00003312 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003313else
3314 echo "$ac_t""no" 1>&6
3315
Barry Warsawc0d24d82000-06-29 16:12:00 +00003316 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00003317echo "configure:3318: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003318ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum5839e582000-10-09 19:52:35 +00003319if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003320 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003321else
3322 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003323LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003324cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003325#line 3326 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003326#include "confdefs.h"
3327/* Override any gcc2 internal prototype to avoid an error. */
3328/* We use char because int might match the return type of a gcc2
3329 builtin and then its argument prototype would still apply. */
3330char pthread_create();
3331
3332int main() {
3333pthread_create()
3334; return 0; }
3335EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003336if { (eval echo configure:3337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003337 rm -rf conftest*
3338 eval "ac_cv_lib_$ac_lib_var=yes"
3339else
3340 echo "configure: failed program was:" >&5
3341 cat conftest.$ac_ext >&5
3342 rm -rf conftest*
3343 eval "ac_cv_lib_$ac_lib_var=no"
3344fi
3345rm -f conftest*
3346LIBS="$ac_save_LIBS"
3347
3348fi
3349if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3350 echo "$ac_t""yes" 1>&6
3351 cat >> confdefs.h <<\EOF
3352#define WITH_THREAD 1
3353EOF
3354
3355 cat >> confdefs.h <<\EOF
3356#define _POSIX_THREADS 1
3357EOF
3358
3359 LIBS="$LIBS -lpthreads"
3360 LIBOBJS="$LIBOBJS thread.o"
3361else
3362 echo "$ac_t""no" 1>&6
3363
3364 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00003365echo "configure:3366: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003366ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum5839e582000-10-09 19:52:35 +00003367if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003368 echo $ac_n "(cached) $ac_c" 1>&6
3369else
3370 ac_save_LIBS="$LIBS"
3371LIBS="-lc_r $LIBS"
3372cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003373#line 3374 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003374#include "confdefs.h"
3375/* Override any gcc2 internal prototype to avoid an error. */
3376/* We use char because int might match the return type of a gcc2
3377 builtin and then its argument prototype would still apply. */
3378char pthread_create();
3379
3380int main() {
3381pthread_create()
3382; return 0; }
3383EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003384if { (eval echo configure:3385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003385 rm -rf conftest*
3386 eval "ac_cv_lib_$ac_lib_var=yes"
3387else
3388 echo "configure: failed program was:" >&5
3389 cat conftest.$ac_ext >&5
3390 rm -rf conftest*
3391 eval "ac_cv_lib_$ac_lib_var=no"
3392fi
3393rm -f conftest*
3394LIBS="$ac_save_LIBS"
3395
3396fi
3397if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3398 echo "$ac_t""yes" 1>&6
3399 cat >> confdefs.h <<\EOF
3400#define WITH_THREAD 1
3401EOF
3402
Barry Warsawc0d24d82000-06-29 16:12:00 +00003403 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003404#define _POSIX_THREADS 1
3405EOF
3406
Greg Steinadf63d62000-07-05 10:38:09 +00003407 LIBS="$LIBS -lc_r"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003408 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003409else
3410 echo "$ac_t""no" 1>&6
3411
Greg Steinadf63d62000-07-05 10:38:09 +00003412 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00003413echo "configure:3414: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003414ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum5839e582000-10-09 19:52:35 +00003415if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003416 echo $ac_n "(cached) $ac_c" 1>&6
3417else
3418 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003419LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003420cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003421#line 3422 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003422#include "confdefs.h"
3423/* Override any gcc2 internal prototype to avoid an error. */
3424/* We use char because int might match the return type of a gcc2
3425 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003426char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003427
3428int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003429__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003430; return 0; }
3431EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003432if { (eval echo configure:3433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003433 rm -rf conftest*
3434 eval "ac_cv_lib_$ac_lib_var=yes"
3435else
3436 echo "configure: failed program was:" >&5
3437 cat conftest.$ac_ext >&5
3438 rm -rf conftest*
3439 eval "ac_cv_lib_$ac_lib_var=no"
3440fi
3441rm -f conftest*
3442LIBS="$ac_save_LIBS"
3443
3444fi
3445if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3446 echo "$ac_t""yes" 1>&6
3447 cat >> confdefs.h <<\EOF
3448#define WITH_THREAD 1
3449EOF
3450
Barry Warsawc0d24d82000-06-29 16:12:00 +00003451 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003452#define _POSIX_THREADS 1
3453EOF
3454
Greg Steinadf63d62000-07-05 10:38:09 +00003455 LIBS="$LIBS -lthread"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003456 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003457else
3458 echo "$ac_t""no" 1>&6
3459
Barry Warsawc0d24d82000-06-29 16:12:00 +00003460 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00003461echo "configure:3462: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003462ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum5839e582000-10-09 19:52:35 +00003463if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003464 echo $ac_n "(cached) $ac_c" 1>&6
3465else
3466 ac_save_LIBS="$LIBS"
3467LIBS="-lcma $LIBS"
3468cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003469#line 3470 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003470#include "confdefs.h"
3471/* Override any gcc2 internal prototype to avoid an error. */
3472/* We use char because int might match the return type of a gcc2
3473 builtin and then its argument prototype would still apply. */
3474char pthread_create();
3475
3476int main() {
3477pthread_create()
3478; return 0; }
3479EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003480if { (eval echo configure:3481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003481 rm -rf conftest*
3482 eval "ac_cv_lib_$ac_lib_var=yes"
3483else
3484 echo "configure: failed program was:" >&5
3485 cat conftest.$ac_ext >&5
3486 rm -rf conftest*
3487 eval "ac_cv_lib_$ac_lib_var=no"
3488fi
3489rm -f conftest*
3490LIBS="$ac_save_LIBS"
3491
3492fi
3493if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3494 echo "$ac_t""yes" 1>&6
3495 cat >> confdefs.h <<\EOF
3496#define WITH_THREAD 1
3497EOF
3498
Barry Warsawc0d24d82000-06-29 16:12:00 +00003499 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003500#define _POSIX_THREADS 1
3501EOF
3502
Barry Warsawc0d24d82000-06-29 16:12:00 +00003503 LIBS="$LIBS -lcma"
3504 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003505else
3506 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003507
3508 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003509fi
3510
Barry Warsawc0d24d82000-06-29 16:12:00 +00003511
Guido van Rossum627b2d71993-12-24 10:39:16 +00003512fi
3513
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003514fi
3515
Guido van Rossum0be3e491997-05-22 20:33:33 +00003516fi
3517
Guido van Rossum49545951997-12-02 19:28:29 +00003518fi
3519
Guido van Rossumb93a8621998-05-07 13:27:32 +00003520fi
3521
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003522fi
3523
Guido van Rossumad678af1998-10-02 14:42:15 +00003524fi
3525
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003526fi
3527
Guido van Rossum0be3e491997-05-22 20:33:33 +00003528
Barry Warsawc0d24d82000-06-29 16:12:00 +00003529 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00003530echo "configure:3531: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003531ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum5839e582000-10-09 19:52:35 +00003532if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003533 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003534else
3535 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003536LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003537cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003538#line 3539 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003539#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003540/* Override any gcc2 internal prototype to avoid an error. */
3541/* We use char because int might match the return type of a gcc2
3542 builtin and then its argument prototype would still apply. */
3543char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003544
Guido van Rossumf78abae1997-01-21 22:02:36 +00003545int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003546usconfig()
3547; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003548EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003549if { (eval echo configure:3550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003550 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003551 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003552else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003553 echo "configure: failed program was:" >&5
3554 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003555 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003556 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003557fi
3558rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003559LIBS="$ac_save_LIBS"
3560
3561fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003562if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003563 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003564 cat >> confdefs.h <<\EOF
3565#define WITH_THREAD 1
3566EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003567
Barry Warsawc0d24d82000-06-29 16:12:00 +00003568 LIBS="$LIBS -lmpc"
3569 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003570 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003571else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003572 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003573fi
3574
Barry Warsawc0d24d82000-06-29 16:12:00 +00003575 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00003576echo "configure:3577: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003577ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum5839e582000-10-09 19:52:35 +00003578if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003579 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003580else
3581 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003582LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003583cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003584#line 3585 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003585#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003586/* Override any gcc2 internal prototype to avoid an error. */
3587/* We use char because int might match the return type of a gcc2
3588 builtin and then its argument prototype would still apply. */
3589char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003590
Guido van Rossumf78abae1997-01-21 22:02:36 +00003591int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003592thr_create()
3593; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003594EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003595if { (eval echo configure:3596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003596 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003597 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003598else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003599 echo "configure: failed program was:" >&5
3600 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003601 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003602 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003603fi
3604rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003605LIBS="$ac_save_LIBS"
3606
3607fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003608if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003609 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003610 cat >> confdefs.h <<\EOF
3611#define WITH_THREAD 1
3612EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003613
Barry Warsawc0d24d82000-06-29 16:12:00 +00003614 LIBS="$LIBS -lthread"
3615 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003616 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003617else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003618 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003619fi
3620
Guido van Rossum627b2d71993-12-24 10:39:16 +00003621fi
3622
Barry Warsawef82cd72000-06-30 16:21:01 +00003623# Check for GC support
3624
3625USE_GC_MODULE=""
3626echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00003627echo "configure:3628: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003628# Check whether --with-cycle-gc or --without-cycle-gc was given.
3629if test "${with_cycle_gc+set}" = set; then
3630 withval="$with_cycle_gc"
3631 :
3632fi
3633
3634
3635if test -z "$with_cycle_gc"
3636then with_cycle_gc="yes"
3637fi
3638if test "$with_cycle_gc" = "no"
3639then
3640 USE_GC_MODULE="#"
3641else
3642 cat >> confdefs.h <<\EOF
3643#define WITH_CYCLE_GC 1
3644EOF
3645
3646fi
3647echo "$ac_t""$with_cycle_gc" 1>&6
3648
Fred Drakea50d6ec2000-08-31 16:13:20 +00003649# Check for LIBDB support
3650# either --with-libdb or, in its absence, the presence of db.h
3651
3652USE_BSDDB_MODULE=""
3653echo $ac_n "checking for --with-libdb""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00003654echo "configure:3655: checking for --with-libdb" >&5
Fred Drakea50d6ec2000-08-31 16:13:20 +00003655# Check whether --with-libdb or --without-libdb was given.
3656if test "${with_libdb+set}" = set; then
3657 withval="$with_libdb"
3658 :
3659fi
3660
3661
Skip Montanarob89f41e2000-09-04 04:06:05 +00003662# enabled by default, but db.h must be found
3663if test "$ac_cv_header_db_h" = "yes"
3664then
3665 if test "$with_libdb" != "no"
3666 then with_libdb="yes"
3667 fi
3668else
Fred Drake5790be12000-10-09 17:06:13 +00003669 # make sure user knows why bsddb support wasn't enabled even
Skip Montanarob89f41e2000-09-04 04:06:05 +00003670 # though s/he requested it
3671 if test "$with_libdb" = "yes"
3672 then echo $ac_n "(requested, but db.h was not found) $ac_c"
3673 fi
3674 with_libdb="no"
Fred Drakea50d6ec2000-08-31 16:13:20 +00003675fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00003676
Fred Drakea50d6ec2000-08-31 16:13:20 +00003677if test "$with_libdb" = "no"
3678then
3679 USE_BSDDB_MODULE="#"
3680else
3681 cat >> confdefs.h <<\EOF
3682#define WITH_LIBDB 1
3683EOF
3684
3685fi
3686echo "$ac_t""$with_libdb" 1>&6
3687
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003688if test "$with_libdb" = "yes"
3689then
3690 # check for libdb; BSD systems have the DB routines in libc --tg
3691
Martin v. Löwis05a65d62000-09-24 19:40:25 +00003692 # If dbopen is not in libc, then checking whether it is in libdb
3693 # is difficult: db_185.h may #define it as __db185_open
Fred Drake02706f52000-09-25 15:08:46 +00003694 # Instead, we just trust it is in libdb; linking will fail if it
3695 # is not.
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003696 echo $ac_n "checking for dbopen""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00003697echo "configure:3698: checking for dbopen" >&5
3698if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003699 echo $ac_n "(cached) $ac_c" 1>&6
3700else
3701 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003702#line 3703 "configure"
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003703#include "confdefs.h"
3704/* System header to define __stub macros and hopefully few prototypes,
3705 which can conflict with char dbopen(); below. */
3706#include <assert.h>
3707/* Override any gcc2 internal prototype to avoid an error. */
3708/* We use char because int might match the return type of a gcc2
3709 builtin and then its argument prototype would still apply. */
3710char dbopen();
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003711
3712int main() {
3713
3714/* The GNU C library defines this for functions which it implements
3715 to always fail with ENOSYS. Some functions are actually named
3716 something starting with __ and the normal name is an alias. */
3717#if defined (__stub_dbopen) || defined (__stub___dbopen)
3718choke me
3719#else
Guido van Rossum5839e582000-10-09 19:52:35 +00003720dbopen();
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003721#endif
3722
3723; return 0; }
3724EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003725if { (eval echo configure:3726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003726 rm -rf conftest*
3727 eval "ac_cv_func_dbopen=yes"
3728else
3729 echo "configure: failed program was:" >&5
3730 cat conftest.$ac_ext >&5
3731 rm -rf conftest*
3732 eval "ac_cv_func_dbopen=no"
3733fi
3734rm -f conftest*
3735fi
3736
3737if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
3738 echo "$ac_t""yes" 1>&6
3739 HAVE_LIBDB=
3740else
3741 echo "$ac_t""no" 1>&6
Martin v. Löwis05a65d62000-09-24 19:40:25 +00003742HAVE_LIBDB=-ldb
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003743fi
3744
3745fi
3746
Barry Warsawef82cd72000-06-30 16:21:01 +00003747# Check for --with-wctype-functions
3748echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00003749echo "configure:3750: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003750# Check whether --with-wctype-functions or --without-wctype-functions was given.
3751if test "${with_wctype_functions+set}" = set; then
3752 withval="$with_wctype_functions"
3753
3754if test "$withval" != no
3755then cat >> confdefs.h <<\EOF
3756#define WANT_WCTYPE_FUNCTIONS 1
3757EOF
3758 echo "$ac_t""yes" 1>&6
3759else echo "$ac_t""no" 1>&6
3760fi
3761else
3762 echo "$ac_t""no" 1>&6
3763fi
3764
3765
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003766# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00003767
3768DLINCLDIR=/
3769
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003770echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00003771echo "configure:3772: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003772# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003773if test "${with_sgi_dl+set}" = set; then
3774 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003775
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003776echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003777cat >> confdefs.h <<\EOF
3778#define WITH_SGI_DL 1
3779EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003780
Guido van Rossume97ee181999-12-20 21:27:22 +00003781DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003782dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00003783if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003784then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003785else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003786fi
3787DLINCLDIR=${dldir}
3788LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003789else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003790 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003791fi
3792
3793
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003794echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00003795echo "configure:3796: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003796# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003797if test "${with_dl_dld+set}" = set; then
3798 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003799
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003800echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003801cat >> confdefs.h <<\EOF
3802#define WITH_DL_DLD 1
3803EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003804
Guido van Rossume97ee181999-12-20 21:27:22 +00003805DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003806dldir=`echo "$withval" | sed 's/,.*//'`
3807dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00003808if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003809then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003810else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003811fi
3812DLINCLDIR=${dldir}
3813LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003814else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003815 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003816fi
3817
3818
Guido van Rossume97ee181999-12-20 21:27:22 +00003819# the dlopen() function means we might want to use dynload_shlib.o. some
3820# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00003821for ac_func in dlopen
3822do
3823echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00003824echo "configure:3825: checking for $ac_func" >&5
3825if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003826 echo $ac_n "(cached) $ac_c" 1>&6
3827else
3828 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003829#line 3830 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00003830#include "confdefs.h"
3831/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00003832 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00003833#include <assert.h>
3834/* Override any gcc2 internal prototype to avoid an error. */
3835/* We use char because int might match the return type of a gcc2
3836 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003837char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00003838
3839int main() {
3840
3841/* The GNU C library defines this for functions which it implements
3842 to always fail with ENOSYS. Some functions are actually named
3843 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003844#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00003845choke me
3846#else
Guido van Rossum5839e582000-10-09 19:52:35 +00003847$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00003848#endif
3849
3850; return 0; }
3851EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003852if { (eval echo configure:3853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003853 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003854 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00003855else
3856 echo "configure: failed program was:" >&5
3857 cat conftest.$ac_ext >&5
3858 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003859 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00003860fi
3861rm -f conftest*
3862fi
3863
Thomas Wouters3a584202000-08-05 23:28:51 +00003864if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003865 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00003866 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3867 cat >> confdefs.h <<EOF
3868#define $ac_tr_func 1
3869EOF
3870
Guido van Rossume97ee181999-12-20 21:27:22 +00003871else
3872 echo "$ac_t""no" 1>&6
3873fi
Thomas Wouters3a584202000-08-05 23:28:51 +00003874done
Guido van Rossume97ee181999-12-20 21:27:22 +00003875
3876
3877# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3878# loading of modules.
3879
3880echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00003881echo "configure:3882: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00003882if test -z "$DYNLOADFILE"
3883then
3884 case $ac_sys_system/$ac_sys_release in
3885 AIX*) DYNLOADFILE="dynload_aix.o";;
3886 BeOS*) DYNLOADFILE="dynload_beos.o";;
3887 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossum5839e582000-10-09 19:52:35 +00003888 Darwin/*|next/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00003889 *)
3890 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
3891 # out any dynamic loading
3892 if test "$ac_cv_func_dlopen" = yes
3893 then DYNLOADFILE="dynload_shlib.o"
3894 else DYNLOADFILE="dynload_stub.o"
3895 fi
3896 ;;
3897 esac
3898fi
3899echo "$ac_t""$DYNLOADFILE" 1>&6
3900if test "$DYNLOADFILE" != "dynload_stub.o"
3901then
3902 cat >> confdefs.h <<\EOF
3903#define HAVE_DYNAMIC_LOADING 1
3904EOF
3905
3906fi
3907
Guido van Rossum627b2d71993-12-24 10:39:16 +00003908# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00003909for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00003910 flock fork fsync fdatasync fpathconf ftime ftruncate \
Thomas Wouters3a584202000-08-05 23:28:51 +00003911 getgroups getlogin getpeername getpid getpwent getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00003912 kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00003913 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00003914 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003915 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00003916 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00003917 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00003918 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters70c21a12000-07-14 14:28:33 +00003919 truncate uname waitpid _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003920do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003921echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00003922echo "configure:3923: checking for $ac_func" >&5
3923if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003924 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003925else
3926 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003927#line 3928 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003928#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003929/* System header to define __stub macros and hopefully few prototypes,
3930 which can conflict with char $ac_func(); below. */
3931#include <assert.h>
3932/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003933/* We use char because int might match the return type of a gcc2
3934 builtin and then its argument prototype would still apply. */
3935char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003936
Guido van Rossumf78abae1997-01-21 22:02:36 +00003937int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003938
Guido van Rossum627b2d71993-12-24 10:39:16 +00003939/* The GNU C library defines this for functions which it implements
3940 to always fail with ENOSYS. Some functions are actually named
3941 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003942#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003943choke me
3944#else
Guido van Rossum5839e582000-10-09 19:52:35 +00003945$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003946#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003947
Guido van Rossum7f43da71994-08-01 12:15:30 +00003948; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003949EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003950if { (eval echo configure:3951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003951 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003952 eval "ac_cv_func_$ac_func=yes"
3953else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003954 echo "configure: failed program was:" >&5
3955 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003956 rm -rf conftest*
3957 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003958fi
3959rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003960fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003961
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003962if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003963 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003964 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003965 cat >> confdefs.h <<EOF
3966#define $ac_tr_func 1
3967EOF
3968
3969else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003970 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003971fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003972done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003973
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003974
Fred Drake8cef4cf2000-06-28 16:40:38 +00003975# check for openpty and forkpty
3976
3977for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003978do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003979echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00003980echo "configure:3981: checking for $ac_func" >&5
3981if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003982 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003983else
3984 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003985#line 3986 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003986#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003987/* System header to define __stub macros and hopefully few prototypes,
3988 which can conflict with char $ac_func(); below. */
3989#include <assert.h>
3990/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003991/* We use char because int might match the return type of a gcc2
3992 builtin and then its argument prototype would still apply. */
3993char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003994
Guido van Rossumf78abae1997-01-21 22:02:36 +00003995int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003996
Guido van Rossum627b2d71993-12-24 10:39:16 +00003997/* The GNU C library defines this for functions which it implements
3998 to always fail with ENOSYS. Some functions are actually named
3999 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004000#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004001choke me
4002#else
Guido van Rossum5839e582000-10-09 19:52:35 +00004003$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004004#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004005
Guido van Rossum7f43da71994-08-01 12:15:30 +00004006; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004007EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004008if { (eval echo configure:4009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004009 rm -rf conftest*
4010 eval "ac_cv_func_$ac_func=yes"
4011else
4012 echo "configure: failed program was:" >&5
4013 cat conftest.$ac_ext >&5
4014 rm -rf conftest*
4015 eval "ac_cv_func_$ac_func=no"
4016fi
4017rm -f conftest*
4018fi
4019
4020if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4021 echo "$ac_t""yes" 1>&6
4022 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4023 cat >> confdefs.h <<EOF
4024#define $ac_tr_func 1
4025EOF
4026
4027else
4028 echo "$ac_t""no" 1>&6
4029echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00004030echo "configure:4031: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004031ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum5839e582000-10-09 19:52:35 +00004032if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004033 echo $ac_n "(cached) $ac_c" 1>&6
4034else
4035 ac_save_LIBS="$LIBS"
4036LIBS="-lutil $LIBS"
4037cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004038#line 4039 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004039#include "confdefs.h"
4040/* Override any gcc2 internal prototype to avoid an error. */
4041/* We use char because int might match the return type of a gcc2
4042 builtin and then its argument prototype would still apply. */
4043char openpty();
4044
4045int main() {
4046openpty()
4047; return 0; }
4048EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004049if { (eval echo configure:4050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004050 rm -rf conftest*
4051 eval "ac_cv_lib_$ac_lib_var=yes"
4052else
4053 echo "configure: failed program was:" >&5
4054 cat conftest.$ac_ext >&5
4055 rm -rf conftest*
4056 eval "ac_cv_lib_$ac_lib_var=no"
4057fi
4058rm -f conftest*
4059LIBS="$ac_save_LIBS"
4060
4061fi
4062if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4063 echo "$ac_t""yes" 1>&6
4064 cat >> confdefs.h <<\EOF
4065#define HAVE_OPENPTY 1
4066EOF
4067 LIBS="$LIBS -lutil"
4068else
4069 echo "$ac_t""no" 1>&6
4070fi
4071
4072fi
4073done
4074
4075for ac_func in forkpty
4076do
4077echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00004078echo "configure:4079: checking for $ac_func" >&5
4079if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004080 echo $ac_n "(cached) $ac_c" 1>&6
4081else
4082 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004083#line 4084 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004084#include "confdefs.h"
4085/* System header to define __stub macros and hopefully few prototypes,
4086 which can conflict with char $ac_func(); below. */
4087#include <assert.h>
4088/* Override any gcc2 internal prototype to avoid an error. */
4089/* We use char because int might match the return type of a gcc2
4090 builtin and then its argument prototype would still apply. */
4091char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004092
4093int main() {
4094
4095/* The GNU C library defines this for functions which it implements
4096 to always fail with ENOSYS. Some functions are actually named
4097 something starting with __ and the normal name is an alias. */
4098#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4099choke me
4100#else
Guido van Rossum5839e582000-10-09 19:52:35 +00004101$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004102#endif
4103
4104; return 0; }
4105EOF
Fred Drake5790be12000-10-09 17:06:13 +00004106if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004107 rm -rf conftest*
4108 eval "ac_cv_func_$ac_func=yes"
4109else
4110 echo "configure: failed program was:" >&5
4111 cat conftest.$ac_ext >&5
4112 rm -rf conftest*
4113 eval "ac_cv_func_$ac_func=no"
4114fi
4115rm -f conftest*
4116fi
4117
4118if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4119 echo "$ac_t""yes" 1>&6
4120 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4121 cat >> confdefs.h <<EOF
4122#define $ac_tr_func 1
4123EOF
4124
4125else
4126 echo "$ac_t""no" 1>&6
4127echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004128echo "configure:4129: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004129ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum5839e582000-10-09 19:52:35 +00004130if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004131 echo $ac_n "(cached) $ac_c" 1>&6
4132else
4133 ac_save_LIBS="$LIBS"
4134LIBS="-lutil $LIBS"
4135cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004136#line 4137 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004137#include "confdefs.h"
4138/* Override any gcc2 internal prototype to avoid an error. */
4139/* We use char because int might match the return type of a gcc2
4140 builtin and then its argument prototype would still apply. */
4141char forkpty();
4142
4143int main() {
4144forkpty()
4145; return 0; }
4146EOF
Fred Drake5790be12000-10-09 17:06:13 +00004147if { (eval echo configure:4148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004148 rm -rf conftest*
4149 eval "ac_cv_lib_$ac_lib_var=yes"
4150else
4151 echo "configure: failed program was:" >&5
4152 cat conftest.$ac_ext >&5
4153 rm -rf conftest*
4154 eval "ac_cv_lib_$ac_lib_var=no"
4155fi
4156rm -f conftest*
4157LIBS="$ac_save_LIBS"
4158
4159fi
4160if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4161 echo "$ac_t""yes" 1>&6
4162 cat >> confdefs.h <<\EOF
4163#define HAVE_FORKPTY 1
4164EOF
4165 LIBS="$LIBS -lutil"
4166else
4167 echo "$ac_t""no" 1>&6
4168fi
4169
4170fi
4171done
4172
4173
4174# check for long file support functions
4175for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4176do
4177echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004178echo "configure:4179: checking for $ac_func" >&5
Guido van Rossum5839e582000-10-09 19:52:35 +00004179if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004180 echo $ac_n "(cached) $ac_c" 1>&6
4181else
4182 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004183#line 4184 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004184#include "confdefs.h"
4185/* System header to define __stub macros and hopefully few prototypes,
4186 which can conflict with char $ac_func(); below. */
4187#include <assert.h>
4188/* Override any gcc2 internal prototype to avoid an error. */
4189/* We use char because int might match the return type of a gcc2
4190 builtin and then its argument prototype would still apply. */
4191char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004192
4193int main() {
4194
4195/* The GNU C library defines this for functions which it implements
4196 to always fail with ENOSYS. Some functions are actually named
4197 something starting with __ and the normal name is an alias. */
4198#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4199choke me
4200#else
Guido van Rossum5839e582000-10-09 19:52:35 +00004201$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004202#endif
4203
4204; return 0; }
4205EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004206if { (eval echo configure:4207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004207 rm -rf conftest*
4208 eval "ac_cv_func_$ac_func=yes"
4209else
4210 echo "configure: failed program was:" >&5
4211 cat conftest.$ac_ext >&5
4212 rm -rf conftest*
4213 eval "ac_cv_func_$ac_func=no"
4214fi
4215rm -f conftest*
4216fi
4217
4218if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4219 echo "$ac_t""yes" 1>&6
4220 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4221 cat >> confdefs.h <<EOF
4222#define $ac_tr_func 1
4223EOF
4224
4225else
4226 echo "$ac_t""no" 1>&6
4227fi
4228done
4229
4230
4231for ac_func in dup2 getcwd strdup strerror memmove
4232do
4233echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00004234echo "configure:4235: checking for $ac_func" >&5
4235if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004236 echo $ac_n "(cached) $ac_c" 1>&6
4237else
4238 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004239#line 4240 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004240#include "confdefs.h"
4241/* System header to define __stub macros and hopefully few prototypes,
4242 which can conflict with char $ac_func(); below. */
4243#include <assert.h>
4244/* Override any gcc2 internal prototype to avoid an error. */
4245/* We use char because int might match the return type of a gcc2
4246 builtin and then its argument prototype would still apply. */
4247char $ac_func();
4248
4249int main() {
4250
4251/* The GNU C library defines this for functions which it implements
4252 to always fail with ENOSYS. Some functions are actually named
4253 something starting with __ and the normal name is an alias. */
4254#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4255choke me
4256#else
Guido van Rossum5839e582000-10-09 19:52:35 +00004257$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004258#endif
4259
4260; return 0; }
4261EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004262if { (eval echo configure:4263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263 rm -rf conftest*
4264 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004265else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004266 echo "configure: failed program was:" >&5
4267 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004268 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004269 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004270fi
4271rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004272fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004273
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004275 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004276 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4277 cat >> confdefs.h <<EOF
4278#define $ac_tr_func 1
4279EOF
4280
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004281else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004282 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004283LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004284fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004285done
4286
Guido van Rossumf78abae1997-01-21 22:02:36 +00004287
Thomas Wouters3a584202000-08-05 23:28:51 +00004288for ac_func in getpgrp
4289do
4290echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00004291echo "configure:4292: checking for $ac_func" >&5
4292if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004293 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004294else
4295 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004296#line 4297 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004297#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004298/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004299 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004300#include <assert.h>
4301/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004302/* We use char because int might match the return type of a gcc2
4303 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004304char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004305
Guido van Rossumf78abae1997-01-21 22:02:36 +00004306int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004307
Guido van Rossum627b2d71993-12-24 10:39:16 +00004308/* The GNU C library defines this for functions which it implements
4309 to always fail with ENOSYS. Some functions are actually named
4310 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004311#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004312choke me
4313#else
Guido van Rossum5839e582000-10-09 19:52:35 +00004314$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004315#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004316
4317; return 0; }
4318EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004319if { (eval echo configure:4320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004320 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004321 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004322else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004323 echo "configure: failed program was:" >&5
4324 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004325 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004326 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004327fi
4328rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004329fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004330
Thomas Wouters3a584202000-08-05 23:28:51 +00004331if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004332 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004333 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4334 cat >> confdefs.h <<EOF
4335#define $ac_tr_func 1
4336EOF
4337 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004338#line 4339 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004339#include "confdefs.h"
4340#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004341int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004342getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004343; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004344EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004345if { (eval echo configure:4346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004346 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004347 cat >> confdefs.h <<\EOF
4348#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004349EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004350
Guido van Rossumf78abae1997-01-21 22:02:36 +00004351else
4352 echo "configure: failed program was:" >&5
4353 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004354fi
4355rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004356else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004357 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004358fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004359done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004360
Thomas Wouters3a584202000-08-05 23:28:51 +00004361for ac_func in setpgrp
4362do
4363echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00004364echo "configure:4365: checking for $ac_func" >&5
4365if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004366 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004367else
4368 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004369#line 4370 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004370#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004371/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004372 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004373#include <assert.h>
4374/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004375/* We use char because int might match the return type of a gcc2
4376 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004377char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004378
Guido van Rossumf78abae1997-01-21 22:02:36 +00004379int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004380
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004381/* The GNU C library defines this for functions which it implements
4382 to always fail with ENOSYS. Some functions are actually named
4383 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004384#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004385choke me
4386#else
Guido van Rossum5839e582000-10-09 19:52:35 +00004387$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004388#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004389
4390; return 0; }
4391EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004392if { (eval echo configure:4393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004393 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004394 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004395else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004396 echo "configure: failed program was:" >&5
4397 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004398 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004399 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004400fi
4401rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004402fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004403
Thomas Wouters3a584202000-08-05 23:28:51 +00004404if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004405 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004406 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4407 cat >> confdefs.h <<EOF
4408#define $ac_tr_func 1
4409EOF
4410 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004411#line 4412 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004412#include "confdefs.h"
4413#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004414int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004415setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004416; return 0; }
4417EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004418if { (eval echo configure:4419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004419 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004420 cat >> confdefs.h <<\EOF
4421#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004422EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004423
Guido van Rossumf78abae1997-01-21 22:02:36 +00004424else
4425 echo "configure: failed program was:" >&5
4426 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004427fi
4428rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004429else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004430 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004431fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004432done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004433
Thomas Wouters3a584202000-08-05 23:28:51 +00004434for ac_func in gettimeofday
4435do
4436echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00004437echo "configure:4438: checking for $ac_func" >&5
4438if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004439 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004440else
4441 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004442#line 4443 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004443#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004444/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004445 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004446#include <assert.h>
4447/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004448/* We use char because int might match the return type of a gcc2
4449 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004450char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004451
Guido van Rossumf78abae1997-01-21 22:02:36 +00004452int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004453
4454/* The GNU C library defines this for functions which it implements
4455 to always fail with ENOSYS. Some functions are actually named
4456 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004457#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004458choke me
4459#else
Guido van Rossum5839e582000-10-09 19:52:35 +00004460$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004461#endif
4462
4463; return 0; }
4464EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004465if { (eval echo configure:4466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004466 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004467 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004468else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004469 echo "configure: failed program was:" >&5
4470 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004471 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004472 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004473fi
4474rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004475fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004476
Thomas Wouters3a584202000-08-05 23:28:51 +00004477if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004478 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004479 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4480 cat >> confdefs.h <<EOF
4481#define $ac_tr_func 1
4482EOF
4483 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004484#line 4485 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004485#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004486#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004487int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004488gettimeofday((struct timeval*)0,(struct timezone*)0);
4489; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004490EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004491if { (eval echo configure:4492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004492 :
4493else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004494 echo "configure: failed program was:" >&5
4495 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004496 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004497 cat >> confdefs.h <<\EOF
4498#define GETTIMEOFDAY_NO_TZ 1
4499EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004500
4501fi
4502rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004503else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004504 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004505fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004506done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004507
4508
4509# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004510echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00004511echo "configure:4512: checking whether time.h and sys/time.h may both be included" >&5
4512if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004513 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004514else
4515 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004516#line 4517 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004517#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004518#include <sys/types.h>
4519#include <sys/time.h>
4520#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004521int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004522struct tm *tp;
4523; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004524EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004525if { (eval echo configure:4526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004526 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004527 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004528else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004529 echo "configure: failed program was:" >&5
4530 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004531 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004532 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004533fi
4534rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004535fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004536
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004537echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004538if test $ac_cv_header_time = yes; then
4539 cat >> confdefs.h <<\EOF
4540#define TIME_WITH_SYS_TIME 1
4541EOF
4542
4543fi
4544
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004545echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00004546echo "configure:4547: checking whether struct tm is in sys/time.h or time.h" >&5
4547if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004548 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004549else
4550 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004551#line 4552 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004552#include "confdefs.h"
4553#include <sys/types.h>
4554#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004555int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004556struct tm *tp; tp->tm_sec;
4557; return 0; }
4558EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004559if { (eval echo configure:4560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004560 rm -rf conftest*
4561 ac_cv_struct_tm=time.h
4562else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004563 echo "configure: failed program was:" >&5
4564 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004565 rm -rf conftest*
4566 ac_cv_struct_tm=sys/time.h
4567fi
4568rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004569fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004570
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004571echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004572if test $ac_cv_struct_tm = sys/time.h; then
4573 cat >> confdefs.h <<\EOF
4574#define TM_IN_SYS_TIME 1
4575EOF
4576
4577fi
4578
Guido van Rossum5839e582000-10-09 19:52:35 +00004579echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4580echo "configure:4581: checking for tm_zone in struct tm" >&5
4581if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004582 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004583else
4584 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004585#line 4586 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004586#include "confdefs.h"
4587#include <sys/types.h>
4588#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004589int main() {
Guido van Rossum5839e582000-10-09 19:52:35 +00004590struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004591; return 0; }
4592EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004593if { (eval echo configure:4594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004594 rm -rf conftest*
Guido van Rossum5839e582000-10-09 19:52:35 +00004595 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004596else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004597 echo "configure: failed program was:" >&5
4598 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004599 rm -rf conftest*
Guido van Rossum5839e582000-10-09 19:52:35 +00004600 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004601fi
4602rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004603fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004604
Guido van Rossum5839e582000-10-09 19:52:35 +00004605echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4606if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004607 cat >> confdefs.h <<\EOF
4608#define HAVE_TM_ZONE 1
4609EOF
4610
4611else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004612 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00004613echo "configure:4614: checking for tzname" >&5
4614if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004615 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004616else
4617 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004618#line 4619 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004619#include "confdefs.h"
4620#include <time.h>
4621#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004622extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004623#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004624int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004625atoi(*tzname);
4626; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004627EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004628if { (eval echo configure:4629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004629 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004630 ac_cv_var_tzname=yes
4631else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004632 echo "configure: failed program was:" >&5
4633 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004634 rm -rf conftest*
4635 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004636fi
4637rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004638fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004639
4640echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004641 if test $ac_cv_var_tzname = yes; then
4642 cat >> confdefs.h <<\EOF
4643#define HAVE_TZNAME 1
4644EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004645
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004646 fi
4647fi
4648
4649
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004650echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00004651echo "configure:4652: checking for time.h that defines altzone" >&5
4652if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004653 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004654else
4655 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004656#line 4657 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004657#include "confdefs.h"
4658#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004659int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004660return altzone;
4661; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004662EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004663if { (eval echo configure:4664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004664 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004665 ac_cv_header_time_altzone=yes
4666else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004667 echo "configure: failed program was:" >&5
4668 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004669 rm -rf conftest*
4670 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004671fi
4672rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004673fi
4674
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004675echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004676if test $ac_cv_header_time_altzone = yes; then
4677 cat >> confdefs.h <<\EOF
4678#define HAVE_ALTZONE 1
4679EOF
4680
4681fi
4682
Guido van Rossumda88dad1995-01-26 00:46:29 +00004683was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004684echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00004685echo "configure:4686: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004686cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004687#line 4688 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004688#include "confdefs.h"
4689
4690#include <sys/types.h>
4691#include <sys/select.h>
4692#include <sys/time.h>
4693
Guido van Rossumf78abae1997-01-21 22:02:36 +00004694int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004695;
4696; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004697EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004698if { (eval echo configure:4699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004699 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004700 cat >> confdefs.h <<\EOF
4701#define SYS_SELECT_WITH_SYS_TIME 1
4702EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004703 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004704else
4705 echo "configure: failed program was:" >&5
4706 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004707fi
4708rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004709echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004710
4711# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004712
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004713echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00004714echo "configure:4715: checking whether char is unsigned" >&5
4715if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004716 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004717else
4718 if test "$GCC" = yes; then
4719 # GCC predefines this symbol on systems where it applies.
4720cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004721#line 4722 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004722#include "confdefs.h"
4723#ifdef __CHAR_UNSIGNED__
4724 yes
4725#endif
4726
4727EOF
4728if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4729 egrep "yes" >/dev/null 2>&1; then
4730 rm -rf conftest*
4731 ac_cv_c_char_unsigned=yes
4732else
4733 rm -rf conftest*
4734 ac_cv_c_char_unsigned=no
4735fi
4736rm -f conftest*
4737
4738else
4739if test "$cross_compiling" = yes; then
4740 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4741else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004742 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004743#line 4744 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004744#include "confdefs.h"
4745/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004746#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00004747#define volatile
4748#endif
4749main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00004750 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004751}
4752EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004753if { (eval echo configure:4754: \"$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 +00004754then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004755 ac_cv_c_char_unsigned=yes
4756else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004757 echo "configure: failed program was:" >&5
4758 cat conftest.$ac_ext >&5
4759 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004760 ac_cv_c_char_unsigned=no
4761fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004762rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004763fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004764
4765fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004766fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004767
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004768echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004769if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
4770 cat >> confdefs.h <<\EOF
4771#define __CHAR_UNSIGNED__ 1
4772EOF
4773
4774fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004775
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004776echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00004777echo "configure:4778: checking for working const" >&5
4778if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004779 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004780else
4781 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004782#line 4783 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004783#include "confdefs.h"
4784
Guido van Rossumf78abae1997-01-21 22:02:36 +00004785int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004786
4787/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004788typedef int charset[2]; const charset x;
4789/* SunOS 4.1.1 cc rejects this. */
4790char const *const *ccp;
4791char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004792/* NEC SVR4.0.2 mips cc rejects this. */
4793struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004794static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004795/* AIX XL C 1.02.0.0 rejects this.
4796 It does not let you subtract one const X* pointer from another in an arm
4797 of an if-expression whose if-part is not a constant expression */
4798const char *g = "string";
4799ccp = &g + (g ? g-g : 0);
4800/* HPUX 7.0 cc rejects these. */
4801++ccp;
4802p = (char**) ccp;
4803ccp = (char const *const *) p;
4804{ /* SCO 3.2v4 cc rejects this. */
4805 char *t;
4806 char const *s = 0 ? (char *) 0 : (char const *) 0;
4807
4808 *t++ = 0;
4809}
4810{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004811 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004812 const int *foo = &x[0];
4813 ++foo;
4814}
4815{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4816 typedef const int *iptr;
4817 iptr p = 0;
4818 ++p;
4819}
4820{ /* AIX XL C 1.02.0.0 rejects this saying
4821 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4822 struct s { int j; const int *ap[3]; };
4823 struct s *b; b->j = 5;
4824}
4825{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4826 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004827}
4828
4829; return 0; }
4830EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004831if { (eval echo configure:4832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004832 rm -rf conftest*
4833 ac_cv_c_const=yes
4834else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004835 echo "configure: failed program was:" >&5
4836 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004837 rm -rf conftest*
4838 ac_cv_c_const=no
4839fi
4840rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004841fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004842
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004843echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004844if test $ac_cv_c_const = no; then
4845 cat >> confdefs.h <<\EOF
4846#define const
4847EOF
4848
4849fi
4850
Guido van Rossumef2255b2000-03-10 22:30:29 +00004851echo $ac_n "checking for inline""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00004852echo "configure:4853: checking for inline" >&5
4853if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004854 echo $ac_n "(cached) $ac_c" 1>&6
4855else
4856 ac_cv_c_inline=no
4857for ac_kw in inline __inline__ __inline; do
4858 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004859#line 4860 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00004860#include "confdefs.h"
4861
4862int main() {
4863} $ac_kw foo() {
4864; return 0; }
4865EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004866if { (eval echo configure:4867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004867 rm -rf conftest*
4868 ac_cv_c_inline=$ac_kw; break
4869else
4870 echo "configure: failed program was:" >&5
4871 cat conftest.$ac_ext >&5
4872fi
4873rm -f conftest*
4874done
4875
4876fi
4877
4878echo "$ac_t""$ac_cv_c_inline" 1>&6
4879case "$ac_cv_c_inline" in
4880 inline | yes) ;;
4881 no) cat >> confdefs.h <<\EOF
4882#define inline
4883EOF
4884 ;;
4885 *) cat >> confdefs.h <<EOF
4886#define inline $ac_cv_c_inline
4887EOF
4888 ;;
4889esac
4890
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004891
Guido van Rossumda88dad1995-01-26 00:46:29 +00004892works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004893echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00004894echo "configure:4895: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004895cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004896#line 4897 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004897#include "confdefs.h"
4898
Guido van Rossumf78abae1997-01-21 22:02:36 +00004899int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004900volatile int x; x = 0;
4901; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004902EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004903if { (eval echo configure:4904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004904 rm -rf conftest*
4905 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004906else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004907 echo "configure: failed program was:" >&5
4908 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004909 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004910 cat >> confdefs.h <<\EOF
4911#define volatile
4912EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004913
4914fi
4915rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004916echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004917
Guido van Rossumda88dad1995-01-26 00:46:29 +00004918works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004919echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00004920echo "configure:4921: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004921cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004922#line 4923 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004923#include "confdefs.h"
4924
Guido van Rossumf78abae1997-01-21 22:02:36 +00004925int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004926signed char c;
4927; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004928EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004929if { (eval echo configure:4930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004930 rm -rf conftest*
4931 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004932else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004933 echo "configure: failed program was:" >&5
4934 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004935 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004936 cat >> confdefs.h <<\EOF
4937#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00004938EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004939
4940fi
4941rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004942echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004943
Guido van Rossumda88dad1995-01-26 00:46:29 +00004944have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004945echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00004946echo "configure:4947: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004947cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004948#line 4949 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004949#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004950int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00004951int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004952return foo(10);
4953; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004954EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004955if { (eval echo configure:4956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004956 rm -rf conftest*
4957 cat >> confdefs.h <<\EOF
4958#define HAVE_PROTOTYPES 1
4959EOF
4960 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004961else
4962 echo "configure: failed program was:" >&5
4963 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004964fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004965rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004966echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004967
Guido van Rossumda88dad1995-01-26 00:46:29 +00004968works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004969echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00004970echo "configure:4971: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004971cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004972#line 4973 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004973#include "confdefs.h"
4974
4975#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00004976int foo(int x, ...) {
4977 va_list va;
4978 va_start(va, x);
4979 va_arg(va, int);
4980 va_arg(va, char *);
4981 va_arg(va, double);
4982 return 0;
4983}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004984
Guido van Rossumf78abae1997-01-21 22:02:36 +00004985int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00004986return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004987; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004988EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00004989if { (eval echo configure:4990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004990 rm -rf conftest*
4991 cat >> confdefs.h <<\EOF
4992#define HAVE_STDARG_PROTOTYPES 1
4993EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004994 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004995else
4996 echo "configure: failed program was:" >&5
4997 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004998fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004999rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005000echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005001
Guido van Rossumda88dad1995-01-26 00:46:29 +00005002if test "$have_prototypes" = yes; then
5003bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005004echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005005echo "configure:5006: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005006cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005007#line 5008 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005008#include "confdefs.h"
5009#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005010int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005011char **t;execve("@",t,t);
5012; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005013EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005014if { (eval echo configure:5015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005015 :
5016else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005017 echo "configure: failed program was:" >&5
5018 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005019 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005020 cat >> confdefs.h <<\EOF
5021#define BAD_EXEC_PROTOTYPES 1
5022EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005023 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005024fi
5025rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005026echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005027fi
5028
Guido van Rossumda88dad1995-01-26 00:46:29 +00005029bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005030echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005031echo "configure:5032: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005032if test "$cross_compiling" = yes; then
5033 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5034else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005035 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005036#line 5037 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005037#include "confdefs.h"
5038
5039struct s { int a; int b; };
5040static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005041int foobar() {
5042 static int random;
5043 random = (int) &foo;
5044 return random;
5045}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005046static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005047main() {
5048 exit(!((int)&foo == foobar()));
5049}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005050
5051EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005052if { (eval echo configure:5053: \"$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 +00005053then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005054 :
5055else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005056 echo "configure: failed program was:" >&5
5057 cat conftest.$ac_ext >&5
5058 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005059 cat >> confdefs.h <<\EOF
5060#define BAD_STATIC_FORWARD 1
5061EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005062 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005063fi
5064rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005065fi
5066
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005067echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005068
Guido van Rossumda88dad1995-01-26 00:46:29 +00005069va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005070echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005071echo "configure:5072: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005072cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005073#line 5074 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005074#include "confdefs.h"
5075
5076#ifdef HAVE_STDARG_PROTOTYPES
5077#include <stdarg.h>
5078#else
5079#include <varargs.h>
5080#endif
5081
Guido van Rossumf78abae1997-01-21 22:02:36 +00005082int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005083va_list list1, list2; list1 = list2;
5084; return 0; }
5085EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005086if { (eval echo configure:5087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005087 :
5088else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005089 echo "configure: failed program was:" >&5
5090 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005091 rm -rf conftest*
5092 cat >> confdefs.h <<\EOF
5093#define VA_LIST_IS_ARRAY 1
5094EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005095 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005096fi
5097rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005098echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005099
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005100# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5101echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005102echo "configure:5103: checking for gethostbyname_r" >&5
5103if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005104 echo $ac_n "(cached) $ac_c" 1>&6
5105else
5106 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005107#line 5108 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005108#include "confdefs.h"
5109/* System header to define __stub macros and hopefully few prototypes,
5110 which can conflict with char gethostbyname_r(); below. */
5111#include <assert.h>
5112/* Override any gcc2 internal prototype to avoid an error. */
5113/* We use char because int might match the return type of a gcc2
5114 builtin and then its argument prototype would still apply. */
5115char gethostbyname_r();
5116
5117int main() {
5118
5119/* The GNU C library defines this for functions which it implements
5120 to always fail with ENOSYS. Some functions are actually named
5121 something starting with __ and the normal name is an alias. */
5122#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5123choke me
5124#else
Guido van Rossum5839e582000-10-09 19:52:35 +00005125gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005126#endif
5127
5128; return 0; }
5129EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005130if { (eval echo configure:5131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005131 rm -rf conftest*
5132 eval "ac_cv_func_gethostbyname_r=yes"
5133else
5134 echo "configure: failed program was:" >&5
5135 cat conftest.$ac_ext >&5
5136 rm -rf conftest*
5137 eval "ac_cv_func_gethostbyname_r=no"
5138fi
5139rm -f conftest*
5140fi
5141
5142if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5143 echo "$ac_t""yes" 1>&6
5144
5145 cat >> confdefs.h <<\EOF
5146#define HAVE_GETHOSTBYNAME_R 1
5147EOF
5148
5149 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005150echo "configure:5151: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005151 OLD_CFLAGS=$CFLAGS
5152 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
5153 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005154#line 5155 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005155#include "confdefs.h"
5156
5157# include <netdb.h>
5158
5159int main() {
5160
5161 char *name;
5162 struct hostent *he, *res;
5163 char buffer[2048];
5164 int buflen = 2048;
5165 int h_errnop;
5166
5167 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
5168
5169; return 0; }
5170EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005171if { (eval echo configure:5172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005172 rm -rf conftest*
5173
5174 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005175#define HAVE_GETHOSTBYNAME_R 1
5176EOF
5177
5178 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005179#define HAVE_GETHOSTBYNAME_R_6_ARG 1
5180EOF
5181
5182 echo "$ac_t""yes" 1>&6
5183
5184else
5185 echo "configure: failed program was:" >&5
5186 cat conftest.$ac_ext >&5
5187 rm -rf conftest*
5188
5189 echo "$ac_t""no" 1>&6
5190 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005191echo "configure:5192: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005192 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005193#line 5194 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005194#include "confdefs.h"
5195
5196# include <netdb.h>
5197
5198int main() {
5199
5200 char *name;
5201 struct hostent *he;
5202 char buffer[2048];
5203 int buflen = 2048;
5204 int h_errnop;
5205
5206 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
5207
5208; return 0; }
5209EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005210if { (eval echo configure:5211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005211 rm -rf conftest*
5212
5213 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005214#define HAVE_GETHOSTBYNAME_R 1
5215EOF
5216
5217 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005218#define HAVE_GETHOSTBYNAME_R_5_ARG 1
5219EOF
5220
5221 echo "$ac_t""yes" 1>&6
5222
5223else
5224 echo "configure: failed program was:" >&5
5225 cat conftest.$ac_ext >&5
5226 rm -rf conftest*
5227
5228 echo "$ac_t""no" 1>&6
5229 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005230echo "configure:5231: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005231 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005232#line 5233 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005233#include "confdefs.h"
5234
5235# include <netdb.h>
5236
5237int main() {
5238
5239 char *name;
5240 struct hostent *he;
5241 struct hostent_data data;
5242
5243 (void) gethostbyname_r(name, he, &data);
5244
5245; return 0; }
5246EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005247if { (eval echo configure:5248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005248 rm -rf conftest*
5249
5250 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005251#define HAVE_GETHOSTBYNAME_R 1
5252EOF
5253
5254 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005255#define HAVE_GETHOSTBYNAME_R_3_ARG 1
5256EOF
5257
5258 echo "$ac_t""yes" 1>&6
5259
5260else
5261 echo "configure: failed program was:" >&5
5262 cat conftest.$ac_ext >&5
5263 rm -rf conftest*
5264
5265 echo "$ac_t""no" 1>&6
5266
5267fi
5268rm -f conftest*
5269
5270fi
5271rm -f conftest*
5272
5273fi
5274rm -f conftest*
5275 CFLAGS=$OLD_CFLAGS
5276
5277else
5278 echo "$ac_t""no" 1>&6
5279
Thomas Wouters3a584202000-08-05 23:28:51 +00005280 for ac_func in gethostbyname
5281do
5282echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005283echo "configure:5284: checking for $ac_func" >&5
5284if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005285 echo $ac_n "(cached) $ac_c" 1>&6
5286else
5287 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005288#line 5289 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005289#include "confdefs.h"
5290/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005291 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005292#include <assert.h>
5293/* Override any gcc2 internal prototype to avoid an error. */
5294/* We use char because int might match the return type of a gcc2
5295 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005296char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005297
5298int main() {
5299
5300/* The GNU C library defines this for functions which it implements
5301 to always fail with ENOSYS. Some functions are actually named
5302 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005303#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005304choke me
5305#else
Guido van Rossum5839e582000-10-09 19:52:35 +00005306$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005307#endif
5308
5309; return 0; }
5310EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005311if { (eval echo configure:5312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005312 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005313 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005314else
5315 echo "configure: failed program was:" >&5
5316 cat conftest.$ac_ext >&5
5317 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005318 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005319fi
5320rm -f conftest*
5321fi
5322
Thomas Wouters3a584202000-08-05 23:28:51 +00005323if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005324 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005325 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5326 cat >> confdefs.h <<EOF
5327#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005328EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00005329
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005330else
5331 echo "$ac_t""no" 1>&6
5332fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005333done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005334
5335
5336fi
5337
5338
5339
5340
5341
5342
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005343
Guido van Rossum627b2d71993-12-24 10:39:16 +00005344# checks for system services
5345# (none yet)
5346
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005347# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005348echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005349echo "configure:5350: checking for __fpu_control" >&5
5350if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005351 echo $ac_n "(cached) $ac_c" 1>&6
5352else
5353 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005354#line 5355 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005355#include "confdefs.h"
5356/* System header to define __stub macros and hopefully few prototypes,
5357 which can conflict with char __fpu_control(); below. */
5358#include <assert.h>
5359/* Override any gcc2 internal prototype to avoid an error. */
5360/* We use char because int might match the return type of a gcc2
5361 builtin and then its argument prototype would still apply. */
5362char __fpu_control();
5363
5364int main() {
5365
5366/* The GNU C library defines this for functions which it implements
5367 to always fail with ENOSYS. Some functions are actually named
5368 something starting with __ and the normal name is an alias. */
5369#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5370choke me
5371#else
Guido van Rossum5839e582000-10-09 19:52:35 +00005372__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005373#endif
5374
5375; return 0; }
5376EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005377if { (eval echo configure:5378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005378 rm -rf conftest*
5379 eval "ac_cv_func___fpu_control=yes"
5380else
5381 echo "configure: failed program was:" >&5
5382 cat conftest.$ac_ext >&5
5383 rm -rf conftest*
5384 eval "ac_cv_func___fpu_control=no"
5385fi
5386rm -f conftest*
5387fi
5388
5389if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5390 echo "$ac_t""yes" 1>&6
5391 :
5392else
5393 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005394echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005395echo "configure:5396: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005396ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum5839e582000-10-09 19:52:35 +00005397if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005398 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005399else
5400 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005401LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005402cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005403#line 5404 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005404#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005405/* Override any gcc2 internal prototype to avoid an error. */
5406/* We use char because int might match the return type of a gcc2
5407 builtin and then its argument prototype would still apply. */
5408char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005409
Guido van Rossumf78abae1997-01-21 22:02:36 +00005410int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005411__fpu_control()
5412; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005413EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005414if { (eval echo configure:5415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005415 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005416 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005417else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005418 echo "configure: failed program was:" >&5
5419 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005420 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005421 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005422fi
5423rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005424LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005425
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005426fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005427if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005428 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005429 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5430 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005431 cat >> confdefs.h <<EOF
5432#define $ac_tr_lib 1
5433EOF
5434
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005435 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005436
5437else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005438 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005439fi
5440
5441
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005442fi
5443
5444
Guido van Rossum7f253911997-05-09 02:42:48 +00005445# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005446echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005447echo "configure:5448: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005448# Check whether --with-fpectl or --without-fpectl was given.
5449if test "${with_fpectl+set}" = set; then
5450 withval="$with_fpectl"
5451
5452if test "$withval" != no
5453then cat >> confdefs.h <<\EOF
5454#define WANT_SIGFPE_HANDLER 1
5455EOF
5456 echo "$ac_t""yes" 1>&6
5457else echo "$ac_t""no" 1>&6
5458fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005459else
5460 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005461fi
5462
5463
Guido van Rossum7f43da71994-08-01 12:15:30 +00005464# check for --with-libm=...
5465
Guido van Rossum563e7081996-09-10 18:20:48 +00005466case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00005467Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005468next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005469BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005470*) LIBM=-lm
5471esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005472echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005473echo "configure:5474: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005474# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005475if test "${with_libm+set}" = set; then
5476 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005477
Guido van Rossum7f253911997-05-09 02:42:48 +00005478if test "$withval" = no
5479then LIBM=
5480 echo "$ac_t""force LIBM empty" 1>&6
5481elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005482then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005483 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005484else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005485fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005486else
5487 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005488fi
5489
5490
5491# check for --with-libc=...
5492
Guido van Rossum7f253911997-05-09 02:42:48 +00005493echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005494echo "configure:5495: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005495# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005496if test "${with_libc+set}" = set; then
5497 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005498
Guido van Rossum7f253911997-05-09 02:42:48 +00005499if test "$withval" = no
5500then LIBC=
5501 echo "$ac_t""force LIBC empty" 1>&6
5502elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005503then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005504 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005505else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005506fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005507else
5508 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005509fi
5510
5511
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005512# check for hypot() in math library
5513LIBS_SAVE=$LIBS
5514LIBS="$LIBS $LIBM"
5515for ac_func in hypot
5516do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005517echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005518echo "configure:5519: checking for $ac_func" >&5
5519if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005520 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005521else
5522 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005523#line 5524 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005524#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005525/* System header to define __stub macros and hopefully few prototypes,
5526 which can conflict with char $ac_func(); below. */
5527#include <assert.h>
5528/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005529/* We use char because int might match the return type of a gcc2
5530 builtin and then its argument prototype would still apply. */
5531char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005532
Guido van Rossumf78abae1997-01-21 22:02:36 +00005533int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005534
5535/* The GNU C library defines this for functions which it implements
5536 to always fail with ENOSYS. Some functions are actually named
5537 something starting with __ and the normal name is an alias. */
5538#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5539choke me
5540#else
Guido van Rossum5839e582000-10-09 19:52:35 +00005541$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005542#endif
5543
5544; return 0; }
5545EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005546if { (eval echo configure:5547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005547 rm -rf conftest*
5548 eval "ac_cv_func_$ac_func=yes"
5549else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005550 echo "configure: failed program was:" >&5
5551 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005552 rm -rf conftest*
5553 eval "ac_cv_func_$ac_func=no"
5554fi
5555rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005556fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005557
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005558if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5559 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005560 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5561 cat >> confdefs.h <<EOF
5562#define $ac_tr_func 1
5563EOF
5564
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005565else
5566 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005567LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005568fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005569done
5570
Guido van Rossumf78abae1997-01-21 22:02:36 +00005571
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005572LIBS=$LIBS_SAVE
5573
Guido van Rossumda88dad1995-01-26 00:46:29 +00005574# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005575echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005576echo "configure:5577: checking for genuine getopt" >&5
5577if eval "test \"`echo '$''{'ac_cv_func_getopt'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005578 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005579else
5580 if test "$cross_compiling" = yes; then
5581 ac_cv_func_getopt=no
5582else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005583 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005584#line 5585 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00005585#include "confdefs.h"
5586#include <stdio.h>
5587extern int optind, opterr, getopt();
5588extern char* optarg;
5589int main() {
5590 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
5591 opterr = 0;
5592 if (getopt(3, av, "f:") == 'f') { exit(1); }
5593 exit(0);
5594}
5595EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005596if { (eval echo configure:5597: \"$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 +00005597then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005598 ac_cv_func_getopt=yes
5599else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005600 echo "configure: failed program was:" >&5
5601 cat conftest.$ac_ext >&5
5602 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00005603 ac_cv_func_getopt=no
5604fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00005605rm -fr conftest*
5606fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005607
5608fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005609echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005610test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
5611
Guido van Rossumad713701997-07-10 22:42:38 +00005612# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005613echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005614echo "configure:5615: checking what malloc(0) returns" >&5
5615if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005616 echo $ac_n "(cached) $ac_c" 1>&6
5617else
5618 if test "$cross_compiling" = yes; then
5619 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5620else
5621 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005622#line 5623 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005623#include "confdefs.h"
5624#include <stdio.h>
5625#ifdef HAVE_STDLIB
5626#include <stdlib.h>
5627#else
5628char *malloc(), *realloc();
5629int *free();
5630#endif
5631main() {
5632 char *p;
5633 p = malloc(0);
5634 if (p == NULL) exit(1);
5635 p = realloc(p, 0);
5636 if (p == NULL) exit(1);
5637 free(p);
5638 exit(0);
5639}
5640EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005641if { (eval echo configure:5642: \"$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 +00005642then
5643 ac_cv_malloc_zero=nonnull
5644else
5645 echo "configure: failed program was:" >&5
5646 cat conftest.$ac_ext >&5
5647 rm -fr conftest*
5648 ac_cv_malloc_zero=null
5649fi
5650rm -fr conftest*
5651fi
5652
5653fi
5654
5655echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5656if test "$ac_cv_malloc_zero" = null
5657then
5658 cat >> confdefs.h <<\EOF
5659#define MALLOC_ZERO_RETURNS_NULL 1
5660EOF
5661
5662fi
5663
Guido van Rossumef2255b2000-03-10 22:30:29 +00005664# check for wchar.h
5665ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5666echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005667echo "configure:5668: checking for wchar.h" >&5
5668if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005669 echo $ac_n "(cached) $ac_c" 1>&6
5670else
5671 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005672#line 5673 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005673#include "confdefs.h"
5674#include <wchar.h>
5675EOF
5676ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum5839e582000-10-09 19:52:35 +00005677{ (eval echo configure:5678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005678ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5679if test -z "$ac_err"; then
5680 rm -rf conftest*
5681 eval "ac_cv_header_$ac_safe=yes"
5682else
5683 echo "$ac_err" >&5
5684 echo "configure: failed program was:" >&5
5685 cat conftest.$ac_ext >&5
5686 rm -rf conftest*
5687 eval "ac_cv_header_$ac_safe=no"
5688fi
5689rm -f conftest*
5690fi
5691if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5692 echo "$ac_t""yes" 1>&6
5693 cat >> confdefs.h <<\EOF
5694#define HAVE_WCHAR_H 1
5695EOF
5696 wchar_h="yes"
5697else
5698 echo "$ac_t""no" 1>&6
5699wchar_h="no"
5700
5701fi
5702
5703
5704# check for usable wchar_t
5705usable_wchar_t="unkown"
5706echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005707echo "configure:5708: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005708if test "$cross_compiling" = yes; then
5709 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5710else
5711 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005712#line 5713 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005713#include "confdefs.h"
5714
5715#include "wchar.h"
5716#include "wctype.h"
5717main() {
5718 wchar_t s;
5719 if (sizeof(s) == 2)
5720 exit(0);
5721 else
5722 exit(1);
5723}
5724
5725EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005726if { (eval echo configure:5727: \"$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 +00005727then
5728 cat >> confdefs.h <<\EOF
5729#define HAVE_USABLE_WCHAR_T 1
5730EOF
5731 usable_wchar_t="yes"
5732else
5733 echo "configure: failed program was:" >&5
5734 cat conftest.$ac_ext >&5
5735 rm -fr conftest*
5736 usable_wchar_t="no"
5737fi
5738rm -fr conftest*
5739fi
5740
5741echo "$ac_t""$usable_wchar_t" 1>&6
5742
5743# check for endianness
5744echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005745echo "configure:5746: checking whether byte ordering is bigendian" >&5
5746if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005747 echo $ac_n "(cached) $ac_c" 1>&6
5748else
5749 ac_cv_c_bigendian=unknown
5750# See if sys/param.h defines the BYTE_ORDER macro.
5751cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005752#line 5753 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005753#include "confdefs.h"
5754#include <sys/types.h>
5755#include <sys/param.h>
5756int main() {
5757
5758#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5759 bogus endian macros
5760#endif
5761; return 0; }
5762EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005763if { (eval echo configure:5764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005764 rm -rf conftest*
5765 # It does; now see whether it defined to BIG_ENDIAN or not.
5766cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005767#line 5768 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005768#include "confdefs.h"
5769#include <sys/types.h>
5770#include <sys/param.h>
5771int main() {
5772
5773#if BYTE_ORDER != BIG_ENDIAN
5774 not big endian
5775#endif
5776; return 0; }
5777EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005778if { (eval echo configure:5779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005779 rm -rf conftest*
5780 ac_cv_c_bigendian=yes
5781else
5782 echo "configure: failed program was:" >&5
5783 cat conftest.$ac_ext >&5
5784 rm -rf conftest*
5785 ac_cv_c_bigendian=no
5786fi
5787rm -f conftest*
5788else
5789 echo "configure: failed program was:" >&5
5790 cat conftest.$ac_ext >&5
5791fi
5792rm -f conftest*
5793if test $ac_cv_c_bigendian = unknown; then
5794if test "$cross_compiling" = yes; then
5795 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5796else
5797 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005798#line 5799 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005799#include "confdefs.h"
5800main () {
5801 /* Are we little or big endian? From Harbison&Steele. */
5802 union
5803 {
5804 long l;
5805 char c[sizeof (long)];
5806 } u;
5807 u.l = 1;
5808 exit (u.c[sizeof (long) - 1] == 1);
5809}
5810EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005811if { (eval echo configure:5812: \"$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 +00005812then
5813 ac_cv_c_bigendian=no
5814else
5815 echo "configure: failed program was:" >&5
5816 cat conftest.$ac_ext >&5
5817 rm -fr conftest*
5818 ac_cv_c_bigendian=yes
5819fi
5820rm -fr conftest*
5821fi
5822
5823fi
5824fi
5825
5826echo "$ac_t""$ac_cv_c_bigendian" 1>&6
5827if test $ac_cv_c_bigendian = yes; then
5828 cat >> confdefs.h <<\EOF
5829#define WORDS_BIGENDIAN 1
5830EOF
5831
5832fi
5833
5834
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005835# Check whether right shifting a negative integer extends the sign bit
5836# or fills with zeros (like the Cray J90, according to Tim Peters).
5837echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005838echo "configure:5839: checking whether right shift extends the sign bit" >&5
5839if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00005840 echo $ac_n "(cached) $ac_c" 1>&6
5841else
5842
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005843if test "$cross_compiling" = yes; then
5844 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5845else
5846 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005847#line 5848 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005848#include "confdefs.h"
5849
5850int main()
5851{
Vladimir Marangozova6180282000-07-12 05:05:06 +00005852 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005853}
5854
5855EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005856if { (eval echo configure:5857: \"$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 +00005857then
5858 ac_cv_rshift_extends_sign=yes
5859else
5860 echo "configure: failed program was:" >&5
5861 cat conftest.$ac_ext >&5
5862 rm -fr conftest*
5863 ac_cv_rshift_extends_sign=no
5864fi
5865rm -fr conftest*
5866fi
5867
5868fi
5869
5870echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
5871if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005872then
5873 cat >> confdefs.h <<\EOF
5874#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
5875EOF
5876
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005877fi
5878
5879
Guido van Rossum95713eb2000-05-18 20:53:31 +00005880# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
5881# Add sys/socket.h to confdefs.h
5882cat >> confdefs.h <<\EOF
5883#ifdef HAVE_SYS_SOCKET_H
5884#include <sys/socket.h>
5885#endif
5886EOF
5887echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Guido van Rossum5839e582000-10-09 19:52:35 +00005888echo "configure:5889: checking for socklen_t" >&5
5889if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00005890 echo $ac_n "(cached) $ac_c" 1>&6
5891else
5892 cat > conftest.$ac_ext <<EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00005893#line 5894 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005894#include "confdefs.h"
5895#include <sys/types.h>
5896#if STDC_HEADERS
5897#include <stdlib.h>
5898#include <stddef.h>
5899#endif
5900EOF
5901if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5902 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5903 rm -rf conftest*
Guido van Rossum5839e582000-10-09 19:52:35 +00005904 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00005905else
5906 rm -rf conftest*
Guido van Rossum5839e582000-10-09 19:52:35 +00005907 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00005908fi
5909rm -f conftest*
5910
5911fi
Guido van Rossum5839e582000-10-09 19:52:35 +00005912echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
5913if test $ac_cv_type_socklen_t = no; then
5914 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00005915#define socklen_t int
5916EOF
5917
5918fi
5919
5920
Guido van Rossum627b2d71993-12-24 10:39:16 +00005921# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005922trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005923cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005924# This file is a shell script that caches the results of configure
5925# tests run on this system so they can be shared between configure
5926# scripts and configure runs. It is not useful on other systems.
5927# If it contains results you don't want to keep, you may remove or edit it.
5928#
5929# By default, configure uses ./config.cache as the cache file,
5930# creating it if it does not exist already. You can give configure
5931# the --cache-file=FILE option to use a different cache file; that is
5932# what configure does when it calls configure scripts in
5933# subdirectories, so they share the cache.
5934# Giving --cache-file=/dev/null disables caching, for debugging configure.
5935# config.status only pays attention to the cache file if you give it the
5936# --recheck option to rerun configure.
5937#
5938EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005939# The following way of writing the cache mishandles newlines in values,
5940# but we know of no workaround that is simple, portable, and efficient.
5941# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005942# Ultrix sh set writes to stderr and can't be redirected directly,
5943# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005944(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005945 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005946 *ac_space=\ *)
5947 # `set' does not quote correctly, so add quotes (double-quote substitution
5948 # turns \\\\ into \\, and sed turns \\ into \).
5949 sed -n \
5950 -e "s/'/'\\\\''/g" \
5951 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5952 ;;
5953 *)
5954 # `set' quotes correctly as required by POSIX, so do not add quotes.
5955 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5956 ;;
5957 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005958if cmp -s $cache_file confcache; then
5959 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005960else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005961 if test -w $cache_file; then
5962 echo "updating cache $cache_file"
5963 cat confcache > $cache_file
5964 else
5965 echo "not updating unwritable cache $cache_file"
5966 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005967fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005968rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00005969
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005970trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005971
5972test "x$prefix" = xNONE && prefix=$ac_default_prefix
5973# Let make expand exec_prefix.
5974test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00005975
Guido van Rossum7f43da71994-08-01 12:15:30 +00005976# Any assignment to VPATH causes Sun make to only execute
5977# the first set of double-colon rules, so remove it if not needed.
5978# If there is a colon in the path, we need to keep it.
5979if test "x$srcdir" = x.; then
5980 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5981fi
5982
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005983trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00005984
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005985DEFS=-DHAVE_CONFIG_H
5986
5987# Without the "./", some shells look in PATH for config.status.
5988: ${CONFIG_STATUS=./config.status}
5989
5990echo creating $CONFIG_STATUS
5991rm -f $CONFIG_STATUS
5992cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005993#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00005994# Generated automatically by configure.
5995# Run this file to recreate the current configuration.
5996# This directory was configured as follows,
5997# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5998#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005999# $0 $ac_configure_args
6000#
6001# Compiler output produced by configure, useful for debugging
6002# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00006003
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006004ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006005for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00006006do
Guido van Rossum7f43da71994-08-01 12:15:30 +00006007 case "\$ac_option" in
6008 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006009 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6010 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00006011 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum5839e582000-10-09 19:52:35 +00006012 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006013 exit 0 ;;
6014 -help | --help | --hel | --he | --h)
6015 echo "\$ac_cs_usage"; exit 0 ;;
6016 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006017 esac
6018done
6019
Guido van Rossum7f43da71994-08-01 12:15:30 +00006020ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00006021
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006022trap 'rm -fr `echo "Makefile \
6023 Objects/Makefile \
6024 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006025 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006026 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006027 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006028 Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006029EOF
6030cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006031
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006032# Protect against being on the right side of a sed subst in config.status.
6033sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6034 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006035$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00006036$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006037s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006038s%@CFLAGS@%$CFLAGS%g
6039s%@CPPFLAGS@%$CPPFLAGS%g
6040s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006041s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006042s%@DEFS@%$DEFS%g
6043s%@LDFLAGS@%$LDFLAGS%g
6044s%@LIBS@%$LIBS%g
6045s%@exec_prefix@%$exec_prefix%g
6046s%@prefix@%$prefix%g
6047s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006048s%@bindir@%$bindir%g
6049s%@sbindir@%$sbindir%g
6050s%@libexecdir@%$libexecdir%g
6051s%@datadir@%$datadir%g
6052s%@sysconfdir@%$sysconfdir%g
6053s%@sharedstatedir@%$sharedstatedir%g
6054s%@localstatedir@%$localstatedir%g
6055s%@libdir@%$libdir%g
6056s%@includedir@%$includedir%g
6057s%@oldincludedir@%$oldincludedir%g
6058s%@infodir@%$infodir%g
6059s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00006060s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006061s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00006062s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00006063s%@SET_CXX@%$SET_CXX%g
6064s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006065s%@CC@%$CC%g
Guido van Rossumff555e32000-09-22 15:38:21 +00006066s%@EXE@%$EXE%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006067s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
6068s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00006069s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006070s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006071s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006072s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006073s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6074s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006075s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006076s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006077s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006078s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006079s%@SO@%$SO%g
6080s%@LDSHARED@%$LDSHARED%g
6081s%@CCSHARED@%$CCSHARED%g
6082s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00006083s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00006084s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00006085s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Fred Drakea50d6ec2000-08-31 16:13:20 +00006086s%@USE_BSDDB_MODULE@%$USE_BSDDB_MODULE%g
Skip Montanaroed33c9a2000-09-08 02:17:15 +00006087s%@HAVE_LIBDB@%$HAVE_LIBDB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006088s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00006089s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006090s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006091s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
6092s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
6093s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006094s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006095s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006096s%@LIBM@%$LIBM%g
6097s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006098
6099CEOF
6100EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006101
6102cat >> $CONFIG_STATUS <<\EOF
6103
6104# Split the substitutions into bite-sized pieces for seds with
6105# small command number limits, like on Digital OSF/1 and HP-UX.
6106ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6107ac_file=1 # Number of current file.
6108ac_beg=1 # First line for current file.
6109ac_end=$ac_max_sed_cmds # Line after last line for current file.
6110ac_more_lines=:
6111ac_sed_cmds=""
6112while $ac_more_lines; do
6113 if test $ac_beg -gt 1; then
6114 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6115 else
6116 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6117 fi
6118 if test ! -s conftest.s$ac_file; then
6119 ac_more_lines=false
6120 rm -f conftest.s$ac_file
6121 else
6122 if test -z "$ac_sed_cmds"; then
6123 ac_sed_cmds="sed -f conftest.s$ac_file"
6124 else
6125 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6126 fi
6127 ac_file=`expr $ac_file + 1`
6128 ac_beg=$ac_end
6129 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6130 fi
6131done
6132if test -z "$ac_sed_cmds"; then
6133 ac_sed_cmds=cat
6134fi
6135EOF
6136
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006137cat >> $CONFIG_STATUS <<EOF
6138
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006139CONFIG_FILES=\${CONFIG_FILES-"Makefile \
6140 Objects/Makefile \
6141 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006142 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006143 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006144 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006145 Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006146EOF
6147cat >> $CONFIG_STATUS <<\EOF
6148for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006149 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006150 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006151 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006152 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6153 *) ac_file_in="${ac_file}.in" ;;
6154 esac
6155
Guido van Rossumf78abae1997-01-21 22:02:36 +00006156 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006157
6158 # Remove last slash and all that follows it. Not all systems have dirname.
6159 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6160 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6161 # The file is in a subdirectory.
6162 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006163 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006164 # A "../" for each directory in $ac_dir_suffix.
6165 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6166 else
6167 ac_dir_suffix= ac_dots=
6168 fi
6169
6170 case "$ac_given_srcdir" in
6171 .) srcdir=.
6172 if test -z "$ac_dots"; then top_srcdir=.
6173 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6174 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6175 *) # Relative path.
6176 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6177 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6178 esac
6179
Guido van Rossumf78abae1997-01-21 22:02:36 +00006180
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006181 echo creating "$ac_file"
6182 rm -f "$ac_file"
6183 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6184 case "$ac_file" in
6185 *Makefile*) ac_comsub="1i\\
6186# $configure_input" ;;
6187 *) ac_comsub= ;;
6188 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006189
6190 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 +00006191 sed -e "$ac_comsub
6192s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006193s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006194s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00006195" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00006196fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00006197rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006198
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006199# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6200# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00006201#
6202# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006203ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6204ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006205ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006206ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006207# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006208ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6209ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006210ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006211ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006212# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006213ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6214ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006215ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006216ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006217
Guido van Rossumf78abae1997-01-21 22:02:36 +00006218if test "${CONFIG_HEADERS+set}" != set; then
6219EOF
6220cat >> $CONFIG_STATUS <<EOF
6221 CONFIG_HEADERS="config.h"
6222EOF
6223cat >> $CONFIG_STATUS <<\EOF
6224fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006225for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006226 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006227 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006228 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006229 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6230 *) ac_file_in="${ac_file}.in" ;;
6231 esac
6232
Guido van Rossum7f43da71994-08-01 12:15:30 +00006233 echo creating $ac_file
6234
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006235 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006236 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6237 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006238
6239EOF
6240
6241# Transform confdefs.h into a sed script conftest.vals that substitutes
6242# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006243# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006244# Protect against being in an unquoted here document in config.status.
6245rm -f conftest.vals
6246cat > conftest.hdr <<\EOF
6247s/[\\&%]/\\&/g
6248s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006249s%#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 +00006250s%ac_d%ac_u%gp
6251s%ac_u%ac_e%gp
6252EOF
6253sed -n -f conftest.hdr confdefs.h > conftest.vals
6254rm -f conftest.hdr
6255
6256# This sed command replaces #undef with comments. This is necessary, for
6257# example, in the case of _POSIX_SOURCE, which is predefined and required
6258# on some systems where configure will not decide to define it.
6259cat >> conftest.vals <<\EOF
6260s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6261EOF
6262
6263# Break up conftest.vals because some shells have a limit on
6264# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006265
6266rm -f conftest.tail
6267while :
6268do
6269 ac_lines=`grep -c . conftest.vals`
6270 # grep -c gives empty output for an empty file on some AIX systems.
6271 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6272 # Write a limited-size here document to conftest.frag.
6273 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6274 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6275 echo 'CEOF
6276 sed -f conftest.frag conftest.in > conftest.out
6277 rm -f conftest.in
6278 mv conftest.out conftest.in
6279' >> $CONFIG_STATUS
6280 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6281 rm -f conftest.vals
6282 mv conftest.tail conftest.vals
6283done
6284rm -f conftest.vals
6285
6286cat >> $CONFIG_STATUS <<\EOF
6287 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006288 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006289 cat conftest.in >> conftest.h
6290 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006291 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006292 echo "$ac_file is unchanged"
6293 rm -f conftest.h
6294 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006295 # Remove last slash and all that follows it. Not all systems have dirname.
6296 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6297 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6298 # The file is in a subdirectory.
6299 test ! -d "$ac_dir" && mkdir "$ac_dir"
6300 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006301 rm -f $ac_file
6302 mv conftest.h $ac_file
6303 fi
6304fi; done
6305
Guido van Rossumf78abae1997-01-21 22:02:36 +00006306EOF
6307cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006308
Guido van Rossumf78abae1997-01-21 22:02:36 +00006309EOF
6310cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006311
6312exit 0
6313EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006314chmod +x $CONFIG_STATUS
6315rm -fr confdefs* $ac_clean_files
Guido van Rossum5839e582000-10-09 19:52:35 +00006316test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006317