blob: 02fb6107877063d3b16cdf0542c927266ba34583 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Fred Drake02706f52000-09-25 15:08:46 +00003# From configure.in Revision: 1.164
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.
Fred Drake02706f52000-09-25 15:08:46 +00006# Generated automatically using autoconf version 2.14.1
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000011
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# Defaults:
13ac_help=
14ac_default_prefix=/usr/local
15# Any additions from configure.in:
16ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000017 --with-next-archs='arch1 arch2 ..' build MAB binary"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000018ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000019 --with-next-framework Build (OpenStep|Rhapsody|MacOSX) framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000020ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000021 --with-dyld Use (OpenStep|Rhapsody|MacOSX) dynamic linker"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000022ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000023 --without-gcc never use gcc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000025 --with-cxx=<compiler> enable C++ support"
Guido van Rossum95012191999-12-16 17:50:52 +000026ac_help="$ac_help
Guido van Rossumff555e32000-09-22 15:38:21 +000027 --with-suffix=.exe set executable suffix"
28ac_help="$ac_help
Skip Montanarocb853262000-08-30 22:29:48 +000029 --with-pydebug build with Py_DEBUG defined"
30ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000031 --with-libs='lib1 ...' link against additional libs"
Guido van Rossuma68acba1996-07-31 17:36:39 +000032ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000033 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000034ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000035 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000036ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000037 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000038ac_help="$ac_help
Guido van Rossum9e8181b2000-09-19 00:46:46 +000039 --with-pth use GNU pth threading libraries"
40ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000041 --with(out)-cycle-gc disable/enable garbage collection"
42ac_help="$ac_help
Fred Drakea50d6ec2000-08-31 16:13:20 +000043 --with(out)-libdb disable/enable bsddb module"
44ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000045 --with-wctype-functions use wctype.h functions"
46ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000047 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000048ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000049 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000050ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000051 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000052ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000053 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000054ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000055 --with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000056
Guido van Rossum7f43da71994-08-01 12:15:30 +000057# Initialize some variables set by options.
58# The variables have the same names as the options, with
59# dashes changed to underlines.
60build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000061cache_file=./config.cache
62exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000063host=NONE
64no_create=
65nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000066no_recursion=
67prefix=NONE
68program_prefix=NONE
69program_suffix=NONE
70program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000071silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000072site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000073srcdir=
74target=NONE
75verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000076x_includes=NONE
77x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000078bindir='${exec_prefix}/bin'
79sbindir='${exec_prefix}/sbin'
80libexecdir='${exec_prefix}/libexec'
81datadir='${prefix}/share'
82sysconfdir='${prefix}/etc'
83sharedstatedir='${prefix}/com'
84localstatedir='${prefix}/var'
85libdir='${exec_prefix}/lib'
86includedir='${prefix}/include'
87oldincludedir='/usr/include'
88infodir='${prefix}/info'
89mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000090
91# Initialize some other variables.
92subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000093MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000094SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +000095# Maximum number of lines to put in a shell here document.
96ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +000097
98ac_prev=
99for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000100do
Guido van Rossum627b2d71993-12-24 10:39:16 +0000101
Guido van Rossum7f43da71994-08-01 12:15:30 +0000102 # If the previous option needs an argument, assign it.
103 if test -n "$ac_prev"; then
104 eval "$ac_prev=\$ac_option"
105 ac_prev=
106 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000107 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000108
Guido van Rossum7f43da71994-08-01 12:15:30 +0000109 case "$ac_option" in
110 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
111 *) ac_optarg= ;;
112 esac
113
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000114 # Accept the important Cygnus configure options, so we can diagnose typos.
115
Guido van Rossum7f43da71994-08-01 12:15:30 +0000116 case "$ac_option" in
117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000118 -bindir | --bindir | --bindi | --bind | --bin | --bi)
119 ac_prev=bindir ;;
120 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
121 bindir="$ac_optarg" ;;
122
123 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000124 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000125 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000126 build="$ac_optarg" ;;
127
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000128 -cache-file | --cache-file | --cache-fil | --cache-fi \
129 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
130 ac_prev=cache_file ;;
131 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
132 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
133 cache_file="$ac_optarg" ;;
134
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000135 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
136 ac_prev=datadir ;;
137 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
138 | --da=*)
139 datadir="$ac_optarg" ;;
140
Guido van Rossum7f43da71994-08-01 12:15:30 +0000141 -disable-* | --disable-*)
142 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000143 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000144 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000145 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000146 fi
147 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
148 eval "enable_${ac_feature}=no" ;;
149
150 -enable-* | --enable-*)
151 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000152 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000153 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000154 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000155 fi
156 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
157 case "$ac_option" in
158 *=*) ;;
159 *) ac_optarg=yes ;;
160 esac
161 eval "enable_${ac_feature}='$ac_optarg'" ;;
162
Guido van Rossum7f43da71994-08-01 12:15:30 +0000163 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
164 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
165 | --exec | --exe | --ex)
166 ac_prev=exec_prefix ;;
167 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
168 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
169 | --exec=* | --exe=* | --ex=*)
170 exec_prefix="$ac_optarg" ;;
171
172 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000173 # Obsolete; use --with-gas.
174 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000175
176 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000177 # Omit some internal or obsolete options to make the list less imposing.
178 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000179 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000180Usage: configure [options] [host]
181Options: [defaults in brackets after descriptions]
182Configuration:
183 --cache-file=FILE cache test results in FILE
184 --help print this message
185 --no-create do not create output files
186 --quiet, --silent do not print \`checking...' messages
187 --version print the version of autoconf that created configure
188Directory and file names:
189 --prefix=PREFIX install architecture-independent files in PREFIX
190 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000191 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000192 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000193 --bindir=DIR user executables in DIR [EPREFIX/bin]
194 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
195 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
196 --datadir=DIR read-only architecture-independent data in DIR
197 [PREFIX/share]
198 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
199 --sharedstatedir=DIR modifiable architecture-independent data in DIR
200 [PREFIX/com]
201 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
202 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
203 --includedir=DIR C header files in DIR [PREFIX/include]
204 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
205 --infodir=DIR info documentation in DIR [PREFIX/info]
206 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000207 --srcdir=DIR find the sources in DIR [configure dir or ..]
208 --program-prefix=PREFIX prepend PREFIX to installed program names
209 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000210 --program-transform-name=PROGRAM
211 run sed PROGRAM on installed program names
212EOF
213 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000214Host type:
215 --build=BUILD configure for building on BUILD [BUILD=HOST]
216 --host=HOST configure for HOST [guessed]
217 --target=TARGET configure for TARGET [TARGET=HOST]
218Features and packages:
219 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
220 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
221 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
222 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
223 --x-includes=DIR X include files are in DIR
224 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000225EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000226 if test -n "$ac_help"; then
227 echo "--enable and --with options recognized:$ac_help"
228 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000229 exit 0 ;;
230
231 -host | --host | --hos | --ho)
232 ac_prev=host ;;
233 -host=* | --host=* | --hos=* | --ho=*)
234 host="$ac_optarg" ;;
235
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000236 -includedir | --includedir | --includedi | --included | --include \
237 | --includ | --inclu | --incl | --inc)
238 ac_prev=includedir ;;
239 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
240 | --includ=* | --inclu=* | --incl=* | --inc=*)
241 includedir="$ac_optarg" ;;
242
243 -infodir | --infodir | --infodi | --infod | --info | --inf)
244 ac_prev=infodir ;;
245 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
246 infodir="$ac_optarg" ;;
247
248 -libdir | --libdir | --libdi | --libd)
249 ac_prev=libdir ;;
250 -libdir=* | --libdir=* | --libdi=* | --libd=*)
251 libdir="$ac_optarg" ;;
252
253 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
254 | --libexe | --libex | --libe)
255 ac_prev=libexecdir ;;
256 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
257 | --libexe=* | --libex=* | --libe=*)
258 libexecdir="$ac_optarg" ;;
259
260 -localstatedir | --localstatedir | --localstatedi | --localstated \
261 | --localstate | --localstat | --localsta | --localst \
262 | --locals | --local | --loca | --loc | --lo)
263 ac_prev=localstatedir ;;
264 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
265 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
266 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
267 localstatedir="$ac_optarg" ;;
268
269 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
270 ac_prev=mandir ;;
271 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
272 mandir="$ac_optarg" ;;
273
Guido van Rossum7f43da71994-08-01 12:15:30 +0000274 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000275 # Obsolete; use --without-fp.
276 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000277
278 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
279 | --no-cr | --no-c)
280 no_create=yes ;;
281
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000282 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
283 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
284 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000285
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000286 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
287 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
288 | --oldin | --oldi | --old | --ol | --o)
289 ac_prev=oldincludedir ;;
290 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
291 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
292 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
293 oldincludedir="$ac_optarg" ;;
294
Guido van Rossum7f43da71994-08-01 12:15:30 +0000295 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
296 ac_prev=prefix ;;
297 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
298 prefix="$ac_optarg" ;;
299
300 -program-prefix | --program-prefix | --program-prefi | --program-pref \
301 | --program-pre | --program-pr | --program-p)
302 ac_prev=program_prefix ;;
303 -program-prefix=* | --program-prefix=* | --program-prefi=* \
304 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
305 program_prefix="$ac_optarg" ;;
306
307 -program-suffix | --program-suffix | --program-suffi | --program-suff \
308 | --program-suf | --program-su | --program-s)
309 ac_prev=program_suffix ;;
310 -program-suffix=* | --program-suffix=* | --program-suffi=* \
311 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
312 program_suffix="$ac_optarg" ;;
313
314 -program-transform-name | --program-transform-name \
315 | --program-transform-nam | --program-transform-na \
316 | --program-transform-n | --program-transform- \
317 | --program-transform | --program-transfor \
318 | --program-transfo | --program-transf \
319 | --program-trans | --program-tran \
320 | --progr-tra | --program-tr | --program-t)
321 ac_prev=program_transform_name ;;
322 -program-transform-name=* | --program-transform-name=* \
323 | --program-transform-nam=* | --program-transform-na=* \
324 | --program-transform-n=* | --program-transform-=* \
325 | --program-transform=* | --program-transfor=* \
326 | --program-transfo=* | --program-transf=* \
327 | --program-trans=* | --program-tran=* \
328 | --progr-tra=* | --program-tr=* | --program-t=*)
329 program_transform_name="$ac_optarg" ;;
330
331 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
332 | -silent | --silent | --silen | --sile | --sil)
333 silent=yes ;;
334
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000335 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
336 ac_prev=sbindir ;;
337 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
338 | --sbi=* | --sb=*)
339 sbindir="$ac_optarg" ;;
340
341 -sharedstatedir | --sharedstatedir | --sharedstatedi \
342 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
343 | --sharedst | --shareds | --shared | --share | --shar \
344 | --sha | --sh)
345 ac_prev=sharedstatedir ;;
346 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
347 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
348 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
349 | --sha=* | --sh=*)
350 sharedstatedir="$ac_optarg" ;;
351
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000352 -site | --site | --sit)
353 ac_prev=site ;;
354 -site=* | --site=* | --sit=*)
355 site="$ac_optarg" ;;
356
Guido van Rossum7f43da71994-08-01 12:15:30 +0000357 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
358 ac_prev=srcdir ;;
359 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
360 srcdir="$ac_optarg" ;;
361
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
363 | --syscon | --sysco | --sysc | --sys | --sy)
364 ac_prev=sysconfdir ;;
365 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
366 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
367 sysconfdir="$ac_optarg" ;;
368
Guido van Rossum7f43da71994-08-01 12:15:30 +0000369 -target | --target | --targe | --targ | --tar | --ta | --t)
370 ac_prev=target ;;
371 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
372 target="$ac_optarg" ;;
373
374 -v | -verbose | --verbose | --verbos | --verbo | --verb)
375 verbose=yes ;;
376
377 -version | --version | --versio | --versi | --vers)
Fred Drake02706f52000-09-25 15:08:46 +0000378 echo "configure generated by autoconf version 2.14.1"
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"
Fred Drake02706f52000-09-25 15:08:46 +0000538 test -f "$cache_file" && . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000539else
540 echo "creating cache $cache_file"
541 > $cache_file
542fi
543
Guido van Rossum7f43da71994-08-01 12:15:30 +0000544ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000545# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000546ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000547ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000548ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000549cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000550
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000551ac_exeext=
552ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000553if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
554 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
555 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
556 ac_n= ac_c='
557' ac_t=' '
558 else
559 ac_n=-n ac_c= ac_t=
560 fi
561else
562 ac_n= ac_c='\c' ac_t=
563fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000564
Guido van Rossum0a516c91994-09-12 10:58:40 +0000565
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000566
Guido van Rossum627b2d71993-12-24 10:39:16 +0000567
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000568# Set VERSION so we only need to edit in one place (i.e., here)
569
Guido van Rossumb9a22a12000-06-30 02:48:53 +0000570VERSION=2.0
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000571
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000572# NEXTSTEP stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000573if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000574
575 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000576echo "configure:577: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000577 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000578if test "${with_next_archs+set}" = set; then
579 withval="$with_next_archs"
580
Guido van Rossum563e7081996-09-10 18:20:48 +0000581 if test -n "$withval"; then
582 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
583 # GCC does not currently support multi archs on the NeXT
584 with_gcc=no
585 fi
586 echo "$ac_t""$with_next_archs" 1>&6
587
588else
589 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000590fi
591
Guido van Rossum563e7081996-09-10 18:20:48 +0000592
593 if test -z "$MACHDEP"
594 then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000595 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum563e7081996-09-10 18:20:48 +0000596 sed -e 's/://' -e 's/\./_/'` && \
597 ac_sys_system=next && ac_sys_release=$4
598
Guido van Rossumb97ef171997-09-28 05:44:03 +0000599 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000600 fi
601fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000602
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000603# Check whether --with-next-framework or --without-next-framework was given.
604if test "${with_next_framework+set}" = set; then
605 withval="$with_next_framework"
606 :
607fi
608
609# Check whether --with-dyld or --without-dyld was given.
610if test "${with_dyld+set}" = set; then
611 withval="$with_dyld"
612 :
613fi
614
Guido van Rossum91922671997-10-09 20:24:13 +0000615
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000616# Set name for machine-dependent library files
617
618echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000619echo "configure:620: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000620if test -z "$MACHDEP"
621then
Guido van Rossum563e7081996-09-10 18:20:48 +0000622 ac_sys_system=`uname -s`
Trent Mick635f6fb2000-08-23 21:33:05 +0000623 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000624 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000625 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000626 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000627 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000628 ac_md_system=`echo $ac_sys_system |
629 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
630 ac_md_release=`echo $ac_sys_release |
631 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000632 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000633
Guido van Rossum07397971997-04-29 21:49:50 +0000634 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000635 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000636 esac
637fi
Guido van Rossum91922671997-10-09 20:24:13 +0000638
639#
640# SGI compilers allow the specification of the both the ABI and the
641# ISA on the command line. Depending on the values of these switches,
642# different and often incompatable code will be generated.
643#
644# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
645# thus supply support for various ABI/ISA combinations. The MACHDEP
646# variable is also adjusted.
647#
648
649if test ! -z "$SGI_ABI"
650then
651 CC="cc $SGI_ABI"
652 LDFLAGS="$SGI_ABI $LDFLAGS"
653 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
654fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000655echo "$ac_t""$MACHDEP" 1>&6
656
Guido van Rossum91922671997-10-09 20:24:13 +0000657#
658# CCC is the command that compiles C++ programs
659#
660# Not all make programs have this predefined.
661#
Guido van Rossum95012191999-12-16 17:50:52 +0000662#AC_SUBST(SET_CCC)
663#AC_MSG_CHECKING(CCC)
664#if test -z "$CCC"
665#then
666# case $ac_sys_system in
667# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
668# Linux*) SET_CCC="CCC= g++";;
669# *) SET_CCC=""
670# esac
671#else
672# SET_CCC="CCC= ${CCC}"
673#fi
674#AC_MSG_RESULT($SET_CCC)
Guido van Rossum91922671997-10-09 20:24:13 +0000675
676
Guido van Rossum627b2d71993-12-24 10:39:16 +0000677# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000678echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000679echo "configure:680: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000680# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000681if test "${with_gcc+set}" = set; then
682 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000683
684 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000685 no) CC=cc
686 without_gcc=yes;;
687 yes) CC=gcc
688 without_gcc=no;;
689 *) CC=$withval
690 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000691 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000692else
Guido van Rossume77438c1995-09-13 18:59:59 +0000693
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000694 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000695 OSF1) CC=cc
696 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000697 BeOS*)
698 # Dunno if it's a good idea to get this over with all at once, or
699 # to handle it in with the other goodies.
700 MACHDEP=beos
701
702 case $BE_HOST_CPU in
703 ppc)
Guido van Rossum81376801999-04-06 15:50:51 +0000704 CC="mwcc -I$PWD/BeOS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000705 without_gcc=yes
Guido van Rossum6b9da451999-03-24 17:48:12 +0000706 case `uname -r` in
707 4.0*) OPT="-DUSE_DL_EXPORT -O7 -opt schedule604 -export pragma" ;;
708 *) OPT="-DUSE_DL_EXPORT -O2 -proc 604e -export pragma" ;;
709 esac
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000710 CCSHARED=-UUSE_DL_EXPORT
711 LDFLAGS="$LDFLAGS -nodup"
712
713 AR="$PWD/BeOS/ar-fake"
714 RANLIB=:
715
716 cat >> confdefs.h <<\EOF
717#define DL_EXPORT_HEADER "dl_export.h"
718EOF
719
720 ;;
721 x86)
722 CC="gcc -I$PWD/BeOS"
723 without_gcc=no
Guido van Rossum32000e82000-05-22 21:31:50 +0000724 OPT="-DUSE_DL_EXPORT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000725 CCSHARED=-UUSE_DL_EXPORT
726
727 AR="$PWD/BeOS/ar-fake"
728 RANLIB=:
729
730 cat >> confdefs.h <<\EOF
731#define DL_EXPORT_HEADER "dl_export.h"
732EOF
733
734 ;;
735 *)
736 { echo "configure: error: Your BeOS system isn't PowerPC or x86... neat" 1>&2; exit 1; }
737 ;;
738 esac
739 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000740 Monterey*)
741 RANLIB=:
742 without_gcc=;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000743 *) without_gcc=no;;
744 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000745fi
746
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000747echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000748
Guido van Rossum95012191999-12-16 17:50:52 +0000749
750
751MAINOBJ=python.o
752echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000753echo "configure:754: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000754# Check whether --with-cxx or --without-cxx was given.
755if test "${with_cxx+set}" = set; then
756 withval="$with_cxx"
757
758 case $withval in
759 no) CXX=
760 with_cxx=no;;
761 *) CXX=$withval
762 MAINOBJ=ccpython.o
763 with_cxx=$withval;;
764 esac
765else
766
767 with_cxx=no
768
769fi
770
771echo "$ac_t""$with_cxx" 1>&6
Guido van Rossume1262332000-09-22 19:41:56 +0000772SET_CXX="CXX=$CXX"
Guido van Rossum95012191999-12-16 17:50:52 +0000773
774#AC_MSG_CHECKING(CCC)
775#if test -z "$CCC"
776#then
777# case $ac_sys_system in
778# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
779# Linux*) SET_CCC="CCC= g++";;
780# *) SET_CCC=""
781# esac
782#else
783# SET_CCC="CCC= ${CCC}"
784#fi
785#AC_MSG_RESULT($SET_CCC)
786
Guido van Rossum8b131c51995-03-09 14:10:13 +0000787# If the user switches compilers, we can't believe the cache
788if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
789then
790 { echo "configure: error: cached CC is different -- throw away $cache_file
791(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
792fi
793
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000794# Extract the first word of "gcc", so it can be a program name with args.
795set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000796echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000797echo "configure:798: checking for $ac_word" >&5
Fred Drake02706f52000-09-25 15:08:46 +0000798if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000799 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000800else
801 if test -n "$CC"; then
802 ac_cv_prog_CC="$CC" # Let the user override the test.
803else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000804 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
805 ac_dummy="$PATH"
806 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000807 test -z "$ac_dir" && ac_dir=.
808 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000809 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000810 break
811 fi
812 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000814fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815fi
816CC="$ac_cv_prog_CC"
817if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000818 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000819else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000820 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000821fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000822
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823if test -z "$CC"; then
824 # Extract the first word of "cc", so it can be a program name with args.
825set dummy cc; ac_word=$2
826echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000827echo "configure:828: checking for $ac_word" >&5
Fred Drake02706f52000-09-25 15:08:46 +0000828if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000829 echo $ac_n "(cached) $ac_c" 1>&6
830else
831 if test -n "$CC"; then
832 ac_cv_prog_CC="$CC" # Let the user override the test.
833else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000834 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000835 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000836 ac_dummy="$PATH"
837 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838 test -z "$ac_dir" && ac_dir=.
839 if test -f $ac_dir/$ac_word; then
840 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
841 ac_prog_rejected=yes
842 continue
843 fi
844 ac_cv_prog_CC="cc"
845 break
846 fi
847 done
848 IFS="$ac_save_ifs"
849if test $ac_prog_rejected = yes; then
850 # We found a bogon in the path, so make sure we never use it.
851 set dummy $ac_cv_prog_CC
852 shift
853 if test $# -gt 0; then
854 # We chose a different compiler from the bogus one.
855 # However, it has the same basename, so the bogon will be chosen
856 # first if we set CC to just the basename; use the full file name.
857 shift
858 set dummy "$ac_dir/$ac_word" "$@"
859 shift
860 ac_cv_prog_CC="$@"
861 fi
862fi
863fi
864fi
865CC="$ac_cv_prog_CC"
866if test -n "$CC"; then
867 echo "$ac_t""$CC" 1>&6
868else
869 echo "$ac_t""no" 1>&6
870fi
871
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000872 if test -z "$CC"; then
873 case "`uname -s`" in
Fred Drake02706f52000-09-25 15:08:46 +0000874 *win32* | *WIN32* | *CYGWIN*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000875 # Extract the first word of "cl", so it can be a program name with args.
876set dummy cl; ac_word=$2
877echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000878echo "configure:879: checking for $ac_word" >&5
Fred Drake02706f52000-09-25 15:08:46 +0000879if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000880 echo $ac_n "(cached) $ac_c" 1>&6
881else
882 if test -n "$CC"; then
883 ac_cv_prog_CC="$CC" # Let the user override the test.
884else
885 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
886 ac_dummy="$PATH"
887 for ac_dir in $ac_dummy; do
888 test -z "$ac_dir" && ac_dir=.
889 if test -f $ac_dir/$ac_word; then
890 ac_cv_prog_CC="cl"
891 break
892 fi
893 done
894 IFS="$ac_save_ifs"
895fi
896fi
897CC="$ac_cv_prog_CC"
898if test -n "$CC"; then
899 echo "$ac_t""$CC" 1>&6
900else
901 echo "$ac_t""no" 1>&6
902fi
903 ;;
904 esac
905 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
907fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908
Fred Drake02706f52000-09-25 15:08:46 +0000909echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
910echo "configure:911: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000911
912ac_ext=c
913# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
914ac_cpp='$CPP $CPPFLAGS'
915ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000916ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000917cross_compiling=$ac_cv_prog_cc_cross
918
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000919cat > conftest.$ac_ext << EOF
920
Guido van Rossumff555e32000-09-22 15:38:21 +0000921#line 922 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000922#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000923
Guido van Rossumf78abae1997-01-21 22:02:36 +0000924main(){return(0);}
925EOF
Guido van Rossumff555e32000-09-22 15:38:21 +0000926if { (eval echo configure:927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000927 ac_cv_prog_cc_works=yes
928 # If we can't run a trivial program, we are probably using a cross compiler.
929 if (./conftest; exit) 2>/dev/null; then
930 ac_cv_prog_cc_cross=no
931 else
932 ac_cv_prog_cc_cross=yes
933 fi
934else
935 echo "configure: failed program was:" >&5
936 cat conftest.$ac_ext >&5
937 ac_cv_prog_cc_works=no
938fi
939rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000940ac_ext=c
941# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
942ac_cpp='$CPP $CPPFLAGS'
943ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
944ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
945cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000946
947echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
948if test $ac_cv_prog_cc_works = no; then
949 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
950fi
Fred Drake02706f52000-09-25 15:08:46 +0000951echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
952echo "configure:953: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000953echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
954cross_compiling=$ac_cv_prog_cc_cross
955
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000956echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000957echo "configure:958: checking whether we are using GNU C" >&5
Fred Drake02706f52000-09-25 15:08:46 +0000958if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000959 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960else
961 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000962#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000964#endif
965EOF
Guido van Rossumff555e32000-09-22 15:38:21 +0000966if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967 ac_cv_prog_gcc=yes
968else
969 ac_cv_prog_gcc=no
970fi
971fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000973echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000974
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000975if test $ac_cv_prog_gcc = yes; then
976 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000977else
978 GCC=
979fi
980
981ac_test_CFLAGS="${CFLAGS+set}"
982ac_save_CFLAGS="$CFLAGS"
983CFLAGS=
984echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000985echo "configure:986: checking whether ${CC-cc} accepts -g" >&5
Fred Drake02706f52000-09-25 15:08:46 +0000986if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000987 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988else
989 echo 'void f(){}' > conftest.c
990if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000991 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000993 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000994fi
995rm -f conftest*
996
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000997fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000998
Guido van Rossumf78abae1997-01-21 22:02:36 +0000999echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001000if test "$ac_test_CFLAGS" = set; then
1001 CFLAGS="$ac_save_CFLAGS"
1002elif test $ac_cv_prog_cc_g = yes; then
1003 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001004 CFLAGS="-g -O2"
1005 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001006 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001007 fi
1008else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001009 if test "$GCC" = yes; then
1010 CFLAGS="-O2"
1011 else
1012 CFLAGS=
1013 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001014fi
1015
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001016
Guido van Rossumff555e32000-09-22 15:38:21 +00001017echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
1018echo "configure:1019: checking for --with-suffix" >&5
1019# Check whether --with-suffix or --without-suffix was given.
1020if test "${with_suffix+set}" = set; then
1021 withval="$with_suffix"
1022
1023 case $withval in
1024 no) EXE=;;
1025 yes) EXE=.exe;;
1026 *) EXE=$withval;;
1027 esac
1028fi
1029
1030echo "$ac_t""$EXE" 1>&6
1031
Guido van Rossumdd997f71998-10-07 19:58:26 +00001032case $MACHDEP in
1033bsdos*)
1034 case $CC in
1035 gcc) CC="$CC -D_HAVE_BSDI";;
1036 esac;;
1037esac
1038
Guido van Rossum24b1e751997-08-21 02:29:16 +00001039case $ac_sys_system in
1040hp*|HP*)
1041 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001042 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001043 esac;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001044BeOS*)
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001045 case $CC in
1046 cc) CC=cc;;
1047 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001048Monterey*)
1049 case $CC in
1050 cc) CC="$CC -Wl,-Bexport";;
1051 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001052esac
1053
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001054# LDLIBRARY is the name of the library to link against (as opposed to the
1055# name of the library into which to insert object files). On systems
1056# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
1057# the Makefiles).
1058
1059
1060LDLIBRARY=''
1061
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001062# LINKCC is the command that links the python executable -- default is $(CC).
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001063# This is altered for AIX and BeOS in order to build the export list before
1064# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001065
1066echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001067echo "configure:1068: checking LINKCC" >&5
Guido van Rossum95012191999-12-16 17:50:52 +00001068if test -z "$LINKCC" -a ! -z "$CXX"
1069then
1070 LINKCC="$CXX"
1071fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001072if test -z "$LINKCC"
1073then
1074 case $ac_sys_system in
1075 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001076 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001077 BeOS*)
Guido van Rossumea516321998-12-17 18:08:55 +00001078 LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001079 LDLIBRARY='libpython$(VERSION).so';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001080 dgux*)
1081 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001082 Monterey64*)
1083 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001084 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001085 esac
1086fi
1087echo "$ac_t""$LINKCC" 1>&6
1088
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001089echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001090echo "configure:1091: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001091
1092# NeXT framework builds require that the 'ar' library be converted into
1093# a bundle using libtool.
1094if test "$with_next_framework"
1095then
1096 LDLIBRARY='libpython$(VERSION).dylib'
1097fi
1098
1099# DG/UX requires some fancy ld contortions to produce a .so from an .a
1100if test "$MACHDEP" = "dguxR4"
1101then
1102 LDLIBRARY='libpython$(VERSION).so'
1103 OPT="$OPT -pic"
1104fi
1105echo "$ac_t""$LDLIBRARY" 1>&6
1106
1107# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1108if test -z "$LDLIBRARY"
1109then
1110 LDLIBRARY='libpython$(VERSION).a'
1111 MAKE_LDLIBRARY="true"
1112else
1113 MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
1114fi
1115
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001116# Extract the first word of "ranlib", so it can be a program name with args.
1117set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001118echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001119echo "configure:1120: checking for $ac_word" >&5
Fred Drake02706f52000-09-25 15:08:46 +00001120if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001121 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001122else
1123 if test -n "$RANLIB"; then
1124 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1125else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001126 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1127 ac_dummy="$PATH"
1128 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129 test -z "$ac_dir" && ac_dir=.
1130 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001131 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001132 break
1133 fi
1134 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001137fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138fi
1139RANLIB="$ac_cv_prog_RANLIB"
1140if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001141 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001143 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001145
1146
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147for ac_prog in ar aal
1148do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001149# Extract the first word of "$ac_prog", so it can be a program name with args.
1150set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001151echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001152echo "configure:1153: checking for $ac_word" >&5
Fred Drake02706f52000-09-25 15:08:46 +00001153if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001154 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001155else
1156 if test -n "$AR"; then
1157 ac_cv_prog_AR="$AR" # Let the user override the test.
1158else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001159 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1160 ac_dummy="$PATH"
1161 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162 test -z "$ac_dir" && ac_dir=.
1163 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001164 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165 break
1166 fi
1167 done
1168 IFS="$ac_save_ifs"
1169fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170fi
1171AR="$ac_cv_prog_AR"
1172if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001173 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001175 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
1178test -n "$AR" && break
1179done
1180test -n "$AR" || AR="ar"
1181
1182
Guido van Rossumda88dad1995-01-26 00:46:29 +00001183
1184
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001185# Install just never works :-(
1186if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001187then
1188 INSTALL=cp
1189 INSTALL_PROGRAM=cp
1190 INSTALL_DATA=cp
1191else
1192 INSTALL_PROGRAM="$INSTALL"
1193 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001194fi
1195
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001196# Not every filesystem supports hard links
1197
1198if test -z "$LN" ; then
1199 case $ac_sys_system in
1200 BeOS*) LN="ln -s";;
1201 *) LN=ln;;
1202 esac
1203fi
1204
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001205# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001206
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001207if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001208then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001209 case $GCC in
1210 yes)
1211 case $ac_cv_prog_cc_g in
1212 yes) OPT="-g -O2";;
1213 *) OPT="-O2";;
1214 esac
1215 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001216 *) OPT="-O";;
1217 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001218fi
1219
Trent Mick635f6fb2000-08-23 21:33:05 +00001220# The current (beta) Monterey compiler dies with optimizations
1221case $ac_sys_system in
1222Monterey*) OPT="";;
1223esac
1224
Guido van Rossum563e7081996-09-10 18:20:48 +00001225if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001226then
1227 OPT="$OPT $ac_arch_flags"
1228fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001229# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001230echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001231echo "configure:1232: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001232# On Suns, sometimes $CPP names a directory.
1233if test -n "$CPP" && test -d "$CPP"; then
1234 CPP=
1235fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001236if test -z "$CPP"; then
Fred Drake02706f52000-09-25 15:08:46 +00001237if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001238 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001239else
1240 # This must be in double quotes, not single quotes, because CPP may get
1241 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001242 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001243 # On the NeXT, cc -E runs the code through the compiler's parser,
1244 # not just through cpp.
1245 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001246#line 1247 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001248#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249Syntax Error
1250EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001251ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001252{ (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001253ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1254if test -z "$ac_err"; then
1255 :
1256else
1257 echo "$ac_err" >&5
1258 echo "configure: failed program was:" >&5
1259 cat conftest.$ac_ext >&5
1260 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001261 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001262 cat > conftest.$ac_ext <<EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001263#line 1264 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001264#include "confdefs.h"
1265#include <assert.h>
1266Syntax Error
1267EOF
1268ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00001269{ (eval echo configure:1270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001270ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272 :
1273else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001274 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001275 echo "configure: failed program was:" >&5
1276 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001278 CPP="${CC-cc} -nologo -E"
1279 cat > conftest.$ac_ext <<EOF
1280#line 1281 "configure"
1281#include "confdefs.h"
1282#include <assert.h>
1283Syntax Error
1284EOF
1285ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1286{ (eval echo configure:1287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1287ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1288if test -z "$ac_err"; then
1289 :
1290else
1291 echo "$ac_err" >&5
1292 echo "configure: failed program was:" >&5
1293 cat conftest.$ac_ext >&5
1294 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295 CPP=/lib/cpp
1296fi
1297rm -f conftest*
1298fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001299rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001300fi
1301rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001302 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001303fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001304 CPP="$ac_cv_prog_CPP"
1305else
1306 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001307fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001308echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001310echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001311echo "configure:1312: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001313#line 1314 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314#include "confdefs.h"
1315#ifdef _AIX
1316 yes
1317#endif
1318
1319EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001320if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1321 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001323 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001324#define _ALL_SOURCE 1
1325EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001327else
1328 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001329 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330fi
1331rm -f conftest*
1332
1333
Guido van Rossumf78abae1997-01-21 22:02:36 +00001334ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001335echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001336echo "configure:1337: checking for minix/config.h" >&5
Fred Drake02706f52000-09-25 15:08:46 +00001337if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001338 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001339else
1340 cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001341#line 1342 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001342#include "confdefs.h"
1343#include <minix/config.h>
1344EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001345ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumff555e32000-09-22 15:38:21 +00001346{ (eval echo configure:1347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001347ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001348if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001349 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001350 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001351else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001352 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001353 echo "configure: failed program was:" >&5
1354 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001355 rm -rf conftest*
1356 eval "ac_cv_header_$ac_safe=no"
1357fi
1358rm -f conftest*
1359fi
1360if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001361 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001362 MINIX=yes
1363else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001364 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001365MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001366fi
1367
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001368if test "$MINIX" = yes; then
1369 cat >> confdefs.h <<\EOF
1370#define _POSIX_SOURCE 1
1371EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001373 cat >> confdefs.h <<\EOF
1374#define _POSIX_1_SOURCE 2
1375EOF
1376
1377 cat >> confdefs.h <<\EOF
1378#define _MINIX 1
1379EOF
1380
1381fi
1382
Guido van Rossumda88dad1995-01-26 00:46:29 +00001383
Guido van Rossum91922671997-10-09 20:24:13 +00001384echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001385echo "configure:1386: checking whether $CC accepts -OPT:Olimit=0" >&5
Fred Drake02706f52000-09-25 15:08:46 +00001386if eval "test \"\${ac_cv_opt_olimit_ok+set}\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001387 echo $ac_n "(cached) $ac_c" 1>&6
1388else
1389 ac_save_cc="$CC"
1390CC="$CC -OPT:Olimit=0"
1391if test "$cross_compiling" = yes; then
1392 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1393else
1394 cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001395#line 1396 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001396#include "confdefs.h"
1397int main() { return 0; }
1398EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001399if { (eval echo configure:1400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossum91922671997-10-09 20:24:13 +00001400then
1401 ac_cv_opt_olimit_ok=yes
1402else
1403 echo "configure: failed program was:" >&5
1404 cat conftest.$ac_ext >&5
1405 rm -fr conftest*
1406 ac_cv_opt_olimit_ok=no
1407fi
1408rm -fr conftest*
1409fi
1410
1411CC="$ac_save_cc"
1412fi
1413
1414echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001415if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001416 OPT="$OPT -OPT:Olimit=0"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001417else
1418 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001419echo "configure:1420: checking whether $CC accepts -Olimit 1500" >&5
Fred Drake02706f52000-09-25 15:08:46 +00001420 if eval "test \"\${ac_cv_olimit_ok+set}\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001421 echo $ac_n "(cached) $ac_c" 1>&6
1422else
1423 ac_save_cc="$CC"
1424 CC="$CC -Olimit 1500"
1425 if test "$cross_compiling" = yes; then
1426 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1427else
1428 cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001429#line 1430 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001430#include "confdefs.h"
1431int main() { return 0; }
1432EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001433if { (eval echo configure:1434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001434then
1435 ac_cv_olimit_ok=yes
1436else
1437 echo "configure: failed program was:" >&5
1438 cat conftest.$ac_ext >&5
1439 rm -fr conftest*
1440 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001441fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001442rm -fr conftest*
1443fi
1444
1445 CC="$ac_save_cc"
1446fi
1447
1448 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1449 if test $ac_cv_olimit_ok = yes; then
1450 OPT="$OPT -Olimit 1500"
1451 fi
1452fi
1453
Guido van Rossum84e7b241996-08-19 21:59:00 +00001454
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001455# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001456echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001457echo "configure:1458: checking for ANSI C header files" >&5
Fred Drake02706f52000-09-25 15:08:46 +00001458if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001459 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001460else
1461 cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001462#line 1463 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001463#include "confdefs.h"
1464#include <stdlib.h>
1465#include <stdarg.h>
1466#include <string.h>
1467#include <float.h>
1468EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001469ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumff555e32000-09-22 15:38:21 +00001470{ (eval echo configure:1471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001471ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001472if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001473 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001474 ac_cv_header_stdc=yes
1475else
1476 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001477 echo "configure: failed program was:" >&5
1478 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001479 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001480 ac_cv_header_stdc=no
1481fi
1482rm -f conftest*
1483
1484if test $ac_cv_header_stdc = yes; then
1485 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1486cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001487#line 1488 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001488#include "confdefs.h"
1489#include <string.h>
1490EOF
1491if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1492 egrep "memchr" >/dev/null 2>&1; then
1493 :
1494else
1495 rm -rf conftest*
1496 ac_cv_header_stdc=no
1497fi
1498rm -f conftest*
1499
1500fi
1501
1502if test $ac_cv_header_stdc = yes; then
1503 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1504cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001505#line 1506 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001506#include "confdefs.h"
1507#include <stdlib.h>
1508EOF
1509if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1510 egrep "free" >/dev/null 2>&1; then
1511 :
1512else
1513 rm -rf conftest*
1514 ac_cv_header_stdc=no
1515fi
1516rm -f conftest*
1517
1518fi
1519
1520if test $ac_cv_header_stdc = yes; then
1521 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1522if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001523 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001524else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001525 cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001526#line 1527 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001527#include "confdefs.h"
1528#include <ctype.h>
1529#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1530#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001531#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001532int main () { int i; for (i = 0; i < 256; i++)
1533if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1534exit (0); }
1535
1536EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001537if { (eval echo configure:1538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00001538then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001539 :
1540else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001541 echo "configure: failed program was:" >&5
1542 cat conftest.$ac_ext >&5
1543 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001544 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001545fi
1546rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001547fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001548
1549fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001550fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001551
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001552echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001553if test $ac_cv_header_stdc = yes; then
1554 cat >> confdefs.h <<\EOF
1555#define STDC_HEADERS 1
1556EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001557
1558fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001559
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00001560for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h poll.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001561signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Fred Drakea50d6ec2000-08-31 16:13:20 +00001562sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001563sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00001564sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
1565ndbm.h db1/ndbm.h gdbm/ndbm.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001566do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001567ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001568echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001569echo "configure:1570: checking for $ac_hdr" >&5
Fred Drake02706f52000-09-25 15:08:46 +00001570if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001571 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001572else
1573 cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001574#line 1575 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001575#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001576#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001577EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001578ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumff555e32000-09-22 15:38:21 +00001579{ (eval echo configure:1580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001580ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001581if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001582 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001583 eval "ac_cv_header_$ac_safe=yes"
1584else
1585 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001586 echo "configure: failed program was:" >&5
1587 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001588 rm -rf conftest*
1589 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001590fi
1591rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001592fi
1593if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001594 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001595 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001596 cat >> confdefs.h <<EOF
1597#define $ac_tr_hdr 1
1598EOF
1599
1600else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001601 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001602fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001603done
1604
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001605ac_header_dirent=no
1606for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1607do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001608ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001609echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001610echo "configure:1611: checking for $ac_hdr that defines DIR" >&5
Fred Drake02706f52000-09-25 15:08:46 +00001611if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001612 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001613else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001614 cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001615#line 1616 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001616#include "confdefs.h"
1617#include <sys/types.h>
1618#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001619int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001620DIR *dirp = 0;
1621; return 0; }
1622EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001623if { (eval echo configure:1624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001624 rm -rf conftest*
1625 eval "ac_cv_header_dirent_$ac_safe=yes"
1626else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001627 echo "configure: failed program was:" >&5
1628 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001629 rm -rf conftest*
1630 eval "ac_cv_header_dirent_$ac_safe=no"
1631fi
1632rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001633fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001634if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001635 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001636 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001637 cat >> confdefs.h <<EOF
1638#define $ac_tr_hdr 1
1639EOF
1640 ac_header_dirent=$ac_hdr; break
1641else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001642 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001643fi
1644done
1645# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1646if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001647echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001648echo "configure:1649: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001649ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Fred Drake02706f52000-09-25 15:08:46 +00001650if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001651 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001652else
1653 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001654LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001655cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001656#line 1657 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001657#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001658/* Override any gcc2 internal prototype to avoid an error. */
1659/* We use char because int might match the return type of a gcc2
1660 builtin and then its argument prototype would still apply. */
1661char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001662
Guido van Rossumf78abae1997-01-21 22:02:36 +00001663int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001664opendir()
1665; return 0; }
1666EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001667if { (eval echo configure:1668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001668 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001669 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001670else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001671 echo "configure: failed program was:" >&5
1672 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001673 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001674 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001675fi
1676rm -f conftest*
1677LIBS="$ac_save_LIBS"
1678
1679fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001680if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001681 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001682 LIBS="$LIBS -ldir"
1683else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001684 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685fi
1686
1687else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001688echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001689echo "configure:1690: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001690ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Fred Drake02706f52000-09-25 15:08:46 +00001691if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001692 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001693else
1694 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001695LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001696cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001697#line 1698 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001698#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001699/* Override any gcc2 internal prototype to avoid an error. */
1700/* We use char because int might match the return type of a gcc2
1701 builtin and then its argument prototype would still apply. */
1702char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703
Guido van Rossumf78abae1997-01-21 22:02:36 +00001704int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001705opendir()
1706; return 0; }
1707EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001708if { (eval echo configure:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001709 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001710 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001711else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001712 echo "configure: failed program was:" >&5
1713 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001714 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001715 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001716fi
1717rm -f conftest*
1718LIBS="$ac_save_LIBS"
1719
1720fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001721if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001722 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001723 LIBS="$LIBS -lx"
1724else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001725 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001726fi
1727
1728fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001729
1730
1731# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001732was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001733echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001734echo "configure:1735: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001735cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001736#line 1737 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001737#include "confdefs.h"
1738#include <time.h>
1739EOF
1740if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1741 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001742 rm -rf conftest*
1743 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001744else
1745 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001746 cat >> confdefs.h <<\EOF
1747#define clock_t long
1748EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001749
1750fi
1751rm -f conftest*
1752
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001753echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001754
Guido van Rossum84e7b241996-08-19 21:59:00 +00001755# Add some code to confdefs.h so that the test for off_t works on SCO
1756cat >> confdefs.h <<\EOF
1757#if defined(SCO_DS)
1758#undef _OFF_T
1759#endif
1760EOF
1761
Guido van Rossumef2255b2000-03-10 22:30:29 +00001762# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001763echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001764echo "configure:1765: checking for mode_t" >&5
Fred Drake02706f52000-09-25 15:08:46 +00001765if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001766 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001767else
1768 cat > conftest.$ac_ext <<EOF
Guido van Rossumff555e32000-09-22 15:38:21 +00001769#line 1770 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001770#include "confdefs.h"
1771#include <sys/types.h>
1772#if STDC_HEADERS
1773#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001774#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001775#endif
1776EOF
1777if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001778 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001779 rm -rf conftest*
Fred Drake02706f52000-09-25 15:08:46 +00001780 eval "ac_cv_type_mode_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001781else
1782 rm -rf conftest*
Fred Drake02706f52000-09-25 15:08:46 +00001783 eval "ac_cv_type_mode_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001784fi
1785rm -f conftest*
1786
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001787fi
Fred Drake02706f52000-09-25 15:08:46 +00001788if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
1789 echo "$ac_t""yes" 1>&6
1790else
1791 echo "$ac_t""no" 1>&6
1792 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001793#define mode_t int
1794EOF
1795
1796fi
1797
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001798echo $ac_n "checking for off_t""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00001799echo "configure:1800: checking for off_t" >&5
1800if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001801 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001802else
1803 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00001804#line 1805 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805#include "confdefs.h"
1806#include <sys/types.h>
1807#if STDC_HEADERS
1808#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001809#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001810#endif
1811EOF
1812if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001813 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 +00001814 rm -rf conftest*
Fred Drake02706f52000-09-25 15:08:46 +00001815 eval "ac_cv_type_off_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001816else
1817 rm -rf conftest*
Fred Drake02706f52000-09-25 15:08:46 +00001818 eval "ac_cv_type_off_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001819fi
1820rm -f conftest*
1821
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001822fi
Fred Drake02706f52000-09-25 15:08:46 +00001823if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
1824 echo "$ac_t""yes" 1>&6
1825else
1826 echo "$ac_t""no" 1>&6
1827 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001828#define off_t long
1829EOF
1830
1831fi
1832
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001833echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00001834echo "configure:1835: checking for pid_t" >&5
1835if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001836 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001837else
1838 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00001839#line 1840 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001840#include "confdefs.h"
1841#include <sys/types.h>
1842#if STDC_HEADERS
1843#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001844#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001845#endif
1846EOF
1847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001848 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 +00001849 rm -rf conftest*
Fred Drake02706f52000-09-25 15:08:46 +00001850 eval "ac_cv_type_pid_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001851else
1852 rm -rf conftest*
Fred Drake02706f52000-09-25 15:08:46 +00001853 eval "ac_cv_type_pid_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001854fi
1855rm -f conftest*
1856
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001857fi
Fred Drake02706f52000-09-25 15:08:46 +00001858if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
1859 echo "$ac_t""yes" 1>&6
1860else
1861 echo "$ac_t""no" 1>&6
1862 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001863#define pid_t int
1864EOF
1865
1866fi
1867
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001868echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00001869echo "configure:1870: checking return type of signal handlers" >&5
1870if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001871 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001872else
1873 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00001874#line 1875 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001875#include "confdefs.h"
1876#include <sys/types.h>
1877#include <signal.h>
1878#ifdef signal
1879#undef signal
1880#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001881#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001882extern "C" void (*signal (int, void (*)(int)))(int);
1883#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001884void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001885#endif
1886
Guido van Rossumf78abae1997-01-21 22:02:36 +00001887int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001888int i;
1889; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001890EOF
Fred Drake02706f52000-09-25 15:08:46 +00001891if { (eval echo configure:1892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001892 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001893 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001894else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001895 echo "configure: failed program was:" >&5
1896 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001897 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001898 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001899fi
1900rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001901fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001902
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001903echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001904cat >> confdefs.h <<EOF
1905#define RETSIGTYPE $ac_cv_type_signal
1906EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001907
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001908
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001909echo $ac_n "checking for size_t""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00001910echo "configure:1911: checking for size_t" >&5
1911if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001912 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001913else
1914 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00001915#line 1916 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001916#include "confdefs.h"
1917#include <sys/types.h>
1918#if STDC_HEADERS
1919#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001920#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001921#endif
1922EOF
1923if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001924 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 +00001925 rm -rf conftest*
Fred Drake02706f52000-09-25 15:08:46 +00001926 eval "ac_cv_type_size_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001927else
1928 rm -rf conftest*
Fred Drake02706f52000-09-25 15:08:46 +00001929 eval "ac_cv_type_size_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001930fi
1931rm -f conftest*
1932
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001933fi
Fred Drake02706f52000-09-25 15:08:46 +00001934if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
1935 echo "$ac_t""yes" 1>&6
1936else
1937 echo "$ac_t""no" 1>&6
1938 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001939#define size_t unsigned
1940EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001941
1942fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001943
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001944echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00001945echo "configure:1946: checking for uid_t in sys/types.h" >&5
1946if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001947 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001948else
1949 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00001950#line 1951 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001951#include "confdefs.h"
1952#include <sys/types.h>
1953EOF
1954if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1955 egrep "uid_t" >/dev/null 2>&1; then
1956 rm -rf conftest*
1957 ac_cv_type_uid_t=yes
1958else
1959 rm -rf conftest*
1960 ac_cv_type_uid_t=no
1961fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001962rm -f conftest*
1963
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001964fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001965
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001966echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001967if test $ac_cv_type_uid_t = no; then
1968 cat >> confdefs.h <<\EOF
1969#define uid_t int
1970EOF
1971
1972 cat >> confdefs.h <<\EOF
1973#define gid_t int
1974EOF
1975
1976fi
1977
Guido van Rossum627b2d71993-12-24 10:39:16 +00001978
Guido van Rossumef2255b2000-03-10 22:30:29 +00001979# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001980echo $ac_n "checking size of int""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00001981echo "configure:1982: checking size of int" >&5
1982if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001983 echo $ac_n "(cached) $ac_c" 1>&6
1984else
1985 if test "$cross_compiling" = yes; then
1986 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1987else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001988 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00001989#line 1990 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001990#include "confdefs.h"
1991#include <stdio.h>
1992main()
1993{
1994 FILE *f=fopen("conftestval", "w");
1995 if (!f) exit(1);
1996 fprintf(f, "%d\n", sizeof(int));
1997 exit(0);
1998}
1999EOF
Fred Drake02706f52000-09-25 15:08:46 +00002000if { (eval echo configure:2001: \"$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 +00002001then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002002 ac_cv_sizeof_int=`cat conftestval`
2003else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002004 echo "configure: failed program was:" >&5
2005 cat conftest.$ac_ext >&5
2006 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002007 ac_cv_sizeof_int=0
2008fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002009rm -fr conftest*
2010fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002011
2012fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002013echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2014cat >> confdefs.h <<EOF
2015#define SIZEOF_INT $ac_cv_sizeof_int
2016EOF
2017
2018
2019echo $ac_n "checking size of long""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002020echo "configure:2021: checking size of long" >&5
2021if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002022 echo $ac_n "(cached) $ac_c" 1>&6
2023else
2024 if test "$cross_compiling" = yes; then
2025 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2026else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002027 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002028#line 2029 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002029#include "confdefs.h"
2030#include <stdio.h>
2031main()
2032{
2033 FILE *f=fopen("conftestval", "w");
2034 if (!f) exit(1);
2035 fprintf(f, "%d\n", sizeof(long));
2036 exit(0);
2037}
2038EOF
Fred Drake02706f52000-09-25 15:08:46 +00002039if { (eval echo configure:2040: \"$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 +00002040then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002041 ac_cv_sizeof_long=`cat conftestval`
2042else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002043 echo "configure: failed program was:" >&5
2044 cat conftest.$ac_ext >&5
2045 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002046 ac_cv_sizeof_long=0
2047fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002048rm -fr conftest*
2049fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002050
2051fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002052echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2053cat >> confdefs.h <<EOF
2054#define SIZEOF_LONG $ac_cv_sizeof_long
2055EOF
2056
2057
Guido van Rossumad678af1998-10-02 14:42:15 +00002058echo $ac_n "checking size of void *""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002059echo "configure:2060: checking size of void *" >&5
2060if eval "test \"\${ac_cv_sizeof_void_p+set}\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002061 echo $ac_n "(cached) $ac_c" 1>&6
2062else
2063 if test "$cross_compiling" = yes; then
2064 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2065else
2066 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002067#line 2068 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002068#include "confdefs.h"
2069#include <stdio.h>
2070main()
2071{
2072 FILE *f=fopen("conftestval", "w");
2073 if (!f) exit(1);
2074 fprintf(f, "%d\n", sizeof(void *));
2075 exit(0);
2076}
2077EOF
Fred Drake02706f52000-09-25 15:08:46 +00002078if { (eval echo configure:2079: \"$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 +00002079then
2080 ac_cv_sizeof_void_p=`cat conftestval`
2081else
2082 echo "configure: failed program was:" >&5
2083 cat conftest.$ac_ext >&5
2084 rm -fr conftest*
2085 ac_cv_sizeof_void_p=0
2086fi
2087rm -fr conftest*
2088fi
2089
2090fi
2091echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2092cat >> confdefs.h <<EOF
2093#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2094EOF
2095
2096
Guido van Rossumef2255b2000-03-10 22:30:29 +00002097echo $ac_n "checking size of char""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002098echo "configure:2099: checking size of char" >&5
2099if eval "test \"\${ac_cv_sizeof_char+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002100 echo $ac_n "(cached) $ac_c" 1>&6
2101else
2102 if test "$cross_compiling" = yes; then
2103 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2104else
2105 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002106#line 2107 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002107#include "confdefs.h"
2108#include <stdio.h>
2109main()
2110{
2111 FILE *f=fopen("conftestval", "w");
2112 if (!f) exit(1);
2113 fprintf(f, "%d\n", sizeof(char));
2114 exit(0);
2115}
2116EOF
Fred Drake02706f52000-09-25 15:08:46 +00002117if { (eval echo configure:2118: \"$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 +00002118then
2119 ac_cv_sizeof_char=`cat conftestval`
2120else
2121 echo "configure: failed program was:" >&5
2122 cat conftest.$ac_ext >&5
2123 rm -fr conftest*
2124 ac_cv_sizeof_char=0
2125fi
2126rm -fr conftest*
2127fi
2128
2129fi
2130echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2131cat >> confdefs.h <<EOF
2132#define SIZEOF_CHAR $ac_cv_sizeof_char
2133EOF
2134
2135
2136echo $ac_n "checking size of short""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002137echo "configure:2138: checking size of short" >&5
2138if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002139 echo $ac_n "(cached) $ac_c" 1>&6
2140else
2141 if test "$cross_compiling" = yes; then
2142 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2143else
2144 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002145#line 2146 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002146#include "confdefs.h"
2147#include <stdio.h>
2148main()
2149{
2150 FILE *f=fopen("conftestval", "w");
2151 if (!f) exit(1);
2152 fprintf(f, "%d\n", sizeof(short));
2153 exit(0);
2154}
2155EOF
Fred Drake02706f52000-09-25 15:08:46 +00002156if { (eval echo configure:2157: \"$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 +00002157then
2158 ac_cv_sizeof_short=`cat conftestval`
2159else
2160 echo "configure: failed program was:" >&5
2161 cat conftest.$ac_ext >&5
2162 rm -fr conftest*
2163 ac_cv_sizeof_short=0
2164fi
2165rm -fr conftest*
2166fi
2167
2168fi
2169echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2170cat >> confdefs.h <<EOF
2171#define SIZEOF_SHORT $ac_cv_sizeof_short
2172EOF
2173
2174
2175echo $ac_n "checking size of float""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002176echo "configure:2177: checking size of float" >&5
2177if eval "test \"\${ac_cv_sizeof_float+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002178 echo $ac_n "(cached) $ac_c" 1>&6
2179else
2180 if test "$cross_compiling" = yes; then
2181 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2182else
2183 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002184#line 2185 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002185#include "confdefs.h"
2186#include <stdio.h>
2187main()
2188{
2189 FILE *f=fopen("conftestval", "w");
2190 if (!f) exit(1);
2191 fprintf(f, "%d\n", sizeof(float));
2192 exit(0);
2193}
2194EOF
Fred Drake02706f52000-09-25 15:08:46 +00002195if { (eval echo configure:2196: \"$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 +00002196then
2197 ac_cv_sizeof_float=`cat conftestval`
2198else
2199 echo "configure: failed program was:" >&5
2200 cat conftest.$ac_ext >&5
2201 rm -fr conftest*
2202 ac_cv_sizeof_float=0
2203fi
2204rm -fr conftest*
2205fi
2206
2207fi
2208echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2209cat >> confdefs.h <<EOF
2210#define SIZEOF_FLOAT $ac_cv_sizeof_float
2211EOF
2212
2213
2214echo $ac_n "checking size of double""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002215echo "configure:2216: checking size of double" >&5
2216if eval "test \"\${ac_cv_sizeof_double+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002217 echo $ac_n "(cached) $ac_c" 1>&6
2218else
2219 if test "$cross_compiling" = yes; then
2220 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2221else
2222 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002223#line 2224 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002224#include "confdefs.h"
2225#include <stdio.h>
2226main()
2227{
2228 FILE *f=fopen("conftestval", "w");
2229 if (!f) exit(1);
2230 fprintf(f, "%d\n", sizeof(double));
2231 exit(0);
2232}
2233EOF
Fred Drake02706f52000-09-25 15:08:46 +00002234if { (eval echo configure:2235: \"$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 +00002235then
2236 ac_cv_sizeof_double=`cat conftestval`
2237else
2238 echo "configure: failed program was:" >&5
2239 cat conftest.$ac_ext >&5
2240 rm -fr conftest*
2241 ac_cv_sizeof_double=0
2242fi
2243rm -fr conftest*
2244fi
2245
2246fi
2247echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2248cat >> confdefs.h <<EOF
2249#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2250EOF
2251
2252
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002253echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002254echo "configure:2255: checking size of fpos_t" >&5
2255if eval "test \"\${ac_cv_sizeof_fpos_t+set}\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002256 echo $ac_n "(cached) $ac_c" 1>&6
2257else
2258 if test "$cross_compiling" = yes; then
2259 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2260else
2261 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002262#line 2263 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002263#include "confdefs.h"
2264#include <stdio.h>
2265main()
2266{
2267 FILE *f=fopen("conftestval", "w");
2268 if (!f) exit(1);
2269 fprintf(f, "%d\n", sizeof(fpos_t));
2270 exit(0);
2271}
2272EOF
Fred Drake02706f52000-09-25 15:08:46 +00002273if { (eval echo configure:2274: \"$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 +00002274then
2275 ac_cv_sizeof_fpos_t=`cat conftestval`
2276else
2277 echo "configure: failed program was:" >&5
2278 cat conftest.$ac_ext >&5
2279 rm -fr conftest*
2280 ac_cv_sizeof_fpos_t=0
2281fi
2282rm -fr conftest*
2283fi
2284
2285fi
2286echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2287cat >> confdefs.h <<EOF
2288#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2289EOF
2290
2291
Guido van Rossum0a516c91994-09-12 10:58:40 +00002292
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002293echo $ac_n "checking for long long support""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002294echo "configure:2295: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002295have_long_long=no
2296cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002297#line 2298 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002298#include "confdefs.h"
2299
2300int main() {
2301long long x; x = (long long)0;
2302; return 0; }
2303EOF
Fred Drake02706f52000-09-25 15:08:46 +00002304if { (eval echo configure:2305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002305 rm -rf conftest*
2306 cat >> confdefs.h <<\EOF
2307#define HAVE_LONG_LONG 1
2308EOF
2309 have_long_long=yes
2310else
2311 echo "configure: failed program was:" >&5
2312 cat conftest.$ac_ext >&5
2313fi
2314rm -f conftest*
2315echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002316if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002317echo $ac_n "checking size of long long""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002318echo "configure:2319: checking size of long long" >&5
2319if eval "test \"\${ac_cv_sizeof_long_long+set}\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002320 echo $ac_n "(cached) $ac_c" 1>&6
2321else
2322 if test "$cross_compiling" = yes; then
2323 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2324else
2325 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002326#line 2327 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002327#include "confdefs.h"
2328#include <stdio.h>
2329main()
2330{
2331 FILE *f=fopen("conftestval", "w");
2332 if (!f) exit(1);
2333 fprintf(f, "%d\n", sizeof(long long));
2334 exit(0);
2335}
2336EOF
Fred Drake02706f52000-09-25 15:08:46 +00002337if { (eval echo configure:2338: \"$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 +00002338then
2339 ac_cv_sizeof_long_long=`cat conftestval`
2340else
2341 echo "configure: failed program was:" >&5
2342 cat conftest.$ac_ext >&5
2343 rm -fr conftest*
2344 ac_cv_sizeof_long_long=0
2345fi
2346rm -fr conftest*
2347fi
2348
2349fi
2350echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2351cat >> confdefs.h <<EOF
2352#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2353EOF
2354
2355
2356fi
2357
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002358echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002359echo "configure:2360: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002360have_uintptr_t=no
2361cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002362#line 2363 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002363#include "confdefs.h"
2364
2365int main() {
2366uintptr_t x; x = (uintptr_t)0;
2367; return 0; }
2368EOF
Fred Drake02706f52000-09-25 15:08:46 +00002369if { (eval echo configure:2370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002370 rm -rf conftest*
2371 cat >> confdefs.h <<\EOF
2372#define HAVE_UINTPTR_T 1
2373EOF
2374 have_uintptr_t=yes
2375else
2376 echo "configure: failed program was:" >&5
2377 cat conftest.$ac_ext >&5
2378fi
2379rm -f conftest*
2380echo "$ac_t""$have_uintptr_t" 1>&6
2381if test "$have_uintptr_t" = yes ; then
2382echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002383echo "configure:2384: checking size of uintptr_t" >&5
2384if eval "test \"\${ac_cv_sizeof_uintptr_t+set}\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002385 echo $ac_n "(cached) $ac_c" 1>&6
2386else
2387 if test "$cross_compiling" = yes; then
2388 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2389else
2390 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002391#line 2392 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002392#include "confdefs.h"
2393#include <stdio.h>
2394main()
2395{
2396 FILE *f=fopen("conftestval", "w");
2397 if (!f) exit(1);
2398 fprintf(f, "%d\n", sizeof(uintptr_t));
2399 exit(0);
2400}
2401EOF
Fred Drake02706f52000-09-25 15:08:46 +00002402if { (eval echo configure:2403: \"$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 +00002403then
2404 ac_cv_sizeof_uintptr_t=`cat conftestval`
2405else
2406 echo "configure: failed program was:" >&5
2407 cat conftest.$ac_ext >&5
2408 rm -fr conftest*
2409 ac_cv_sizeof_uintptr_t=0
2410fi
2411rm -fr conftest*
2412fi
2413
2414fi
2415echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2416cat >> confdefs.h <<EOF
2417#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2418EOF
2419
2420
2421fi
2422
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002423# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2424echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002425echo "configure:2426: checking size of off_t" >&5
2426if eval "test \"\${ac_cv_sizeof_off_t+set}\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002427 echo $ac_n "(cached) $ac_c" 1>&6
2428else
2429 if test "$cross_compiling" = yes; then
2430 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2431else
2432 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002433#line 2434 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002434#include "confdefs.h"
2435#include <stdio.h>
2436#include <sys/types.h>
2437main()
2438{
2439 FILE *f=fopen("conftestval", "w");
2440 if (!f) exit(1);
2441 fprintf(f, "%d\n", sizeof(off_t));
2442 exit(0);
2443}
2444EOF
Fred Drake02706f52000-09-25 15:08:46 +00002445if { (eval echo configure:2446: \"$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 +00002446then
2447 ac_cv_sizeof_off_t=`cat conftestval`
2448else
2449 echo "configure: failed program was:" >&5
2450 cat conftest.$ac_ext >&5
2451 rm -fr conftest*
2452 ac_cv_sizeof_off_t=0
2453fi
2454rm -fr conftest*
2455fi
2456
2457
2458fi
2459
2460echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2461cat >> confdefs.h <<EOF
2462#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2463EOF
2464
2465
2466echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002467echo "configure:2468: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002468if test "$have_long_long" = yes -a \
2469 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2470 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002471 cat >> confdefs.h <<\EOF
2472#define HAVE_LARGEFILE_SUPPORT 1
2473EOF
2474
2475 echo "$ac_t""yes" 1>&6
2476else
2477 echo "$ac_t""no" 1>&6
2478fi
2479
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002480# AC_CHECK_SIZEOF() doesn't include <time.h>.
2481echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002482echo "configure:2483: checking size of time_t" >&5
2483if eval "test \"\${ac_cv_sizeof_time_t+set}\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002484 echo $ac_n "(cached) $ac_c" 1>&6
2485else
2486 if test "$cross_compiling" = yes; then
2487 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2488else
2489 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002490#line 2491 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002491#include "confdefs.h"
2492#include <stdio.h>
2493#include <time.h>
2494main()
2495{
2496 FILE *f=fopen("conftestval", "w");
2497 if (!f) exit(1);
2498 fprintf(f, "%d\n", sizeof(time_t));
2499 exit(0);
2500}
2501EOF
Fred Drake02706f52000-09-25 15:08:46 +00002502if { (eval echo configure:2503: \"$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 +00002503then
2504 ac_cv_sizeof_time_t=`cat conftestval`
2505else
2506 echo "configure: failed program was:" >&5
2507 cat conftest.$ac_ext >&5
2508 rm -fr conftest*
2509 ac_cv_sizeof_time_t=0
2510fi
2511rm -fr conftest*
2512fi
2513
2514
2515fi
2516
2517echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2518cat >> confdefs.h <<EOF
2519#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2520EOF
2521
2522
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002523
Trent Mick635f6fb2000-08-23 21:33:05 +00002524# if have pthread_t then define SIZEOF_PTHREAD_T
2525echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002526echo "configure:2527: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002527have_pthread_t=no
2528cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002529#line 2530 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002530#include "confdefs.h"
2531#include <pthread.h>
2532int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002533pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002534; return 0; }
2535EOF
Fred Drake02706f52000-09-25 15:08:46 +00002536if { (eval echo configure:2537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002537 rm -rf conftest*
2538 have_pthread_t=yes
2539else
2540 echo "configure: failed program was:" >&5
2541 cat conftest.$ac_ext >&5
2542fi
2543rm -f conftest*
2544echo "$ac_t""$have_pthread_t" 1>&6
2545if test "$have_pthread_t" = yes ; then
2546 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2547 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002548echo "configure:2549: checking size of pthread_t" >&5
2549 if eval "test \"\${ac_cv_sizeof_pthread_t+set}\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002550 echo $ac_n "(cached) $ac_c" 1>&6
2551else
2552 if test "$cross_compiling" = yes; then
2553 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2554else
2555 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002556#line 2557 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002557#include "confdefs.h"
2558#include <stdio.h>
2559 #include <pthread.h>
2560 main()
2561 {
2562 FILE *f=fopen("conftestval", "w");
2563 if (!f) exit(1);
2564 fprintf(f, "%d\n", sizeof(pthread_t));
2565 exit(0);
2566 }
2567EOF
Fred Drake02706f52000-09-25 15:08:46 +00002568if { (eval echo configure:2569: \"$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 +00002569then
2570 ac_cv_sizeof_pthread_t=`cat conftestval`
2571else
2572 echo "configure: failed program was:" >&5
2573 cat conftest.$ac_ext >&5
2574 rm -fr conftest*
2575 ac_cv_sizeof_pthread_t=0
2576fi
2577rm -fr conftest*
2578fi
2579
2580
2581fi
2582
2583 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2584 cat >> confdefs.h <<EOF
2585#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2586EOF
2587
2588fi
2589
2590
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002591# Minor variations in building a framework between NextStep versions 4 and 5
2592
2593case $ac_sys_system/$ac_sys_release in
2594 next/4*)
2595 ns_undef_sym='__environ'
2596 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2597 next/5*)
2598 ns_undef_sym='_environ'
2599 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2600esac
2601
2602echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002603echo "configure:2604: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002604if test "$with_next_framework"
2605then
2606 OPT="$OPT -fno-common"
2607 # -U __environ is needed since bundles don't have access
2608 # to crt0 when built but will always be linked against it
2609 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2610 cat >> confdefs.h <<\EOF
2611#define WITH_NEXT_FRAMEWORK 1
2612EOF
2613
2614 echo "$ac_t""yes" 1>&6
2615else
2616 echo "$ac_t""no" 1>&6
2617fi
2618
2619echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002620echo "configure:2621: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002621if test "$with_next_framework" -o "$with_dyld"
2622then
2623 if test "$with_dyld"
2624 then
2625 echo "$ac_t""yes" 1>&6
2626 else
2627 echo "$ac_t""required for framework build" 1>&6
2628 fi
2629 cat >> confdefs.h <<\EOF
2630#define WITH_DYLD 1
2631EOF
2632
2633 ns_dyld='set'
2634else
2635 echo "$ac_t""no" 1>&6
2636fi
2637
Guido van Rossum0a516c91994-09-12 10:58:40 +00002638# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002639
2640
2641
2642
Guido van Rossum0a516c91994-09-12 10:58:40 +00002643# SO is the extension of shared libraries `(including the dot!)
2644# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002645echo $ac_n "checking SO""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002646echo "configure:2647: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002647if test -z "$SO"
2648then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002649 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002650 hp*|HP*) SO=.sl;;
2651 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002652 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002653fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002654echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002655# LDSHARED is the ld *command* used to create shared library
2656# -- "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 +00002657# (Shared libraries in this instance are shared modules to be loaded into
2658# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002659echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002660echo "configure:2661: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002661if test -z "$LDSHARED"
2662then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002663 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002664 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002665 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002666 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002667 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002668 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00002669 SunOS/5*)
2670 if test "$GCC" = "yes"
2671 then LDSHARED='$(CC) -G'
2672 else LDSHARED="ld -G";
2673 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002674 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002675 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2676 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002677 next/*)
2678 if test "$ns_dyld"
2679 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2680 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2681 fi
2682 if test "$with_next_framework" ; then
2683 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2684 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002685 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002686 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002687 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002688 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002689 NetBSD*)
2690 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2691 then
2692 LDSHARED="cc -shared"
2693 else
2694 LDSHARED="ld -Bshareable"
2695 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002696 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00002697 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00002698 then
2699 LDSHARED="cc -shared ${LDFLAGS}"
2700 else
2701 LDSHARED="ld -Bshareable ${LDFLAGS}"
2702 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002703 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002704 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002705 *) LDSHARED="ld";;
2706 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002707fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002708echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002709# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002710# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002711echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002712echo "configure:2713: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002713if test -z "$CCSHARED"
2714then
Guido van Rossum07397971997-04-29 21:49:50 +00002715 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002716 hp*|HP*) if test "$GCC" = yes;
2717 then CCSHARED="-fpic";
2718 else CCSHARED="+z";
2719 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002720 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002721 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002722 OpenBSD*) CCSHARED="-fpic";;
2723 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002724 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002725 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002726 IRIX*/6*) case $CC in
2727 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002728 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002729 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002730 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002731fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002732echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002733# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002734# the python executable -- this is only needed for a few systems
2735echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002736echo "configure:2737: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002737if test -z "$LINKFORSHARED"
2738then
Guido van Rossum07397971997-04-29 21:49:50 +00002739 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002740 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002741 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002742 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002743 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002744 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002745 # -u libsys_s pulls in all symbols in libsys
2746 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2747 # -u __dummy makes the linker aware of the objc runtime
2748 # in System.framework; otherwise, __objcInit (referenced in
2749 # crt1.o) gets erroneously defined as common, which breaks dynamic
2750 # loading of any modules which reference it in System.framework
2751 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002752 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00002753 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002754 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00002755 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2756 then
2757 LINKFORSHARED="-Wl,--export-dynamic"
2758 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002759 SunOS/5*) case $CC in
2760 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002761 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002762 then
2763 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002764 fi;;
2765 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002766 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002767fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002768echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002769
Guido van Rossum627b2d71993-12-24 10:39:16 +00002770# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002771echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002772echo "configure:2773: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002773ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Fred Drake02706f52000-09-25 15:08:46 +00002774if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002775 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002776else
2777 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002778LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002779cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002780#line 2781 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002781#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002782/* Override any gcc2 internal prototype to avoid an error. */
2783/* We use char because int might match the return type of a gcc2
2784 builtin and then its argument prototype would still apply. */
2785char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002786
Guido van Rossumf78abae1997-01-21 22:02:36 +00002787int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002788dlopen()
2789; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002790EOF
Fred Drake02706f52000-09-25 15:08:46 +00002791if { (eval echo configure:2792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002792 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002793 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002794else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002795 echo "configure: failed program was:" >&5
2796 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002797 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002798 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002799fi
2800rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002801LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002802
Guido van Rossum627b2d71993-12-24 10:39:16 +00002803fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002804if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002805 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002806 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2807 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002808 cat >> confdefs.h <<EOF
2809#define $ac_tr_lib 1
2810EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002811
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002812 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002813
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002814else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002815 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002816fi
2817 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002818echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002819echo "configure:2820: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002820ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Fred Drake02706f52000-09-25 15:08:46 +00002821if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002822 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002823else
2824 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002825LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002826cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002827#line 2828 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002828#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002829/* Override any gcc2 internal prototype to avoid an error. */
2830/* We use char because int might match the return type of a gcc2
2831 builtin and then its argument prototype would still apply. */
2832char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002833
Guido van Rossumf78abae1997-01-21 22:02:36 +00002834int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002835shl_load()
2836; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002837EOF
Fred Drake02706f52000-09-25 15:08:46 +00002838if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002839 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002840 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002841else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002842 echo "configure: failed program was:" >&5
2843 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002844 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002845 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002846fi
2847rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002848LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002849
Guido van Rossum627b2d71993-12-24 10:39:16 +00002850fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002851if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002852 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002853 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2854 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002855 cat >> confdefs.h <<EOF
2856#define $ac_tr_lib 1
2857EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002858
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002859 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002860
2861else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002862 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002863fi
2864 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002865
Skip Montanarocb853262000-08-30 22:29:48 +00002866# Check for --with-pydebug
2867echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002868echo "configure:2869: checking for --with-pydebug" >&5
Skip Montanarocb853262000-08-30 22:29:48 +00002869# Check whether --with-pydebug or --without-pydebug was given.
2870if test "${with_pydebug+set}" = set; then
2871 withval="$with_pydebug"
2872
2873if test "$withval" != no
2874then cat >> confdefs.h <<\EOF
2875#define Py_DEBUG 1
2876EOF
2877 echo "$ac_t""yes" 1>&6
2878else echo "$ac_t""no" 1>&6
2879fi
2880else
2881 echo "$ac_t""no" 1>&6
2882fi
2883
2884
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002885# checks for system dependent C++ extensions support
2886case "$ac_sys_system" in
2887 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002888echo "configure:2889: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002889 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002890#line 2891 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002891#include "confdefs.h"
2892#include "/usr/lpp/xlC/include/load.h"
2893int main() {
2894loadAndInit("", 0, "")
2895; return 0; }
2896EOF
Fred Drake02706f52000-09-25 15:08:46 +00002897if { (eval echo configure:2898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002898 rm -rf conftest*
2899 cat >> confdefs.h <<\EOF
2900#define AIX_GENUINE_CPLUSPLUS 1
2901EOF
2902
2903 echo "$ac_t""yes" 1>&6
2904else
2905 echo "configure: failed program was:" >&5
2906 cat conftest.$ac_ext >&5
2907 rm -rf conftest*
2908 echo "$ac_t""no" 1>&6
2909fi
2910rm -f conftest*;;
2911 *) ;;
2912esac
2913
Guido van Rossum70c7f481998-03-26 18:44:10 +00002914# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2915# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002916# BeOS' sockets are stashed in libnet.
2917case "$ac_sys_system" in
2918IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002919*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002920echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002921echo "configure:2922: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002922ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Fred Drake02706f52000-09-25 15:08:46 +00002923if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002924 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002925else
2926 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002927LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002928cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002929#line 2930 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002930#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002931/* Override any gcc2 internal prototype to avoid an error. */
2932/* We use char because int might match the return type of a gcc2
2933 builtin and then its argument prototype would still apply. */
2934char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002935
Guido van Rossumf78abae1997-01-21 22:02:36 +00002936int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002937t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002938; return 0; }
2939EOF
Fred Drake02706f52000-09-25 15:08:46 +00002940if { (eval echo configure:2941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002941 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002942 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002943else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002944 echo "configure: failed program was:" >&5
2945 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002946 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002947 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002948fi
2949rm -f conftest*
2950LIBS="$ac_save_LIBS"
2951
2952fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002953if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002954 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002955 LIBS="-lnsl $LIBS"
2956else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002957 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002958fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002959 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002960echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00002961echo "configure:2962: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002962ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Fred Drake02706f52000-09-25 15:08:46 +00002963if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002964 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002965else
2966 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002967LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002968cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00002969#line 2970 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002970#include "confdefs.h"
2971/* Override any gcc2 internal prototype to avoid an error. */
2972/* We use char because int might match the return type of a gcc2
2973 builtin and then its argument prototype would still apply. */
2974char socket();
2975
2976int main() {
2977socket()
2978; return 0; }
2979EOF
Fred Drake02706f52000-09-25 15:08:46 +00002980if { (eval echo configure:2981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002981 rm -rf conftest*
2982 eval "ac_cv_lib_$ac_lib_var=yes"
2983else
2984 echo "configure: failed program was:" >&5
2985 cat conftest.$ac_ext >&5
2986 rm -rf conftest*
2987 eval "ac_cv_lib_$ac_lib_var=no"
2988fi
2989rm -f conftest*
2990LIBS="$ac_save_LIBS"
2991
2992fi
2993if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2994 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002995 LIBS="-lsocket $LIBS"
2996else
2997 echo "$ac_t""no" 1>&6
2998fi
2999 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003000;;
3001esac
3002case "$ac_sys_system" in
3003BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003004echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003005echo "configure:3006: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003006ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Fred Drake02706f52000-09-25 15:08:46 +00003007if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003008 echo $ac_n "(cached) $ac_c" 1>&6
3009else
3010 ac_save_LIBS="$LIBS"
3011LIBS="-lnet $LIBS $LIBS"
3012cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00003013#line 3014 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003014#include "confdefs.h"
3015/* Override any gcc2 internal prototype to avoid an error. */
3016/* We use char because int might match the return type of a gcc2
3017 builtin and then its argument prototype would still apply. */
3018char socket();
3019
3020int main() {
3021socket()
3022; return 0; }
3023EOF
Fred Drake02706f52000-09-25 15:08:46 +00003024if { (eval echo configure:3025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003025 rm -rf conftest*
3026 eval "ac_cv_lib_$ac_lib_var=yes"
3027else
3028 echo "configure: failed program was:" >&5
3029 cat conftest.$ac_ext >&5
3030 rm -rf conftest*
3031 eval "ac_cv_lib_$ac_lib_var=no"
3032fi
3033rm -f conftest*
3034LIBS="$ac_save_LIBS"
3035
3036fi
3037if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3038 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003039 LIBS="-lnet $LIBS"
3040else
3041 echo "$ac_t""no" 1>&6
3042fi
3043 # BeOS
3044;;
3045esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003046
Guido van Rossuma68acba1996-07-31 17:36:39 +00003047echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003048echo "configure:3049: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003049# Check whether --with-libs or --without-libs was given.
3050if test "${with_libs+set}" = set; then
3051 withval="$with_libs"
3052
3053echo "$ac_t""$withval" 1>&6
3054LIBS="$withval $LIBS"
3055
3056else
3057 echo "$ac_t""no" 1>&6
3058fi
3059
Guido van Rossum7f43da71994-08-01 12:15:30 +00003060
Guido van Rossum009f7871997-12-04 00:51:42 +00003061
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003062USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003063
Guido van Rossumec2f0731997-01-22 20:54:01 +00003064echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003065echo "configure:3066: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003066
3067# Check whether --with-dec-threads or --without-dec-threads was given.
3068if test "${with_dec_threads+set}" = set; then
3069 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003070
3071echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003072LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003073if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003074 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003075fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003076else
3077 echo "$ac_t""no" 1>&6
3078fi
3079
3080
3081echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003082echo "configure:3083: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003083# Check whether --with-threads or --without-threads was given.
3084if test "${with_threads+set}" = set; then
3085 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003086 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003087fi
3088
3089
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003090# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003091# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003092if test "${with_thread+set}" = set; then
3093 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003094
3095with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003096fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003097
3098
3099if test -z "$with_threads"
3100then with_threads="yes"
3101fi
3102echo "$ac_t""$with_threads" 1>&6
3103
3104if test "$with_threads" = "no"
3105then
3106 USE_THREAD_MODULE="#"
3107else
3108 if test -d "$with_threads"
3109 then LDFLAGS="$LDFLAGS -L$with_threads"
3110 fi
3111 if test -d "$withval"
3112 then LDFLAGS="$LDFLAGS -L$withval"
3113 fi
3114 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003115#define _REENTRANT 1
3116EOF
3117
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003118 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003119echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003120echo "configure:3121: checking for mach/cthreads.h" >&5
3121if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003122 echo $ac_n "(cached) $ac_c" 1>&6
3123else
3124 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00003125#line 3126 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003126#include "confdefs.h"
3127#include <mach/cthreads.h>
3128EOF
3129ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake02706f52000-09-25 15:08:46 +00003130{ (eval echo configure:3131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003131ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003132if test -z "$ac_err"; then
3133 rm -rf conftest*
3134 eval "ac_cv_header_$ac_safe=yes"
3135else
3136 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003137 echo "configure: failed program was:" >&5
3138 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003139 rm -rf conftest*
3140 eval "ac_cv_header_$ac_safe=no"
3141fi
3142rm -f conftest*
3143fi
3144if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3145 echo "$ac_t""yes" 1>&6
3146 cat >> confdefs.h <<\EOF
3147#define WITH_THREAD 1
3148EOF
3149
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003150 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003151#define C_THREADS 1
3152EOF
3153
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003154 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003155else
3156 echo "$ac_t""no" 1>&6
3157
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003158 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003159echo "configure:3160: checking for --with-pth" >&5
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003160 # Check whether --with-pth or --without-pth was given.
3161if test "${with_pth+set}" = set; then
3162 withval="$with_pth"
3163
3164 echo "$ac_t""$withval" 1>&6
3165 cat >> confdefs.h <<\EOF
3166#define WITH_THREAD 1
3167EOF
3168
3169 cat >> confdefs.h <<\EOF
3170#define HAVE_PTH 1
3171EOF
3172
3173 LIBS="-lpth $LIBS"
3174 LIBOBJS="$LIBOBJS thread.o"
3175else
3176
3177 echo "$ac_t""no" 1>&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003178 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003179echo "configure:3180: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003180ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Fred Drake02706f52000-09-25 15:08:46 +00003181if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003182 echo $ac_n "(cached) $ac_c" 1>&6
3183else
3184 ac_save_LIBS="$LIBS"
3185LIBS="-lpthread $LIBS"
3186cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00003187#line 3188 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003188#include "confdefs.h"
3189/* Override any gcc2 internal prototype to avoid an error. */
3190/* We use char because int might match the return type of a gcc2
3191 builtin and then its argument prototype would still apply. */
3192char pthread_create();
3193
3194int main() {
3195pthread_create()
3196; return 0; }
3197EOF
Fred Drake02706f52000-09-25 15:08:46 +00003198if { (eval echo configure:3199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003199 rm -rf conftest*
3200 eval "ac_cv_lib_$ac_lib_var=yes"
3201else
3202 echo "configure: failed program was:" >&5
3203 cat conftest.$ac_ext >&5
3204 rm -rf conftest*
3205 eval "ac_cv_lib_$ac_lib_var=no"
3206fi
3207rm -f conftest*
3208LIBS="$ac_save_LIBS"
3209
3210fi
3211if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3212 echo "$ac_t""yes" 1>&6
3213 cat >> confdefs.h <<\EOF
3214#define WITH_THREAD 1
3215EOF
3216
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003217 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003218#define _POSIX_THREADS 1
3219EOF
3220
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003221 LIBS="-lpthread $LIBS"
3222 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003223else
3224 echo "$ac_t""no" 1>&6
3225
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003226 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003227echo "configure:3228: checking for pthread_detach" >&5
3228if eval "test \"\${ac_cv_func_pthread_detach+set}\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003229 echo $ac_n "(cached) $ac_c" 1>&6
3230else
3231 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00003232#line 3233 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003233#include "confdefs.h"
3234/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003235 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003236#include <assert.h>
3237/* Override any gcc2 internal prototype to avoid an error. */
3238/* We use char because int might match the return type of a gcc2
3239 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003240char pthread_detach();
Fred Drake02706f52000-09-25 15:08:46 +00003241char (*f)();
Guido van Rossumad678af1998-10-02 14:42:15 +00003242
3243int main() {
3244
3245/* The GNU C library defines this for functions which it implements
3246 to always fail with ENOSYS. Some functions are actually named
3247 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003248#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003249choke me
3250#else
Fred Drake02706f52000-09-25 15:08:46 +00003251f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00003252#endif
3253
3254; return 0; }
3255EOF
Fred Drake02706f52000-09-25 15:08:46 +00003256if { (eval echo configure:3257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003257 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003258 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003259else
3260 echo "configure: failed program was:" >&5
3261 cat conftest.$ac_ext >&5
3262 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003263 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003264fi
3265rm -f conftest*
3266fi
3267
Guido van Rossumea516321998-12-17 18:08:55 +00003268if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003269 echo "$ac_t""yes" 1>&6
3270 cat >> confdefs.h <<\EOF
3271#define WITH_THREAD 1
3272EOF
3273
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003274 cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003275#define _POSIX_THREADS 1
3276EOF
3277
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003278 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003279else
3280 echo "$ac_t""no" 1>&6
3281
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003282 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003283echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003284echo "configure:3285: checking for kernel/OS.h" >&5
3285if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003286 echo $ac_n "(cached) $ac_c" 1>&6
3287else
3288 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00003289#line 3290 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003290#include "confdefs.h"
3291#include <kernel/OS.h>
3292EOF
3293ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake02706f52000-09-25 15:08:46 +00003294{ (eval echo configure:3295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003295ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003296if test -z "$ac_err"; then
3297 rm -rf conftest*
3298 eval "ac_cv_header_$ac_safe=yes"
3299else
3300 echo "$ac_err" >&5
3301 echo "configure: failed program was:" >&5
3302 cat conftest.$ac_ext >&5
3303 rm -rf conftest*
3304 eval "ac_cv_header_$ac_safe=no"
3305fi
3306rm -f conftest*
3307fi
3308if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3309 echo "$ac_t""yes" 1>&6
3310 cat >> confdefs.h <<\EOF
3311#define WITH_THREAD 1
3312EOF
3313
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003314 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003315#define BEOS_THREADS 1
3316EOF
3317
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003318 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003319else
3320 echo "$ac_t""no" 1>&6
3321
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003322 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003323echo "configure:3324: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003324ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Fred Drake02706f52000-09-25 15:08:46 +00003325if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003326 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003327else
3328 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003329LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003330cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00003331#line 3332 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003332#include "confdefs.h"
3333/* Override any gcc2 internal prototype to avoid an error. */
3334/* We use char because int might match the return type of a gcc2
3335 builtin and then its argument prototype would still apply. */
3336char pthread_create();
3337
3338int main() {
3339pthread_create()
3340; return 0; }
3341EOF
Fred Drake02706f52000-09-25 15:08:46 +00003342if { (eval echo configure:3343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003343 rm -rf conftest*
3344 eval "ac_cv_lib_$ac_lib_var=yes"
3345else
3346 echo "configure: failed program was:" >&5
3347 cat conftest.$ac_ext >&5
3348 rm -rf conftest*
3349 eval "ac_cv_lib_$ac_lib_var=no"
3350fi
3351rm -f conftest*
3352LIBS="$ac_save_LIBS"
3353
3354fi
3355if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3356 echo "$ac_t""yes" 1>&6
3357 cat >> confdefs.h <<\EOF
3358#define WITH_THREAD 1
3359EOF
3360
3361 cat >> confdefs.h <<\EOF
3362#define _POSIX_THREADS 1
3363EOF
3364
3365 LIBS="$LIBS -lpthreads"
3366 LIBOBJS="$LIBOBJS thread.o"
3367else
3368 echo "$ac_t""no" 1>&6
3369
3370 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003371echo "configure:3372: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003372ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Fred Drake02706f52000-09-25 15:08:46 +00003373if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003374 echo $ac_n "(cached) $ac_c" 1>&6
3375else
3376 ac_save_LIBS="$LIBS"
3377LIBS="-lc_r $LIBS"
3378cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00003379#line 3380 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003380#include "confdefs.h"
3381/* Override any gcc2 internal prototype to avoid an error. */
3382/* We use char because int might match the return type of a gcc2
3383 builtin and then its argument prototype would still apply. */
3384char pthread_create();
3385
3386int main() {
3387pthread_create()
3388; return 0; }
3389EOF
Fred Drake02706f52000-09-25 15:08:46 +00003390if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003391 rm -rf conftest*
3392 eval "ac_cv_lib_$ac_lib_var=yes"
3393else
3394 echo "configure: failed program was:" >&5
3395 cat conftest.$ac_ext >&5
3396 rm -rf conftest*
3397 eval "ac_cv_lib_$ac_lib_var=no"
3398fi
3399rm -f conftest*
3400LIBS="$ac_save_LIBS"
3401
3402fi
3403if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3404 echo "$ac_t""yes" 1>&6
3405 cat >> confdefs.h <<\EOF
3406#define WITH_THREAD 1
3407EOF
3408
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003409 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003410#define _POSIX_THREADS 1
3411EOF
3412
Greg Steinadf63d62000-07-05 10:38:09 +00003413 LIBS="$LIBS -lc_r"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003414 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003415else
3416 echo "$ac_t""no" 1>&6
3417
Greg Steinadf63d62000-07-05 10:38:09 +00003418 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003419echo "configure:3420: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003420ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Fred Drake02706f52000-09-25 15:08:46 +00003421if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003422 echo $ac_n "(cached) $ac_c" 1>&6
3423else
3424 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003425LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003426cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00003427#line 3428 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003428#include "confdefs.h"
3429/* Override any gcc2 internal prototype to avoid an error. */
3430/* We use char because int might match the return type of a gcc2
3431 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003432char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003433
3434int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003435__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003436; return 0; }
3437EOF
Fred Drake02706f52000-09-25 15:08:46 +00003438if { (eval echo configure:3439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003439 rm -rf conftest*
3440 eval "ac_cv_lib_$ac_lib_var=yes"
3441else
3442 echo "configure: failed program was:" >&5
3443 cat conftest.$ac_ext >&5
3444 rm -rf conftest*
3445 eval "ac_cv_lib_$ac_lib_var=no"
3446fi
3447rm -f conftest*
3448LIBS="$ac_save_LIBS"
3449
3450fi
3451if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3452 echo "$ac_t""yes" 1>&6
3453 cat >> confdefs.h <<\EOF
3454#define WITH_THREAD 1
3455EOF
3456
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003457 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003458#define _POSIX_THREADS 1
3459EOF
3460
Greg Steinadf63d62000-07-05 10:38:09 +00003461 LIBS="$LIBS -lthread"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003462 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003463else
3464 echo "$ac_t""no" 1>&6
3465
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003466 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003467echo "configure:3468: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003468ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Fred Drake02706f52000-09-25 15:08:46 +00003469if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003470 echo $ac_n "(cached) $ac_c" 1>&6
3471else
3472 ac_save_LIBS="$LIBS"
3473LIBS="-lcma $LIBS"
3474cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00003475#line 3476 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003476#include "confdefs.h"
3477/* Override any gcc2 internal prototype to avoid an error. */
3478/* We use char because int might match the return type of a gcc2
3479 builtin and then its argument prototype would still apply. */
3480char pthread_create();
3481
3482int main() {
3483pthread_create()
3484; return 0; }
3485EOF
Fred Drake02706f52000-09-25 15:08:46 +00003486if { (eval echo configure:3487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003487 rm -rf conftest*
3488 eval "ac_cv_lib_$ac_lib_var=yes"
3489else
3490 echo "configure: failed program was:" >&5
3491 cat conftest.$ac_ext >&5
3492 rm -rf conftest*
3493 eval "ac_cv_lib_$ac_lib_var=no"
3494fi
3495rm -f conftest*
3496LIBS="$ac_save_LIBS"
3497
3498fi
3499if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3500 echo "$ac_t""yes" 1>&6
3501 cat >> confdefs.h <<\EOF
3502#define WITH_THREAD 1
3503EOF
3504
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003505 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003506#define _POSIX_THREADS 1
3507EOF
3508
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003509 LIBS="$LIBS -lcma"
3510 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003511else
3512 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003513
3514 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003515fi
3516
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003517
Guido van Rossum627b2d71993-12-24 10:39:16 +00003518fi
3519
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003520fi
3521
Guido van Rossum0be3e491997-05-22 20:33:33 +00003522fi
3523
Guido van Rossum49545951997-12-02 19:28:29 +00003524fi
3525
Guido van Rossumb93a8621998-05-07 13:27:32 +00003526fi
3527
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003528fi
3529
Guido van Rossumad678af1998-10-02 14:42:15 +00003530fi
3531
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003532fi
3533
Guido van Rossum0be3e491997-05-22 20:33:33 +00003534
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003535 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003536echo "configure:3537: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003537ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Fred Drake02706f52000-09-25 15:08:46 +00003538if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003539 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003540else
3541 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003542LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003543cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00003544#line 3545 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003545#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003546/* Override any gcc2 internal prototype to avoid an error. */
3547/* We use char because int might match the return type of a gcc2
3548 builtin and then its argument prototype would still apply. */
3549char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003550
Guido van Rossumf78abae1997-01-21 22:02:36 +00003551int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003552usconfig()
3553; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003554EOF
Fred Drake02706f52000-09-25 15:08:46 +00003555if { (eval echo configure:3556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003556 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003557 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003558else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003559 echo "configure: failed program was:" >&5
3560 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003561 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003562 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003563fi
3564rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003565LIBS="$ac_save_LIBS"
3566
3567fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003568if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003569 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003570 cat >> confdefs.h <<\EOF
3571#define WITH_THREAD 1
3572EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003573
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003574 LIBS="$LIBS -lmpc"
3575 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003576 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003577else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003578 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003579fi
3580
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003581 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003582echo "configure:3583: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003583ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Fred Drake02706f52000-09-25 15:08:46 +00003584if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003585 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003586else
3587 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003588LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003589cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00003590#line 3591 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003591#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003592/* Override any gcc2 internal prototype to avoid an error. */
3593/* We use char because int might match the return type of a gcc2
3594 builtin and then its argument prototype would still apply. */
3595char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003596
Guido van Rossumf78abae1997-01-21 22:02:36 +00003597int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003598thr_create()
3599; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003600EOF
Fred Drake02706f52000-09-25 15:08:46 +00003601if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003602 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003603 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003604else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003605 echo "configure: failed program was:" >&5
3606 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003607 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003608 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003609fi
3610rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003611LIBS="$ac_save_LIBS"
3612
3613fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003614if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003615 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003616 cat >> confdefs.h <<\EOF
3617#define WITH_THREAD 1
3618EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003619
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003620 LIBS="$LIBS -lthread"
3621 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003622 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003623else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003624 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003625fi
3626
Guido van Rossum627b2d71993-12-24 10:39:16 +00003627fi
3628
Barry Warsawef82cd72000-06-30 16:21:01 +00003629# Check for GC support
3630
3631USE_GC_MODULE=""
3632echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003633echo "configure:3634: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003634# Check whether --with-cycle-gc or --without-cycle-gc was given.
3635if test "${with_cycle_gc+set}" = set; then
3636 withval="$with_cycle_gc"
3637 :
3638fi
3639
3640
3641if test -z "$with_cycle_gc"
3642then with_cycle_gc="yes"
3643fi
3644if test "$with_cycle_gc" = "no"
3645then
3646 USE_GC_MODULE="#"
3647else
3648 cat >> confdefs.h <<\EOF
3649#define WITH_CYCLE_GC 1
3650EOF
3651
3652fi
3653echo "$ac_t""$with_cycle_gc" 1>&6
3654
Fred Drakea50d6ec2000-08-31 16:13:20 +00003655# Check for LIBDB support
3656# either --with-libdb or, in its absence, the presence of db.h
3657
3658USE_BSDDB_MODULE=""
3659echo $ac_n "checking for --with-libdb""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003660echo "configure:3661: checking for --with-libdb" >&5
Fred Drakea50d6ec2000-08-31 16:13:20 +00003661# Check whether --with-libdb or --without-libdb was given.
3662if test "${with_libdb+set}" = set; then
3663 withval="$with_libdb"
3664 :
3665fi
3666
3667
Skip Montanarob89f41e2000-09-04 04:06:05 +00003668# enabled by default, but db.h must be found
3669if test "$ac_cv_header_db_h" = "yes"
3670then
3671 if test "$with_libdb" != "no"
3672 then with_libdb="yes"
3673 fi
3674else
3675 # make sure user knows why bsddb support wasn't enabled event
3676 # though s/he requested it
3677 if test "$with_libdb" = "yes"
3678 then echo $ac_n "(requested, but db.h was not found) $ac_c"
3679 fi
3680 with_libdb="no"
Fred Drakea50d6ec2000-08-31 16:13:20 +00003681fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00003682
Fred Drakea50d6ec2000-08-31 16:13:20 +00003683if test "$with_libdb" = "no"
3684then
3685 USE_BSDDB_MODULE="#"
3686else
3687 cat >> confdefs.h <<\EOF
3688#define WITH_LIBDB 1
3689EOF
3690
3691fi
3692echo "$ac_t""$with_libdb" 1>&6
3693
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003694if test "$with_libdb" = "yes"
3695then
3696 # check for libdb; BSD systems have the DB routines in libc --tg
3697
Martin v. Löwis05a65d62000-09-24 19:40:25 +00003698 # If dbopen is not in libc, then checking whether it is in libdb
3699 # is difficult: db_185.h may #define it as __db185_open
Fred Drake02706f52000-09-25 15:08:46 +00003700 # Instead, we just trust it is in libdb; linking will fail if it
3701 # is not.
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003702 echo $ac_n "checking for dbopen""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003703echo "configure:3704: checking for dbopen" >&5
3704if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003705 echo $ac_n "(cached) $ac_c" 1>&6
3706else
3707 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00003708#line 3709 "configure"
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003709#include "confdefs.h"
3710/* System header to define __stub macros and hopefully few prototypes,
3711 which can conflict with char dbopen(); below. */
3712#include <assert.h>
3713/* Override any gcc2 internal prototype to avoid an error. */
3714/* We use char because int might match the return type of a gcc2
3715 builtin and then its argument prototype would still apply. */
3716char dbopen();
Fred Drake02706f52000-09-25 15:08:46 +00003717char (*f)();
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003718
3719int main() {
3720
3721/* The GNU C library defines this for functions which it implements
3722 to always fail with ENOSYS. Some functions are actually named
3723 something starting with __ and the normal name is an alias. */
3724#if defined (__stub_dbopen) || defined (__stub___dbopen)
3725choke me
3726#else
Fred Drake02706f52000-09-25 15:08:46 +00003727f = dbopen;
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003728#endif
3729
3730; return 0; }
3731EOF
Fred Drake02706f52000-09-25 15:08:46 +00003732if { (eval echo configure:3733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003733 rm -rf conftest*
3734 eval "ac_cv_func_dbopen=yes"
3735else
3736 echo "configure: failed program was:" >&5
3737 cat conftest.$ac_ext >&5
3738 rm -rf conftest*
3739 eval "ac_cv_func_dbopen=no"
3740fi
3741rm -f conftest*
3742fi
3743
3744if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
3745 echo "$ac_t""yes" 1>&6
3746 HAVE_LIBDB=
3747else
3748 echo "$ac_t""no" 1>&6
Martin v. Löwis05a65d62000-09-24 19:40:25 +00003749HAVE_LIBDB=-ldb
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003750fi
3751
3752fi
3753
Barry Warsawef82cd72000-06-30 16:21:01 +00003754# Check for --with-wctype-functions
3755echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003756echo "configure:3757: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003757# Check whether --with-wctype-functions or --without-wctype-functions was given.
3758if test "${with_wctype_functions+set}" = set; then
3759 withval="$with_wctype_functions"
3760
3761if test "$withval" != no
3762then cat >> confdefs.h <<\EOF
3763#define WANT_WCTYPE_FUNCTIONS 1
3764EOF
3765 echo "$ac_t""yes" 1>&6
3766else echo "$ac_t""no" 1>&6
3767fi
3768else
3769 echo "$ac_t""no" 1>&6
3770fi
3771
3772
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003773# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00003774
3775DLINCLDIR=/
3776
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003777echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003778echo "configure:3779: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003779# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003780if test "${with_sgi_dl+set}" = set; then
3781 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003782
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003783echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003784cat >> confdefs.h <<\EOF
3785#define WITH_SGI_DL 1
3786EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003787
Guido van Rossume97ee181999-12-20 21:27:22 +00003788DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003789dldir=$withval
3790if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003791then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003792else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003793fi
3794DLINCLDIR=${dldir}
3795LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003796else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003797 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003798fi
3799
3800
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003801echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003802echo "configure:3803: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003803# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003804if test "${with_dl_dld+set}" = set; then
3805 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003806
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003807echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003808cat >> confdefs.h <<\EOF
3809#define WITH_DL_DLD 1
3810EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003811
Guido van Rossume97ee181999-12-20 21:27:22 +00003812DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003813dldir=`echo "$withval" | sed 's/,.*//'`
3814dlddir=`echo "$withval" | sed 's/.*,//'`
3815if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003816then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003817else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003818fi
3819DLINCLDIR=${dldir}
3820LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003821else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003822 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003823fi
3824
3825
Guido van Rossume97ee181999-12-20 21:27:22 +00003826# the dlopen() function means we might want to use dynload_shlib.o. some
3827# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00003828for ac_func in dlopen
3829do
3830echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003831echo "configure:3832: checking for $ac_func" >&5
3832if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003833 echo $ac_n "(cached) $ac_c" 1>&6
3834else
3835 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00003836#line 3837 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00003837#include "confdefs.h"
3838/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00003839 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00003840#include <assert.h>
3841/* Override any gcc2 internal prototype to avoid an error. */
3842/* We use char because int might match the return type of a gcc2
3843 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003844char $ac_func();
Fred Drake02706f52000-09-25 15:08:46 +00003845char (*f)();
Guido van Rossume97ee181999-12-20 21:27:22 +00003846
3847int main() {
3848
3849/* The GNU C library defines this for functions which it implements
3850 to always fail with ENOSYS. Some functions are actually named
3851 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003852#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00003853choke me
3854#else
Fred Drake02706f52000-09-25 15:08:46 +00003855f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +00003856#endif
3857
3858; return 0; }
3859EOF
Fred Drake02706f52000-09-25 15:08:46 +00003860if { (eval echo configure:3861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003861 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003862 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00003863else
3864 echo "configure: failed program was:" >&5
3865 cat conftest.$ac_ext >&5
3866 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003867 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00003868fi
3869rm -f conftest*
3870fi
3871
Thomas Wouters3a584202000-08-05 23:28:51 +00003872if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003873 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00003874 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3875 cat >> confdefs.h <<EOF
3876#define $ac_tr_func 1
3877EOF
3878
Guido van Rossume97ee181999-12-20 21:27:22 +00003879else
3880 echo "$ac_t""no" 1>&6
3881fi
Thomas Wouters3a584202000-08-05 23:28:51 +00003882done
Guido van Rossume97ee181999-12-20 21:27:22 +00003883
3884
3885# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3886# loading of modules.
3887
3888echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003889echo "configure:3890: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00003890if test -z "$DYNLOADFILE"
3891then
3892 case $ac_sys_system/$ac_sys_release in
3893 AIX*) DYNLOADFILE="dynload_aix.o";;
3894 BeOS*) DYNLOADFILE="dynload_beos.o";;
3895 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
3896 next/*) DYNLOADFILE="dynload_next.o";;
3897 *)
3898 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
3899 # out any dynamic loading
3900 if test "$ac_cv_func_dlopen" = yes
3901 then DYNLOADFILE="dynload_shlib.o"
3902 else DYNLOADFILE="dynload_stub.o"
3903 fi
3904 ;;
3905 esac
3906fi
3907echo "$ac_t""$DYNLOADFILE" 1>&6
3908if test "$DYNLOADFILE" != "dynload_stub.o"
3909then
3910 cat >> confdefs.h <<\EOF
3911#define HAVE_DYNAMIC_LOADING 1
3912EOF
3913
3914fi
3915
Guido van Rossum627b2d71993-12-24 10:39:16 +00003916# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00003917for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00003918 flock fork fsync fdatasync fpathconf ftime ftruncate \
Thomas Wouters3a584202000-08-05 23:28:51 +00003919 getgroups getlogin getpeername getpid getpwent getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00003920 kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00003921 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00003922 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003923 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00003924 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00003925 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00003926 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters70c21a12000-07-14 14:28:33 +00003927 truncate uname waitpid _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003928do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003929echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003930echo "configure:3931: checking for $ac_func" >&5
3931if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003932 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003933else
3934 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00003935#line 3936 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003936#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003937/* System header to define __stub macros and hopefully few prototypes,
3938 which can conflict with char $ac_func(); below. */
3939#include <assert.h>
3940/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003941/* We use char because int might match the return type of a gcc2
3942 builtin and then its argument prototype would still apply. */
3943char $ac_func();
Fred Drake02706f52000-09-25 15:08:46 +00003944char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003945
Guido van Rossumf78abae1997-01-21 22:02:36 +00003946int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003947
Guido van Rossum627b2d71993-12-24 10:39:16 +00003948/* The GNU C library defines this for functions which it implements
3949 to always fail with ENOSYS. Some functions are actually named
3950 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003951#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003952choke me
3953#else
Fred Drake02706f52000-09-25 15:08:46 +00003954f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003955#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003956
Guido van Rossum7f43da71994-08-01 12:15:30 +00003957; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003958EOF
Fred Drake02706f52000-09-25 15:08:46 +00003959if { (eval echo configure:3960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003960 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003961 eval "ac_cv_func_$ac_func=yes"
3962else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003963 echo "configure: failed program was:" >&5
3964 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003965 rm -rf conftest*
3966 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003967fi
3968rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003969fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003970
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003971if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003972 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003973 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003974 cat >> confdefs.h <<EOF
3975#define $ac_tr_func 1
3976EOF
3977
3978else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003979 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003980fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003981done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003982
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003983
Fred Drake8cef4cf2000-06-28 16:40:38 +00003984# check for openpty and forkpty
3985
3986for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003987do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003988echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00003989echo "configure:3990: checking for $ac_func" >&5
3990if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003991 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003992else
3993 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00003994#line 3995 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003995#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003996/* System header to define __stub macros and hopefully few prototypes,
3997 which can conflict with char $ac_func(); below. */
3998#include <assert.h>
3999/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004000/* We use char because int might match the return type of a gcc2
4001 builtin and then its argument prototype would still apply. */
4002char $ac_func();
Fred Drake02706f52000-09-25 15:08:46 +00004003char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004004
Guido van Rossumf78abae1997-01-21 22:02:36 +00004005int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004006
Guido van Rossum627b2d71993-12-24 10:39:16 +00004007/* The GNU C library defines this for functions which it implements
4008 to always fail with ENOSYS. Some functions are actually named
4009 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004010#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004011choke me
4012#else
Fred Drake02706f52000-09-25 15:08:46 +00004013f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +00004014#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004015
Guido van Rossum7f43da71994-08-01 12:15:30 +00004016; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004017EOF
Fred Drake02706f52000-09-25 15:08:46 +00004018if { (eval echo configure:4019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004019 rm -rf conftest*
4020 eval "ac_cv_func_$ac_func=yes"
4021else
4022 echo "configure: failed program was:" >&5
4023 cat conftest.$ac_ext >&5
4024 rm -rf conftest*
4025 eval "ac_cv_func_$ac_func=no"
4026fi
4027rm -f conftest*
4028fi
4029
4030if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4031 echo "$ac_t""yes" 1>&6
4032 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4033 cat >> confdefs.h <<EOF
4034#define $ac_tr_func 1
4035EOF
4036
4037else
4038 echo "$ac_t""no" 1>&6
4039echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004040echo "configure:4041: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004041ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Fred Drake02706f52000-09-25 15:08:46 +00004042if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004043 echo $ac_n "(cached) $ac_c" 1>&6
4044else
4045 ac_save_LIBS="$LIBS"
4046LIBS="-lutil $LIBS"
4047cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004048#line 4049 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004049#include "confdefs.h"
4050/* Override any gcc2 internal prototype to avoid an error. */
4051/* We use char because int might match the return type of a gcc2
4052 builtin and then its argument prototype would still apply. */
4053char openpty();
4054
4055int main() {
4056openpty()
4057; return 0; }
4058EOF
Fred Drake02706f52000-09-25 15:08:46 +00004059if { (eval echo configure:4060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004060 rm -rf conftest*
4061 eval "ac_cv_lib_$ac_lib_var=yes"
4062else
4063 echo "configure: failed program was:" >&5
4064 cat conftest.$ac_ext >&5
4065 rm -rf conftest*
4066 eval "ac_cv_lib_$ac_lib_var=no"
4067fi
4068rm -f conftest*
4069LIBS="$ac_save_LIBS"
4070
4071fi
4072if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4073 echo "$ac_t""yes" 1>&6
4074 cat >> confdefs.h <<\EOF
4075#define HAVE_OPENPTY 1
4076EOF
4077 LIBS="$LIBS -lutil"
4078else
4079 echo "$ac_t""no" 1>&6
4080fi
4081
4082fi
4083done
4084
4085for ac_func in forkpty
4086do
4087echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004088echo "configure:4089: checking for $ac_func" >&5
4089if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004090 echo $ac_n "(cached) $ac_c" 1>&6
4091else
4092 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004093#line 4094 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004094#include "confdefs.h"
4095/* System header to define __stub macros and hopefully few prototypes,
4096 which can conflict with char $ac_func(); below. */
4097#include <assert.h>
4098/* Override any gcc2 internal prototype to avoid an error. */
4099/* We use char because int might match the return type of a gcc2
4100 builtin and then its argument prototype would still apply. */
4101char $ac_func();
Fred Drake02706f52000-09-25 15:08:46 +00004102char (*f)();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004103
4104int main() {
4105
4106/* The GNU C library defines this for functions which it implements
4107 to always fail with ENOSYS. Some functions are actually named
4108 something starting with __ and the normal name is an alias. */
4109#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4110choke me
4111#else
Fred Drake02706f52000-09-25 15:08:46 +00004112f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +00004113#endif
4114
4115; return 0; }
4116EOF
Fred Drake02706f52000-09-25 15:08:46 +00004117if { (eval echo configure:4118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004118 rm -rf conftest*
4119 eval "ac_cv_func_$ac_func=yes"
4120else
4121 echo "configure: failed program was:" >&5
4122 cat conftest.$ac_ext >&5
4123 rm -rf conftest*
4124 eval "ac_cv_func_$ac_func=no"
4125fi
4126rm -f conftest*
4127fi
4128
4129if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4130 echo "$ac_t""yes" 1>&6
4131 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4132 cat >> confdefs.h <<EOF
4133#define $ac_tr_func 1
4134EOF
4135
4136else
4137 echo "$ac_t""no" 1>&6
4138echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004139echo "configure:4140: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004140ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Fred Drake02706f52000-09-25 15:08:46 +00004141if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004142 echo $ac_n "(cached) $ac_c" 1>&6
4143else
4144 ac_save_LIBS="$LIBS"
4145LIBS="-lutil $LIBS"
4146cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004147#line 4148 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004148#include "confdefs.h"
4149/* Override any gcc2 internal prototype to avoid an error. */
4150/* We use char because int might match the return type of a gcc2
4151 builtin and then its argument prototype would still apply. */
4152char forkpty();
4153
4154int main() {
4155forkpty()
4156; return 0; }
4157EOF
Fred Drake02706f52000-09-25 15:08:46 +00004158if { (eval echo configure:4159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004159 rm -rf conftest*
4160 eval "ac_cv_lib_$ac_lib_var=yes"
4161else
4162 echo "configure: failed program was:" >&5
4163 cat conftest.$ac_ext >&5
4164 rm -rf conftest*
4165 eval "ac_cv_lib_$ac_lib_var=no"
4166fi
4167rm -f conftest*
4168LIBS="$ac_save_LIBS"
4169
4170fi
4171if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4172 echo "$ac_t""yes" 1>&6
4173 cat >> confdefs.h <<\EOF
4174#define HAVE_FORKPTY 1
4175EOF
4176 LIBS="$LIBS -lutil"
4177else
4178 echo "$ac_t""no" 1>&6
4179fi
4180
4181fi
4182done
4183
4184
4185# check for long file support functions
4186for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4187do
4188echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004189echo "configure:4190: checking for $ac_func" >&5
4190if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004191 echo $ac_n "(cached) $ac_c" 1>&6
4192else
4193 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004194#line 4195 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004195#include "confdefs.h"
4196/* System header to define __stub macros and hopefully few prototypes,
4197 which can conflict with char $ac_func(); below. */
4198#include <assert.h>
4199/* Override any gcc2 internal prototype to avoid an error. */
4200/* We use char because int might match the return type of a gcc2
4201 builtin and then its argument prototype would still apply. */
4202char $ac_func();
Fred Drake02706f52000-09-25 15:08:46 +00004203char (*f)();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004204
4205int main() {
4206
4207/* The GNU C library defines this for functions which it implements
4208 to always fail with ENOSYS. Some functions are actually named
4209 something starting with __ and the normal name is an alias. */
4210#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4211choke me
4212#else
Fred Drake02706f52000-09-25 15:08:46 +00004213f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +00004214#endif
4215
4216; return 0; }
4217EOF
Fred Drake02706f52000-09-25 15:08:46 +00004218if { (eval echo configure:4219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004219 rm -rf conftest*
4220 eval "ac_cv_func_$ac_func=yes"
4221else
4222 echo "configure: failed program was:" >&5
4223 cat conftest.$ac_ext >&5
4224 rm -rf conftest*
4225 eval "ac_cv_func_$ac_func=no"
4226fi
4227rm -f conftest*
4228fi
4229
4230if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4231 echo "$ac_t""yes" 1>&6
4232 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4233 cat >> confdefs.h <<EOF
4234#define $ac_tr_func 1
4235EOF
4236
4237else
4238 echo "$ac_t""no" 1>&6
4239fi
4240done
4241
4242
4243for ac_func in dup2 getcwd strdup strerror memmove
4244do
4245echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004246echo "configure:4247: checking for $ac_func" >&5
4247if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004248 echo $ac_n "(cached) $ac_c" 1>&6
4249else
4250 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004251#line 4252 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004252#include "confdefs.h"
4253/* System header to define __stub macros and hopefully few prototypes,
4254 which can conflict with char $ac_func(); below. */
4255#include <assert.h>
4256/* Override any gcc2 internal prototype to avoid an error. */
4257/* We use char because int might match the return type of a gcc2
4258 builtin and then its argument prototype would still apply. */
4259char $ac_func();
Fred Drake02706f52000-09-25 15:08:46 +00004260char (*f)();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004261
4262int main() {
4263
4264/* The GNU C library defines this for functions which it implements
4265 to always fail with ENOSYS. Some functions are actually named
4266 something starting with __ and the normal name is an alias. */
4267#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4268choke me
4269#else
Fred Drake02706f52000-09-25 15:08:46 +00004270f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004271#endif
4272
4273; return 0; }
4274EOF
Fred Drake02706f52000-09-25 15:08:46 +00004275if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004276 rm -rf conftest*
4277 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004278else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004279 echo "configure: failed program was:" >&5
4280 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004281 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004282 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004283fi
4284rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004285fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004286
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004287if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004288 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004289 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4290 cat >> confdefs.h <<EOF
4291#define $ac_tr_func 1
4292EOF
4293
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004294else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004295 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004296LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004297fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004298done
4299
Guido van Rossumf78abae1997-01-21 22:02:36 +00004300
Thomas Wouters3a584202000-08-05 23:28:51 +00004301for ac_func in getpgrp
4302do
4303echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004304echo "configure:4305: checking for $ac_func" >&5
4305if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004306 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004307else
4308 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004309#line 4310 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004310#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004311/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004312 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004313#include <assert.h>
4314/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004315/* We use char because int might match the return type of a gcc2
4316 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004317char $ac_func();
Fred Drake02706f52000-09-25 15:08:46 +00004318char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004319
Guido van Rossumf78abae1997-01-21 22:02:36 +00004320int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004321
Guido van Rossum627b2d71993-12-24 10:39:16 +00004322/* The GNU C library defines this for functions which it implements
4323 to always fail with ENOSYS. Some functions are actually named
4324 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004325#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004326choke me
4327#else
Fred Drake02706f52000-09-25 15:08:46 +00004328f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +00004329#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004330
4331; return 0; }
4332EOF
Fred Drake02706f52000-09-25 15:08:46 +00004333if { (eval echo configure:4334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004334 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004335 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004336else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004337 echo "configure: failed program was:" >&5
4338 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004339 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004340 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004341fi
4342rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004343fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004344
Thomas Wouters3a584202000-08-05 23:28:51 +00004345if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004346 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004347 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4348 cat >> confdefs.h <<EOF
4349#define $ac_tr_func 1
4350EOF
4351 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004352#line 4353 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004353#include "confdefs.h"
4354#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004355int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004356getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004357; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004358EOF
Fred Drake02706f52000-09-25 15:08:46 +00004359if { (eval echo configure:4360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004360 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004361 cat >> confdefs.h <<\EOF
4362#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004363EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004364
Guido van Rossumf78abae1997-01-21 22:02:36 +00004365else
4366 echo "configure: failed program was:" >&5
4367 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004368fi
4369rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004370else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004371 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004372fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004373done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004374
Thomas Wouters3a584202000-08-05 23:28:51 +00004375for ac_func in setpgrp
4376do
4377echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004378echo "configure:4379: checking for $ac_func" >&5
4379if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004380 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004381else
4382 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004383#line 4384 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004384#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004385/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004386 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004387#include <assert.h>
4388/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004389/* We use char because int might match the return type of a gcc2
4390 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004391char $ac_func();
Fred Drake02706f52000-09-25 15:08:46 +00004392char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004393
Guido van Rossumf78abae1997-01-21 22:02:36 +00004394int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004395
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004396/* The GNU C library defines this for functions which it implements
4397 to always fail with ENOSYS. Some functions are actually named
4398 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004399#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004400choke me
4401#else
Fred Drake02706f52000-09-25 15:08:46 +00004402f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004403#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004404
4405; return 0; }
4406EOF
Fred Drake02706f52000-09-25 15:08:46 +00004407if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004408 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004409 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004410else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004411 echo "configure: failed program was:" >&5
4412 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004413 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004414 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004415fi
4416rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004417fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004418
Thomas Wouters3a584202000-08-05 23:28:51 +00004419if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004420 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004421 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4422 cat >> confdefs.h <<EOF
4423#define $ac_tr_func 1
4424EOF
4425 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004426#line 4427 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004427#include "confdefs.h"
4428#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004429int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004430setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004431; return 0; }
4432EOF
Fred Drake02706f52000-09-25 15:08:46 +00004433if { (eval echo configure:4434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004434 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004435 cat >> confdefs.h <<\EOF
4436#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004437EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004438
Guido van Rossumf78abae1997-01-21 22:02:36 +00004439else
4440 echo "configure: failed program was:" >&5
4441 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004442fi
4443rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004444else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004445 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004446fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004447done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004448
Thomas Wouters3a584202000-08-05 23:28:51 +00004449for ac_func in gettimeofday
4450do
4451echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004452echo "configure:4453: checking for $ac_func" >&5
4453if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004454 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004455else
4456 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004457#line 4458 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004458#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004459/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004460 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004461#include <assert.h>
4462/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004463/* We use char because int might match the return type of a gcc2
4464 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004465char $ac_func();
Fred Drake02706f52000-09-25 15:08:46 +00004466char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004467
Guido van Rossumf78abae1997-01-21 22:02:36 +00004468int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004469
4470/* The GNU C library defines this for functions which it implements
4471 to always fail with ENOSYS. Some functions are actually named
4472 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004473#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004474choke me
4475#else
Fred Drake02706f52000-09-25 15:08:46 +00004476f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004477#endif
4478
4479; return 0; }
4480EOF
Fred Drake02706f52000-09-25 15:08:46 +00004481if { (eval echo configure:4482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004482 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004483 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004484else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004485 echo "configure: failed program was:" >&5
4486 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004487 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004488 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004489fi
4490rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004491fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004492
Thomas Wouters3a584202000-08-05 23:28:51 +00004493if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004494 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004495 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4496 cat >> confdefs.h <<EOF
4497#define $ac_tr_func 1
4498EOF
4499 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004500#line 4501 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004501#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004502#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004503int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004504gettimeofday((struct timeval*)0,(struct timezone*)0);
4505; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004506EOF
Fred Drake02706f52000-09-25 15:08:46 +00004507if { (eval echo configure:4508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004508 :
4509else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004510 echo "configure: failed program was:" >&5
4511 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004512 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004513 cat >> confdefs.h <<\EOF
4514#define GETTIMEOFDAY_NO_TZ 1
4515EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004516
4517fi
4518rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004519else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004520 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004521fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004522done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004523
4524
4525# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004526echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004527echo "configure:4528: checking whether time.h and sys/time.h may both be included" >&5
4528if eval "test \"\${ac_cv_header_time+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004529 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004530else
4531 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004532#line 4533 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004533#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004534#include <sys/types.h>
4535#include <sys/time.h>
4536#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004537int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004538struct tm *tp;
4539; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004540EOF
Fred Drake02706f52000-09-25 15:08:46 +00004541if { (eval echo configure:4542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004542 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004543 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004544else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004545 echo "configure: failed program was:" >&5
4546 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004547 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004548 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004549fi
4550rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004551fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004552
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004553echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004554if test $ac_cv_header_time = yes; then
4555 cat >> confdefs.h <<\EOF
4556#define TIME_WITH_SYS_TIME 1
4557EOF
4558
4559fi
4560
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004561echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004562echo "configure:4563: checking whether struct tm is in sys/time.h or time.h" >&5
4563if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004564 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004565else
4566 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004567#line 4568 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004568#include "confdefs.h"
4569#include <sys/types.h>
4570#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004571int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004572struct tm *tp; tp->tm_sec;
4573; return 0; }
4574EOF
Fred Drake02706f52000-09-25 15:08:46 +00004575if { (eval echo configure:4576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004576 rm -rf conftest*
4577 ac_cv_struct_tm=time.h
4578else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004579 echo "configure: failed program was:" >&5
4580 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004581 rm -rf conftest*
4582 ac_cv_struct_tm=sys/time.h
4583fi
4584rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004585fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004586
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004587echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004588if test $ac_cv_struct_tm = sys/time.h; then
4589 cat >> confdefs.h <<\EOF
4590#define TM_IN_SYS_TIME 1
4591EOF
4592
4593fi
4594
Fred Drake02706f52000-09-25 15:08:46 +00004595echo $ac_n "checking for member tm_zone in aggregate type struct tm""... $ac_c" 1>&6
4596echo "configure:4597: checking for member tm_zone in aggregate type struct tm" >&5
4597if eval "test \"\${ac_cv_c_struct_member_tm_zone+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004598 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004599else
4600 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004601#line 4602 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004602#include "confdefs.h"
4603#include <sys/types.h>
4604#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004605int main() {
Fred Drake02706f52000-09-25 15:08:46 +00004606struct tm foo; foo.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004607; return 0; }
4608EOF
Fred Drake02706f52000-09-25 15:08:46 +00004609if { (eval echo configure:4610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004610 rm -rf conftest*
Fred Drake02706f52000-09-25 15:08:46 +00004611 ac_cv_c_struct_member_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004612else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004613 echo "configure: failed program was:" >&5
4614 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004615 rm -rf conftest*
Fred Drake02706f52000-09-25 15:08:46 +00004616 ac_cv_c_struct_member_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004617fi
4618rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004619fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004620
Fred Drake02706f52000-09-25 15:08:46 +00004621echo "$ac_t""$ac_cv_c_struct_member_tm_zone" 1>&6
4622tm_zone="$ac_cv_c_struct_member_tm_zone"
4623if test "$ac_cv_c_struct_member_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004624 cat >> confdefs.h <<\EOF
4625#define HAVE_TM_ZONE 1
4626EOF
4627
4628else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004629 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004630echo "configure:4631: checking for tzname" >&5
4631if eval "test \"\${ac_cv_var_tzname+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004632 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004633else
4634 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004635#line 4636 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004636#include "confdefs.h"
4637#include <time.h>
4638#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004639extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004640#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004641int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004642atoi(*tzname);
4643; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004644EOF
Fred Drake02706f52000-09-25 15:08:46 +00004645if { (eval echo configure:4646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004646 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004647 ac_cv_var_tzname=yes
4648else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004649 echo "configure: failed program was:" >&5
4650 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004651 rm -rf conftest*
4652 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004653fi
4654rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004655fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004656
4657echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004658 if test $ac_cv_var_tzname = yes; then
4659 cat >> confdefs.h <<\EOF
4660#define HAVE_TZNAME 1
4661EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004662
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004663 fi
4664fi
4665
4666
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004667echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004668echo "configure:4669: checking for time.h that defines altzone" >&5
4669if eval "test \"\${ac_cv_header_time_altzone+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004670 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004671else
4672 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004673#line 4674 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004674#include "confdefs.h"
4675#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004676int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004677return altzone;
4678; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004679EOF
Fred Drake02706f52000-09-25 15:08:46 +00004680if { (eval echo configure:4681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004681 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004682 ac_cv_header_time_altzone=yes
4683else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004684 echo "configure: failed program was:" >&5
4685 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004686 rm -rf conftest*
4687 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004688fi
4689rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004690fi
4691
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004692echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004693if test $ac_cv_header_time_altzone = yes; then
4694 cat >> confdefs.h <<\EOF
4695#define HAVE_ALTZONE 1
4696EOF
4697
4698fi
4699
Guido van Rossumda88dad1995-01-26 00:46:29 +00004700was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004701echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004702echo "configure:4703: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004703cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004704#line 4705 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004705#include "confdefs.h"
4706
4707#include <sys/types.h>
4708#include <sys/select.h>
4709#include <sys/time.h>
4710
Guido van Rossumf78abae1997-01-21 22:02:36 +00004711int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004712;
4713; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004714EOF
Fred Drake02706f52000-09-25 15:08:46 +00004715if { (eval echo configure:4716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004716 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004717 cat >> confdefs.h <<\EOF
4718#define SYS_SELECT_WITH_SYS_TIME 1
4719EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004720 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004721else
4722 echo "configure: failed program was:" >&5
4723 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004724fi
4725rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004726echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004727
4728# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004729
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004730echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004731echo "configure:4732: checking whether char is unsigned" >&5
4732if eval "test \"\${ac_cv_c_char_unsigned+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004733 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004734else
4735 if test "$GCC" = yes; then
4736 # GCC predefines this symbol on systems where it applies.
4737cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004738#line 4739 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004739#include "confdefs.h"
4740#ifdef __CHAR_UNSIGNED__
4741 yes
4742#endif
4743
4744EOF
4745if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4746 egrep "yes" >/dev/null 2>&1; then
4747 rm -rf conftest*
4748 ac_cv_c_char_unsigned=yes
4749else
4750 rm -rf conftest*
4751 ac_cv_c_char_unsigned=no
4752fi
4753rm -f conftest*
4754
4755else
4756if test "$cross_compiling" = yes; then
4757 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4758else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004759 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004760#line 4761 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004761#include "confdefs.h"
4762/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004763#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00004764#define volatile
4765#endif
4766main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00004767 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004768}
4769EOF
Fred Drake02706f52000-09-25 15:08:46 +00004770if { (eval echo configure:4771: \"$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 +00004771then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004772 ac_cv_c_char_unsigned=yes
4773else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004774 echo "configure: failed program was:" >&5
4775 cat conftest.$ac_ext >&5
4776 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004777 ac_cv_c_char_unsigned=no
4778fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004779rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004780fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004781
4782fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004783fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004784
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004785echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004786if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
4787 cat >> confdefs.h <<\EOF
4788#define __CHAR_UNSIGNED__ 1
4789EOF
4790
4791fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004792
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004793echo $ac_n "checking for working const""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004794echo "configure:4795: checking for working const" >&5
4795if eval "test \"\${ac_cv_c_const+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004796 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004797else
4798 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004799#line 4800 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004800#include "confdefs.h"
4801
Guido van Rossumf78abae1997-01-21 22:02:36 +00004802int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004803
4804/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004805typedef int charset[2]; const charset x;
4806/* SunOS 4.1.1 cc rejects this. */
4807char const *const *ccp;
4808char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004809/* NEC SVR4.0.2 mips cc rejects this. */
4810struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004811static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004812/* AIX XL C 1.02.0.0 rejects this.
4813 It does not let you subtract one const X* pointer from another in an arm
4814 of an if-expression whose if-part is not a constant expression */
4815const char *g = "string";
4816ccp = &g + (g ? g-g : 0);
4817/* HPUX 7.0 cc rejects these. */
4818++ccp;
4819p = (char**) ccp;
4820ccp = (char const *const *) p;
4821{ /* SCO 3.2v4 cc rejects this. */
4822 char *t;
4823 char const *s = 0 ? (char *) 0 : (char const *) 0;
4824
4825 *t++ = 0;
4826}
4827{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004828 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004829 const int *foo = &x[0];
4830 ++foo;
4831}
4832{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4833 typedef const int *iptr;
4834 iptr p = 0;
4835 ++p;
4836}
4837{ /* AIX XL C 1.02.0.0 rejects this saying
4838 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4839 struct s { int j; const int *ap[3]; };
4840 struct s *b; b->j = 5;
4841}
4842{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4843 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004844}
4845
4846; return 0; }
4847EOF
Fred Drake02706f52000-09-25 15:08:46 +00004848if { (eval echo configure:4849: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004849 rm -rf conftest*
4850 ac_cv_c_const=yes
4851else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004852 echo "configure: failed program was:" >&5
4853 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004854 rm -rf conftest*
4855 ac_cv_c_const=no
4856fi
4857rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004858fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004859
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004860echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004861if test $ac_cv_c_const = no; then
4862 cat >> confdefs.h <<\EOF
4863#define const
4864EOF
4865
4866fi
4867
Guido van Rossumef2255b2000-03-10 22:30:29 +00004868echo $ac_n "checking for inline""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004869echo "configure:4870: checking for inline" >&5
4870if eval "test \"\${ac_cv_c_inline+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004871 echo $ac_n "(cached) $ac_c" 1>&6
4872else
4873 ac_cv_c_inline=no
4874for ac_kw in inline __inline__ __inline; do
4875 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004876#line 4877 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00004877#include "confdefs.h"
4878
4879int main() {
4880} $ac_kw foo() {
4881; return 0; }
4882EOF
Fred Drake02706f52000-09-25 15:08:46 +00004883if { (eval echo configure:4884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004884 rm -rf conftest*
4885 ac_cv_c_inline=$ac_kw; break
4886else
4887 echo "configure: failed program was:" >&5
4888 cat conftest.$ac_ext >&5
4889fi
4890rm -f conftest*
4891done
4892
4893fi
4894
4895echo "$ac_t""$ac_cv_c_inline" 1>&6
4896case "$ac_cv_c_inline" in
4897 inline | yes) ;;
4898 no) cat >> confdefs.h <<\EOF
4899#define inline
4900EOF
4901 ;;
4902 *) cat >> confdefs.h <<EOF
4903#define inline $ac_cv_c_inline
4904EOF
4905 ;;
4906esac
4907
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004908
Guido van Rossumda88dad1995-01-26 00:46:29 +00004909works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004910echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004911echo "configure:4912: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004912cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004913#line 4914 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004914#include "confdefs.h"
4915
Guido van Rossumf78abae1997-01-21 22:02:36 +00004916int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004917volatile int x; x = 0;
4918; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004919EOF
Fred Drake02706f52000-09-25 15:08:46 +00004920if { (eval echo configure:4921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004921 rm -rf conftest*
4922 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004923else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004924 echo "configure: failed program was:" >&5
4925 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004926 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004927 cat >> confdefs.h <<\EOF
4928#define volatile
4929EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004930
4931fi
4932rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004933echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004934
Guido van Rossumda88dad1995-01-26 00:46:29 +00004935works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004936echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004937echo "configure:4938: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004938cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004939#line 4940 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004940#include "confdefs.h"
4941
Guido van Rossumf78abae1997-01-21 22:02:36 +00004942int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004943signed char c;
4944; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004945EOF
Fred Drake02706f52000-09-25 15:08:46 +00004946if { (eval echo configure:4947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004947 rm -rf conftest*
4948 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004949else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004950 echo "configure: failed program was:" >&5
4951 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004952 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004953 cat >> confdefs.h <<\EOF
4954#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00004955EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004956
4957fi
4958rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004959echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004960
Guido van Rossumda88dad1995-01-26 00:46:29 +00004961have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004962echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004963echo "configure:4964: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004964cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004965#line 4966 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004966#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004967int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00004968int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004969return foo(10);
4970; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004971EOF
Fred Drake02706f52000-09-25 15:08:46 +00004972if { (eval echo configure:4973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004973 rm -rf conftest*
4974 cat >> confdefs.h <<\EOF
4975#define HAVE_PROTOTYPES 1
4976EOF
4977 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004978else
4979 echo "configure: failed program was:" >&5
4980 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004981fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004982rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004983echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004984
Guido van Rossumda88dad1995-01-26 00:46:29 +00004985works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004986echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00004987echo "configure:4988: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004988cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00004989#line 4990 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004990#include "confdefs.h"
4991
4992#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00004993int foo(int x, ...) {
4994 va_list va;
4995 va_start(va, x);
4996 va_arg(va, int);
4997 va_arg(va, char *);
4998 va_arg(va, double);
4999 return 0;
5000}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005001
Guido van Rossumf78abae1997-01-21 22:02:36 +00005002int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005003return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005004; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005005EOF
Fred Drake02706f52000-09-25 15:08:46 +00005006if { (eval echo configure:5007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005007 rm -rf conftest*
5008 cat >> confdefs.h <<\EOF
5009#define HAVE_STDARG_PROTOTYPES 1
5010EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005011 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005012else
5013 echo "configure: failed program was:" >&5
5014 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005015fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005016rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005017echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005018
Guido van Rossumda88dad1995-01-26 00:46:29 +00005019if test "$have_prototypes" = yes; then
5020bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005021echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005022echo "configure:5023: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005023cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005024#line 5025 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005025#include "confdefs.h"
5026#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005027int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005028char **t;execve("@",t,t);
5029; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005030EOF
Fred Drake02706f52000-09-25 15:08:46 +00005031if { (eval echo configure:5032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005032 :
5033else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005034 echo "configure: failed program was:" >&5
5035 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005036 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005037 cat >> confdefs.h <<\EOF
5038#define BAD_EXEC_PROTOTYPES 1
5039EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005040 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005041fi
5042rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005043echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005044fi
5045
Guido van Rossumda88dad1995-01-26 00:46:29 +00005046bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005047echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005048echo "configure:5049: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005049if test "$cross_compiling" = yes; then
5050 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5051else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005052 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005053#line 5054 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005054#include "confdefs.h"
5055
5056struct s { int a; int b; };
5057static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005058int foobar() {
5059 static int random;
5060 random = (int) &foo;
5061 return random;
5062}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005063static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005064main() {
5065 exit(!((int)&foo == foobar()));
5066}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005067
5068EOF
Fred Drake02706f52000-09-25 15:08:46 +00005069if { (eval echo configure:5070: \"$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 +00005070then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005071 :
5072else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005073 echo "configure: failed program was:" >&5
5074 cat conftest.$ac_ext >&5
5075 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005076 cat >> confdefs.h <<\EOF
5077#define BAD_STATIC_FORWARD 1
5078EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005079 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005080fi
5081rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005082fi
5083
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005084echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005085
Guido van Rossumda88dad1995-01-26 00:46:29 +00005086va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005087echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005088echo "configure:5089: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005089cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005090#line 5091 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005091#include "confdefs.h"
5092
5093#ifdef HAVE_STDARG_PROTOTYPES
5094#include <stdarg.h>
5095#else
5096#include <varargs.h>
5097#endif
5098
Guido van Rossumf78abae1997-01-21 22:02:36 +00005099int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005100va_list list1, list2; list1 = list2;
5101; return 0; }
5102EOF
Fred Drake02706f52000-09-25 15:08:46 +00005103if { (eval echo configure:5104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005104 :
5105else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005106 echo "configure: failed program was:" >&5
5107 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005108 rm -rf conftest*
5109 cat >> confdefs.h <<\EOF
5110#define VA_LIST_IS_ARRAY 1
5111EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005112 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005113fi
5114rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005115echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005116
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005117# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5118echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005119echo "configure:5120: checking for gethostbyname_r" >&5
5120if eval "test \"\${ac_cv_func_gethostbyname_r+set}\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005121 echo $ac_n "(cached) $ac_c" 1>&6
5122else
5123 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005124#line 5125 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005125#include "confdefs.h"
5126/* System header to define __stub macros and hopefully few prototypes,
5127 which can conflict with char gethostbyname_r(); below. */
5128#include <assert.h>
5129/* Override any gcc2 internal prototype to avoid an error. */
5130/* We use char because int might match the return type of a gcc2
5131 builtin and then its argument prototype would still apply. */
5132char gethostbyname_r();
Fred Drake02706f52000-09-25 15:08:46 +00005133char (*f)();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005134
5135int main() {
5136
5137/* The GNU C library defines this for functions which it implements
5138 to always fail with ENOSYS. Some functions are actually named
5139 something starting with __ and the normal name is an alias. */
5140#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5141choke me
5142#else
Fred Drake02706f52000-09-25 15:08:46 +00005143f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005144#endif
5145
5146; return 0; }
5147EOF
Fred Drake02706f52000-09-25 15:08:46 +00005148if { (eval echo configure:5149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005149 rm -rf conftest*
5150 eval "ac_cv_func_gethostbyname_r=yes"
5151else
5152 echo "configure: failed program was:" >&5
5153 cat conftest.$ac_ext >&5
5154 rm -rf conftest*
5155 eval "ac_cv_func_gethostbyname_r=no"
5156fi
5157rm -f conftest*
5158fi
5159
5160if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5161 echo "$ac_t""yes" 1>&6
5162
5163 cat >> confdefs.h <<\EOF
5164#define HAVE_GETHOSTBYNAME_R 1
5165EOF
5166
5167 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005168echo "configure:5169: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005169 OLD_CFLAGS=$CFLAGS
5170 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
5171 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005172#line 5173 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005173#include "confdefs.h"
5174
5175# include <netdb.h>
5176
5177int main() {
5178
5179 char *name;
5180 struct hostent *he, *res;
5181 char buffer[2048];
5182 int buflen = 2048;
5183 int h_errnop;
5184
5185 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
5186
5187; return 0; }
5188EOF
Fred Drake02706f52000-09-25 15:08:46 +00005189if { (eval echo configure:5190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005190 rm -rf conftest*
5191
5192 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005193#define HAVE_GETHOSTBYNAME_R 1
5194EOF
5195
5196 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005197#define HAVE_GETHOSTBYNAME_R_6_ARG 1
5198EOF
5199
5200 echo "$ac_t""yes" 1>&6
5201
5202else
5203 echo "configure: failed program was:" >&5
5204 cat conftest.$ac_ext >&5
5205 rm -rf conftest*
5206
5207 echo "$ac_t""no" 1>&6
5208 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005209echo "configure:5210: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005210 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005211#line 5212 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005212#include "confdefs.h"
5213
5214# include <netdb.h>
5215
5216int main() {
5217
5218 char *name;
5219 struct hostent *he;
5220 char buffer[2048];
5221 int buflen = 2048;
5222 int h_errnop;
5223
5224 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
5225
5226; return 0; }
5227EOF
Fred Drake02706f52000-09-25 15:08:46 +00005228if { (eval echo configure:5229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005229 rm -rf conftest*
5230
5231 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005232#define HAVE_GETHOSTBYNAME_R 1
5233EOF
5234
5235 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005236#define HAVE_GETHOSTBYNAME_R_5_ARG 1
5237EOF
5238
5239 echo "$ac_t""yes" 1>&6
5240
5241else
5242 echo "configure: failed program was:" >&5
5243 cat conftest.$ac_ext >&5
5244 rm -rf conftest*
5245
5246 echo "$ac_t""no" 1>&6
5247 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005248echo "configure:5249: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005249 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005250#line 5251 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005251#include "confdefs.h"
5252
5253# include <netdb.h>
5254
5255int main() {
5256
5257 char *name;
5258 struct hostent *he;
5259 struct hostent_data data;
5260
5261 (void) gethostbyname_r(name, he, &data);
5262
5263; return 0; }
5264EOF
Fred Drake02706f52000-09-25 15:08:46 +00005265if { (eval echo configure:5266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005266 rm -rf conftest*
5267
5268 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005269#define HAVE_GETHOSTBYNAME_R 1
5270EOF
5271
5272 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005273#define HAVE_GETHOSTBYNAME_R_3_ARG 1
5274EOF
5275
5276 echo "$ac_t""yes" 1>&6
5277
5278else
5279 echo "configure: failed program was:" >&5
5280 cat conftest.$ac_ext >&5
5281 rm -rf conftest*
5282
5283 echo "$ac_t""no" 1>&6
5284
5285fi
5286rm -f conftest*
5287
5288fi
5289rm -f conftest*
5290
5291fi
5292rm -f conftest*
5293 CFLAGS=$OLD_CFLAGS
5294
5295else
5296 echo "$ac_t""no" 1>&6
5297
Thomas Wouters3a584202000-08-05 23:28:51 +00005298 for ac_func in gethostbyname
5299do
5300echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005301echo "configure:5302: checking for $ac_func" >&5
5302if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005303 echo $ac_n "(cached) $ac_c" 1>&6
5304else
5305 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005306#line 5307 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005307#include "confdefs.h"
5308/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005309 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005310#include <assert.h>
5311/* Override any gcc2 internal prototype to avoid an error. */
5312/* We use char because int might match the return type of a gcc2
5313 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005314char $ac_func();
Fred Drake02706f52000-09-25 15:08:46 +00005315char (*f)();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005316
5317int main() {
5318
5319/* The GNU C library defines this for functions which it implements
5320 to always fail with ENOSYS. Some functions are actually named
5321 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005322#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005323choke me
5324#else
Fred Drake02706f52000-09-25 15:08:46 +00005325f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005326#endif
5327
5328; return 0; }
5329EOF
Fred Drake02706f52000-09-25 15:08:46 +00005330if { (eval echo configure:5331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005331 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005332 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005333else
5334 echo "configure: failed program was:" >&5
5335 cat conftest.$ac_ext >&5
5336 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005337 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005338fi
5339rm -f conftest*
5340fi
5341
Thomas Wouters3a584202000-08-05 23:28:51 +00005342if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005343 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005344 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5345 cat >> confdefs.h <<EOF
5346#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005347EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00005348
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005349else
5350 echo "$ac_t""no" 1>&6
5351fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005352done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005353
5354
5355fi
5356
5357
5358
5359
5360
5361
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005362
Guido van Rossum627b2d71993-12-24 10:39:16 +00005363# checks for system services
5364# (none yet)
5365
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005366# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005367echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005368echo "configure:5369: checking for __fpu_control" >&5
5369if eval "test \"\${ac_cv_func___fpu_control+set}\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005370 echo $ac_n "(cached) $ac_c" 1>&6
5371else
5372 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005373#line 5374 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005374#include "confdefs.h"
5375/* System header to define __stub macros and hopefully few prototypes,
5376 which can conflict with char __fpu_control(); below. */
5377#include <assert.h>
5378/* Override any gcc2 internal prototype to avoid an error. */
5379/* We use char because int might match the return type of a gcc2
5380 builtin and then its argument prototype would still apply. */
5381char __fpu_control();
Fred Drake02706f52000-09-25 15:08:46 +00005382char (*f)();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005383
5384int main() {
5385
5386/* The GNU C library defines this for functions which it implements
5387 to always fail with ENOSYS. Some functions are actually named
5388 something starting with __ and the normal name is an alias. */
5389#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5390choke me
5391#else
Fred Drake02706f52000-09-25 15:08:46 +00005392f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005393#endif
5394
5395; return 0; }
5396EOF
Fred Drake02706f52000-09-25 15:08:46 +00005397if { (eval echo configure:5398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005398 rm -rf conftest*
5399 eval "ac_cv_func___fpu_control=yes"
5400else
5401 echo "configure: failed program was:" >&5
5402 cat conftest.$ac_ext >&5
5403 rm -rf conftest*
5404 eval "ac_cv_func___fpu_control=no"
5405fi
5406rm -f conftest*
5407fi
5408
5409if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5410 echo "$ac_t""yes" 1>&6
5411 :
5412else
5413 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005414echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005415echo "configure:5416: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005416ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Fred Drake02706f52000-09-25 15:08:46 +00005417if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005418 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005419else
5420 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005421LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005422cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005423#line 5424 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005424#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005425/* Override any gcc2 internal prototype to avoid an error. */
5426/* We use char because int might match the return type of a gcc2
5427 builtin and then its argument prototype would still apply. */
5428char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005429
Guido van Rossumf78abae1997-01-21 22:02:36 +00005430int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005431__fpu_control()
5432; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005433EOF
Fred Drake02706f52000-09-25 15:08:46 +00005434if { (eval echo configure:5435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005435 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005436 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005437else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005438 echo "configure: failed program was:" >&5
5439 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005440 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005441 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005442fi
5443rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005444LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005445
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005446fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005447if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005448 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005449 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5450 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005451 cat >> confdefs.h <<EOF
5452#define $ac_tr_lib 1
5453EOF
5454
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005455 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005456
5457else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005458 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005459fi
5460
5461
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005462fi
5463
5464
Guido van Rossum7f253911997-05-09 02:42:48 +00005465# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005466echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005467echo "configure:5468: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005468# Check whether --with-fpectl or --without-fpectl was given.
5469if test "${with_fpectl+set}" = set; then
5470 withval="$with_fpectl"
5471
5472if test "$withval" != no
5473then cat >> confdefs.h <<\EOF
5474#define WANT_SIGFPE_HANDLER 1
5475EOF
5476 echo "$ac_t""yes" 1>&6
5477else echo "$ac_t""no" 1>&6
5478fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005479else
5480 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005481fi
5482
5483
Guido van Rossum7f43da71994-08-01 12:15:30 +00005484# check for --with-libm=...
5485
Guido van Rossum563e7081996-09-10 18:20:48 +00005486case $ac_sys_system in
5487next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005488BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005489*) LIBM=-lm
5490esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005491echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005492echo "configure:5493: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005493# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005494if test "${with_libm+set}" = set; then
5495 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005496
Guido van Rossum7f253911997-05-09 02:42:48 +00005497if test "$withval" = no
5498then LIBM=
5499 echo "$ac_t""force LIBM empty" 1>&6
5500elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005501then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005502 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005503else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005504fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005505else
5506 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005507fi
5508
5509
5510# check for --with-libc=...
5511
Guido van Rossum7f253911997-05-09 02:42:48 +00005512echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005513echo "configure:5514: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005514# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005515if test "${with_libc+set}" = set; then
5516 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005517
Guido van Rossum7f253911997-05-09 02:42:48 +00005518if test "$withval" = no
5519then LIBC=
5520 echo "$ac_t""force LIBC empty" 1>&6
5521elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005522then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005523 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005524else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005525fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005526else
5527 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005528fi
5529
5530
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005531# check for hypot() in math library
5532LIBS_SAVE=$LIBS
5533LIBS="$LIBS $LIBM"
5534for ac_func in hypot
5535do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005536echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005537echo "configure:5538: checking for $ac_func" >&5
5538if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005539 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005540else
5541 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005542#line 5543 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005543#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005544/* System header to define __stub macros and hopefully few prototypes,
5545 which can conflict with char $ac_func(); below. */
5546#include <assert.h>
5547/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005548/* We use char because int might match the return type of a gcc2
5549 builtin and then its argument prototype would still apply. */
5550char $ac_func();
Fred Drake02706f52000-09-25 15:08:46 +00005551char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005552
Guido van Rossumf78abae1997-01-21 22:02:36 +00005553int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005554
5555/* The GNU C library defines this for functions which it implements
5556 to always fail with ENOSYS. Some functions are actually named
5557 something starting with __ and the normal name is an alias. */
5558#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5559choke me
5560#else
Fred Drake02706f52000-09-25 15:08:46 +00005561f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005562#endif
5563
5564; return 0; }
5565EOF
Fred Drake02706f52000-09-25 15:08:46 +00005566if { (eval echo configure:5567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005567 rm -rf conftest*
5568 eval "ac_cv_func_$ac_func=yes"
5569else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005570 echo "configure: failed program was:" >&5
5571 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005572 rm -rf conftest*
5573 eval "ac_cv_func_$ac_func=no"
5574fi
5575rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005576fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005577
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005578if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5579 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005580 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5581 cat >> confdefs.h <<EOF
5582#define $ac_tr_func 1
5583EOF
5584
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005585else
5586 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005587LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005588fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005589done
5590
Guido van Rossumf78abae1997-01-21 22:02:36 +00005591
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005592LIBS=$LIBS_SAVE
5593
Guido van Rossumda88dad1995-01-26 00:46:29 +00005594# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005595echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005596echo "configure:5597: checking for genuine getopt" >&5
5597if eval "test \"\${ac_cv_func_getopt+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005598 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005599else
5600 if test "$cross_compiling" = yes; then
5601 ac_cv_func_getopt=no
5602else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005603 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005604#line 5605 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00005605#include "confdefs.h"
5606#include <stdio.h>
5607extern int optind, opterr, getopt();
5608extern char* optarg;
5609int main() {
5610 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
5611 opterr = 0;
5612 if (getopt(3, av, "f:") == 'f') { exit(1); }
5613 exit(0);
5614}
5615EOF
Fred Drake02706f52000-09-25 15:08:46 +00005616if { (eval echo configure:5617: \"$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 +00005617then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005618 ac_cv_func_getopt=yes
5619else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005620 echo "configure: failed program was:" >&5
5621 cat conftest.$ac_ext >&5
5622 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00005623 ac_cv_func_getopt=no
5624fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00005625rm -fr conftest*
5626fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005627
5628fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005629echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005630test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
5631
Guido van Rossumad713701997-07-10 22:42:38 +00005632# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005633echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005634echo "configure:5635: checking what malloc(0) returns" >&5
5635if eval "test \"\${ac_cv_malloc_zero+set}\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005636 echo $ac_n "(cached) $ac_c" 1>&6
5637else
5638 if test "$cross_compiling" = yes; then
5639 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5640else
5641 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005642#line 5643 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005643#include "confdefs.h"
5644#include <stdio.h>
5645#ifdef HAVE_STDLIB
5646#include <stdlib.h>
5647#else
5648char *malloc(), *realloc();
5649int *free();
5650#endif
5651main() {
5652 char *p;
5653 p = malloc(0);
5654 if (p == NULL) exit(1);
5655 p = realloc(p, 0);
5656 if (p == NULL) exit(1);
5657 free(p);
5658 exit(0);
5659}
5660EOF
Fred Drake02706f52000-09-25 15:08:46 +00005661if { (eval echo configure:5662: \"$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 +00005662then
5663 ac_cv_malloc_zero=nonnull
5664else
5665 echo "configure: failed program was:" >&5
5666 cat conftest.$ac_ext >&5
5667 rm -fr conftest*
5668 ac_cv_malloc_zero=null
5669fi
5670rm -fr conftest*
5671fi
5672
5673fi
5674
5675echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5676if test "$ac_cv_malloc_zero" = null
5677then
5678 cat >> confdefs.h <<\EOF
5679#define MALLOC_ZERO_RETURNS_NULL 1
5680EOF
5681
5682fi
5683
Guido van Rossumef2255b2000-03-10 22:30:29 +00005684# check for wchar.h
5685ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5686echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005687echo "configure:5688: checking for wchar.h" >&5
5688if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005689 echo $ac_n "(cached) $ac_c" 1>&6
5690else
5691 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005692#line 5693 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005693#include "confdefs.h"
5694#include <wchar.h>
5695EOF
5696ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake02706f52000-09-25 15:08:46 +00005697{ (eval echo configure:5698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005698ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5699if test -z "$ac_err"; then
5700 rm -rf conftest*
5701 eval "ac_cv_header_$ac_safe=yes"
5702else
5703 echo "$ac_err" >&5
5704 echo "configure: failed program was:" >&5
5705 cat conftest.$ac_ext >&5
5706 rm -rf conftest*
5707 eval "ac_cv_header_$ac_safe=no"
5708fi
5709rm -f conftest*
5710fi
5711if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5712 echo "$ac_t""yes" 1>&6
5713 cat >> confdefs.h <<\EOF
5714#define HAVE_WCHAR_H 1
5715EOF
5716 wchar_h="yes"
5717else
5718 echo "$ac_t""no" 1>&6
5719wchar_h="no"
5720
5721fi
5722
5723
5724# check for usable wchar_t
5725usable_wchar_t="unkown"
5726echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005727echo "configure:5728: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005728if test "$cross_compiling" = yes; then
5729 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5730else
5731 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005732#line 5733 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005733#include "confdefs.h"
5734
5735#include "wchar.h"
5736#include "wctype.h"
5737main() {
5738 wchar_t s;
5739 if (sizeof(s) == 2)
5740 exit(0);
5741 else
5742 exit(1);
5743}
5744
5745EOF
Fred Drake02706f52000-09-25 15:08:46 +00005746if { (eval echo configure:5747: \"$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 +00005747then
5748 cat >> confdefs.h <<\EOF
5749#define HAVE_USABLE_WCHAR_T 1
5750EOF
5751 usable_wchar_t="yes"
5752else
5753 echo "configure: failed program was:" >&5
5754 cat conftest.$ac_ext >&5
5755 rm -fr conftest*
5756 usable_wchar_t="no"
5757fi
5758rm -fr conftest*
5759fi
5760
5761echo "$ac_t""$usable_wchar_t" 1>&6
5762
5763# check for endianness
5764echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005765echo "configure:5766: checking whether byte ordering is bigendian" >&5
5766if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005767 echo $ac_n "(cached) $ac_c" 1>&6
5768else
5769 ac_cv_c_bigendian=unknown
5770# See if sys/param.h defines the BYTE_ORDER macro.
5771cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005772#line 5773 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005773#include "confdefs.h"
5774#include <sys/types.h>
5775#include <sys/param.h>
5776int main() {
5777
5778#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5779 bogus endian macros
5780#endif
5781; return 0; }
5782EOF
Fred Drake02706f52000-09-25 15:08:46 +00005783if { (eval echo configure:5784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005784 rm -rf conftest*
5785 # It does; now see whether it defined to BIG_ENDIAN or not.
5786cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005787#line 5788 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005788#include "confdefs.h"
5789#include <sys/types.h>
5790#include <sys/param.h>
5791int main() {
5792
5793#if BYTE_ORDER != BIG_ENDIAN
5794 not big endian
5795#endif
5796; return 0; }
5797EOF
Fred Drake02706f52000-09-25 15:08:46 +00005798if { (eval echo configure:5799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005799 rm -rf conftest*
5800 ac_cv_c_bigendian=yes
5801else
5802 echo "configure: failed program was:" >&5
5803 cat conftest.$ac_ext >&5
5804 rm -rf conftest*
5805 ac_cv_c_bigendian=no
5806fi
5807rm -f conftest*
5808else
5809 echo "configure: failed program was:" >&5
5810 cat conftest.$ac_ext >&5
5811fi
5812rm -f conftest*
5813if test $ac_cv_c_bigendian = unknown; then
5814if test "$cross_compiling" = yes; then
5815 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5816else
5817 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005818#line 5819 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005819#include "confdefs.h"
5820main () {
5821 /* Are we little or big endian? From Harbison&Steele. */
5822 union
5823 {
5824 long l;
5825 char c[sizeof (long)];
5826 } u;
5827 u.l = 1;
5828 exit (u.c[sizeof (long) - 1] == 1);
5829}
5830EOF
Fred Drake02706f52000-09-25 15:08:46 +00005831if { (eval echo configure:5832: \"$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 +00005832then
5833 ac_cv_c_bigendian=no
5834else
5835 echo "configure: failed program was:" >&5
5836 cat conftest.$ac_ext >&5
5837 rm -fr conftest*
5838 ac_cv_c_bigendian=yes
5839fi
5840rm -fr conftest*
5841fi
5842
5843fi
5844fi
5845
5846echo "$ac_t""$ac_cv_c_bigendian" 1>&6
5847if test $ac_cv_c_bigendian = yes; then
5848 cat >> confdefs.h <<\EOF
5849#define WORDS_BIGENDIAN 1
5850EOF
5851
5852fi
5853
5854
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005855# Check whether right shifting a negative integer extends the sign bit
5856# or fills with zeros (like the Cray J90, according to Tim Peters).
5857echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005858echo "configure:5859: checking whether right shift extends the sign bit" >&5
5859if eval "test \"\${ac_cv_rshift_extends_sign+set}\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00005860 echo $ac_n "(cached) $ac_c" 1>&6
5861else
5862
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005863if test "$cross_compiling" = yes; then
5864 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5865else
5866 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005867#line 5868 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005868#include "confdefs.h"
5869
5870int main()
5871{
Vladimir Marangozova6180282000-07-12 05:05:06 +00005872 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005873}
5874
5875EOF
Fred Drake02706f52000-09-25 15:08:46 +00005876if { (eval echo configure:5877: \"$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 +00005877then
5878 ac_cv_rshift_extends_sign=yes
5879else
5880 echo "configure: failed program was:" >&5
5881 cat conftest.$ac_ext >&5
5882 rm -fr conftest*
5883 ac_cv_rshift_extends_sign=no
5884fi
5885rm -fr conftest*
5886fi
5887
5888fi
5889
5890echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
5891if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005892then
5893 cat >> confdefs.h <<\EOF
5894#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
5895EOF
5896
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005897fi
5898
5899
Guido van Rossum95713eb2000-05-18 20:53:31 +00005900# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
5901# Add sys/socket.h to confdefs.h
5902cat >> confdefs.h <<\EOF
5903#ifdef HAVE_SYS_SOCKET_H
5904#include <sys/socket.h>
5905#endif
5906EOF
5907echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Fred Drake02706f52000-09-25 15:08:46 +00005908echo "configure:5909: checking for socklen_t" >&5
5909if eval "test \"\${ac_cv_type_socklen_t+set}\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00005910 echo $ac_n "(cached) $ac_c" 1>&6
5911else
5912 cat > conftest.$ac_ext <<EOF
Fred Drake02706f52000-09-25 15:08:46 +00005913#line 5914 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005914#include "confdefs.h"
5915#include <sys/types.h>
5916#if STDC_HEADERS
5917#include <stdlib.h>
5918#include <stddef.h>
5919#endif
5920EOF
5921if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5922 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5923 rm -rf conftest*
Fred Drake02706f52000-09-25 15:08:46 +00005924 eval "ac_cv_type_socklen_t=yes"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005925else
5926 rm -rf conftest*
Fred Drake02706f52000-09-25 15:08:46 +00005927 eval "ac_cv_type_socklen_t=no"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005928fi
5929rm -f conftest*
5930
5931fi
Fred Drake02706f52000-09-25 15:08:46 +00005932if eval "test \"`echo '$ac_cv_type_'socklen_t`\" = yes"; then
5933 echo "$ac_t""yes" 1>&6
5934else
5935 echo "$ac_t""no" 1>&6
5936 cat >> confdefs.h <<EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00005937#define socklen_t int
5938EOF
5939
5940fi
5941
5942
Guido van Rossum627b2d71993-12-24 10:39:16 +00005943# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005944trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005945cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005946# This file is a shell script that caches the results of configure
5947# tests run on this system so they can be shared between configure
5948# scripts and configure runs. It is not useful on other systems.
5949# If it contains results you don't want to keep, you may remove or edit it.
5950#
5951# By default, configure uses ./config.cache as the cache file,
5952# creating it if it does not exist already. You can give configure
5953# the --cache-file=FILE option to use a different cache file; that is
5954# what configure does when it calls configure scripts in
5955# subdirectories, so they share the cache.
5956# Giving --cache-file=/dev/null disables caching, for debugging configure.
5957# config.status only pays attention to the cache file if you give it the
5958# --recheck option to rerun configure.
5959#
5960EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005961# The following way of writing the cache mishandles newlines in values,
5962# but we know of no workaround that is simple, portable, and efficient.
5963# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005964# Ultrix sh set writes to stderr and can't be redirected directly,
5965# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005966(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005967 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005968 *ac_space=\ *)
5969 # `set' does not quote correctly, so add quotes (double-quote substitution
5970 # turns \\\\ into \\, and sed turns \\ into \).
5971 sed -n \
5972 -e "s/'/'\\\\''/g" \
5973 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5974 ;;
5975 *)
5976 # `set' quotes correctly as required by POSIX, so do not add quotes.
5977 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5978 ;;
5979 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005980if cmp -s $cache_file confcache; then
5981 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005982else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005983 if test -w $cache_file; then
5984 echo "updating cache $cache_file"
5985 cat confcache > $cache_file
5986 else
5987 echo "not updating unwritable cache $cache_file"
5988 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005989fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005990rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00005991
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005992trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005993
5994test "x$prefix" = xNONE && prefix=$ac_default_prefix
5995# Let make expand exec_prefix.
5996test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00005997
Guido van Rossum7f43da71994-08-01 12:15:30 +00005998# Any assignment to VPATH causes Sun make to only execute
5999# the first set of double-colon rules, so remove it if not needed.
6000# If there is a colon in the path, we need to keep it.
6001if test "x$srcdir" = x.; then
6002 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6003fi
6004
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006005trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00006006
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006007DEFS=-DHAVE_CONFIG_H
6008
6009# Without the "./", some shells look in PATH for config.status.
6010: ${CONFIG_STATUS=./config.status}
6011
6012echo creating $CONFIG_STATUS
6013rm -f $CONFIG_STATUS
6014cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006015#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00006016# Generated automatically by configure.
6017# Run this file to recreate the current configuration.
6018# This directory was configured as follows,
6019# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6020#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006021# $0 $ac_configure_args
6022#
6023# Compiler output produced by configure, useful for debugging
6024# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00006025
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006026ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006027for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00006028do
Guido van Rossum7f43da71994-08-01 12:15:30 +00006029 case "\$ac_option" in
6030 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006031 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6032 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00006033 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Fred Drake02706f52000-09-25 15:08:46 +00006034 echo "$CONFIG_STATUS generated by autoconf version 2.14.1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006035 exit 0 ;;
6036 -help | --help | --hel | --he | --h)
6037 echo "\$ac_cs_usage"; exit 0 ;;
6038 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006039 esac
6040done
6041
Guido van Rossum7f43da71994-08-01 12:15:30 +00006042ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00006043
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006044trap 'rm -fr `echo "Makefile \
6045 Objects/Makefile \
6046 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006047 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006048 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006049 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006050 Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006051EOF
6052cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006053
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006054# Protect against being on the right side of a sed subst in config.status.
6055sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6056 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006057$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00006058$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006059s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006060s%@CFLAGS@%$CFLAGS%g
6061s%@CPPFLAGS@%$CPPFLAGS%g
6062s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006063s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006064s%@DEFS@%$DEFS%g
6065s%@LDFLAGS@%$LDFLAGS%g
6066s%@LIBS@%$LIBS%g
6067s%@exec_prefix@%$exec_prefix%g
6068s%@prefix@%$prefix%g
6069s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006070s%@bindir@%$bindir%g
6071s%@sbindir@%$sbindir%g
6072s%@libexecdir@%$libexecdir%g
6073s%@datadir@%$datadir%g
6074s%@sysconfdir@%$sysconfdir%g
6075s%@sharedstatedir@%$sharedstatedir%g
6076s%@localstatedir@%$localstatedir%g
6077s%@libdir@%$libdir%g
6078s%@includedir@%$includedir%g
6079s%@oldincludedir@%$oldincludedir%g
6080s%@infodir@%$infodir%g
6081s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00006082s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006083s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00006084s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00006085s%@SET_CXX@%$SET_CXX%g
6086s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006087s%@CC@%$CC%g
Guido van Rossumff555e32000-09-22 15:38:21 +00006088s%@EXE@%$EXE%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006089s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
6090s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00006091s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006092s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006093s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006094s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006095s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6096s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006097s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006098s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006099s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006100s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006101s%@SO@%$SO%g
6102s%@LDSHARED@%$LDSHARED%g
6103s%@CCSHARED@%$CCSHARED%g
6104s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00006105s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00006106s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00006107s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Fred Drakea50d6ec2000-08-31 16:13:20 +00006108s%@USE_BSDDB_MODULE@%$USE_BSDDB_MODULE%g
Skip Montanaroed33c9a2000-09-08 02:17:15 +00006109s%@HAVE_LIBDB@%$HAVE_LIBDB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006110s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00006111s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006112s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006113s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
6114s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
6115s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006116s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006117s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006118s%@LIBM@%$LIBM%g
6119s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006120
6121CEOF
6122EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006123
6124cat >> $CONFIG_STATUS <<\EOF
6125
6126# Split the substitutions into bite-sized pieces for seds with
6127# small command number limits, like on Digital OSF/1 and HP-UX.
6128ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6129ac_file=1 # Number of current file.
6130ac_beg=1 # First line for current file.
6131ac_end=$ac_max_sed_cmds # Line after last line for current file.
6132ac_more_lines=:
6133ac_sed_cmds=""
6134while $ac_more_lines; do
6135 if test $ac_beg -gt 1; then
6136 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6137 else
6138 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6139 fi
6140 if test ! -s conftest.s$ac_file; then
6141 ac_more_lines=false
6142 rm -f conftest.s$ac_file
6143 else
6144 if test -z "$ac_sed_cmds"; then
6145 ac_sed_cmds="sed -f conftest.s$ac_file"
6146 else
6147 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6148 fi
6149 ac_file=`expr $ac_file + 1`
6150 ac_beg=$ac_end
6151 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6152 fi
6153done
6154if test -z "$ac_sed_cmds"; then
6155 ac_sed_cmds=cat
6156fi
6157EOF
6158
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006159cat >> $CONFIG_STATUS <<EOF
6160
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006161CONFIG_FILES=\${CONFIG_FILES-"Makefile \
6162 Objects/Makefile \
6163 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006164 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006165 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006166 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006167 Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006168EOF
6169cat >> $CONFIG_STATUS <<\EOF
6170for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006171 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006172 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006173 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006174 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6175 *) ac_file_in="${ac_file}.in" ;;
6176 esac
6177
Guido van Rossumf78abae1997-01-21 22:02:36 +00006178 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006179
6180 # Remove last slash and all that follows it. Not all systems have dirname.
6181 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6182 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6183 # The file is in a subdirectory.
6184 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006185 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006186 # A "../" for each directory in $ac_dir_suffix.
6187 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6188 else
6189 ac_dir_suffix= ac_dots=
6190 fi
6191
6192 case "$ac_given_srcdir" in
6193 .) srcdir=.
6194 if test -z "$ac_dots"; then top_srcdir=.
6195 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6196 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6197 *) # Relative path.
6198 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6199 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6200 esac
6201
Guido van Rossumf78abae1997-01-21 22:02:36 +00006202
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006203 echo creating "$ac_file"
6204 rm -f "$ac_file"
6205 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6206 case "$ac_file" in
6207 *Makefile*) ac_comsub="1i\\
6208# $configure_input" ;;
6209 *) ac_comsub= ;;
6210 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006211
6212 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 +00006213 sed -e "$ac_comsub
6214s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006215s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006216s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00006217" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00006218fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00006219rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006220
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006221# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6222# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00006223#
6224# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006225ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6226ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006227ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006228ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006229# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006230ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6231ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006232ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006233ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006234# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006235ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6236ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006237ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006238ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006239
Guido van Rossumf78abae1997-01-21 22:02:36 +00006240if test "${CONFIG_HEADERS+set}" != set; then
6241EOF
6242cat >> $CONFIG_STATUS <<EOF
6243 CONFIG_HEADERS="config.h"
6244EOF
6245cat >> $CONFIG_STATUS <<\EOF
6246fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006247for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006248 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006249 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006250 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006251 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6252 *) ac_file_in="${ac_file}.in" ;;
6253 esac
6254
Guido van Rossum7f43da71994-08-01 12:15:30 +00006255 echo creating $ac_file
6256
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006257 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006258 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6259 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006260
6261EOF
6262
6263# Transform confdefs.h into a sed script conftest.vals that substitutes
6264# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006265# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006266# Protect against being in an unquoted here document in config.status.
6267rm -f conftest.vals
6268cat > conftest.hdr <<\EOF
6269s/[\\&%]/\\&/g
6270s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006271s%#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 +00006272s%ac_d%ac_u%gp
6273s%ac_u%ac_e%gp
6274EOF
6275sed -n -f conftest.hdr confdefs.h > conftest.vals
6276rm -f conftest.hdr
6277
6278# This sed command replaces #undef with comments. This is necessary, for
6279# example, in the case of _POSIX_SOURCE, which is predefined and required
6280# on some systems where configure will not decide to define it.
6281cat >> conftest.vals <<\EOF
6282s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6283EOF
6284
6285# Break up conftest.vals because some shells have a limit on
6286# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006287
6288rm -f conftest.tail
6289while :
6290do
6291 ac_lines=`grep -c . conftest.vals`
6292 # grep -c gives empty output for an empty file on some AIX systems.
6293 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6294 # Write a limited-size here document to conftest.frag.
6295 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6296 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6297 echo 'CEOF
6298 sed -f conftest.frag conftest.in > conftest.out
6299 rm -f conftest.in
6300 mv conftest.out conftest.in
6301' >> $CONFIG_STATUS
6302 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6303 rm -f conftest.vals
6304 mv conftest.tail conftest.vals
6305done
6306rm -f conftest.vals
6307
6308cat >> $CONFIG_STATUS <<\EOF
6309 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006310 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006311 cat conftest.in >> conftest.h
6312 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006313 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006314 echo "$ac_file is unchanged"
6315 rm -f conftest.h
6316 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006317 # Remove last slash and all that follows it. Not all systems have dirname.
6318 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6319 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6320 # The file is in a subdirectory.
6321 test ! -d "$ac_dir" && mkdir "$ac_dir"
6322 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006323 rm -f $ac_file
6324 mv conftest.h $ac_file
6325 fi
6326fi; done
6327
Guido van Rossumf78abae1997-01-21 22:02:36 +00006328EOF
6329cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006330
Guido van Rossumf78abae1997-01-21 22:02:36 +00006331EOF
6332cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006333
6334exit 0
6335EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006336chmod +x $CONFIG_STATUS
6337rm -fr confdefs* $ac_clean_files
Fred Drake02706f52000-09-25 15:08:46 +00006338test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006339