blob: eb0d9acadb7cc99034ef76f510a8725903154d29 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Guido van Rossum262cf202000-11-02 19:33:53 +00003# From configure.in Revision: 1.176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004
Guido van Rossum627b2d71993-12-24 10:39:16 +00005# Guess values for system-dependent variables and create Makefiles.
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006# Generated automatically using autoconf version 2.13
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000011
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# Defaults:
13ac_help=
14ac_default_prefix=/usr/local
15# Any additions from configure.in:
16ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000017 --with-next-archs='arch1 arch2 ..' build MAB binary"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000018ac_help="$ac_help
Guido van Rossum3dc0a512000-10-05 18:00:06 +000019 --with-next-framework Build (OpenStep|Rhapsody|MacOSX|Darwin) framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000020ac_help="$ac_help
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021 --with-dyld Use (OpenStep|Rhapsody|MacOSX|Darwin) dynamic linker"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000022ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000023 --without-gcc never use gcc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000025 --with-cxx=<compiler> enable C++ support"
Guido van Rossum95012191999-12-16 17:50:52 +000026ac_help="$ac_help
Guido van Rossumff555e32000-09-22 15:38:21 +000027 --with-suffix=.exe set executable suffix"
28ac_help="$ac_help
Skip Montanarocb853262000-08-30 22:29:48 +000029 --with-pydebug build with Py_DEBUG defined"
30ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000031 --with-libs='lib1 ...' link against additional libs"
Guido van Rossuma68acba1996-07-31 17:36:39 +000032ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000033 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000034ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000035 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000036ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000037 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000038ac_help="$ac_help
Guido van Rossum9e8181b2000-09-19 00:46:46 +000039 --with-pth use GNU pth threading libraries"
40ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000041 --with(out)-cycle-gc disable/enable garbage collection"
42ac_help="$ac_help
Fred Drakea50d6ec2000-08-31 16:13:20 +000043 --with(out)-libdb disable/enable bsddb module"
44ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000045 --with-wctype-functions use wctype.h functions"
46ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000047 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000048ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000049 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000050ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000051 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000052ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000053 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000054ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000055 --with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000056
Guido van Rossum7f43da71994-08-01 12:15:30 +000057# Initialize some variables set by options.
58# The variables have the same names as the options, with
59# dashes changed to underlines.
60build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000061cache_file=./config.cache
62exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000063host=NONE
64no_create=
65nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000066no_recursion=
67prefix=NONE
68program_prefix=NONE
69program_suffix=NONE
70program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000071silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000072site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000073srcdir=
74target=NONE
75verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000076x_includes=NONE
77x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000078bindir='${exec_prefix}/bin'
79sbindir='${exec_prefix}/sbin'
80libexecdir='${exec_prefix}/libexec'
81datadir='${prefix}/share'
82sysconfdir='${prefix}/etc'
83sharedstatedir='${prefix}/com'
84localstatedir='${prefix}/var'
85libdir='${exec_prefix}/lib'
86includedir='${prefix}/include'
87oldincludedir='/usr/include'
88infodir='${prefix}/info'
89mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000090
91# Initialize some other variables.
92subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000093MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000094SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +000095# Maximum number of lines to put in a shell here document.
96ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +000097
98ac_prev=
99for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000100do
Guido van Rossum627b2d71993-12-24 10:39:16 +0000101
Guido van Rossum7f43da71994-08-01 12:15:30 +0000102 # If the previous option needs an argument, assign it.
103 if test -n "$ac_prev"; then
104 eval "$ac_prev=\$ac_option"
105 ac_prev=
106 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000107 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000108
Guido van Rossum7f43da71994-08-01 12:15:30 +0000109 case "$ac_option" in
110 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
111 *) ac_optarg= ;;
112 esac
113
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000114 # Accept the important Cygnus configure options, so we can diagnose typos.
115
Guido van Rossum7f43da71994-08-01 12:15:30 +0000116 case "$ac_option" in
117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000118 -bindir | --bindir | --bindi | --bind | --bin | --bi)
119 ac_prev=bindir ;;
120 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
121 bindir="$ac_optarg" ;;
122
123 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000124 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000125 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000126 build="$ac_optarg" ;;
127
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000128 -cache-file | --cache-file | --cache-fil | --cache-fi \
129 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
130 ac_prev=cache_file ;;
131 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
132 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
133 cache_file="$ac_optarg" ;;
134
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000135 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
136 ac_prev=datadir ;;
137 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
138 | --da=*)
139 datadir="$ac_optarg" ;;
140
Guido van Rossum7f43da71994-08-01 12:15:30 +0000141 -disable-* | --disable-*)
142 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000143 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000144 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000145 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000146 fi
147 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
148 eval "enable_${ac_feature}=no" ;;
149
150 -enable-* | --enable-*)
151 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000152 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000153 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000154 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000155 fi
156 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
157 case "$ac_option" in
158 *=*) ;;
159 *) ac_optarg=yes ;;
160 esac
161 eval "enable_${ac_feature}='$ac_optarg'" ;;
162
Guido van Rossum7f43da71994-08-01 12:15:30 +0000163 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
164 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
165 | --exec | --exe | --ex)
166 ac_prev=exec_prefix ;;
167 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
168 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
169 | --exec=* | --exe=* | --ex=*)
170 exec_prefix="$ac_optarg" ;;
171
172 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000173 # Obsolete; use --with-gas.
174 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000175
176 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000177 # Omit some internal or obsolete options to make the list less imposing.
178 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000179 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000180Usage: configure [options] [host]
181Options: [defaults in brackets after descriptions]
182Configuration:
183 --cache-file=FILE cache test results in FILE
184 --help print this message
185 --no-create do not create output files
186 --quiet, --silent do not print \`checking...' messages
187 --version print the version of autoconf that created configure
188Directory and file names:
189 --prefix=PREFIX install architecture-independent files in PREFIX
190 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000191 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000192 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000193 --bindir=DIR user executables in DIR [EPREFIX/bin]
194 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
195 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
196 --datadir=DIR read-only architecture-independent data in DIR
197 [PREFIX/share]
198 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
199 --sharedstatedir=DIR modifiable architecture-independent data in DIR
200 [PREFIX/com]
201 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
202 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
203 --includedir=DIR C header files in DIR [PREFIX/include]
204 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
205 --infodir=DIR info documentation in DIR [PREFIX/info]
206 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000207 --srcdir=DIR find the sources in DIR [configure dir or ..]
208 --program-prefix=PREFIX prepend PREFIX to installed program names
209 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000210 --program-transform-name=PROGRAM
211 run sed PROGRAM on installed program names
212EOF
213 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000214Host type:
215 --build=BUILD configure for building on BUILD [BUILD=HOST]
216 --host=HOST configure for HOST [guessed]
217 --target=TARGET configure for TARGET [TARGET=HOST]
218Features and packages:
219 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
220 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
221 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
222 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
223 --x-includes=DIR X include files are in DIR
224 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000225EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000226 if test -n "$ac_help"; then
227 echo "--enable and --with options recognized:$ac_help"
228 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000229 exit 0 ;;
230
231 -host | --host | --hos | --ho)
232 ac_prev=host ;;
233 -host=* | --host=* | --hos=* | --ho=*)
234 host="$ac_optarg" ;;
235
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000236 -includedir | --includedir | --includedi | --included | --include \
237 | --includ | --inclu | --incl | --inc)
238 ac_prev=includedir ;;
239 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
240 | --includ=* | --inclu=* | --incl=* | --inc=*)
241 includedir="$ac_optarg" ;;
242
243 -infodir | --infodir | --infodi | --infod | --info | --inf)
244 ac_prev=infodir ;;
245 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
246 infodir="$ac_optarg" ;;
247
248 -libdir | --libdir | --libdi | --libd)
249 ac_prev=libdir ;;
250 -libdir=* | --libdir=* | --libdi=* | --libd=*)
251 libdir="$ac_optarg" ;;
252
253 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
254 | --libexe | --libex | --libe)
255 ac_prev=libexecdir ;;
256 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
257 | --libexe=* | --libex=* | --libe=*)
258 libexecdir="$ac_optarg" ;;
259
260 -localstatedir | --localstatedir | --localstatedi | --localstated \
261 | --localstate | --localstat | --localsta | --localst \
262 | --locals | --local | --loca | --loc | --lo)
263 ac_prev=localstatedir ;;
264 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
265 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
266 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
267 localstatedir="$ac_optarg" ;;
268
269 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
270 ac_prev=mandir ;;
271 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
272 mandir="$ac_optarg" ;;
273
Guido van Rossum7f43da71994-08-01 12:15:30 +0000274 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000275 # Obsolete; use --without-fp.
276 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000277
278 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
279 | --no-cr | --no-c)
280 no_create=yes ;;
281
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000282 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
283 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
284 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000285
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000286 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
287 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
288 | --oldin | --oldi | --old | --ol | --o)
289 ac_prev=oldincludedir ;;
290 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
291 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
292 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
293 oldincludedir="$ac_optarg" ;;
294
Guido van Rossum7f43da71994-08-01 12:15:30 +0000295 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
296 ac_prev=prefix ;;
297 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
298 prefix="$ac_optarg" ;;
299
300 -program-prefix | --program-prefix | --program-prefi | --program-pref \
301 | --program-pre | --program-pr | --program-p)
302 ac_prev=program_prefix ;;
303 -program-prefix=* | --program-prefix=* | --program-prefi=* \
304 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
305 program_prefix="$ac_optarg" ;;
306
307 -program-suffix | --program-suffix | --program-suffi | --program-suff \
308 | --program-suf | --program-su | --program-s)
309 ac_prev=program_suffix ;;
310 -program-suffix=* | --program-suffix=* | --program-suffi=* \
311 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
312 program_suffix="$ac_optarg" ;;
313
314 -program-transform-name | --program-transform-name \
315 | --program-transform-nam | --program-transform-na \
316 | --program-transform-n | --program-transform- \
317 | --program-transform | --program-transfor \
318 | --program-transfo | --program-transf \
319 | --program-trans | --program-tran \
320 | --progr-tra | --program-tr | --program-t)
321 ac_prev=program_transform_name ;;
322 -program-transform-name=* | --program-transform-name=* \
323 | --program-transform-nam=* | --program-transform-na=* \
324 | --program-transform-n=* | --program-transform-=* \
325 | --program-transform=* | --program-transfor=* \
326 | --program-transfo=* | --program-transf=* \
327 | --program-trans=* | --program-tran=* \
328 | --progr-tra=* | --program-tr=* | --program-t=*)
329 program_transform_name="$ac_optarg" ;;
330
331 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
332 | -silent | --silent | --silen | --sile | --sil)
333 silent=yes ;;
334
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000335 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
336 ac_prev=sbindir ;;
337 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
338 | --sbi=* | --sb=*)
339 sbindir="$ac_optarg" ;;
340
341 -sharedstatedir | --sharedstatedir | --sharedstatedi \
342 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
343 | --sharedst | --shareds | --shared | --share | --shar \
344 | --sha | --sh)
345 ac_prev=sharedstatedir ;;
346 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
347 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
348 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
349 | --sha=* | --sh=*)
350 sharedstatedir="$ac_optarg" ;;
351
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000352 -site | --site | --sit)
353 ac_prev=site ;;
354 -site=* | --site=* | --sit=*)
355 site="$ac_optarg" ;;
356
Guido van Rossum7f43da71994-08-01 12:15:30 +0000357 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
358 ac_prev=srcdir ;;
359 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
360 srcdir="$ac_optarg" ;;
361
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
363 | --syscon | --sysco | --sysc | --sys | --sy)
364 ac_prev=sysconfdir ;;
365 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
366 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
367 sysconfdir="$ac_optarg" ;;
368
Guido van Rossum7f43da71994-08-01 12:15:30 +0000369 -target | --target | --targe | --targ | --tar | --ta | --t)
370 ac_prev=target ;;
371 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
372 target="$ac_optarg" ;;
373
374 -v | -verbose | --verbose | --verbos | --verbo | --verb)
375 verbose=yes ;;
376
377 -version | --version | --versio | --versi | --vers)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000378 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000379 exit 0 ;;
380
381 -with-* | --with-*)
382 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000384 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000385 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000386 fi
387 ac_package=`echo $ac_package| sed 's/-/_/g'`
388 case "$ac_option" in
389 *=*) ;;
390 *) ac_optarg=yes ;;
391 esac
392 eval "with_${ac_package}='$ac_optarg'" ;;
393
394 -without-* | --without-*)
395 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000396 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000397 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000398 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 fi
400 ac_package=`echo $ac_package| sed 's/-/_/g'`
401 eval "with_${ac_package}=no" ;;
402
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000403 --x)
404 # Obsolete; use --with-x.
405 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000406
407 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
408 | --x-incl | --x-inc | --x-in | --x-i)
409 ac_prev=x_includes ;;
410 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
411 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
412 x_includes="$ac_optarg" ;;
413
414 -x-libraries | --x-libraries | --x-librarie | --x-librari \
415 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
416 ac_prev=x_libraries ;;
417 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
418 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
419 x_libraries="$ac_optarg" ;;
420
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000421 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422 ;;
423
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000424 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000425 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000426 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000428 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000429 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000430 fi
431 nonopt="$ac_option"
432 ;;
433
434 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000435done
436
Guido van Rossum7f43da71994-08-01 12:15:30 +0000437if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000438 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000439fi
440
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000441trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000442
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000443# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000444# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000445# 1 file creation
446# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000447# 3 some systems may open it to /dev/tty
448# 4 used on the Kubota Titan
449# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000450# 5 compiler messages saved in config.log
451if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000452 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000453else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000454 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000455fi
456exec 5>./config.log
457
458echo "\
459This file contains any messages produced by compilers while
460running configure, to aid debugging if configure makes a mistake.
461" 1>&5
462
463# Strip out --no-create and --no-recursion so they do not pile up.
464# Also quote any args containing shell metacharacters.
465ac_configure_args=
466for ac_arg
467do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000468 case "$ac_arg" in
469 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
470 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000471 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
472 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
473 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
474 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
475 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000476 esac
477done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000478
479# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000480# Only set these to C if already set. These must not be set unconditionally
481# because not all systems understand e.g. LANG=C (notably SCO).
482# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
483# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000484if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000485if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
486if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
487if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000488
Guido van Rossum7f43da71994-08-01 12:15:30 +0000489# confdefs.h avoids OS command line length limits that DEFS can exceed.
490rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000491# AIX cpp loses on an empty file, so make sure it contains at least a newline.
492echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000493
494# A filename unique to this package, relative to the directory that
495# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000496ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000497
498# Find the source files, if location was not specified.
499if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000500 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000501 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000502 ac_prog=$0
503 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
504 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
505 srcdir=$ac_confdir
506 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000507 srcdir=..
508 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000509else
510 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000511fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000512if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000513 if test "$ac_srcdir_defaulted" = yes; then
514 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000515 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000516 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000517 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000518fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000519srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
520
521# Prefer explicitly selected file to automatically selected ones.
522if test -z "$CONFIG_SITE"; then
523 if test "x$prefix" != xNONE; then
524 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
525 else
526 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
527 fi
528fi
529for ac_site_file in $CONFIG_SITE; do
530 if test -r "$ac_site_file"; then
531 echo "loading site script $ac_site_file"
532 . "$ac_site_file"
533 fi
534done
535
536if test -r "$cache_file"; then
537 echo "loading cache $cache_file"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000538 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000539else
540 echo "creating cache $cache_file"
541 > $cache_file
542fi
543
Guido van Rossum7f43da71994-08-01 12:15:30 +0000544ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000545# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000546ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000547ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000548ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000549cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000550
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000551ac_exeext=
552ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000553if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
554 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
555 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
556 ac_n= ac_c='
557' ac_t=' '
558 else
559 ac_n=-n ac_c= ac_t=
560 fi
561else
562 ac_n= ac_c='\c' ac_t=
563fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000564
Guido van Rossum0a516c91994-09-12 10:58:40 +0000565
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000566
Guido van Rossum627b2d71993-12-24 10:39:16 +0000567
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000568# Set VERSION so we only need to edit in one place (i.e., here)
569
Guido van Rossumb9a22a12000-06-30 02:48:53 +0000570VERSION=2.0
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000571
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000572# NEXTSTEP|MacOSX|Darwin stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000573if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000574
575 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000576echo "configure:577: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000577 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000578if test "${with_next_archs+set}" = set; then
579 withval="$with_next_archs"
580
Guido van Rossum563e7081996-09-10 18:20:48 +0000581 if test -n "$withval"; then
582 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
583 # GCC does not currently support multi archs on the NeXT
584 with_gcc=no
585 fi
586 echo "$ac_t""$with_next_archs" 1>&6
587
588else
589 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000590fi
591
Guido van Rossum563e7081996-09-10 18:20:48 +0000592
593 if test -z "$MACHDEP"
594 then
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000595 ac_sys_system=`uname -s`
596 if test "$ac_sys_system" = "Darwin" ; then
597 ac_sys_release=`uname -r`
598 else
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000599 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000600 sed -e 's/://' -e 's/\./_/'` && \
601 ac_sys_system=next && ac_sys_release=$4
602 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000603
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000604 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000605 fi
606fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000607
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000608# Check whether --with-next-framework or --without-next-framework was given.
609if test "${with_next_framework+set}" = set; then
610 withval="$with_next_framework"
611 :
612fi
613
614# Check whether --with-dyld or --without-dyld was given.
615if test "${with_dyld+set}" = set; then
616 withval="$with_dyld"
617 :
618fi
619
Guido van Rossum91922671997-10-09 20:24:13 +0000620
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000621# Set name for machine-dependent library files
622
623echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000624echo "configure:625: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000625if test -z "$MACHDEP"
626then
Guido van Rossum563e7081996-09-10 18:20:48 +0000627 ac_sys_system=`uname -s`
Trent Mick635f6fb2000-08-23 21:33:05 +0000628 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000629 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000630 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000631 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000632 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000633 ac_md_system=`echo $ac_sys_system |
634 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
635 ac_md_release=`echo $ac_sys_release |
636 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000637 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000638
Guido van Rossum07397971997-04-29 21:49:50 +0000639 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000640 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000641 esac
642fi
Guido van Rossum91922671997-10-09 20:24:13 +0000643
644#
645# SGI compilers allow the specification of the both the ABI and the
646# ISA on the command line. Depending on the values of these switches,
647# different and often incompatable code will be generated.
648#
649# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
650# thus supply support for various ABI/ISA combinations. The MACHDEP
651# variable is also adjusted.
652#
653
654if test ! -z "$SGI_ABI"
655then
656 CC="cc $SGI_ABI"
657 LDFLAGS="$SGI_ABI $LDFLAGS"
658 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
659fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000660echo "$ac_t""$MACHDEP" 1>&6
661
Guido van Rossum91922671997-10-09 20:24:13 +0000662#
663# CCC is the command that compiles C++ programs
664#
665# Not all make programs have this predefined.
666#
Guido van Rossum95012191999-12-16 17:50:52 +0000667#AC_SUBST(SET_CCC)
668#AC_MSG_CHECKING(CCC)
669#if test -z "$CCC"
670#then
671# case $ac_sys_system in
672# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
673# Linux*) SET_CCC="CCC= g++";;
674# *) SET_CCC=""
675# esac
676#else
677# SET_CCC="CCC= ${CCC}"
678#fi
679#AC_MSG_RESULT($SET_CCC)
Guido van Rossum91922671997-10-09 20:24:13 +0000680
681
Guido van Rossum627b2d71993-12-24 10:39:16 +0000682# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000683echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000684echo "configure:685: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000685# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000686if test "${with_gcc+set}" = set; then
687 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000688
689 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000690 no) CC=cc
691 without_gcc=yes;;
692 yes) CC=gcc
693 without_gcc=no;;
694 *) CC=$withval
695 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000696 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000697else
Guido van Rossume77438c1995-09-13 18:59:59 +0000698
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000699 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000700 OSF1) CC=cc
701 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000702 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000703 case $BE_HOST_CPU in
704 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000705 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000706 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000707 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
708 CCSHARED="UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000709 LDFLAGS="$LDFLAGS -nodup"
710
711 AR="$PWD/BeOS/ar-fake"
712 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000713 ;;
714 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000715 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000716 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000717 OPT=-O
718 # Really should use srcdir instead of PWD
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000719 AR="$PWD/BeOS/ar-fake"
720 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000721 ;;
722 *)
Fred Drake5790be12000-10-09 17:06:13 +0000723 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000724 ;;
725 esac
726 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000727 Monterey*)
728 RANLIB=:
729 without_gcc=;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000730 *) without_gcc=no;;
731 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000732fi
733
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000734echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000735
Guido van Rossum95012191999-12-16 17:50:52 +0000736
737
738MAINOBJ=python.o
739echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +0000740echo "configure:741: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000741# Check whether --with-cxx or --without-cxx was given.
742if test "${with_cxx+set}" = set; then
743 withval="$with_cxx"
744
745 case $withval in
746 no) CXX=
747 with_cxx=no;;
748 *) CXX=$withval
749 MAINOBJ=ccpython.o
750 with_cxx=$withval;;
751 esac
752else
753
754 with_cxx=no
755
756fi
757
758echo "$ac_t""$with_cxx" 1>&6
Guido van Rossume1262332000-09-22 19:41:56 +0000759SET_CXX="CXX=$CXX"
Guido van Rossum95012191999-12-16 17:50:52 +0000760
761#AC_MSG_CHECKING(CCC)
762#if test -z "$CCC"
763#then
764# case $ac_sys_system in
765# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
766# Linux*) SET_CCC="CCC= g++";;
767# *) SET_CCC=""
768# esac
769#else
770# SET_CCC="CCC= ${CCC}"
771#fi
772#AC_MSG_RESULT($SET_CCC)
773
Guido van Rossum8b131c51995-03-09 14:10:13 +0000774# If the user switches compilers, we can't believe the cache
775if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
776then
777 { echo "configure: error: cached CC is different -- throw away $cache_file
778(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
779fi
780
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000781# Extract the first word of "gcc", so it can be a program name with args.
782set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000783echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +0000784echo "configure:785: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000785if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000786 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000787else
788 if test -n "$CC"; then
789 ac_cv_prog_CC="$CC" # Let the user override the test.
790else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000791 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
792 ac_dummy="$PATH"
793 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000794 test -z "$ac_dir" && ac_dir=.
795 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000797 break
798 fi
799 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000802fi
803CC="$ac_cv_prog_CC"
804if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000805 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000806else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000807 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000808fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000809
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000810if test -z "$CC"; then
811 # Extract the first word of "cc", so it can be a program name with args.
812set dummy cc; ac_word=$2
813echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +0000814echo "configure:815: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000815if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000816 echo $ac_n "(cached) $ac_c" 1>&6
817else
818 if test -n "$CC"; then
819 ac_cv_prog_CC="$CC" # Let the user override the test.
820else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000821 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000823 ac_dummy="$PATH"
824 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825 test -z "$ac_dir" && ac_dir=.
826 if test -f $ac_dir/$ac_word; then
827 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
828 ac_prog_rejected=yes
829 continue
830 fi
831 ac_cv_prog_CC="cc"
832 break
833 fi
834 done
835 IFS="$ac_save_ifs"
836if test $ac_prog_rejected = yes; then
837 # We found a bogon in the path, so make sure we never use it.
838 set dummy $ac_cv_prog_CC
839 shift
840 if test $# -gt 0; then
841 # We chose a different compiler from the bogus one.
842 # However, it has the same basename, so the bogon will be chosen
843 # first if we set CC to just the basename; use the full file name.
844 shift
845 set dummy "$ac_dir/$ac_word" "$@"
846 shift
847 ac_cv_prog_CC="$@"
848 fi
849fi
850fi
851fi
852CC="$ac_cv_prog_CC"
853if test -n "$CC"; then
854 echo "$ac_t""$CC" 1>&6
855else
856 echo "$ac_t""no" 1>&6
857fi
858
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000859 if test -z "$CC"; then
860 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000861 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000862 # Extract the first word of "cl", so it can be a program name with args.
863set dummy cl; ac_word=$2
864echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +0000865echo "configure:866: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000866if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000867 echo $ac_n "(cached) $ac_c" 1>&6
868else
869 if test -n "$CC"; then
870 ac_cv_prog_CC="$CC" # Let the user override the test.
871else
872 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
873 ac_dummy="$PATH"
874 for ac_dir in $ac_dummy; do
875 test -z "$ac_dir" && ac_dir=.
876 if test -f $ac_dir/$ac_word; then
877 ac_cv_prog_CC="cl"
878 break
879 fi
880 done
881 IFS="$ac_save_ifs"
882fi
883fi
884CC="$ac_cv_prog_CC"
885if test -n "$CC"; then
886 echo "$ac_t""$CC" 1>&6
887else
888 echo "$ac_t""no" 1>&6
889fi
890 ;;
891 esac
892 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
894fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000895
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000896echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
897echo "configure:898: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000898
899ac_ext=c
900# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
901ac_cpp='$CPP $CPPFLAGS'
902ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000903ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000904cross_compiling=$ac_cv_prog_cc_cross
905
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000906cat > conftest.$ac_ext << EOF
907
Fred Drakec9a5cc12000-10-09 20:18:32 +0000908#line 909 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000909#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000910
Guido van Rossumf78abae1997-01-21 22:02:36 +0000911main(){return(0);}
912EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +0000913if { (eval echo configure:914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000914 ac_cv_prog_cc_works=yes
915 # If we can't run a trivial program, we are probably using a cross compiler.
916 if (./conftest; exit) 2>/dev/null; then
917 ac_cv_prog_cc_cross=no
918 else
919 ac_cv_prog_cc_cross=yes
920 fi
921else
922 echo "configure: failed program was:" >&5
923 cat conftest.$ac_ext >&5
924 ac_cv_prog_cc_works=no
925fi
926rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000927ac_ext=c
928# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
929ac_cpp='$CPP $CPPFLAGS'
930ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
931ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
932cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000933
934echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
935if test $ac_cv_prog_cc_works = no; then
936 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
937fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000938echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
939echo "configure:940: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000940echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
941cross_compiling=$ac_cv_prog_cc_cross
942
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000943echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +0000944echo "configure:945: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000945if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000946 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000947else
948 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000949#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000951#endif
952EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +0000953if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954 ac_cv_prog_gcc=yes
955else
956 ac_cv_prog_gcc=no
957fi
958fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000960echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000961
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000962if test $ac_cv_prog_gcc = yes; then
963 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000964else
965 GCC=
966fi
967
968ac_test_CFLAGS="${CFLAGS+set}"
969ac_save_CFLAGS="$CFLAGS"
970CFLAGS=
971echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +0000972echo "configure:973: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000973if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000974 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000975else
976 echo 'void f(){}' > conftest.c
977if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000978 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000979else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000980 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000981fi
982rm -f conftest*
983
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000985
Guido van Rossumf78abae1997-01-21 22:02:36 +0000986echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000987if test "$ac_test_CFLAGS" = set; then
988 CFLAGS="$ac_save_CFLAGS"
989elif test $ac_cv_prog_cc_g = yes; then
990 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000991 CFLAGS="-g -O2"
992 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000993 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 fi
995else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000996 if test "$GCC" = yes; then
997 CFLAGS="-O2"
998 else
999 CFLAGS=
1000 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001001fi
1002
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001003
Guido van Rossumff555e32000-09-22 15:38:21 +00001004echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +00001005echo "configure:1006: checking for --with-suffix" >&5
Guido van Rossumff555e32000-09-22 15:38:21 +00001006# Check whether --with-suffix or --without-suffix was given.
1007if test "${with_suffix+set}" = set; then
1008 withval="$with_suffix"
1009
1010 case $withval in
1011 no) EXE=;;
1012 yes) EXE=.exe;;
1013 *) EXE=$withval;;
1014 esac
1015fi
1016
1017echo "$ac_t""$EXE" 1>&6
1018
Guido van Rossumdd997f71998-10-07 19:58:26 +00001019case $MACHDEP in
1020bsdos*)
1021 case $CC in
1022 gcc) CC="$CC -D_HAVE_BSDI";;
1023 esac;;
1024esac
1025
Guido van Rossum24b1e751997-08-21 02:29:16 +00001026case $ac_sys_system in
1027hp*|HP*)
1028 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001029 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001030 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001031Monterey*)
1032 case $CC in
1033 cc) CC="$CC -Wl,-Bexport";;
1034 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001035esac
1036
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001037# LDLIBRARY is the name of the library to link against (as opposed to the
1038# name of the library into which to insert object files). On systems
1039# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
1040# the Makefiles).
1041
1042
1043LDLIBRARY=''
1044
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001045# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001046# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001047# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001048
1049echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +00001050echo "configure:1051: checking LINKCC" >&5
Guido van Rossum95012191999-12-16 17:50:52 +00001051if test -z "$LINKCC" -a ! -z "$CXX"
1052then
1053 LINKCC="$CXX"
1054fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001055if test -z "$LINKCC"
1056then
1057 case $ac_sys_system in
1058 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001059 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001060 dgux*)
1061 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001062 Monterey64*)
1063 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001064 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001065 esac
1066fi
1067echo "$ac_t""$LINKCC" 1>&6
1068
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001069echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +00001070echo "configure:1071: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001071
1072# NeXT framework builds require that the 'ar' library be converted into
1073# a bundle using libtool.
1074if test "$with_next_framework"
1075then
1076 LDLIBRARY='libpython$(VERSION).dylib'
1077fi
1078
1079# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001080case $MACHDEP in
1081dguxR4)
1082 LDLIBRARY='libpython$(VERSION).so'
1083 OPT="$OPT -pic"
1084 ;;
1085beos*)
1086 LDLIBRARY='libpython$(VERSION).so'
1087 ;;
1088esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001089echo "$ac_t""$LDLIBRARY" 1>&6
1090
1091# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1092if test -z "$LDLIBRARY"
1093then
1094 LDLIBRARY='libpython$(VERSION).a'
1095 MAKE_LDLIBRARY="true"
1096else
1097 MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
1098fi
1099
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001100# Extract the first word of "ranlib", so it can be a program name with args.
1101set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001102echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +00001103echo "configure:1104: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001104if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001105 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001106else
1107 if test -n "$RANLIB"; then
1108 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1109else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001110 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1111 ac_dummy="$PATH"
1112 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113 test -z "$ac_dir" && ac_dir=.
1114 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001115 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001116 break
1117 fi
1118 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001120 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001121fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001122fi
1123RANLIB="$ac_cv_prog_RANLIB"
1124if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001125 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001126else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001127 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001128fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001129
1130
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131for ac_prog in ar aal
1132do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133# Extract the first word of "$ac_prog", so it can be a program name with args.
1134set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001135echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +00001136echo "configure:1137: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001137if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001138 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001139else
1140 if test -n "$AR"; then
1141 ac_cv_prog_AR="$AR" # Let the user override the test.
1142else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001143 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1144 ac_dummy="$PATH"
1145 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 test -z "$ac_dir" && ac_dir=.
1147 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001148 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149 break
1150 fi
1151 done
1152 IFS="$ac_save_ifs"
1153fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001154fi
1155AR="$ac_cv_prog_AR"
1156if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001157 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001158else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001159 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001160fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
1162test -n "$AR" && break
1163done
1164test -n "$AR" || AR="ar"
1165
1166
Guido van Rossumda88dad1995-01-26 00:46:29 +00001167
1168
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001169# Install just never works :-(
1170if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001171then
1172 INSTALL=cp
1173 INSTALL_PROGRAM=cp
1174 INSTALL_DATA=cp
1175else
1176 INSTALL_PROGRAM="$INSTALL"
1177 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001178fi
1179
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001180# Not every filesystem supports hard links
1181
1182if test -z "$LN" ; then
1183 case $ac_sys_system in
1184 BeOS*) LN="ln -s";;
1185 *) LN=ln;;
1186 esac
1187fi
1188
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001189# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001190
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001191if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001192then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001193 case $GCC in
1194 yes)
1195 case $ac_cv_prog_cc_g in
Fred Drakef4670e92000-10-12 17:11:38 +00001196 yes) OPT="-g -O2 -Wall -Wstrict-prototypes";;
1197 *) OPT="-O2 -Wall -Wstrict-prototypes";;
Guido van Rossumedca74a1997-07-18 23:29:40 +00001198 esac
1199 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001200 *) OPT="-O";;
1201 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001202fi
1203
Trent Mick635f6fb2000-08-23 21:33:05 +00001204# The current (beta) Monterey compiler dies with optimizations
1205case $ac_sys_system in
1206Monterey*) OPT="";;
1207esac
1208
Guido van Rossum563e7081996-09-10 18:20:48 +00001209if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001210then
1211 OPT="$OPT $ac_arch_flags"
1212fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001214echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +00001215echo "configure:1216: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216# On Suns, sometimes $CPP names a directory.
1217if test -n "$CPP" && test -d "$CPP"; then
1218 CPP=
1219fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001220if test -z "$CPP"; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001221if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001222 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223else
1224 # This must be in double quotes, not single quotes, because CPP may get
1225 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001226 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227 # On the NeXT, cc -E runs the code through the compiler's parser,
1228 # not just through cpp.
1229 cat > conftest.$ac_ext <<EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001230#line 1231 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001232#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233Syntax Error
1234EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001235ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drakec9a5cc12000-10-09 20:18:32 +00001236{ (eval echo configure:1237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001237ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1238if test -z "$ac_err"; then
1239 :
1240else
1241 echo "$ac_err" >&5
1242 echo "configure: failed program was:" >&5
1243 cat conftest.$ac_ext >&5
1244 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001245 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001246 cat > conftest.$ac_ext <<EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001247#line 1248 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001248#include "confdefs.h"
1249#include <assert.h>
1250Syntax Error
1251EOF
1252ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drakec9a5cc12000-10-09 20:18:32 +00001253{ (eval echo configure:1254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001254ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001256 :
1257else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001258 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001259 echo "configure: failed program was:" >&5
1260 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001261 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001262 CPP="${CC-cc} -nologo -E"
1263 cat > conftest.$ac_ext <<EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001264#line 1265 "configure"
Guido van Rossumff555e32000-09-22 15:38:21 +00001265#include "confdefs.h"
1266#include <assert.h>
1267Syntax Error
1268EOF
1269ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drakec9a5cc12000-10-09 20:18:32 +00001270{ (eval echo configure:1271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumff555e32000-09-22 15:38:21 +00001271ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1272if test -z "$ac_err"; then
1273 :
1274else
1275 echo "$ac_err" >&5
1276 echo "configure: failed program was:" >&5
1277 cat conftest.$ac_ext >&5
1278 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279 CPP=/lib/cpp
1280fi
1281rm -f conftest*
1282fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001283rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001284fi
1285rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001286 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001287fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001288 CPP="$ac_cv_prog_CPP"
1289else
1290 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001291fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001292echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001293
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001294echo $ac_n "checking for AIX""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +00001295echo "configure:1296: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001296cat > conftest.$ac_ext <<EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001297#line 1298 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001298#include "confdefs.h"
1299#ifdef _AIX
1300 yes
1301#endif
1302
1303EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001304if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1305 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001307 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308#define _ALL_SOURCE 1
1309EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001311else
1312 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001313 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314fi
1315rm -f conftest*
1316
1317
Guido van Rossumf78abae1997-01-21 22:02:36 +00001318ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001319echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +00001320echo "configure:1321: checking for minix/config.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001321if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001322 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001323else
1324 cat > conftest.$ac_ext <<EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001325#line 1326 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326#include "confdefs.h"
1327#include <minix/config.h>
1328EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001329ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drakec9a5cc12000-10-09 20:18:32 +00001330{ (eval echo configure:1331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001331ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001332if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001333 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001334 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001336 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001337 echo "configure: failed program was:" >&5
1338 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001339 rm -rf conftest*
1340 eval "ac_cv_header_$ac_safe=no"
1341fi
1342rm -f conftest*
1343fi
1344if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001345 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001346 MINIX=yes
1347else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001348 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001349MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001350fi
1351
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001352if test "$MINIX" = yes; then
1353 cat >> confdefs.h <<\EOF
1354#define _POSIX_SOURCE 1
1355EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001356
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001357 cat >> confdefs.h <<\EOF
1358#define _POSIX_1_SOURCE 2
1359EOF
1360
1361 cat >> confdefs.h <<\EOF
1362#define _MINIX 1
1363EOF
1364
1365fi
1366
Guido van Rossumda88dad1995-01-26 00:46:29 +00001367
Guido van Rossum91922671997-10-09 20:24:13 +00001368echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +00001369echo "configure:1370: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001370if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001371 echo $ac_n "(cached) $ac_c" 1>&6
1372else
1373 ac_save_cc="$CC"
1374CC="$CC -OPT:Olimit=0"
1375if test "$cross_compiling" = yes; then
1376 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1377else
1378 cat > conftest.$ac_ext <<EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001379#line 1380 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001380#include "confdefs.h"
1381int main() { return 0; }
1382EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001383if { (eval echo configure:1384: \"$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 +00001384then
1385 ac_cv_opt_olimit_ok=yes
1386else
1387 echo "configure: failed program was:" >&5
1388 cat conftest.$ac_ext >&5
1389 rm -fr conftest*
1390 ac_cv_opt_olimit_ok=no
1391fi
1392rm -fr conftest*
1393fi
1394
1395CC="$ac_save_cc"
1396fi
1397
1398echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001399if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001400 case $ac_sys_system in
1401 Darwin*) OPT="$OPT" ;;
1402 *) OPT="$OPT -OPT:Olimit=0";;
1403 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001404else
1405 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +00001406echo "configure:1407: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001407 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001408 echo $ac_n "(cached) $ac_c" 1>&6
1409else
1410 ac_save_cc="$CC"
1411 CC="$CC -Olimit 1500"
1412 if test "$cross_compiling" = yes; then
1413 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1414else
1415 cat > conftest.$ac_ext <<EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001416#line 1417 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001417#include "confdefs.h"
1418int main() { return 0; }
1419EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001420if { (eval echo configure:1421: \"$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 +00001421then
1422 ac_cv_olimit_ok=yes
1423else
1424 echo "configure: failed program was:" >&5
1425 cat conftest.$ac_ext >&5
1426 rm -fr conftest*
1427 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001428fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001429rm -fr conftest*
1430fi
1431
1432 CC="$ac_save_cc"
1433fi
1434
1435 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1436 if test $ac_cv_olimit_ok = yes; then
1437 OPT="$OPT -Olimit 1500"
1438 fi
1439fi
1440
Guido van Rossum84e7b241996-08-19 21:59:00 +00001441
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001442# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001443echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +00001444echo "configure:1445: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001445if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001446 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001447else
1448 cat > conftest.$ac_ext <<EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001449#line 1450 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001450#include "confdefs.h"
1451#include <stdlib.h>
1452#include <stdarg.h>
1453#include <string.h>
1454#include <float.h>
1455EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001456ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drakec9a5cc12000-10-09 20:18:32 +00001457{ (eval echo configure:1458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001458ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001459if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001460 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001461 ac_cv_header_stdc=yes
1462else
1463 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001464 echo "configure: failed program was:" >&5
1465 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001466 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001467 ac_cv_header_stdc=no
1468fi
1469rm -f conftest*
1470
1471if test $ac_cv_header_stdc = yes; then
1472 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1473cat > conftest.$ac_ext <<EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001474#line 1475 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001475#include "confdefs.h"
1476#include <string.h>
1477EOF
1478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1479 egrep "memchr" >/dev/null 2>&1; then
1480 :
1481else
1482 rm -rf conftest*
1483 ac_cv_header_stdc=no
1484fi
1485rm -f conftest*
1486
1487fi
1488
1489if test $ac_cv_header_stdc = yes; then
1490 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1491cat > conftest.$ac_ext <<EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001492#line 1493 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001493#include "confdefs.h"
1494#include <stdlib.h>
1495EOF
1496if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1497 egrep "free" >/dev/null 2>&1; then
1498 :
1499else
1500 rm -rf conftest*
1501 ac_cv_header_stdc=no
1502fi
1503rm -f conftest*
1504
1505fi
1506
1507if test $ac_cv_header_stdc = yes; then
1508 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1509if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001510 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001511else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001512 cat > conftest.$ac_ext <<EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001513#line 1514 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001514#include "confdefs.h"
1515#include <ctype.h>
1516#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1517#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001518#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001519int main () { int i; for (i = 0; i < 256; i++)
1520if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1521exit (0); }
1522
1523EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001524if { (eval echo configure:1525: \"$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 +00001525then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001526 :
1527else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001528 echo "configure: failed program was:" >&5
1529 cat conftest.$ac_ext >&5
1530 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001531 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001532fi
1533rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001534fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001535
1536fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001537fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001538
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001539echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001540if test $ac_cv_header_stdc = yes; then
1541 cat >> confdefs.h <<\EOF
1542#define STDC_HEADERS 1
1543EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001544
1545fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001546
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00001547for 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 +00001548signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Fred Drakea50d6ec2000-08-31 16:13:20 +00001549sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001550sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00001551sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
1552ndbm.h db1/ndbm.h gdbm/ndbm.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001553do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001554ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001555echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +00001556echo "configure:1557: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001557if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001558 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001559else
1560 cat > conftest.$ac_ext <<EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001561#line 1562 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001562#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001563#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001564EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001565ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drakec9a5cc12000-10-09 20:18:32 +00001566{ (eval echo configure:1567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001567ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001568if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001569 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001570 eval "ac_cv_header_$ac_safe=yes"
1571else
1572 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001573 echo "configure: failed program was:" >&5
1574 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001575 rm -rf conftest*
1576 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001577fi
1578rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001579fi
1580if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001581 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001582 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001583 cat >> confdefs.h <<EOF
1584#define $ac_tr_hdr 1
1585EOF
1586
1587else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001588 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001589fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001590done
1591
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001592ac_header_dirent=no
1593for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1594do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001595ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001596echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +00001597echo "configure:1598: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001598if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001599 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001600else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001601 cat > conftest.$ac_ext <<EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001602#line 1603 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001603#include "confdefs.h"
1604#include <sys/types.h>
1605#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001606int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001607DIR *dirp = 0;
1608; return 0; }
1609EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001610if { (eval echo configure:1611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001611 rm -rf conftest*
1612 eval "ac_cv_header_dirent_$ac_safe=yes"
1613else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001614 echo "configure: failed program was:" >&5
1615 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001616 rm -rf conftest*
1617 eval "ac_cv_header_dirent_$ac_safe=no"
1618fi
1619rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001620fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001621if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001622 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001623 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001624 cat >> confdefs.h <<EOF
1625#define $ac_tr_hdr 1
1626EOF
1627 ac_header_dirent=$ac_hdr; break
1628else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001629 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001630fi
1631done
1632# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1633if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001634echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +00001635echo "configure:1636: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001636ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001637if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001638 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001639else
1640 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001641LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001642cat > conftest.$ac_ext <<EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001643#line 1644 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001644#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001645/* Override any gcc2 internal prototype to avoid an error. */
1646/* We use char because int might match the return type of a gcc2
1647 builtin and then its argument prototype would still apply. */
1648char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001649
Guido van Rossumf78abae1997-01-21 22:02:36 +00001650int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001651opendir()
1652; return 0; }
1653EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001654if { (eval echo configure:1655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001655 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001656 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001657else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001658 echo "configure: failed program was:" >&5
1659 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001660 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001661 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001662fi
1663rm -f conftest*
1664LIBS="$ac_save_LIBS"
1665
1666fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001667if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001668 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001669 LIBS="$LIBS -ldir"
1670else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001671 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001672fi
1673
1674else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001675echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +00001676echo "configure:1677: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001677ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001678if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001679 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001680else
1681 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001682LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001683cat > conftest.$ac_ext <<EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001684#line 1685 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001686/* Override any gcc2 internal prototype to avoid an error. */
1687/* We use char because int might match the return type of a gcc2
1688 builtin and then its argument prototype would still apply. */
1689char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001690
Guido van Rossumf78abae1997-01-21 22:02:36 +00001691int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001692opendir()
1693; return 0; }
1694EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001695if { (eval echo configure:1696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001696 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001697 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001698else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001699 echo "configure: failed program was:" >&5
1700 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001701 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001702 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703fi
1704rm -f conftest*
1705LIBS="$ac_save_LIBS"
1706
1707fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001708if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001709 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001710 LIBS="$LIBS -lx"
1711else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001712 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001713fi
1714
1715fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001716
1717
1718# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001719was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001720echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +00001721echo "configure:1722: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001722cat > conftest.$ac_ext <<EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001723#line 1724 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001724#include "confdefs.h"
1725#include <time.h>
1726EOF
1727if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1728 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001729 rm -rf conftest*
1730 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001731else
1732 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001733 cat >> confdefs.h <<\EOF
1734#define clock_t long
1735EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001736
1737fi
1738rm -f conftest*
1739
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001740echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001741
Guido van Rossum84e7b241996-08-19 21:59:00 +00001742# Add some code to confdefs.h so that the test for off_t works on SCO
1743cat >> confdefs.h <<\EOF
1744#if defined(SCO_DS)
1745#undef _OFF_T
1746#endif
1747EOF
1748
Guido van Rossumef2255b2000-03-10 22:30:29 +00001749# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001750echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Fred Drakec9a5cc12000-10-09 20:18:32 +00001751echo "configure:1752: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001752if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001753 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001754else
1755 cat > conftest.$ac_ext <<EOF
Fred Drakec9a5cc12000-10-09 20:18:32 +00001756#line 1757 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001757#include "confdefs.h"
1758#include <sys/types.h>
1759#if STDC_HEADERS
1760#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001761#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001762#endif
1763EOF
1764if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001765 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 +00001766 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001767 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001768else
1769 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001770 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001771fi
1772rm -f conftest*
1773
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001774fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001775echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1776if test $ac_cv_type_mode_t = no; then
1777 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001778#define mode_t int
1779EOF
1780
1781fi
1782
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001783echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001784echo "configure:1785: checking for off_t" >&5
1785if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001786 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001787else
1788 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001789#line 1790 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001790#include "confdefs.h"
1791#include <sys/types.h>
1792#if STDC_HEADERS
1793#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001794#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001795#endif
1796EOF
1797if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001798 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 +00001799 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001800 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001801else
1802 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001803 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001804fi
1805rm -f conftest*
1806
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001807fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001808echo "$ac_t""$ac_cv_type_off_t" 1>&6
1809if test $ac_cv_type_off_t = no; then
1810 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811#define off_t long
1812EOF
1813
1814fi
1815
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001816echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001817echo "configure:1818: checking for pid_t" >&5
1818if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001819 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001820else
1821 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001822#line 1823 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001823#include "confdefs.h"
1824#include <sys/types.h>
1825#if STDC_HEADERS
1826#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001827#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001828#endif
1829EOF
1830if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001831 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 +00001832 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001833 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001834else
1835 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001836 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001837fi
1838rm -f conftest*
1839
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001840fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001841echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1842if test $ac_cv_type_pid_t = no; then
1843 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001844#define pid_t int
1845EOF
1846
1847fi
1848
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001849echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001850echo "configure:1851: checking return type of signal handlers" >&5
1851if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001852 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001853else
1854 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001855#line 1856 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001856#include "confdefs.h"
1857#include <sys/types.h>
1858#include <signal.h>
1859#ifdef signal
1860#undef signal
1861#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001862#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001863extern "C" void (*signal (int, void (*)(int)))(int);
1864#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001865void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001866#endif
1867
Guido van Rossumf78abae1997-01-21 22:02:36 +00001868int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001869int i;
1870; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001871EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001872if { (eval echo configure:1873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001873 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001874 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001875else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001876 echo "configure: failed program was:" >&5
1877 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001878 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001879 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001880fi
1881rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001882fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001883
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001884echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001885cat >> confdefs.h <<EOF
1886#define RETSIGTYPE $ac_cv_type_signal
1887EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001888
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001889
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001890echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001891echo "configure:1892: checking for size_t" >&5
1892if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001893 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001894else
1895 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001896#line 1897 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001897#include "confdefs.h"
1898#include <sys/types.h>
1899#if STDC_HEADERS
1900#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001901#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001902#endif
1903EOF
1904if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001905 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 +00001906 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001907 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001908else
1909 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001910 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001911fi
1912rm -f conftest*
1913
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001914fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001915echo "$ac_t""$ac_cv_type_size_t" 1>&6
1916if test $ac_cv_type_size_t = no; then
1917 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001918#define size_t unsigned
1919EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001920
1921fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001922
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001923echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001924echo "configure:1925: checking for uid_t in sys/types.h" >&5
1925if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001926 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001927else
1928 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001929#line 1930 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001930#include "confdefs.h"
1931#include <sys/types.h>
1932EOF
1933if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1934 egrep "uid_t" >/dev/null 2>&1; then
1935 rm -rf conftest*
1936 ac_cv_type_uid_t=yes
1937else
1938 rm -rf conftest*
1939 ac_cv_type_uid_t=no
1940fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001941rm -f conftest*
1942
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001943fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001944
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001945echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001946if test $ac_cv_type_uid_t = no; then
1947 cat >> confdefs.h <<\EOF
1948#define uid_t int
1949EOF
1950
1951 cat >> confdefs.h <<\EOF
1952#define gid_t int
1953EOF
1954
1955fi
1956
Guido van Rossum627b2d71993-12-24 10:39:16 +00001957
Guido van Rossumef2255b2000-03-10 22:30:29 +00001958# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001959echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001960echo "configure:1961: checking size of int" >&5
1961if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001962 echo $ac_n "(cached) $ac_c" 1>&6
1963else
1964 if test "$cross_compiling" = yes; then
1965 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1966else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001967 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001968#line 1969 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001969#include "confdefs.h"
1970#include <stdio.h>
1971main()
1972{
1973 FILE *f=fopen("conftestval", "w");
1974 if (!f) exit(1);
1975 fprintf(f, "%d\n", sizeof(int));
1976 exit(0);
1977}
1978EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001979if { (eval echo configure:1980: \"$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 +00001980then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001981 ac_cv_sizeof_int=`cat conftestval`
1982else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001983 echo "configure: failed program was:" >&5
1984 cat conftest.$ac_ext >&5
1985 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001986 ac_cv_sizeof_int=0
1987fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001988rm -fr conftest*
1989fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001990
1991fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001992echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1993cat >> confdefs.h <<EOF
1994#define SIZEOF_INT $ac_cv_sizeof_int
1995EOF
1996
1997
1998echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001999echo "configure:2000: checking size of long" >&5
2000if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002001 echo $ac_n "(cached) $ac_c" 1>&6
2002else
2003 if test "$cross_compiling" = yes; then
2004 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2005else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002006 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002007#line 2008 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002008#include "confdefs.h"
2009#include <stdio.h>
2010main()
2011{
2012 FILE *f=fopen("conftestval", "w");
2013 if (!f) exit(1);
2014 fprintf(f, "%d\n", sizeof(long));
2015 exit(0);
2016}
2017EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002018if { (eval echo configure:2019: \"$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 +00002019then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002020 ac_cv_sizeof_long=`cat conftestval`
2021else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002022 echo "configure: failed program was:" >&5
2023 cat conftest.$ac_ext >&5
2024 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002025 ac_cv_sizeof_long=0
2026fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002027rm -fr conftest*
2028fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002029
2030fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002031echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2032cat >> confdefs.h <<EOF
2033#define SIZEOF_LONG $ac_cv_sizeof_long
2034EOF
2035
2036
Guido van Rossumad678af1998-10-02 14:42:15 +00002037echo $ac_n "checking size of void *""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002038echo "configure:2039: checking size of void *" >&5
2039if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002040 echo $ac_n "(cached) $ac_c" 1>&6
2041else
2042 if test "$cross_compiling" = yes; then
2043 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2044else
2045 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002046#line 2047 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002047#include "confdefs.h"
2048#include <stdio.h>
2049main()
2050{
2051 FILE *f=fopen("conftestval", "w");
2052 if (!f) exit(1);
2053 fprintf(f, "%d\n", sizeof(void *));
2054 exit(0);
2055}
2056EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002057if { (eval echo configure:2058: \"$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 +00002058then
2059 ac_cv_sizeof_void_p=`cat conftestval`
2060else
2061 echo "configure: failed program was:" >&5
2062 cat conftest.$ac_ext >&5
2063 rm -fr conftest*
2064 ac_cv_sizeof_void_p=0
2065fi
2066rm -fr conftest*
2067fi
2068
2069fi
2070echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2071cat >> confdefs.h <<EOF
2072#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2073EOF
2074
2075
Guido van Rossumef2255b2000-03-10 22:30:29 +00002076echo $ac_n "checking size of char""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002077echo "configure:2078: checking size of char" >&5
2078if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002079 echo $ac_n "(cached) $ac_c" 1>&6
2080else
2081 if test "$cross_compiling" = yes; then
2082 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2083else
2084 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002085#line 2086 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002086#include "confdefs.h"
2087#include <stdio.h>
2088main()
2089{
2090 FILE *f=fopen("conftestval", "w");
2091 if (!f) exit(1);
2092 fprintf(f, "%d\n", sizeof(char));
2093 exit(0);
2094}
2095EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002096if { (eval echo configure:2097: \"$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 +00002097then
2098 ac_cv_sizeof_char=`cat conftestval`
2099else
2100 echo "configure: failed program was:" >&5
2101 cat conftest.$ac_ext >&5
2102 rm -fr conftest*
2103 ac_cv_sizeof_char=0
2104fi
2105rm -fr conftest*
2106fi
2107
2108fi
2109echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2110cat >> confdefs.h <<EOF
2111#define SIZEOF_CHAR $ac_cv_sizeof_char
2112EOF
2113
2114
2115echo $ac_n "checking size of short""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002116echo "configure:2117: checking size of short" >&5
2117if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002118 echo $ac_n "(cached) $ac_c" 1>&6
2119else
2120 if test "$cross_compiling" = yes; then
2121 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2122else
2123 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002124#line 2125 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002125#include "confdefs.h"
2126#include <stdio.h>
2127main()
2128{
2129 FILE *f=fopen("conftestval", "w");
2130 if (!f) exit(1);
2131 fprintf(f, "%d\n", sizeof(short));
2132 exit(0);
2133}
2134EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002135if { (eval echo configure:2136: \"$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 +00002136then
2137 ac_cv_sizeof_short=`cat conftestval`
2138else
2139 echo "configure: failed program was:" >&5
2140 cat conftest.$ac_ext >&5
2141 rm -fr conftest*
2142 ac_cv_sizeof_short=0
2143fi
2144rm -fr conftest*
2145fi
2146
2147fi
2148echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2149cat >> confdefs.h <<EOF
2150#define SIZEOF_SHORT $ac_cv_sizeof_short
2151EOF
2152
2153
2154echo $ac_n "checking size of float""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002155echo "configure:2156: checking size of float" >&5
2156if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002157 echo $ac_n "(cached) $ac_c" 1>&6
2158else
2159 if test "$cross_compiling" = yes; then
2160 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2161else
2162 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002163#line 2164 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002164#include "confdefs.h"
2165#include <stdio.h>
2166main()
2167{
2168 FILE *f=fopen("conftestval", "w");
2169 if (!f) exit(1);
2170 fprintf(f, "%d\n", sizeof(float));
2171 exit(0);
2172}
2173EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002174if { (eval echo configure:2175: \"$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 +00002175then
2176 ac_cv_sizeof_float=`cat conftestval`
2177else
2178 echo "configure: failed program was:" >&5
2179 cat conftest.$ac_ext >&5
2180 rm -fr conftest*
2181 ac_cv_sizeof_float=0
2182fi
2183rm -fr conftest*
2184fi
2185
2186fi
2187echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2188cat >> confdefs.h <<EOF
2189#define SIZEOF_FLOAT $ac_cv_sizeof_float
2190EOF
2191
2192
2193echo $ac_n "checking size of double""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002194echo "configure:2195: checking size of double" >&5
2195if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002196 echo $ac_n "(cached) $ac_c" 1>&6
2197else
2198 if test "$cross_compiling" = yes; then
2199 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2200else
2201 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002202#line 2203 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002203#include "confdefs.h"
2204#include <stdio.h>
2205main()
2206{
2207 FILE *f=fopen("conftestval", "w");
2208 if (!f) exit(1);
2209 fprintf(f, "%d\n", sizeof(double));
2210 exit(0);
2211}
2212EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002213if { (eval echo configure:2214: \"$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 +00002214then
2215 ac_cv_sizeof_double=`cat conftestval`
2216else
2217 echo "configure: failed program was:" >&5
2218 cat conftest.$ac_ext >&5
2219 rm -fr conftest*
2220 ac_cv_sizeof_double=0
2221fi
2222rm -fr conftest*
2223fi
2224
2225fi
2226echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2227cat >> confdefs.h <<EOF
2228#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2229EOF
2230
2231
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002232echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002233echo "configure:2234: checking size of fpos_t" >&5
2234if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002235 echo $ac_n "(cached) $ac_c" 1>&6
2236else
2237 if test "$cross_compiling" = yes; then
2238 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2239else
2240 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002241#line 2242 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002242#include "confdefs.h"
2243#include <stdio.h>
2244main()
2245{
2246 FILE *f=fopen("conftestval", "w");
2247 if (!f) exit(1);
2248 fprintf(f, "%d\n", sizeof(fpos_t));
2249 exit(0);
2250}
2251EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002252if { (eval echo configure:2253: \"$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 +00002253then
2254 ac_cv_sizeof_fpos_t=`cat conftestval`
2255else
2256 echo "configure: failed program was:" >&5
2257 cat conftest.$ac_ext >&5
2258 rm -fr conftest*
2259 ac_cv_sizeof_fpos_t=0
2260fi
2261rm -fr conftest*
2262fi
2263
2264fi
2265echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2266cat >> confdefs.h <<EOF
2267#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2268EOF
2269
2270
Guido van Rossum0a516c91994-09-12 10:58:40 +00002271
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002272echo $ac_n "checking for long long support""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002273echo "configure:2274: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002274have_long_long=no
2275cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002276#line 2277 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002277#include "confdefs.h"
2278
2279int main() {
2280long long x; x = (long long)0;
2281; return 0; }
2282EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002283if { (eval echo configure:2284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002284 rm -rf conftest*
2285 cat >> confdefs.h <<\EOF
2286#define HAVE_LONG_LONG 1
2287EOF
2288 have_long_long=yes
2289else
2290 echo "configure: failed program was:" >&5
2291 cat conftest.$ac_ext >&5
2292fi
2293rm -f conftest*
2294echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002295if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002296echo $ac_n "checking size of long long""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002297echo "configure:2298: checking size of long long" >&5
2298if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002299 echo $ac_n "(cached) $ac_c" 1>&6
2300else
2301 if test "$cross_compiling" = yes; then
2302 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2303else
2304 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002305#line 2306 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002306#include "confdefs.h"
2307#include <stdio.h>
2308main()
2309{
2310 FILE *f=fopen("conftestval", "w");
2311 if (!f) exit(1);
2312 fprintf(f, "%d\n", sizeof(long long));
2313 exit(0);
2314}
2315EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002316if { (eval echo configure:2317: \"$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 +00002317then
2318 ac_cv_sizeof_long_long=`cat conftestval`
2319else
2320 echo "configure: failed program was:" >&5
2321 cat conftest.$ac_ext >&5
2322 rm -fr conftest*
2323 ac_cv_sizeof_long_long=0
2324fi
2325rm -fr conftest*
2326fi
2327
2328fi
2329echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2330cat >> confdefs.h <<EOF
2331#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2332EOF
2333
2334
2335fi
2336
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002337echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002338echo "configure:2339: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002339have_uintptr_t=no
2340cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002341#line 2342 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002342#include "confdefs.h"
2343
2344int main() {
2345uintptr_t x; x = (uintptr_t)0;
2346; return 0; }
2347EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002348if { (eval echo configure:2349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002349 rm -rf conftest*
2350 cat >> confdefs.h <<\EOF
2351#define HAVE_UINTPTR_T 1
2352EOF
2353 have_uintptr_t=yes
2354else
2355 echo "configure: failed program was:" >&5
2356 cat conftest.$ac_ext >&5
2357fi
2358rm -f conftest*
2359echo "$ac_t""$have_uintptr_t" 1>&6
2360if test "$have_uintptr_t" = yes ; then
2361echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002362echo "configure:2363: checking size of uintptr_t" >&5
2363if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002364 echo $ac_n "(cached) $ac_c" 1>&6
2365else
2366 if test "$cross_compiling" = yes; then
2367 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2368else
2369 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002370#line 2371 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002371#include "confdefs.h"
2372#include <stdio.h>
2373main()
2374{
2375 FILE *f=fopen("conftestval", "w");
2376 if (!f) exit(1);
2377 fprintf(f, "%d\n", sizeof(uintptr_t));
2378 exit(0);
2379}
2380EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002381if { (eval echo configure:2382: \"$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 +00002382then
2383 ac_cv_sizeof_uintptr_t=`cat conftestval`
2384else
2385 echo "configure: failed program was:" >&5
2386 cat conftest.$ac_ext >&5
2387 rm -fr conftest*
2388 ac_cv_sizeof_uintptr_t=0
2389fi
2390rm -fr conftest*
2391fi
2392
2393fi
2394echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2395cat >> confdefs.h <<EOF
2396#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2397EOF
2398
2399
2400fi
2401
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002402# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2403echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002404echo "configure:2405: checking size of off_t" >&5
2405if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002406 echo $ac_n "(cached) $ac_c" 1>&6
2407else
2408 if test "$cross_compiling" = yes; then
2409 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2410else
2411 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002412#line 2413 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002413#include "confdefs.h"
2414#include <stdio.h>
2415#include <sys/types.h>
2416main()
2417{
2418 FILE *f=fopen("conftestval", "w");
2419 if (!f) exit(1);
2420 fprintf(f, "%d\n", sizeof(off_t));
2421 exit(0);
2422}
2423EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002424if { (eval echo configure:2425: \"$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 +00002425then
2426 ac_cv_sizeof_off_t=`cat conftestval`
2427else
2428 echo "configure: failed program was:" >&5
2429 cat conftest.$ac_ext >&5
2430 rm -fr conftest*
2431 ac_cv_sizeof_off_t=0
2432fi
2433rm -fr conftest*
2434fi
2435
2436
2437fi
2438
2439echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2440cat >> confdefs.h <<EOF
2441#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2442EOF
2443
2444
2445echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002446echo "configure:2447: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002447if test "$have_long_long" = yes -a \
2448 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2449 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002450 cat >> confdefs.h <<\EOF
2451#define HAVE_LARGEFILE_SUPPORT 1
2452EOF
2453
2454 echo "$ac_t""yes" 1>&6
2455else
2456 echo "$ac_t""no" 1>&6
2457fi
2458
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002459# AC_CHECK_SIZEOF() doesn't include <time.h>.
2460echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002461echo "configure:2462: checking size of time_t" >&5
2462if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002463 echo $ac_n "(cached) $ac_c" 1>&6
2464else
2465 if test "$cross_compiling" = yes; then
2466 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2467else
2468 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002469#line 2470 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002470#include "confdefs.h"
2471#include <stdio.h>
2472#include <time.h>
2473main()
2474{
2475 FILE *f=fopen("conftestval", "w");
2476 if (!f) exit(1);
2477 fprintf(f, "%d\n", sizeof(time_t));
2478 exit(0);
2479}
2480EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002481if { (eval echo configure:2482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002482then
2483 ac_cv_sizeof_time_t=`cat conftestval`
2484else
2485 echo "configure: failed program was:" >&5
2486 cat conftest.$ac_ext >&5
2487 rm -fr conftest*
2488 ac_cv_sizeof_time_t=0
2489fi
2490rm -fr conftest*
2491fi
2492
2493
2494fi
2495
2496echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2497cat >> confdefs.h <<EOF
2498#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2499EOF
2500
2501
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002502
Trent Mick635f6fb2000-08-23 21:33:05 +00002503# if have pthread_t then define SIZEOF_PTHREAD_T
2504echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002505echo "configure:2506: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002506have_pthread_t=no
2507cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002508#line 2509 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002509#include "confdefs.h"
2510#include <pthread.h>
2511int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002512pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002513; return 0; }
2514EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002515if { (eval echo configure:2516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002516 rm -rf conftest*
2517 have_pthread_t=yes
2518else
2519 echo "configure: failed program was:" >&5
2520 cat conftest.$ac_ext >&5
2521fi
2522rm -f conftest*
2523echo "$ac_t""$have_pthread_t" 1>&6
2524if test "$have_pthread_t" = yes ; then
2525 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2526 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002527echo "configure:2528: checking size of pthread_t" >&5
2528 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002529 echo $ac_n "(cached) $ac_c" 1>&6
2530else
2531 if test "$cross_compiling" = yes; then
2532 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2533else
2534 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002535#line 2536 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002536#include "confdefs.h"
2537#include <stdio.h>
2538 #include <pthread.h>
2539 main()
2540 {
2541 FILE *f=fopen("conftestval", "w");
2542 if (!f) exit(1);
2543 fprintf(f, "%d\n", sizeof(pthread_t));
2544 exit(0);
2545 }
2546EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002547if { (eval echo configure:2548: \"$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 +00002548then
2549 ac_cv_sizeof_pthread_t=`cat conftestval`
2550else
2551 echo "configure: failed program was:" >&5
2552 cat conftest.$ac_ext >&5
2553 rm -fr conftest*
2554 ac_cv_sizeof_pthread_t=0
2555fi
2556rm -fr conftest*
2557fi
2558
2559
2560fi
2561
2562 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2563 cat >> confdefs.h <<EOF
2564#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2565EOF
2566
2567fi
2568
2569
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002570# Minor variations in building a framework between NextStep versions 4 and 5
2571
2572case $ac_sys_system/$ac_sys_release in
Guido van Rossum5839e582000-10-09 19:52:35 +00002573 Darwin/*)
2574 ns_undef_sym='_environ'
2575 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002576 next/4*)
2577 ns_undef_sym='__environ'
2578 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2579 next/5*)
2580 ns_undef_sym='_environ'
2581 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2582esac
2583
2584echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002585echo "configure:2586: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002586if test "$with_next_framework"
2587then
2588 OPT="$OPT -fno-common"
2589 # -U __environ is needed since bundles don't have access
2590 # to crt0 when built but will always be linked against it
2591 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2592 cat >> confdefs.h <<\EOF
2593#define WITH_NEXT_FRAMEWORK 1
2594EOF
2595
2596 echo "$ac_t""yes" 1>&6
2597else
2598 echo "$ac_t""no" 1>&6
2599fi
2600
2601echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002602echo "configure:2603: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002603if test "$with_next_framework" -o "$with_dyld"
2604then
2605 if test "$with_dyld"
2606 then
2607 echo "$ac_t""yes" 1>&6
2608 else
2609 echo "$ac_t""required for framework build" 1>&6
2610 fi
2611 cat >> confdefs.h <<\EOF
2612#define WITH_DYLD 1
2613EOF
2614
2615 ns_dyld='set'
2616else
2617 echo "$ac_t""no" 1>&6
2618fi
2619
Guido van Rossum0a516c91994-09-12 10:58:40 +00002620# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002621
2622
2623
2624
Guido van Rossum0a516c91994-09-12 10:58:40 +00002625# SO is the extension of shared libraries `(including the dot!)
2626# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002627echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002628echo "configure:2629: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002629if test -z "$SO"
2630then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002631 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002632 hp*|HP*) SO=.sl;;
2633 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002634 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002635fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002636echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002637# LDSHARED is the ld *command* used to create shared library
2638# -- "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 +00002639# (Shared libraries in this instance are shared modules to be loaded into
2640# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002641echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002642echo "configure:2643: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002643if test -z "$LDSHARED"
2644then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002645 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002646 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002647 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002648 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002649 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002650 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a662000-05-26 12:22:54 +00002651 SunOS/5*)
2652 if test "$GCC" = "yes"
2653 then LDSHARED='$(CC) -G'
2654 else LDSHARED="ld -G";
2655 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002656 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002657 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2658 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002659 Darwin/*|next/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002660 if test "$ns_dyld"
Guido van Rossum5839e582000-10-09 19:52:35 +00002661 then
2662 if test "$ac_sys_system" = Darwin
2663 then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
2664 else LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2665 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002666 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2667 fi
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002668 if test "$with_next_framework" ; then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002669 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2670 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002671 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002672 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002673 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002674 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002675 NetBSD*)
2676 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2677 then
2678 LDSHARED="cc -shared"
2679 else
2680 LDSHARED="ld -Bshareable"
2681 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002682 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00002683 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00002684 then
2685 LDSHARED="cc -shared ${LDFLAGS}"
2686 else
2687 LDSHARED="ld -Bshareable ${LDFLAGS}"
2688 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002689 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002690 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002691 *) LDSHARED="ld";;
2692 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002693fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002694echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002695# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002696# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002697echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002698echo "configure:2699: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002699if test -z "$CCSHARED"
2700then
Guido van Rossum07397971997-04-29 21:49:50 +00002701 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002702 hp*|HP*) if test "$GCC" = yes;
2703 then CCSHARED="-fpic";
2704 else CCSHARED="+z";
2705 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002706 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002707 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002708 OpenBSD*) CCSHARED="-fpic";;
2709 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002710 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002711 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002712 IRIX*/6*) case $CC in
2713 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002714 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002715 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002716 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002717fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002718echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002719# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002720# the python executable -- this is only needed for a few systems
2721echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002722echo "configure:2723: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002723if test -z "$LINKFORSHARED"
2724then
Guido van Rossum07397971997-04-29 21:49:50 +00002725 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002726 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002727 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002728 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002729 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002730 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002731 # -u libsys_s pulls in all symbols in libsys
2732 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2733 # -u __dummy makes the linker aware of the objc runtime
2734 # in System.framework; otherwise, __objcInit (referenced in
2735 # crt1.o) gets erroneously defined as common, which breaks dynamic
2736 # loading of any modules which reference it in System.framework
2737 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00002738 Darwin/*) LINKFORSHARED="-framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002739 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00002740 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002741 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00002742 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2743 then
2744 LINKFORSHARED="-Wl,--export-dynamic"
2745 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002746 SunOS/5*) case $CC in
2747 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002748 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002749 then
2750 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002751 fi;;
2752 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002753 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002754fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002755echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002756
Guido van Rossum627b2d71993-12-24 10:39:16 +00002757# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002758echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002759echo "configure:2760: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002760ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002761if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002762 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002763else
2764 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002765LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002766cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002767#line 2768 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002768#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002769/* Override any gcc2 internal prototype to avoid an error. */
2770/* We use char because int might match the return type of a gcc2
2771 builtin and then its argument prototype would still apply. */
2772char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002773
Guido van Rossumf78abae1997-01-21 22:02:36 +00002774int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002775dlopen()
2776; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002777EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002778if { (eval echo configure:2779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002779 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002780 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002781else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002782 echo "configure: failed program was:" >&5
2783 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002784 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002785 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002786fi
2787rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002788LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002789
Guido van Rossum627b2d71993-12-24 10:39:16 +00002790fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002791if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002792 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002793 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2794 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002795 cat >> confdefs.h <<EOF
2796#define $ac_tr_lib 1
2797EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002798
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002799 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002800
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002801else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002802 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002803fi
2804 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002805echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002806echo "configure:2807: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002807ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002808if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002809 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002810else
2811 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002812LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002813cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002814#line 2815 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002815#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002816/* Override any gcc2 internal prototype to avoid an error. */
2817/* We use char because int might match the return type of a gcc2
2818 builtin and then its argument prototype would still apply. */
2819char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002820
Guido van Rossumf78abae1997-01-21 22:02:36 +00002821int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002822shl_load()
2823; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002824EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002825if { (eval echo configure:2826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002826 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002827 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002828else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002829 echo "configure: failed program was:" >&5
2830 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002831 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002832 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002833fi
2834rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002835LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002836
Guido van Rossum627b2d71993-12-24 10:39:16 +00002837fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002838if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002839 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002840 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2841 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002842 cat >> confdefs.h <<EOF
2843#define $ac_tr_lib 1
2844EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002845
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002846 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002847
2848else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002849 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002850fi
2851 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002852
Skip Montanarocb853262000-08-30 22:29:48 +00002853# Check for --with-pydebug
2854echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002855echo "configure:2856: checking for --with-pydebug" >&5
Skip Montanarocb853262000-08-30 22:29:48 +00002856# Check whether --with-pydebug or --without-pydebug was given.
2857if test "${with_pydebug+set}" = set; then
2858 withval="$with_pydebug"
2859
2860if test "$withval" != no
2861then cat >> confdefs.h <<\EOF
2862#define Py_DEBUG 1
2863EOF
2864 echo "$ac_t""yes" 1>&6
2865else echo "$ac_t""no" 1>&6
2866fi
2867else
2868 echo "$ac_t""no" 1>&6
2869fi
2870
2871
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002872# checks for system dependent C++ extensions support
2873case "$ac_sys_system" in
2874 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002875echo "configure:2876: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002876 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002877#line 2878 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002878#include "confdefs.h"
2879#include "/usr/lpp/xlC/include/load.h"
2880int main() {
2881loadAndInit("", 0, "")
2882; return 0; }
2883EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002884if { (eval echo configure:2885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002885 rm -rf conftest*
2886 cat >> confdefs.h <<\EOF
2887#define AIX_GENUINE_CPLUSPLUS 1
2888EOF
2889
2890 echo "$ac_t""yes" 1>&6
2891else
2892 echo "configure: failed program was:" >&5
2893 cat conftest.$ac_ext >&5
2894 rm -rf conftest*
2895 echo "$ac_t""no" 1>&6
2896fi
2897rm -f conftest*;;
2898 *) ;;
2899esac
2900
Guido van Rossum70c7f481998-03-26 18:44:10 +00002901# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2902# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002903# BeOS' sockets are stashed in libnet.
2904case "$ac_sys_system" in
2905IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002906*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002907echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002908echo "configure:2909: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002909ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002910if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002911 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002912else
2913 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002914LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002915cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002916#line 2917 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002917#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002918/* Override any gcc2 internal prototype to avoid an error. */
2919/* We use char because int might match the return type of a gcc2
2920 builtin and then its argument prototype would still apply. */
2921char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002922
Guido van Rossumf78abae1997-01-21 22:02:36 +00002923int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002924t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002925; return 0; }
2926EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002927if { (eval echo configure:2928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002928 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002929 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002930else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002931 echo "configure: failed program was:" >&5
2932 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002933 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002934 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002935fi
2936rm -f conftest*
2937LIBS="$ac_save_LIBS"
2938
2939fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002940if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002941 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002942 LIBS="-lnsl $LIBS"
2943else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002944 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002945fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002946 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002947echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002948echo "configure:2949: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002949ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002950if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002951 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002952else
2953 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002954LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002955cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002956#line 2957 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002957#include "confdefs.h"
2958/* Override any gcc2 internal prototype to avoid an error. */
2959/* We use char because int might match the return type of a gcc2
2960 builtin and then its argument prototype would still apply. */
2961char socket();
2962
2963int main() {
2964socket()
2965; return 0; }
2966EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002967if { (eval echo configure:2968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002968 rm -rf conftest*
2969 eval "ac_cv_lib_$ac_lib_var=yes"
2970else
2971 echo "configure: failed program was:" >&5
2972 cat conftest.$ac_ext >&5
2973 rm -rf conftest*
2974 eval "ac_cv_lib_$ac_lib_var=no"
2975fi
2976rm -f conftest*
2977LIBS="$ac_save_LIBS"
2978
2979fi
2980if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2981 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002982 LIBS="-lsocket $LIBS"
2983else
2984 echo "$ac_t""no" 1>&6
2985fi
2986 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00002987;;
2988esac
2989case "$ac_sys_system" in
2990BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00002991echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002992echo "configure:2993: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002993ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002994if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002995 echo $ac_n "(cached) $ac_c" 1>&6
2996else
2997 ac_save_LIBS="$LIBS"
2998LIBS="-lnet $LIBS $LIBS"
2999cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003000#line 3001 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003001#include "confdefs.h"
3002/* Override any gcc2 internal prototype to avoid an error. */
3003/* We use char because int might match the return type of a gcc2
3004 builtin and then its argument prototype would still apply. */
3005char socket();
3006
3007int main() {
3008socket()
3009; return 0; }
3010EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003011if { (eval echo configure:3012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003012 rm -rf conftest*
3013 eval "ac_cv_lib_$ac_lib_var=yes"
3014else
3015 echo "configure: failed program was:" >&5
3016 cat conftest.$ac_ext >&5
3017 rm -rf conftest*
3018 eval "ac_cv_lib_$ac_lib_var=no"
3019fi
3020rm -f conftest*
3021LIBS="$ac_save_LIBS"
3022
3023fi
3024if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3025 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003026 LIBS="-lnet $LIBS"
3027else
3028 echo "$ac_t""no" 1>&6
3029fi
3030 # BeOS
3031;;
3032esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003033
Guido van Rossuma68acba1996-07-31 17:36:39 +00003034echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003035echo "configure:3036: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003036# Check whether --with-libs or --without-libs was given.
3037if test "${with_libs+set}" = set; then
3038 withval="$with_libs"
3039
3040echo "$ac_t""$withval" 1>&6
3041LIBS="$withval $LIBS"
3042
3043else
3044 echo "$ac_t""no" 1>&6
3045fi
3046
Guido van Rossum7f43da71994-08-01 12:15:30 +00003047
Guido van Rossum009f7871997-12-04 00:51:42 +00003048
Barry Warsawc0d24d82000-06-29 16:12:00 +00003049USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003050
Guido van Rossumec2f0731997-01-22 20:54:01 +00003051echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003052echo "configure:3053: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003053
3054# Check whether --with-dec-threads or --without-dec-threads was given.
3055if test "${with_dec_threads+set}" = set; then
3056 withval="$with_dec_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003057
3058echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003059LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003060if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003061 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003062fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003063else
3064 echo "$ac_t""no" 1>&6
3065fi
3066
3067
3068echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003069echo "configure:3070: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003070# Check whether --with-threads or --without-threads was given.
3071if test "${with_threads+set}" = set; then
3072 withval="$with_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003073 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003074fi
3075
3076
Barry Warsawc0d24d82000-06-29 16:12:00 +00003077# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003078# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003079if test "${with_thread+set}" = set; then
3080 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003081
3082with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003083fi
Barry Warsawc0d24d82000-06-29 16:12:00 +00003084
3085
3086if test -z "$with_threads"
3087then with_threads="yes"
3088fi
3089echo "$ac_t""$with_threads" 1>&6
3090
3091if test "$with_threads" = "no"
3092then
3093 USE_THREAD_MODULE="#"
3094else
Guido van Rossum40951012000-10-07 16:21:27 +00003095 if test ! -z "$with_threads" -a -d "$with_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003096 then LDFLAGS="$LDFLAGS -L$with_threads"
3097 fi
Guido van Rossum40951012000-10-07 16:21:27 +00003098 if test ! -z "$withval" -a -d "$withval"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003099 then LDFLAGS="$LDFLAGS -L$withval"
3100 fi
3101 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003102#define _REENTRANT 1
3103EOF
3104
Barry Warsawc0d24d82000-06-29 16:12:00 +00003105 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003106echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003107echo "configure:3108: checking for mach/cthreads.h" >&5
3108if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003109 echo $ac_n "(cached) $ac_c" 1>&6
3110else
3111 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003112#line 3113 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003113#include "confdefs.h"
3114#include <mach/cthreads.h>
3115EOF
3116ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003117{ (eval echo configure:3118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003118ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003119if test -z "$ac_err"; then
3120 rm -rf conftest*
3121 eval "ac_cv_header_$ac_safe=yes"
3122else
3123 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003124 echo "configure: failed program was:" >&5
3125 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003126 rm -rf conftest*
3127 eval "ac_cv_header_$ac_safe=no"
3128fi
3129rm -f conftest*
3130fi
3131if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3132 echo "$ac_t""yes" 1>&6
3133 cat >> confdefs.h <<\EOF
3134#define WITH_THREAD 1
3135EOF
3136
Barry Warsawc0d24d82000-06-29 16:12:00 +00003137 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003138#define C_THREADS 1
3139EOF
3140
Barry Warsawc0d24d82000-06-29 16:12:00 +00003141 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003142else
3143 echo "$ac_t""no" 1>&6
3144
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003145 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003146echo "configure:3147: checking for --with-pth" >&5
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003147 # Check whether --with-pth or --without-pth was given.
3148if test "${with_pth+set}" = set; then
3149 withval="$with_pth"
3150
3151 echo "$ac_t""$withval" 1>&6
3152 cat >> confdefs.h <<\EOF
3153#define WITH_THREAD 1
3154EOF
3155
3156 cat >> confdefs.h <<\EOF
3157#define HAVE_PTH 1
3158EOF
3159
3160 LIBS="-lpth $LIBS"
3161 LIBOBJS="$LIBOBJS thread.o"
3162else
3163
3164 echo "$ac_t""no" 1>&6
Barry Warsawc0d24d82000-06-29 16:12:00 +00003165 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003166echo "configure:3167: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003167ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003168if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003169 echo $ac_n "(cached) $ac_c" 1>&6
3170else
3171 ac_save_LIBS="$LIBS"
3172LIBS="-lpthread $LIBS"
3173cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003174#line 3175 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003175#include "confdefs.h"
3176/* Override any gcc2 internal prototype to avoid an error. */
3177/* We use char because int might match the return type of a gcc2
3178 builtin and then its argument prototype would still apply. */
3179char pthread_create();
3180
3181int main() {
3182pthread_create()
3183; return 0; }
3184EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003185if { (eval echo configure:3186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003186 rm -rf conftest*
3187 eval "ac_cv_lib_$ac_lib_var=yes"
3188else
3189 echo "configure: failed program was:" >&5
3190 cat conftest.$ac_ext >&5
3191 rm -rf conftest*
3192 eval "ac_cv_lib_$ac_lib_var=no"
3193fi
3194rm -f conftest*
3195LIBS="$ac_save_LIBS"
3196
3197fi
3198if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3199 echo "$ac_t""yes" 1>&6
3200 cat >> confdefs.h <<\EOF
3201#define WITH_THREAD 1
3202EOF
3203
Barry Warsawc0d24d82000-06-29 16:12:00 +00003204 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003205#define _POSIX_THREADS 1
3206EOF
3207
Barry Warsawc0d24d82000-06-29 16:12:00 +00003208 LIBS="-lpthread $LIBS"
3209 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003210else
3211 echo "$ac_t""no" 1>&6
3212
Barry Warsawc0d24d82000-06-29 16:12:00 +00003213 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003214echo "configure:3215: checking for pthread_detach" >&5
3215if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003216 echo $ac_n "(cached) $ac_c" 1>&6
3217else
3218 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003219#line 3220 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003220#include "confdefs.h"
3221/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003222 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003223#include <assert.h>
3224/* Override any gcc2 internal prototype to avoid an error. */
3225/* We use char because int might match the return type of a gcc2
3226 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003227char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003228
3229int main() {
3230
3231/* The GNU C library defines this for functions which it implements
3232 to always fail with ENOSYS. Some functions are actually named
3233 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003234#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003235choke me
3236#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003237pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003238#endif
3239
3240; return 0; }
3241EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003242if { (eval echo configure:3243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003243 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003244 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003245else
3246 echo "configure: failed program was:" >&5
3247 cat conftest.$ac_ext >&5
3248 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003249 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003250fi
3251rm -f conftest*
3252fi
3253
Guido van Rossumea516321998-12-17 18:08:55 +00003254if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003255 echo "$ac_t""yes" 1>&6
3256 cat >> confdefs.h <<\EOF
3257#define WITH_THREAD 1
3258EOF
3259
Guido van Rossum5839e582000-10-09 19:52:35 +00003260 case $ac_sys_system in
3261 Darwin*) ;;
3262 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003263#define _POSIX_THREADS 1
3264EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003265;;
3266 esac
Barry Warsawc0d24d82000-06-29 16:12:00 +00003267 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003268else
3269 echo "$ac_t""no" 1>&6
3270
Barry Warsawc0d24d82000-06-29 16:12:00 +00003271 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003272echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003273echo "configure:3274: checking for kernel/OS.h" >&5
3274if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003275 echo $ac_n "(cached) $ac_c" 1>&6
3276else
3277 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003278#line 3279 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003279#include "confdefs.h"
3280#include <kernel/OS.h>
3281EOF
3282ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003283{ (eval echo configure:3284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003284ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003285if test -z "$ac_err"; then
3286 rm -rf conftest*
3287 eval "ac_cv_header_$ac_safe=yes"
3288else
3289 echo "$ac_err" >&5
3290 echo "configure: failed program was:" >&5
3291 cat conftest.$ac_ext >&5
3292 rm -rf conftest*
3293 eval "ac_cv_header_$ac_safe=no"
3294fi
3295rm -f conftest*
3296fi
3297if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3298 echo "$ac_t""yes" 1>&6
3299 cat >> confdefs.h <<\EOF
3300#define WITH_THREAD 1
3301EOF
3302
Barry Warsawc0d24d82000-06-29 16:12:00 +00003303 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003304#define BEOS_THREADS 1
3305EOF
3306
Barry Warsawc0d24d82000-06-29 16:12:00 +00003307 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003308else
3309 echo "$ac_t""no" 1>&6
3310
Barry Warsawc0d24d82000-06-29 16:12:00 +00003311 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003312echo "configure:3313: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003313ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003314if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003315 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003316else
3317 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003318LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003319cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003320#line 3321 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003321#include "confdefs.h"
3322/* Override any gcc2 internal prototype to avoid an error. */
3323/* We use char because int might match the return type of a gcc2
3324 builtin and then its argument prototype would still apply. */
3325char pthread_create();
3326
3327int main() {
3328pthread_create()
3329; return 0; }
3330EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003331if { (eval echo configure:3332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003332 rm -rf conftest*
3333 eval "ac_cv_lib_$ac_lib_var=yes"
3334else
3335 echo "configure: failed program was:" >&5
3336 cat conftest.$ac_ext >&5
3337 rm -rf conftest*
3338 eval "ac_cv_lib_$ac_lib_var=no"
3339fi
3340rm -f conftest*
3341LIBS="$ac_save_LIBS"
3342
3343fi
3344if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3345 echo "$ac_t""yes" 1>&6
3346 cat >> confdefs.h <<\EOF
3347#define WITH_THREAD 1
3348EOF
3349
3350 cat >> confdefs.h <<\EOF
3351#define _POSIX_THREADS 1
3352EOF
3353
3354 LIBS="$LIBS -lpthreads"
3355 LIBOBJS="$LIBOBJS thread.o"
3356else
3357 echo "$ac_t""no" 1>&6
3358
3359 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003360echo "configure:3361: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003361ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003362if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003363 echo $ac_n "(cached) $ac_c" 1>&6
3364else
3365 ac_save_LIBS="$LIBS"
3366LIBS="-lc_r $LIBS"
3367cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003368#line 3369 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003369#include "confdefs.h"
3370/* Override any gcc2 internal prototype to avoid an error. */
3371/* We use char because int might match the return type of a gcc2
3372 builtin and then its argument prototype would still apply. */
3373char pthread_create();
3374
3375int main() {
3376pthread_create()
3377; return 0; }
3378EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003379if { (eval echo configure:3380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003380 rm -rf conftest*
3381 eval "ac_cv_lib_$ac_lib_var=yes"
3382else
3383 echo "configure: failed program was:" >&5
3384 cat conftest.$ac_ext >&5
3385 rm -rf conftest*
3386 eval "ac_cv_lib_$ac_lib_var=no"
3387fi
3388rm -f conftest*
3389LIBS="$ac_save_LIBS"
3390
3391fi
3392if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3393 echo "$ac_t""yes" 1>&6
3394 cat >> confdefs.h <<\EOF
3395#define WITH_THREAD 1
3396EOF
3397
Barry Warsawc0d24d82000-06-29 16:12:00 +00003398 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003399#define _POSIX_THREADS 1
3400EOF
3401
Greg Steinadf63d62000-07-05 10:38:09 +00003402 LIBS="$LIBS -lc_r"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003403 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003404else
3405 echo "$ac_t""no" 1>&6
3406
Greg Steinadf63d62000-07-05 10:38:09 +00003407 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003408echo "configure:3409: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003409ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003410if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003411 echo $ac_n "(cached) $ac_c" 1>&6
3412else
3413 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003414LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003415cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003416#line 3417 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003417#include "confdefs.h"
3418/* Override any gcc2 internal prototype to avoid an error. */
3419/* We use char because int might match the return type of a gcc2
3420 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003421char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003422
3423int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003424__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003425; return 0; }
3426EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003427if { (eval echo configure:3428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003428 rm -rf conftest*
3429 eval "ac_cv_lib_$ac_lib_var=yes"
3430else
3431 echo "configure: failed program was:" >&5
3432 cat conftest.$ac_ext >&5
3433 rm -rf conftest*
3434 eval "ac_cv_lib_$ac_lib_var=no"
3435fi
3436rm -f conftest*
3437LIBS="$ac_save_LIBS"
3438
3439fi
3440if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3441 echo "$ac_t""yes" 1>&6
3442 cat >> confdefs.h <<\EOF
3443#define WITH_THREAD 1
3444EOF
3445
Barry Warsawc0d24d82000-06-29 16:12:00 +00003446 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003447#define _POSIX_THREADS 1
3448EOF
3449
Greg Steinadf63d62000-07-05 10:38:09 +00003450 LIBS="$LIBS -lthread"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003451 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003452else
3453 echo "$ac_t""no" 1>&6
3454
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003455 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
3456echo "configure:3457: checking for __pthread_create_system in -lpthread" >&5
3457ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
3458if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3459 echo $ac_n "(cached) $ac_c" 1>&6
3460else
3461 ac_save_LIBS="$LIBS"
3462LIBS="-lpthread $LIBS"
3463cat > conftest.$ac_ext <<EOF
3464#line 3465 "configure"
3465#include "confdefs.h"
3466/* Override any gcc2 internal prototype to avoid an error. */
3467/* We use char because int might match the return type of a gcc2
3468 builtin and then its argument prototype would still apply. */
3469char __pthread_create_system();
3470
3471int main() {
3472__pthread_create_system()
3473; return 0; }
3474EOF
3475if { (eval echo configure:3476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3476 rm -rf conftest*
3477 eval "ac_cv_lib_$ac_lib_var=yes"
3478else
3479 echo "configure: failed program was:" >&5
3480 cat conftest.$ac_ext >&5
3481 rm -rf conftest*
3482 eval "ac_cv_lib_$ac_lib_var=no"
3483fi
3484rm -f conftest*
3485LIBS="$ac_save_LIBS"
3486
3487fi
3488if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3489 echo "$ac_t""yes" 1>&6
3490 cat >> confdefs.h <<\EOF
3491#define WITH_THREAD 1
3492EOF
3493
3494 cat >> confdefs.h <<\EOF
3495#define _POSIX_THREADS 1
3496EOF
3497
3498 LIBS="$LIBS -lpthread"
3499 LIBOBJS="$LIBOBJS thread.o"
3500else
3501 echo "$ac_t""no" 1>&6
3502
Barry Warsawc0d24d82000-06-29 16:12:00 +00003503 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003504echo "configure:3505: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003505ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003506if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003507 echo $ac_n "(cached) $ac_c" 1>&6
3508else
3509 ac_save_LIBS="$LIBS"
3510LIBS="-lcma $LIBS"
3511cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003512#line 3513 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003513#include "confdefs.h"
3514/* Override any gcc2 internal prototype to avoid an error. */
3515/* We use char because int might match the return type of a gcc2
3516 builtin and then its argument prototype would still apply. */
3517char pthread_create();
3518
3519int main() {
3520pthread_create()
3521; return 0; }
3522EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003523if { (eval echo configure:3524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003524 rm -rf conftest*
3525 eval "ac_cv_lib_$ac_lib_var=yes"
3526else
3527 echo "configure: failed program was:" >&5
3528 cat conftest.$ac_ext >&5
3529 rm -rf conftest*
3530 eval "ac_cv_lib_$ac_lib_var=no"
3531fi
3532rm -f conftest*
3533LIBS="$ac_save_LIBS"
3534
3535fi
3536if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3537 echo "$ac_t""yes" 1>&6
3538 cat >> confdefs.h <<\EOF
3539#define WITH_THREAD 1
3540EOF
3541
Barry Warsawc0d24d82000-06-29 16:12:00 +00003542 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003543#define _POSIX_THREADS 1
3544EOF
3545
Barry Warsawc0d24d82000-06-29 16:12:00 +00003546 LIBS="$LIBS -lcma"
3547 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003548else
3549 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003550
3551 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003552fi
3553
Barry Warsawc0d24d82000-06-29 16:12:00 +00003554
Guido van Rossum627b2d71993-12-24 10:39:16 +00003555fi
3556
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003557fi
3558
Guido van Rossum0be3e491997-05-22 20:33:33 +00003559fi
3560
Guido van Rossum49545951997-12-02 19:28:29 +00003561fi
3562
Guido van Rossumb93a8621998-05-07 13:27:32 +00003563fi
3564
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003565fi
3566
Guido van Rossumad678af1998-10-02 14:42:15 +00003567fi
3568
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003569fi
3570
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003571fi
3572
Guido van Rossum0be3e491997-05-22 20:33:33 +00003573
Barry Warsawc0d24d82000-06-29 16:12:00 +00003574 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003575echo "configure:3576: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003576ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003577if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003578 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003579else
3580 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003581LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003582cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003583#line 3584 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003584#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003585/* Override any gcc2 internal prototype to avoid an error. */
3586/* We use char because int might match the return type of a gcc2
3587 builtin and then its argument prototype would still apply. */
3588char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003589
Guido van Rossumf78abae1997-01-21 22:02:36 +00003590int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003591usconfig()
3592; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003593EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003594if { (eval echo configure:3595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003595 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003596 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003597else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003598 echo "configure: failed program was:" >&5
3599 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003600 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003601 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003602fi
3603rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003604LIBS="$ac_save_LIBS"
3605
3606fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003607if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003608 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003609 cat >> confdefs.h <<\EOF
3610#define WITH_THREAD 1
3611EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003612
Barry Warsawc0d24d82000-06-29 16:12:00 +00003613 LIBS="$LIBS -lmpc"
3614 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003615 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003616else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003617 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003618fi
3619
Barry Warsawc0d24d82000-06-29 16:12:00 +00003620 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003621echo "configure:3622: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003622ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003623if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003624 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003625else
3626 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003627LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003628cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003629#line 3630 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003630#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003631/* Override any gcc2 internal prototype to avoid an error. */
3632/* We use char because int might match the return type of a gcc2
3633 builtin and then its argument prototype would still apply. */
3634char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003635
Guido van Rossumf78abae1997-01-21 22:02:36 +00003636int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003637thr_create()
3638; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003639EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003640if { (eval echo configure:3641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003641 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003642 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003643else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003644 echo "configure: failed program was:" >&5
3645 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003646 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003647 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003648fi
3649rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003650LIBS="$ac_save_LIBS"
3651
3652fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003653if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003654 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003655 cat >> confdefs.h <<\EOF
3656#define WITH_THREAD 1
3657EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003658
Barry Warsawc0d24d82000-06-29 16:12:00 +00003659 LIBS="$LIBS -lthread"
3660 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003661 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003662else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003663 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003664fi
3665
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00003666
3667 if test "$USE_THREAD_MODULE" != "#"
3668 then
3669 # If the above checks didn't disable threads, (at least) OSF1
3670 # needs this '-threads' argument during linking.
3671 case $ac_sys_system in
3672 OSF1) LDLAST=-threads;;
3673 esac
3674 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003675fi
3676
Barry Warsawef82cd72000-06-30 16:21:01 +00003677# Check for GC support
3678
3679USE_GC_MODULE=""
3680echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003681echo "configure:3682: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003682# Check whether --with-cycle-gc or --without-cycle-gc was given.
3683if test "${with_cycle_gc+set}" = set; then
3684 withval="$with_cycle_gc"
3685 :
3686fi
3687
3688
3689if test -z "$with_cycle_gc"
3690then with_cycle_gc="yes"
3691fi
3692if test "$with_cycle_gc" = "no"
3693then
3694 USE_GC_MODULE="#"
3695else
3696 cat >> confdefs.h <<\EOF
3697#define WITH_CYCLE_GC 1
3698EOF
3699
3700fi
3701echo "$ac_t""$with_cycle_gc" 1>&6
3702
Fred Drakea50d6ec2000-08-31 16:13:20 +00003703# Check for LIBDB support
3704# either --with-libdb or, in its absence, the presence of db.h
3705
3706USE_BSDDB_MODULE=""
3707echo $ac_n "checking for --with-libdb""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003708echo "configure:3709: checking for --with-libdb" >&5
Fred Drakea50d6ec2000-08-31 16:13:20 +00003709# Check whether --with-libdb or --without-libdb was given.
3710if test "${with_libdb+set}" = set; then
3711 withval="$with_libdb"
3712 :
3713fi
3714
3715
Skip Montanarob89f41e2000-09-04 04:06:05 +00003716# enabled by default, but db.h must be found
3717if test "$ac_cv_header_db_h" = "yes"
3718then
3719 if test "$with_libdb" != "no"
3720 then with_libdb="yes"
3721 fi
3722else
Fred Drake5790be12000-10-09 17:06:13 +00003723 # make sure user knows why bsddb support wasn't enabled even
Skip Montanarob89f41e2000-09-04 04:06:05 +00003724 # though s/he requested it
3725 if test "$with_libdb" = "yes"
3726 then echo $ac_n "(requested, but db.h was not found) $ac_c"
3727 fi
3728 with_libdb="no"
Fred Drakea50d6ec2000-08-31 16:13:20 +00003729fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00003730
Fred Drakea50d6ec2000-08-31 16:13:20 +00003731if test "$with_libdb" = "no"
3732then
3733 USE_BSDDB_MODULE="#"
3734else
3735 cat >> confdefs.h <<\EOF
3736#define WITH_LIBDB 1
3737EOF
3738
3739fi
3740echo "$ac_t""$with_libdb" 1>&6
3741
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003742if test "$with_libdb" = "yes"
3743then
3744 # check for libdb; BSD systems have the DB routines in libc --tg
3745
Martin v. Löwis05a65d62000-09-24 19:40:25 +00003746 # If dbopen is not in libc, then checking whether it is in libdb
3747 # is difficult: db_185.h may #define it as __db185_open
Fred Drake02706f52000-09-25 15:08:46 +00003748 # Instead, we just trust it is in libdb; linking will fail if it
3749 # is not.
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003750 echo $ac_n "checking for dbopen""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003751echo "configure:3752: checking for dbopen" >&5
3752if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003753 echo $ac_n "(cached) $ac_c" 1>&6
3754else
3755 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003756#line 3757 "configure"
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003757#include "confdefs.h"
3758/* System header to define __stub macros and hopefully few prototypes,
3759 which can conflict with char dbopen(); below. */
3760#include <assert.h>
3761/* Override any gcc2 internal prototype to avoid an error. */
3762/* We use char because int might match the return type of a gcc2
3763 builtin and then its argument prototype would still apply. */
3764char dbopen();
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003765
3766int main() {
3767
3768/* The GNU C library defines this for functions which it implements
3769 to always fail with ENOSYS. Some functions are actually named
3770 something starting with __ and the normal name is an alias. */
3771#if defined (__stub_dbopen) || defined (__stub___dbopen)
3772choke me
3773#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003774dbopen();
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003775#endif
3776
3777; return 0; }
3778EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003779if { (eval echo configure:3780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003780 rm -rf conftest*
3781 eval "ac_cv_func_dbopen=yes"
3782else
3783 echo "configure: failed program was:" >&5
3784 cat conftest.$ac_ext >&5
3785 rm -rf conftest*
3786 eval "ac_cv_func_dbopen=no"
3787fi
3788rm -f conftest*
3789fi
3790
3791if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
3792 echo "$ac_t""yes" 1>&6
3793 HAVE_LIBDB=
3794else
3795 echo "$ac_t""no" 1>&6
Martin v. Löwis05a65d62000-09-24 19:40:25 +00003796HAVE_LIBDB=-ldb
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003797fi
3798
3799fi
3800
Barry Warsawef82cd72000-06-30 16:21:01 +00003801# Check for --with-wctype-functions
3802echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003803echo "configure:3804: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003804# Check whether --with-wctype-functions or --without-wctype-functions was given.
3805if test "${with_wctype_functions+set}" = set; then
3806 withval="$with_wctype_functions"
3807
3808if test "$withval" != no
3809then cat >> confdefs.h <<\EOF
3810#define WANT_WCTYPE_FUNCTIONS 1
3811EOF
3812 echo "$ac_t""yes" 1>&6
3813else echo "$ac_t""no" 1>&6
3814fi
3815else
3816 echo "$ac_t""no" 1>&6
3817fi
3818
3819
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003820# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00003821
3822DLINCLDIR=/
3823
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003824echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003825echo "configure:3826: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003826# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003827if test "${with_sgi_dl+set}" = set; then
3828 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003829
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003830echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003831cat >> confdefs.h <<\EOF
3832#define WITH_SGI_DL 1
3833EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003834
Guido van Rossume97ee181999-12-20 21:27:22 +00003835DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003836dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00003837if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003838then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003839else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003840fi
3841DLINCLDIR=${dldir}
3842LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003843else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003844 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003845fi
3846
3847
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003848echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003849echo "configure:3850: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003850# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003851if test "${with_dl_dld+set}" = set; then
3852 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003853
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003854echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003855cat >> confdefs.h <<\EOF
3856#define WITH_DL_DLD 1
3857EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003858
Guido van Rossume97ee181999-12-20 21:27:22 +00003859DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003860dldir=`echo "$withval" | sed 's/,.*//'`
3861dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00003862if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003863then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003864else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003865fi
3866DLINCLDIR=${dldir}
3867LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003868else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003869 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003870fi
3871
3872
Guido van Rossume97ee181999-12-20 21:27:22 +00003873# the dlopen() function means we might want to use dynload_shlib.o. some
3874# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00003875for ac_func in dlopen
3876do
3877echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003878echo "configure:3879: checking for $ac_func" >&5
3879if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003880 echo $ac_n "(cached) $ac_c" 1>&6
3881else
3882 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003883#line 3884 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00003884#include "confdefs.h"
3885/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00003886 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00003887#include <assert.h>
3888/* Override any gcc2 internal prototype to avoid an error. */
3889/* We use char because int might match the return type of a gcc2
3890 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003891char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00003892
3893int main() {
3894
3895/* The GNU C library defines this for functions which it implements
3896 to always fail with ENOSYS. Some functions are actually named
3897 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003898#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00003899choke me
3900#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003901$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00003902#endif
3903
3904; return 0; }
3905EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003906if { (eval echo configure:3907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003907 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003908 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00003909else
3910 echo "configure: failed program was:" >&5
3911 cat conftest.$ac_ext >&5
3912 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003913 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00003914fi
3915rm -f conftest*
3916fi
3917
Thomas Wouters3a584202000-08-05 23:28:51 +00003918if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003919 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00003920 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3921 cat >> confdefs.h <<EOF
3922#define $ac_tr_func 1
3923EOF
3924
Guido van Rossume97ee181999-12-20 21:27:22 +00003925else
3926 echo "$ac_t""no" 1>&6
3927fi
Thomas Wouters3a584202000-08-05 23:28:51 +00003928done
Guido van Rossume97ee181999-12-20 21:27:22 +00003929
3930
3931# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3932# loading of modules.
3933
3934echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003935echo "configure:3936: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00003936if test -z "$DYNLOADFILE"
3937then
3938 case $ac_sys_system/$ac_sys_release in
3939 AIX*) DYNLOADFILE="dynload_aix.o";;
3940 BeOS*) DYNLOADFILE="dynload_beos.o";;
3941 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossum5839e582000-10-09 19:52:35 +00003942 Darwin/*|next/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00003943 *)
3944 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
3945 # out any dynamic loading
3946 if test "$ac_cv_func_dlopen" = yes
3947 then DYNLOADFILE="dynload_shlib.o"
3948 else DYNLOADFILE="dynload_stub.o"
3949 fi
3950 ;;
3951 esac
3952fi
3953echo "$ac_t""$DYNLOADFILE" 1>&6
3954if test "$DYNLOADFILE" != "dynload_stub.o"
3955then
3956 cat >> confdefs.h <<\EOF
3957#define HAVE_DYNAMIC_LOADING 1
3958EOF
3959
3960fi
3961
Guido van Rossum627b2d71993-12-24 10:39:16 +00003962# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00003963for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00003964 flock fork fsync fdatasync fpathconf ftime ftruncate \
Thomas Wouters3a584202000-08-05 23:28:51 +00003965 getgroups getlogin getpeername getpid getpwent getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00003966 kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00003967 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00003968 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003969 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00003970 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00003971 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00003972 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters70c21a12000-07-14 14:28:33 +00003973 truncate uname waitpid _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003974do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003975echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003976echo "configure:3977: checking for $ac_func" >&5
3977if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003978 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003979else
3980 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003981#line 3982 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003982#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003983/* System header to define __stub macros and hopefully few prototypes,
3984 which can conflict with char $ac_func(); below. */
3985#include <assert.h>
3986/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003987/* We use char because int might match the return type of a gcc2
3988 builtin and then its argument prototype would still apply. */
3989char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003990
Guido van Rossumf78abae1997-01-21 22:02:36 +00003991int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003992
Guido van Rossum627b2d71993-12-24 10:39:16 +00003993/* The GNU C library defines this for functions which it implements
3994 to always fail with ENOSYS. Some functions are actually named
3995 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003996#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003997choke me
3998#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003999$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004000#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004001
Guido van Rossum7f43da71994-08-01 12:15:30 +00004002; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004003EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004004if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004005 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004006 eval "ac_cv_func_$ac_func=yes"
4007else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004008 echo "configure: failed program was:" >&5
4009 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004010 rm -rf conftest*
4011 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004012fi
4013rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004014fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004015
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004016if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004017 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004018 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004019 cat >> confdefs.h <<EOF
4020#define $ac_tr_func 1
4021EOF
4022
4023else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004024 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004025fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004026done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004027
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004028
Fred Drake8cef4cf2000-06-28 16:40:38 +00004029# check for openpty and forkpty
4030
4031for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004032do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004033echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004034echo "configure:4035: checking for $ac_func" >&5
4035if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004036 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004037else
4038 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004039#line 4040 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004040#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004041/* System header to define __stub macros and hopefully few prototypes,
4042 which can conflict with char $ac_func(); below. */
4043#include <assert.h>
4044/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004045/* We use char because int might match the return type of a gcc2
4046 builtin and then its argument prototype would still apply. */
4047char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004048
Guido van Rossumf78abae1997-01-21 22:02:36 +00004049int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004050
Guido van Rossum627b2d71993-12-24 10:39:16 +00004051/* The GNU C library defines this for functions which it implements
4052 to always fail with ENOSYS. Some functions are actually named
4053 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004054#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004055choke me
4056#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004057$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004058#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004059
Guido van Rossum7f43da71994-08-01 12:15:30 +00004060; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004061EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004062if { (eval echo configure:4063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004063 rm -rf conftest*
4064 eval "ac_cv_func_$ac_func=yes"
4065else
4066 echo "configure: failed program was:" >&5
4067 cat conftest.$ac_ext >&5
4068 rm -rf conftest*
4069 eval "ac_cv_func_$ac_func=no"
4070fi
4071rm -f conftest*
4072fi
4073
4074if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4075 echo "$ac_t""yes" 1>&6
4076 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4077 cat >> confdefs.h <<EOF
4078#define $ac_tr_func 1
4079EOF
4080
4081else
4082 echo "$ac_t""no" 1>&6
4083echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004084echo "configure:4085: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004085ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004086if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004087 echo $ac_n "(cached) $ac_c" 1>&6
4088else
4089 ac_save_LIBS="$LIBS"
4090LIBS="-lutil $LIBS"
4091cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004092#line 4093 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004093#include "confdefs.h"
4094/* Override any gcc2 internal prototype to avoid an error. */
4095/* We use char because int might match the return type of a gcc2
4096 builtin and then its argument prototype would still apply. */
4097char openpty();
4098
4099int main() {
4100openpty()
4101; return 0; }
4102EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004103if { (eval echo configure:4104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004104 rm -rf conftest*
4105 eval "ac_cv_lib_$ac_lib_var=yes"
4106else
4107 echo "configure: failed program was:" >&5
4108 cat conftest.$ac_ext >&5
4109 rm -rf conftest*
4110 eval "ac_cv_lib_$ac_lib_var=no"
4111fi
4112rm -f conftest*
4113LIBS="$ac_save_LIBS"
4114
4115fi
4116if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4117 echo "$ac_t""yes" 1>&6
4118 cat >> confdefs.h <<\EOF
4119#define HAVE_OPENPTY 1
4120EOF
4121 LIBS="$LIBS -lutil"
4122else
4123 echo "$ac_t""no" 1>&6
4124fi
4125
4126fi
4127done
4128
4129for ac_func in forkpty
4130do
4131echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004132echo "configure:4133: checking for $ac_func" >&5
4133if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004134 echo $ac_n "(cached) $ac_c" 1>&6
4135else
4136 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004137#line 4138 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004138#include "confdefs.h"
4139/* System header to define __stub macros and hopefully few prototypes,
4140 which can conflict with char $ac_func(); below. */
4141#include <assert.h>
4142/* Override any gcc2 internal prototype to avoid an error. */
4143/* We use char because int might match the return type of a gcc2
4144 builtin and then its argument prototype would still apply. */
4145char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004146
4147int main() {
4148
4149/* The GNU C library defines this for functions which it implements
4150 to always fail with ENOSYS. Some functions are actually named
4151 something starting with __ and the normal name is an alias. */
4152#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4153choke me
4154#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004155$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004156#endif
4157
4158; return 0; }
4159EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004160if { (eval echo configure:4161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004161 rm -rf conftest*
4162 eval "ac_cv_func_$ac_func=yes"
4163else
4164 echo "configure: failed program was:" >&5
4165 cat conftest.$ac_ext >&5
4166 rm -rf conftest*
4167 eval "ac_cv_func_$ac_func=no"
4168fi
4169rm -f conftest*
4170fi
4171
4172if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4173 echo "$ac_t""yes" 1>&6
4174 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4175 cat >> confdefs.h <<EOF
4176#define $ac_tr_func 1
4177EOF
4178
4179else
4180 echo "$ac_t""no" 1>&6
4181echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004182echo "configure:4183: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004183ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004184if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004185 echo $ac_n "(cached) $ac_c" 1>&6
4186else
4187 ac_save_LIBS="$LIBS"
4188LIBS="-lutil $LIBS"
4189cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004190#line 4191 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004191#include "confdefs.h"
4192/* Override any gcc2 internal prototype to avoid an error. */
4193/* We use char because int might match the return type of a gcc2
4194 builtin and then its argument prototype would still apply. */
4195char forkpty();
4196
4197int main() {
4198forkpty()
4199; return 0; }
4200EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004201if { (eval echo configure:4202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004202 rm -rf conftest*
4203 eval "ac_cv_lib_$ac_lib_var=yes"
4204else
4205 echo "configure: failed program was:" >&5
4206 cat conftest.$ac_ext >&5
4207 rm -rf conftest*
4208 eval "ac_cv_lib_$ac_lib_var=no"
4209fi
4210rm -f conftest*
4211LIBS="$ac_save_LIBS"
4212
4213fi
4214if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4215 echo "$ac_t""yes" 1>&6
4216 cat >> confdefs.h <<\EOF
4217#define HAVE_FORKPTY 1
4218EOF
4219 LIBS="$LIBS -lutil"
4220else
4221 echo "$ac_t""no" 1>&6
4222fi
4223
4224fi
4225done
4226
4227
4228# check for long file support functions
4229for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4230do
4231echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004232echo "configure:4233: checking for $ac_func" >&5
4233if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004234 echo $ac_n "(cached) $ac_c" 1>&6
4235else
4236 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004237#line 4238 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004238#include "confdefs.h"
4239/* System header to define __stub macros and hopefully few prototypes,
4240 which can conflict with char $ac_func(); below. */
4241#include <assert.h>
4242/* Override any gcc2 internal prototype to avoid an error. */
4243/* We use char because int might match the return type of a gcc2
4244 builtin and then its argument prototype would still apply. */
4245char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004246
4247int main() {
4248
4249/* The GNU C library defines this for functions which it implements
4250 to always fail with ENOSYS. Some functions are actually named
4251 something starting with __ and the normal name is an alias. */
4252#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4253choke me
4254#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004255$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004256#endif
4257
4258; return 0; }
4259EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004260if { (eval echo configure:4261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004261 rm -rf conftest*
4262 eval "ac_cv_func_$ac_func=yes"
4263else
4264 echo "configure: failed program was:" >&5
4265 cat conftest.$ac_ext >&5
4266 rm -rf conftest*
4267 eval "ac_cv_func_$ac_func=no"
4268fi
4269rm -f conftest*
4270fi
4271
4272if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4273 echo "$ac_t""yes" 1>&6
4274 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4275 cat >> confdefs.h <<EOF
4276#define $ac_tr_func 1
4277EOF
4278
4279else
4280 echo "$ac_t""no" 1>&6
4281fi
4282done
4283
4284
4285for ac_func in dup2 getcwd strdup strerror memmove
4286do
4287echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004288echo "configure:4289: checking for $ac_func" >&5
4289if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004290 echo $ac_n "(cached) $ac_c" 1>&6
4291else
4292 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004293#line 4294 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004294#include "confdefs.h"
4295/* System header to define __stub macros and hopefully few prototypes,
4296 which can conflict with char $ac_func(); below. */
4297#include <assert.h>
4298/* Override any gcc2 internal prototype to avoid an error. */
4299/* We use char because int might match the return type of a gcc2
4300 builtin and then its argument prototype would still apply. */
4301char $ac_func();
4302
4303int main() {
4304
4305/* The GNU C library defines this for functions which it implements
4306 to always fail with ENOSYS. Some functions are actually named
4307 something starting with __ and the normal name is an alias. */
4308#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4309choke me
4310#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004311$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004312#endif
4313
4314; return 0; }
4315EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004316if { (eval echo configure:4317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004317 rm -rf conftest*
4318 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004319else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004320 echo "configure: failed program was:" >&5
4321 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004322 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004323 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004324fi
4325rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004326fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004327
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004328if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004329 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004330 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4331 cat >> confdefs.h <<EOF
4332#define $ac_tr_func 1
4333EOF
4334
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004335else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004336 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004337LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004338fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004339done
4340
Guido van Rossumf78abae1997-01-21 22:02:36 +00004341
Thomas Wouters3a584202000-08-05 23:28:51 +00004342for ac_func in getpgrp
4343do
4344echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004345echo "configure:4346: checking for $ac_func" >&5
4346if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004347 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004348else
4349 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004350#line 4351 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004351#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004352/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004353 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004354#include <assert.h>
4355/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004356/* We use char because int might match the return type of a gcc2
4357 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004358char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004359
Guido van Rossumf78abae1997-01-21 22:02:36 +00004360int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004361
Guido van Rossum627b2d71993-12-24 10:39:16 +00004362/* The GNU C library defines this for functions which it implements
4363 to always fail with ENOSYS. Some functions are actually named
4364 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004365#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004366choke me
4367#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004368$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004369#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004370
4371; return 0; }
4372EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004373if { (eval echo configure:4374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004374 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004375 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004376else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004377 echo "configure: failed program was:" >&5
4378 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004379 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004380 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004381fi
4382rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004383fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004384
Thomas Wouters3a584202000-08-05 23:28:51 +00004385if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004386 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004387 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4388 cat >> confdefs.h <<EOF
4389#define $ac_tr_func 1
4390EOF
4391 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004392#line 4393 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004393#include "confdefs.h"
4394#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004395int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004396getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004397; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004398EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004399if { (eval echo configure:4400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004400 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004401 cat >> confdefs.h <<\EOF
4402#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004403EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004404
Guido van Rossumf78abae1997-01-21 22:02:36 +00004405else
4406 echo "configure: failed program was:" >&5
4407 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004408fi
4409rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004410else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004411 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004412fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004413done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004414
Thomas Wouters3a584202000-08-05 23:28:51 +00004415for ac_func in setpgrp
4416do
4417echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004418echo "configure:4419: checking for $ac_func" >&5
4419if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004420 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004421else
4422 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004423#line 4424 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004424#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004425/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004426 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004427#include <assert.h>
4428/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004429/* We use char because int might match the return type of a gcc2
4430 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004431char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004432
Guido van Rossumf78abae1997-01-21 22:02:36 +00004433int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004434
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004435/* The GNU C library defines this for functions which it implements
4436 to always fail with ENOSYS. Some functions are actually named
4437 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004438#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004439choke me
4440#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004441$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004442#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004443
4444; return 0; }
4445EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004446if { (eval echo configure:4447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004447 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004448 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004449else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004450 echo "configure: failed program was:" >&5
4451 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004452 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004453 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004454fi
4455rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004456fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004457
Thomas Wouters3a584202000-08-05 23:28:51 +00004458if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004459 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004460 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4461 cat >> confdefs.h <<EOF
4462#define $ac_tr_func 1
4463EOF
4464 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004465#line 4466 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004466#include "confdefs.h"
4467#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004468int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004469setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004470; return 0; }
4471EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004472if { (eval echo configure:4473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004473 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004474 cat >> confdefs.h <<\EOF
4475#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004476EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004477
Guido van Rossumf78abae1997-01-21 22:02:36 +00004478else
4479 echo "configure: failed program was:" >&5
4480 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004481fi
4482rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004483else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004484 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004485fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004486done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004487
Thomas Wouters3a584202000-08-05 23:28:51 +00004488for ac_func in gettimeofday
4489do
4490echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004491echo "configure:4492: checking for $ac_func" >&5
4492if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004493 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004494else
4495 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004496#line 4497 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004497#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004498/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004499 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004500#include <assert.h>
4501/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004502/* We use char because int might match the return type of a gcc2
4503 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004504char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004505
Guido van Rossumf78abae1997-01-21 22:02:36 +00004506int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004507
4508/* The GNU C library defines this for functions which it implements
4509 to always fail with ENOSYS. Some functions are actually named
4510 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004511#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004512choke me
4513#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004514$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004515#endif
4516
4517; return 0; }
4518EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004519if { (eval echo configure:4520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004520 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004521 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004522else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004523 echo "configure: failed program was:" >&5
4524 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004525 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004526 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004527fi
4528rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004529fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004530
Thomas Wouters3a584202000-08-05 23:28:51 +00004531if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004532 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004533 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4534 cat >> confdefs.h <<EOF
4535#define $ac_tr_func 1
4536EOF
4537 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004538#line 4539 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004539#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004540#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004541int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004542gettimeofday((struct timeval*)0,(struct timezone*)0);
4543; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004544EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004545if { (eval echo configure:4546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004546 :
4547else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004548 echo "configure: failed program was:" >&5
4549 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004550 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004551 cat >> confdefs.h <<\EOF
4552#define GETTIMEOFDAY_NO_TZ 1
4553EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004554
4555fi
4556rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004557else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004558 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004559fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004560done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004561
4562
4563# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004564echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004565echo "configure:4566: checking whether time.h and sys/time.h may both be included" >&5
4566if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004567 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004568else
4569 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004570#line 4571 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004571#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004572#include <sys/types.h>
4573#include <sys/time.h>
4574#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004575int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004576struct tm *tp;
4577; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004578EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004579if { (eval echo configure:4580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004580 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004581 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004582else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004583 echo "configure: failed program was:" >&5
4584 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004585 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004586 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004587fi
4588rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004589fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004590
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004591echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004592if test $ac_cv_header_time = yes; then
4593 cat >> confdefs.h <<\EOF
4594#define TIME_WITH_SYS_TIME 1
4595EOF
4596
4597fi
4598
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004599echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004600echo "configure:4601: checking whether struct tm is in sys/time.h or time.h" >&5
4601if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004602 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004603else
4604 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004605#line 4606 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004606#include "confdefs.h"
4607#include <sys/types.h>
4608#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004609int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004610struct tm *tp; tp->tm_sec;
4611; return 0; }
4612EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004613if { (eval echo configure:4614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004614 rm -rf conftest*
4615 ac_cv_struct_tm=time.h
4616else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004617 echo "configure: failed program was:" >&5
4618 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004619 rm -rf conftest*
4620 ac_cv_struct_tm=sys/time.h
4621fi
4622rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004623fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004624
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004625echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004626if test $ac_cv_struct_tm = sys/time.h; then
4627 cat >> confdefs.h <<\EOF
4628#define TM_IN_SYS_TIME 1
4629EOF
4630
4631fi
4632
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004633echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4634echo "configure:4635: checking for tm_zone in struct tm" >&5
4635if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004636 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004637else
4638 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004639#line 4640 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004640#include "confdefs.h"
4641#include <sys/types.h>
4642#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004643int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004644struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004645; return 0; }
4646EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004647if { (eval echo configure:4648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004648 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004649 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004650else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004651 echo "configure: failed program was:" >&5
4652 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004653 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004654 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004655fi
4656rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004657fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004658
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004659echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4660if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004661 cat >> confdefs.h <<\EOF
4662#define HAVE_TM_ZONE 1
4663EOF
4664
4665else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004666 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004667echo "configure:4668: checking for tzname" >&5
4668if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004669 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004670else
4671 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004672#line 4673 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004673#include "confdefs.h"
4674#include <time.h>
4675#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004676extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004677#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004678int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004679atoi(*tzname);
4680; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004681EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004682if { (eval echo configure:4683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004683 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004684 ac_cv_var_tzname=yes
4685else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004686 echo "configure: failed program was:" >&5
4687 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004688 rm -rf conftest*
4689 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004690fi
4691rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004692fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004693
4694echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004695 if test $ac_cv_var_tzname = yes; then
4696 cat >> confdefs.h <<\EOF
4697#define HAVE_TZNAME 1
4698EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004699
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004700 fi
4701fi
4702
4703
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004704echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004705echo "configure:4706: checking for time.h that defines altzone" >&5
4706if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004707 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004708else
4709 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004710#line 4711 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004711#include "confdefs.h"
4712#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004713int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004714return altzone;
4715; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004716EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004717if { (eval echo configure:4718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004718 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004719 ac_cv_header_time_altzone=yes
4720else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004721 echo "configure: failed program was:" >&5
4722 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004723 rm -rf conftest*
4724 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004725fi
4726rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004727fi
4728
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004729echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004730if test $ac_cv_header_time_altzone = yes; then
4731 cat >> confdefs.h <<\EOF
4732#define HAVE_ALTZONE 1
4733EOF
4734
4735fi
4736
Guido van Rossumda88dad1995-01-26 00:46:29 +00004737was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004738echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004739echo "configure:4740: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004740cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004741#line 4742 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004742#include "confdefs.h"
4743
4744#include <sys/types.h>
4745#include <sys/select.h>
4746#include <sys/time.h>
4747
Guido van Rossumf78abae1997-01-21 22:02:36 +00004748int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004749;
4750; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004751EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004752if { (eval echo configure:4753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004753 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004754 cat >> confdefs.h <<\EOF
4755#define SYS_SELECT_WITH_SYS_TIME 1
4756EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004757 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004758else
4759 echo "configure: failed program was:" >&5
4760 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004761fi
4762rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004763echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004764
4765# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004766
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004767echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004768echo "configure:4769: checking whether char is unsigned" >&5
4769if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004770 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004771else
4772 if test "$GCC" = yes; then
4773 # GCC predefines this symbol on systems where it applies.
4774cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004775#line 4776 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004776#include "confdefs.h"
4777#ifdef __CHAR_UNSIGNED__
4778 yes
4779#endif
4780
4781EOF
4782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4783 egrep "yes" >/dev/null 2>&1; then
4784 rm -rf conftest*
4785 ac_cv_c_char_unsigned=yes
4786else
4787 rm -rf conftest*
4788 ac_cv_c_char_unsigned=no
4789fi
4790rm -f conftest*
4791
4792else
4793if test "$cross_compiling" = yes; then
4794 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4795else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004796 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004797#line 4798 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004798#include "confdefs.h"
4799/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004800#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00004801#define volatile
4802#endif
4803main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00004804 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004805}
4806EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004807if { (eval echo configure:4808: \"$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 +00004808then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004809 ac_cv_c_char_unsigned=yes
4810else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004811 echo "configure: failed program was:" >&5
4812 cat conftest.$ac_ext >&5
4813 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004814 ac_cv_c_char_unsigned=no
4815fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004816rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004817fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004818
4819fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004820fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004821
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004822echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004823if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
4824 cat >> confdefs.h <<\EOF
4825#define __CHAR_UNSIGNED__ 1
4826EOF
4827
4828fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004829
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004830echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004831echo "configure:4832: checking for working const" >&5
4832if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004833 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004834else
4835 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004836#line 4837 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004837#include "confdefs.h"
4838
Guido van Rossumf78abae1997-01-21 22:02:36 +00004839int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004840
4841/* Ultrix mips cc rejects this. */
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00004842typedef int charset[2]; const charset x = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004843/* SunOS 4.1.1 cc rejects this. */
4844char const *const *ccp;
4845char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004846/* NEC SVR4.0.2 mips cc rejects this. */
4847struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004848static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004849/* AIX XL C 1.02.0.0 rejects this.
4850 It does not let you subtract one const X* pointer from another in an arm
4851 of an if-expression whose if-part is not a constant expression */
4852const char *g = "string";
4853ccp = &g + (g ? g-g : 0);
4854/* HPUX 7.0 cc rejects these. */
4855++ccp;
4856p = (char**) ccp;
4857ccp = (char const *const *) p;
4858{ /* SCO 3.2v4 cc rejects this. */
4859 char *t;
4860 char const *s = 0 ? (char *) 0 : (char const *) 0;
4861
4862 *t++ = 0;
4863}
4864{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004865 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004866 const int *foo = &x[0];
4867 ++foo;
4868}
4869{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4870 typedef const int *iptr;
4871 iptr p = 0;
4872 ++p;
4873}
4874{ /* AIX XL C 1.02.0.0 rejects this saying
4875 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4876 struct s { int j; const int *ap[3]; };
4877 struct s *b; b->j = 5;
4878}
4879{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4880 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004881}
4882
4883; return 0; }
4884EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004885if { (eval echo configure:4886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004886 rm -rf conftest*
4887 ac_cv_c_const=yes
4888else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004889 echo "configure: failed program was:" >&5
4890 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004891 rm -rf conftest*
4892 ac_cv_c_const=no
4893fi
4894rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004895fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004896
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004897echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004898if test $ac_cv_c_const = no; then
4899 cat >> confdefs.h <<\EOF
4900#define const
4901EOF
4902
4903fi
4904
Guido van Rossumef2255b2000-03-10 22:30:29 +00004905echo $ac_n "checking for inline""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004906echo "configure:4907: checking for inline" >&5
4907if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004908 echo $ac_n "(cached) $ac_c" 1>&6
4909else
4910 ac_cv_c_inline=no
4911for ac_kw in inline __inline__ __inline; do
4912 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004913#line 4914 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00004914#include "confdefs.h"
4915
4916int main() {
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00004917} int $ac_kw foo() {
Guido van Rossumef2255b2000-03-10 22:30:29 +00004918; return 0; }
4919EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004920if { (eval echo configure:4921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004921 rm -rf conftest*
4922 ac_cv_c_inline=$ac_kw; break
4923else
4924 echo "configure: failed program was:" >&5
4925 cat conftest.$ac_ext >&5
4926fi
4927rm -f conftest*
4928done
4929
4930fi
4931
4932echo "$ac_t""$ac_cv_c_inline" 1>&6
4933case "$ac_cv_c_inline" in
4934 inline | yes) ;;
4935 no) cat >> confdefs.h <<\EOF
4936#define inline
4937EOF
4938 ;;
4939 *) cat >> confdefs.h <<EOF
4940#define inline $ac_cv_c_inline
4941EOF
4942 ;;
4943esac
4944
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004945
Guido van Rossumda88dad1995-01-26 00:46:29 +00004946works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004947echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004948echo "configure:4949: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004949cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004950#line 4951 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004951#include "confdefs.h"
4952
Guido van Rossumf78abae1997-01-21 22:02:36 +00004953int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004954volatile int x; x = 0;
4955; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004956EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004957if { (eval echo configure:4958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004958 rm -rf conftest*
4959 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004960else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004961 echo "configure: failed program was:" >&5
4962 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004963 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004964 cat >> confdefs.h <<\EOF
4965#define volatile
4966EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004967
4968fi
4969rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004970echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004971
Guido van Rossumda88dad1995-01-26 00:46:29 +00004972works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004973echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004974echo "configure:4975: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004975cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004976#line 4977 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004977#include "confdefs.h"
4978
Guido van Rossumf78abae1997-01-21 22:02:36 +00004979int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004980signed char c;
4981; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004982EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004983if { (eval echo configure:4984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004984 rm -rf conftest*
4985 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004986else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004987 echo "configure: failed program was:" >&5
4988 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004989 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004990 cat >> confdefs.h <<\EOF
4991#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00004992EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004993
4994fi
4995rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004996echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004997
Guido van Rossumda88dad1995-01-26 00:46:29 +00004998have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004999echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005000echo "configure:5001: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005001cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005002#line 5003 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005003#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005004int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005005int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005006return foo(10);
5007; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005008EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005009if { (eval echo configure:5010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005010 rm -rf conftest*
5011 cat >> confdefs.h <<\EOF
5012#define HAVE_PROTOTYPES 1
5013EOF
5014 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005015else
5016 echo "configure: failed program was:" >&5
5017 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005018fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005019rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005020echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005021
Guido van Rossumda88dad1995-01-26 00:46:29 +00005022works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005023echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005024echo "configure:5025: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005025cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005026#line 5027 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005027#include "confdefs.h"
5028
5029#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00005030int foo(int x, ...) {
5031 va_list va;
5032 va_start(va, x);
5033 va_arg(va, int);
5034 va_arg(va, char *);
5035 va_arg(va, double);
5036 return 0;
5037}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005038
Guido van Rossumf78abae1997-01-21 22:02:36 +00005039int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005040return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005041; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005042EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005043if { (eval echo configure:5044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005044 rm -rf conftest*
5045 cat >> confdefs.h <<\EOF
5046#define HAVE_STDARG_PROTOTYPES 1
5047EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005048 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005049else
5050 echo "configure: failed program was:" >&5
5051 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005052fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005053rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005054echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005055
Guido van Rossumda88dad1995-01-26 00:46:29 +00005056if test "$have_prototypes" = yes; then
5057bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005058echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005059echo "configure:5060: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005060cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005061#line 5062 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005062#include "confdefs.h"
5063#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005064int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005065char **t;execve("@",t,t);
5066; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005067EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005068if { (eval echo configure:5069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005069 :
5070else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005071 echo "configure: failed program was:" >&5
5072 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005073 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005074 cat >> confdefs.h <<\EOF
5075#define BAD_EXEC_PROTOTYPES 1
5076EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005077 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005078fi
5079rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005080echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005081fi
5082
Guido van Rossumda88dad1995-01-26 00:46:29 +00005083bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005084echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005085echo "configure:5086: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005086if test "$cross_compiling" = yes; then
5087 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5088else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005089 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005090#line 5091 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005091#include "confdefs.h"
5092
5093struct s { int a; int b; };
5094static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005095int foobar() {
5096 static int random;
5097 random = (int) &foo;
5098 return random;
5099}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005100static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005101main() {
5102 exit(!((int)&foo == foobar()));
5103}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005104
5105EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005106if { (eval echo configure:5107: \"$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 +00005107then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005108 :
5109else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005110 echo "configure: failed program was:" >&5
5111 cat conftest.$ac_ext >&5
5112 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005113 cat >> confdefs.h <<\EOF
5114#define BAD_STATIC_FORWARD 1
5115EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005116 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005117fi
5118rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005119fi
5120
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005121echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005122
Guido van Rossumda88dad1995-01-26 00:46:29 +00005123va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005124echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005125echo "configure:5126: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005126cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005127#line 5128 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005128#include "confdefs.h"
5129
5130#ifdef HAVE_STDARG_PROTOTYPES
5131#include <stdarg.h>
5132#else
5133#include <varargs.h>
5134#endif
5135
Guido van Rossumf78abae1997-01-21 22:02:36 +00005136int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005137va_list list1, list2; list1 = list2;
5138; return 0; }
5139EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005140if { (eval echo configure:5141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005141 :
5142else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005143 echo "configure: failed program was:" >&5
5144 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005145 rm -rf conftest*
5146 cat >> confdefs.h <<\EOF
5147#define VA_LIST_IS_ARRAY 1
5148EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005149 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005150fi
5151rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005152echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005153
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005154# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5155echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005156echo "configure:5157: checking for gethostbyname_r" >&5
5157if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005158 echo $ac_n "(cached) $ac_c" 1>&6
5159else
5160 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005161#line 5162 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005162#include "confdefs.h"
5163/* System header to define __stub macros and hopefully few prototypes,
5164 which can conflict with char gethostbyname_r(); below. */
5165#include <assert.h>
5166/* Override any gcc2 internal prototype to avoid an error. */
5167/* We use char because int might match the return type of a gcc2
5168 builtin and then its argument prototype would still apply. */
5169char gethostbyname_r();
5170
5171int main() {
5172
5173/* The GNU C library defines this for functions which it implements
5174 to always fail with ENOSYS. Some functions are actually named
5175 something starting with __ and the normal name is an alias. */
5176#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5177choke me
5178#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005179gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005180#endif
5181
5182; return 0; }
5183EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005184if { (eval echo configure:5185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005185 rm -rf conftest*
5186 eval "ac_cv_func_gethostbyname_r=yes"
5187else
5188 echo "configure: failed program was:" >&5
5189 cat conftest.$ac_ext >&5
5190 rm -rf conftest*
5191 eval "ac_cv_func_gethostbyname_r=no"
5192fi
5193rm -f conftest*
5194fi
5195
5196if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5197 echo "$ac_t""yes" 1>&6
5198
5199 cat >> confdefs.h <<\EOF
5200#define HAVE_GETHOSTBYNAME_R 1
5201EOF
5202
5203 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005204echo "configure:5205: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005205 OLD_CFLAGS=$CFLAGS
5206 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
5207 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005208#line 5209 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005209#include "confdefs.h"
5210
5211# include <netdb.h>
5212
5213int main() {
5214
5215 char *name;
5216 struct hostent *he, *res;
5217 char buffer[2048];
5218 int buflen = 2048;
5219 int h_errnop;
5220
5221 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
5222
5223; return 0; }
5224EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005225if { (eval echo configure:5226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005226 rm -rf conftest*
5227
5228 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005229#define HAVE_GETHOSTBYNAME_R 1
5230EOF
5231
5232 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005233#define HAVE_GETHOSTBYNAME_R_6_ARG 1
5234EOF
5235
5236 echo "$ac_t""yes" 1>&6
5237
5238else
5239 echo "configure: failed program was:" >&5
5240 cat conftest.$ac_ext >&5
5241 rm -rf conftest*
5242
5243 echo "$ac_t""no" 1>&6
5244 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005245echo "configure:5246: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005246 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005247#line 5248 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005248#include "confdefs.h"
5249
5250# include <netdb.h>
5251
5252int main() {
5253
5254 char *name;
5255 struct hostent *he;
5256 char buffer[2048];
5257 int buflen = 2048;
5258 int h_errnop;
5259
5260 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
5261
5262; return 0; }
5263EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005264if { (eval echo configure:5265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005265 rm -rf conftest*
5266
5267 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005268#define HAVE_GETHOSTBYNAME_R 1
5269EOF
5270
5271 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005272#define HAVE_GETHOSTBYNAME_R_5_ARG 1
5273EOF
5274
5275 echo "$ac_t""yes" 1>&6
5276
5277else
5278 echo "configure: failed program was:" >&5
5279 cat conftest.$ac_ext >&5
5280 rm -rf conftest*
5281
5282 echo "$ac_t""no" 1>&6
5283 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005284echo "configure:5285: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005285 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005286#line 5287 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005287#include "confdefs.h"
5288
5289# include <netdb.h>
5290
5291int main() {
5292
5293 char *name;
5294 struct hostent *he;
5295 struct hostent_data data;
5296
5297 (void) gethostbyname_r(name, he, &data);
5298
5299; return 0; }
5300EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005301if { (eval echo configure:5302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005302 rm -rf conftest*
5303
5304 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005305#define HAVE_GETHOSTBYNAME_R 1
5306EOF
5307
5308 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005309#define HAVE_GETHOSTBYNAME_R_3_ARG 1
5310EOF
5311
5312 echo "$ac_t""yes" 1>&6
5313
5314else
5315 echo "configure: failed program was:" >&5
5316 cat conftest.$ac_ext >&5
5317 rm -rf conftest*
5318
5319 echo "$ac_t""no" 1>&6
5320
5321fi
5322rm -f conftest*
5323
5324fi
5325rm -f conftest*
5326
5327fi
5328rm -f conftest*
5329 CFLAGS=$OLD_CFLAGS
5330
5331else
5332 echo "$ac_t""no" 1>&6
5333
Thomas Wouters3a584202000-08-05 23:28:51 +00005334 for ac_func in gethostbyname
5335do
5336echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005337echo "configure:5338: checking for $ac_func" >&5
5338if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005339 echo $ac_n "(cached) $ac_c" 1>&6
5340else
5341 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005342#line 5343 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005343#include "confdefs.h"
5344/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005345 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005346#include <assert.h>
5347/* Override any gcc2 internal prototype to avoid an error. */
5348/* We use char because int might match the return type of a gcc2
5349 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005350char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005351
5352int main() {
5353
5354/* The GNU C library defines this for functions which it implements
5355 to always fail with ENOSYS. Some functions are actually named
5356 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005357#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005358choke me
5359#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005360$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005361#endif
5362
5363; return 0; }
5364EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005365if { (eval echo configure:5366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005366 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005367 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005368else
5369 echo "configure: failed program was:" >&5
5370 cat conftest.$ac_ext >&5
5371 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005372 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005373fi
5374rm -f conftest*
5375fi
5376
Thomas Wouters3a584202000-08-05 23:28:51 +00005377if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005378 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005379 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5380 cat >> confdefs.h <<EOF
5381#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005382EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00005383
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005384else
5385 echo "$ac_t""no" 1>&6
5386fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005387done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005388
5389
5390fi
5391
5392
5393
5394
5395
5396
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005397
Guido van Rossum627b2d71993-12-24 10:39:16 +00005398# checks for system services
5399# (none yet)
5400
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005401# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005402echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005403echo "configure:5404: checking for __fpu_control" >&5
5404if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005405 echo $ac_n "(cached) $ac_c" 1>&6
5406else
5407 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005408#line 5409 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005409#include "confdefs.h"
5410/* System header to define __stub macros and hopefully few prototypes,
5411 which can conflict with char __fpu_control(); below. */
5412#include <assert.h>
5413/* Override any gcc2 internal prototype to avoid an error. */
5414/* We use char because int might match the return type of a gcc2
5415 builtin and then its argument prototype would still apply. */
5416char __fpu_control();
5417
5418int main() {
5419
5420/* The GNU C library defines this for functions which it implements
5421 to always fail with ENOSYS. Some functions are actually named
5422 something starting with __ and the normal name is an alias. */
5423#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5424choke me
5425#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005426__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005427#endif
5428
5429; return 0; }
5430EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005431if { (eval echo configure:5432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005432 rm -rf conftest*
5433 eval "ac_cv_func___fpu_control=yes"
5434else
5435 echo "configure: failed program was:" >&5
5436 cat conftest.$ac_ext >&5
5437 rm -rf conftest*
5438 eval "ac_cv_func___fpu_control=no"
5439fi
5440rm -f conftest*
5441fi
5442
5443if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5444 echo "$ac_t""yes" 1>&6
5445 :
5446else
5447 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005448echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005449echo "configure:5450: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005450ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005451if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005452 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005453else
5454 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005455LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005456cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005457#line 5458 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005458#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005459/* Override any gcc2 internal prototype to avoid an error. */
5460/* We use char because int might match the return type of a gcc2
5461 builtin and then its argument prototype would still apply. */
5462char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005463
Guido van Rossumf78abae1997-01-21 22:02:36 +00005464int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005465__fpu_control()
5466; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005467EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005468if { (eval echo configure:5469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005469 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005470 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005471else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005472 echo "configure: failed program was:" >&5
5473 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005474 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005475 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005476fi
5477rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005478LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005479
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005480fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005481if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005482 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005483 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5484 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005485 cat >> confdefs.h <<EOF
5486#define $ac_tr_lib 1
5487EOF
5488
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005489 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005490
5491else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005492 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005493fi
5494
5495
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005496fi
5497
5498
Guido van Rossum7f253911997-05-09 02:42:48 +00005499# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005500echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005501echo "configure:5502: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005502# Check whether --with-fpectl or --without-fpectl was given.
5503if test "${with_fpectl+set}" = set; then
5504 withval="$with_fpectl"
5505
5506if test "$withval" != no
5507then cat >> confdefs.h <<\EOF
5508#define WANT_SIGFPE_HANDLER 1
5509EOF
5510 echo "$ac_t""yes" 1>&6
5511else echo "$ac_t""no" 1>&6
5512fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005513else
5514 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005515fi
5516
5517
Guido van Rossum7f43da71994-08-01 12:15:30 +00005518# check for --with-libm=...
5519
Guido van Rossum563e7081996-09-10 18:20:48 +00005520case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00005521Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005522next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005523BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005524*) LIBM=-lm
5525esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005526echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005527echo "configure:5528: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005528# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005529if test "${with_libm+set}" = set; then
5530 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005531
Guido van Rossum7f253911997-05-09 02:42:48 +00005532if test "$withval" = no
5533then LIBM=
5534 echo "$ac_t""force LIBM empty" 1>&6
5535elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005536then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005537 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005538else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005539fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005540else
5541 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005542fi
5543
5544
5545# check for --with-libc=...
5546
Guido van Rossum7f253911997-05-09 02:42:48 +00005547echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005548echo "configure:5549: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005549# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005550if test "${with_libc+set}" = set; then
5551 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005552
Guido van Rossum7f253911997-05-09 02:42:48 +00005553if test "$withval" = no
5554then LIBC=
5555 echo "$ac_t""force LIBC empty" 1>&6
5556elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005557then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005558 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005559else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005560fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005561else
5562 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005563fi
5564
5565
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005566# check for hypot() in math library
5567LIBS_SAVE=$LIBS
5568LIBS="$LIBS $LIBM"
5569for ac_func in hypot
5570do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005571echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005572echo "configure:5573: checking for $ac_func" >&5
5573if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005574 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005575else
5576 cat > conftest.$ac_ext <<EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005577#line 5578 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005578#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005579/* System header to define __stub macros and hopefully few prototypes,
5580 which can conflict with char $ac_func(); below. */
5581#include <assert.h>
5582/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005583/* We use char because int might match the return type of a gcc2
5584 builtin and then its argument prototype would still apply. */
5585char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005586
Guido van Rossumf78abae1997-01-21 22:02:36 +00005587int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005588
5589/* The GNU C library defines this for functions which it implements
5590 to always fail with ENOSYS. Some functions are actually named
5591 something starting with __ and the normal name is an alias. */
5592#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5593choke me
5594#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005595$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005596#endif
5597
5598; return 0; }
5599EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005600if { (eval echo configure:5601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005601 rm -rf conftest*
5602 eval "ac_cv_func_$ac_func=yes"
5603else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005604 echo "configure: failed program was:" >&5
5605 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005606 rm -rf conftest*
5607 eval "ac_cv_func_$ac_func=no"
5608fi
5609rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005610fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005611
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005612if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5613 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005614 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5615 cat >> confdefs.h <<EOF
5616#define $ac_tr_func 1
5617EOF
5618
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005619else
5620 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005621LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005622fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005623done
5624
Guido van Rossumf78abae1997-01-21 22:02:36 +00005625
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005626LIBS=$LIBS_SAVE
5627
Guido van Rossumad713701997-07-10 22:42:38 +00005628# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005629echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005630echo "configure:5631: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005631if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005632 echo $ac_n "(cached) $ac_c" 1>&6
5633else
5634 if test "$cross_compiling" = yes; then
5635 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5636else
5637 cat > conftest.$ac_ext <<EOF
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005638#line 5639 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005639#include "confdefs.h"
5640#include <stdio.h>
5641#ifdef HAVE_STDLIB
5642#include <stdlib.h>
5643#else
5644char *malloc(), *realloc();
5645int *free();
5646#endif
5647main() {
5648 char *p;
5649 p = malloc(0);
5650 if (p == NULL) exit(1);
5651 p = realloc(p, 0);
5652 if (p == NULL) exit(1);
5653 free(p);
5654 exit(0);
5655}
5656EOF
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005657if { (eval echo configure:5658: \"$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 +00005658then
5659 ac_cv_malloc_zero=nonnull
5660else
5661 echo "configure: failed program was:" >&5
5662 cat conftest.$ac_ext >&5
5663 rm -fr conftest*
5664 ac_cv_malloc_zero=null
5665fi
5666rm -fr conftest*
5667fi
5668
5669fi
5670
5671echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5672if test "$ac_cv_malloc_zero" = null
5673then
5674 cat >> confdefs.h <<\EOF
5675#define MALLOC_ZERO_RETURNS_NULL 1
5676EOF
5677
5678fi
5679
Guido van Rossumef2255b2000-03-10 22:30:29 +00005680# check for wchar.h
5681ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5682echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005683echo "configure:5684: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005684if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005685 echo $ac_n "(cached) $ac_c" 1>&6
5686else
5687 cat > conftest.$ac_ext <<EOF
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005688#line 5689 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005689#include "confdefs.h"
5690#include <wchar.h>
5691EOF
5692ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005693{ (eval echo configure:5694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005694ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5695if test -z "$ac_err"; then
5696 rm -rf conftest*
5697 eval "ac_cv_header_$ac_safe=yes"
5698else
5699 echo "$ac_err" >&5
5700 echo "configure: failed program was:" >&5
5701 cat conftest.$ac_ext >&5
5702 rm -rf conftest*
5703 eval "ac_cv_header_$ac_safe=no"
5704fi
5705rm -f conftest*
5706fi
5707if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5708 echo "$ac_t""yes" 1>&6
5709 cat >> confdefs.h <<\EOF
5710#define HAVE_WCHAR_H 1
5711EOF
5712 wchar_h="yes"
5713else
5714 echo "$ac_t""no" 1>&6
5715wchar_h="no"
5716
5717fi
5718
5719
5720# check for usable wchar_t
5721usable_wchar_t="unkown"
5722echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005723echo "configure:5724: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005724if test "$cross_compiling" = yes; then
5725 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5726else
5727 cat > conftest.$ac_ext <<EOF
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005728#line 5729 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005729#include "confdefs.h"
5730
5731#include "wchar.h"
5732#include "wctype.h"
5733main() {
5734 wchar_t s;
5735 if (sizeof(s) == 2)
5736 exit(0);
5737 else
5738 exit(1);
5739}
5740
5741EOF
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005742if { (eval echo configure:5743: \"$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 +00005743then
5744 cat >> confdefs.h <<\EOF
5745#define HAVE_USABLE_WCHAR_T 1
5746EOF
5747 usable_wchar_t="yes"
5748else
5749 echo "configure: failed program was:" >&5
5750 cat conftest.$ac_ext >&5
5751 rm -fr conftest*
5752 usable_wchar_t="no"
5753fi
5754rm -fr conftest*
5755fi
5756
5757echo "$ac_t""$usable_wchar_t" 1>&6
5758
5759# check for endianness
5760echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005761echo "configure:5762: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005762if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005763 echo $ac_n "(cached) $ac_c" 1>&6
5764else
5765 ac_cv_c_bigendian=unknown
5766# See if sys/param.h defines the BYTE_ORDER macro.
5767cat > conftest.$ac_ext <<EOF
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005768#line 5769 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005769#include "confdefs.h"
5770#include <sys/types.h>
5771#include <sys/param.h>
5772int main() {
5773
5774#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5775 bogus endian macros
5776#endif
5777; return 0; }
5778EOF
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005779if { (eval echo configure:5780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005780 rm -rf conftest*
5781 # It does; now see whether it defined to BIG_ENDIAN or not.
5782cat > conftest.$ac_ext <<EOF
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005783#line 5784 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005784#include "confdefs.h"
5785#include <sys/types.h>
5786#include <sys/param.h>
5787int main() {
5788
5789#if BYTE_ORDER != BIG_ENDIAN
5790 not big endian
5791#endif
5792; return 0; }
5793EOF
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005794if { (eval echo configure:5795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005795 rm -rf conftest*
5796 ac_cv_c_bigendian=yes
5797else
5798 echo "configure: failed program was:" >&5
5799 cat conftest.$ac_ext >&5
5800 rm -rf conftest*
5801 ac_cv_c_bigendian=no
5802fi
5803rm -f conftest*
5804else
5805 echo "configure: failed program was:" >&5
5806 cat conftest.$ac_ext >&5
5807fi
5808rm -f conftest*
5809if test $ac_cv_c_bigendian = unknown; then
5810if test "$cross_compiling" = yes; then
5811 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5812else
5813 cat > conftest.$ac_ext <<EOF
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005814#line 5815 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005815#include "confdefs.h"
5816main () {
5817 /* Are we little or big endian? From Harbison&Steele. */
5818 union
5819 {
5820 long l;
5821 char c[sizeof (long)];
5822 } u;
5823 u.l = 1;
5824 exit (u.c[sizeof (long) - 1] == 1);
5825}
5826EOF
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005827if { (eval echo configure:5828: \"$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 +00005828then
5829 ac_cv_c_bigendian=no
5830else
5831 echo "configure: failed program was:" >&5
5832 cat conftest.$ac_ext >&5
5833 rm -fr conftest*
5834 ac_cv_c_bigendian=yes
5835fi
5836rm -fr conftest*
5837fi
5838
5839fi
5840fi
5841
5842echo "$ac_t""$ac_cv_c_bigendian" 1>&6
5843if test $ac_cv_c_bigendian = yes; then
5844 cat >> confdefs.h <<\EOF
5845#define WORDS_BIGENDIAN 1
5846EOF
5847
5848fi
5849
5850
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005851# Check whether right shifting a negative integer extends the sign bit
5852# or fills with zeros (like the Cray J90, according to Tim Peters).
5853echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005854echo "configure:5855: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005855if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00005856 echo $ac_n "(cached) $ac_c" 1>&6
5857else
5858
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005859if test "$cross_compiling" = yes; then
5860 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5861else
5862 cat > conftest.$ac_ext <<EOF
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005863#line 5864 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005864#include "confdefs.h"
5865
5866int main()
5867{
Vladimir Marangozova6180282000-07-12 05:05:06 +00005868 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005869}
5870
5871EOF
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005872if { (eval echo configure:5873: \"$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 +00005873then
5874 ac_cv_rshift_extends_sign=yes
5875else
5876 echo "configure: failed program was:" >&5
5877 cat conftest.$ac_ext >&5
5878 rm -fr conftest*
5879 ac_cv_rshift_extends_sign=no
5880fi
5881rm -fr conftest*
5882fi
5883
5884fi
5885
5886echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
5887if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005888then
5889 cat >> confdefs.h <<\EOF
5890#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
5891EOF
5892
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005893fi
5894
5895
Guido van Rossum95713eb2000-05-18 20:53:31 +00005896# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
5897# Add sys/socket.h to confdefs.h
5898cat >> confdefs.h <<\EOF
5899#ifdef HAVE_SYS_SOCKET_H
5900#include <sys/socket.h>
5901#endif
5902EOF
5903echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005904echo "configure:5905: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005905if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00005906 echo $ac_n "(cached) $ac_c" 1>&6
5907else
5908 cat > conftest.$ac_ext <<EOF
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005909#line 5910 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005910#include "confdefs.h"
5911#include <sys/types.h>
5912#if STDC_HEADERS
5913#include <stdlib.h>
5914#include <stddef.h>
5915#endif
5916EOF
5917if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5918 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5919 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005920 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00005921else
5922 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005923 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00005924fi
5925rm -f conftest*
5926
5927fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005928echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
5929if test $ac_cv_type_socklen_t = no; then
5930 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00005931#define socklen_t int
5932EOF
5933
5934fi
5935
5936
Fred Drake036144d2000-10-26 17:09:35 +00005937echo $ac_n "checking for Modules/Setup""... $ac_c" 1>&6
Thomas Wouters2cffc7d2000-11-03 08:18:37 +00005938echo "configure:5939: checking for Modules/Setup" >&5
Fred Drake036144d2000-10-26 17:09:35 +00005939if test ! -f Modules/Setup ; then
Guido van Rossum262cf202000-11-02 19:33:53 +00005940 if test ! -d Modules ; then
5941 mkdir Modules
5942 fi
Fred Drake036144d2000-10-26 17:09:35 +00005943 cp "$srcdir/Modules/Setup.dist" Modules/Setup
5944 echo "$ac_t""creating" 1>&6
5945else
5946 echo "$ac_t""already exists" 1>&6
5947fi
5948
Guido van Rossum627b2d71993-12-24 10:39:16 +00005949# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005950trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005951cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005952# This file is a shell script that caches the results of configure
5953# tests run on this system so they can be shared between configure
5954# scripts and configure runs. It is not useful on other systems.
5955# If it contains results you don't want to keep, you may remove or edit it.
5956#
5957# By default, configure uses ./config.cache as the cache file,
5958# creating it if it does not exist already. You can give configure
5959# the --cache-file=FILE option to use a different cache file; that is
5960# what configure does when it calls configure scripts in
5961# subdirectories, so they share the cache.
5962# Giving --cache-file=/dev/null disables caching, for debugging configure.
5963# config.status only pays attention to the cache file if you give it the
5964# --recheck option to rerun configure.
5965#
5966EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005967# The following way of writing the cache mishandles newlines in values,
5968# but we know of no workaround that is simple, portable, and efficient.
5969# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005970# Ultrix sh set writes to stderr and can't be redirected directly,
5971# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005972(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005973 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005974 *ac_space=\ *)
5975 # `set' does not quote correctly, so add quotes (double-quote substitution
5976 # turns \\\\ into \\, and sed turns \\ into \).
5977 sed -n \
5978 -e "s/'/'\\\\''/g" \
5979 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5980 ;;
5981 *)
5982 # `set' quotes correctly as required by POSIX, so do not add quotes.
5983 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5984 ;;
5985 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005986if cmp -s $cache_file confcache; then
5987 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005988else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005989 if test -w $cache_file; then
5990 echo "updating cache $cache_file"
5991 cat confcache > $cache_file
5992 else
5993 echo "not updating unwritable cache $cache_file"
5994 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005995fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005996rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00005997
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005998trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005999
6000test "x$prefix" = xNONE && prefix=$ac_default_prefix
6001# Let make expand exec_prefix.
6002test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00006003
Guido van Rossum7f43da71994-08-01 12:15:30 +00006004# Any assignment to VPATH causes Sun make to only execute
6005# the first set of double-colon rules, so remove it if not needed.
6006# If there is a colon in the path, we need to keep it.
6007if test "x$srcdir" = x.; then
6008 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6009fi
6010
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006011trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00006012
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006013DEFS=-DHAVE_CONFIG_H
6014
6015# Without the "./", some shells look in PATH for config.status.
6016: ${CONFIG_STATUS=./config.status}
6017
6018echo creating $CONFIG_STATUS
6019rm -f $CONFIG_STATUS
6020cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006021#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00006022# Generated automatically by configure.
6023# Run this file to recreate the current configuration.
6024# This directory was configured as follows,
6025# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6026#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006027# $0 $ac_configure_args
6028#
6029# Compiler output produced by configure, useful for debugging
6030# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00006031
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006032ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006033for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00006034do
Guido van Rossum7f43da71994-08-01 12:15:30 +00006035 case "\$ac_option" in
6036 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006037 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6038 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00006039 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006040 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006041 exit 0 ;;
6042 -help | --help | --hel | --he | --h)
6043 echo "\$ac_cs_usage"; exit 0 ;;
6044 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006045 esac
6046done
6047
Guido van Rossum7f43da71994-08-01 12:15:30 +00006048ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00006049
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006050trap 'rm -fr `echo "Makefile \
6051 Objects/Makefile \
6052 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006053 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006054 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006055 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006056 Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006057EOF
6058cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006059
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006060# Protect against being on the right side of a sed subst in config.status.
6061sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6062 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006063$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00006064$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006065s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006066s%@CFLAGS@%$CFLAGS%g
6067s%@CPPFLAGS@%$CPPFLAGS%g
6068s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006069s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006070s%@DEFS@%$DEFS%g
6071s%@LDFLAGS@%$LDFLAGS%g
6072s%@LIBS@%$LIBS%g
6073s%@exec_prefix@%$exec_prefix%g
6074s%@prefix@%$prefix%g
6075s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006076s%@bindir@%$bindir%g
6077s%@sbindir@%$sbindir%g
6078s%@libexecdir@%$libexecdir%g
6079s%@datadir@%$datadir%g
6080s%@sysconfdir@%$sysconfdir%g
6081s%@sharedstatedir@%$sharedstatedir%g
6082s%@localstatedir@%$localstatedir%g
6083s%@libdir@%$libdir%g
6084s%@includedir@%$includedir%g
6085s%@oldincludedir@%$oldincludedir%g
6086s%@infodir@%$infodir%g
6087s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00006088s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006089s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00006090s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00006091s%@SET_CXX@%$SET_CXX%g
6092s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006093s%@CC@%$CC%g
Guido van Rossumff555e32000-09-22 15:38:21 +00006094s%@EXE@%$EXE%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006095s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
6096s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00006097s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006098s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006099s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006100s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006101s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6102s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006103s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006104s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006105s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006106s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006107s%@SO@%$SO%g
6108s%@LDSHARED@%$LDSHARED%g
6109s%@CCSHARED@%$CCSHARED%g
6110s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00006111s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00006112s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00006113s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Fred Drakea50d6ec2000-08-31 16:13:20 +00006114s%@USE_BSDDB_MODULE@%$USE_BSDDB_MODULE%g
Skip Montanaroed33c9a2000-09-08 02:17:15 +00006115s%@HAVE_LIBDB@%$HAVE_LIBDB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006116s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00006117s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006118s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006119s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
6120s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
6121s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006122s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006123s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006124s%@LIBM@%$LIBM%g
6125s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006126
6127CEOF
6128EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006129
6130cat >> $CONFIG_STATUS <<\EOF
6131
6132# Split the substitutions into bite-sized pieces for seds with
6133# small command number limits, like on Digital OSF/1 and HP-UX.
6134ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6135ac_file=1 # Number of current file.
6136ac_beg=1 # First line for current file.
6137ac_end=$ac_max_sed_cmds # Line after last line for current file.
6138ac_more_lines=:
6139ac_sed_cmds=""
6140while $ac_more_lines; do
6141 if test $ac_beg -gt 1; then
6142 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6143 else
6144 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6145 fi
6146 if test ! -s conftest.s$ac_file; then
6147 ac_more_lines=false
6148 rm -f conftest.s$ac_file
6149 else
6150 if test -z "$ac_sed_cmds"; then
6151 ac_sed_cmds="sed -f conftest.s$ac_file"
6152 else
6153 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6154 fi
6155 ac_file=`expr $ac_file + 1`
6156 ac_beg=$ac_end
6157 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6158 fi
6159done
6160if test -z "$ac_sed_cmds"; then
6161 ac_sed_cmds=cat
6162fi
6163EOF
6164
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006165cat >> $CONFIG_STATUS <<EOF
6166
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006167CONFIG_FILES=\${CONFIG_FILES-"Makefile \
6168 Objects/Makefile \
6169 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006170 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006171 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006172 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006173 Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006174EOF
6175cat >> $CONFIG_STATUS <<\EOF
6176for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006177 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006178 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006179 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006180 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6181 *) ac_file_in="${ac_file}.in" ;;
6182 esac
6183
Guido van Rossumf78abae1997-01-21 22:02:36 +00006184 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006185
6186 # Remove last slash and all that follows it. Not all systems have dirname.
6187 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6188 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6189 # The file is in a subdirectory.
6190 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006191 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006192 # A "../" for each directory in $ac_dir_suffix.
6193 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6194 else
6195 ac_dir_suffix= ac_dots=
6196 fi
6197
6198 case "$ac_given_srcdir" in
6199 .) srcdir=.
6200 if test -z "$ac_dots"; then top_srcdir=.
6201 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6202 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6203 *) # Relative path.
6204 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6205 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6206 esac
6207
Guido van Rossumf78abae1997-01-21 22:02:36 +00006208
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006209 echo creating "$ac_file"
6210 rm -f "$ac_file"
6211 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6212 case "$ac_file" in
6213 *Makefile*) ac_comsub="1i\\
6214# $configure_input" ;;
6215 *) ac_comsub= ;;
6216 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006217
6218 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 +00006219 sed -e "$ac_comsub
6220s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006221s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006222s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00006223" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00006224fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00006225rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006226
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006227# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6228# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00006229#
6230# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006231ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6232ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006233ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006234ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006235# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006236ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6237ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006238ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006239ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006240# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006241ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6242ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006243ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006244ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006245
Guido van Rossumf78abae1997-01-21 22:02:36 +00006246if test "${CONFIG_HEADERS+set}" != set; then
6247EOF
6248cat >> $CONFIG_STATUS <<EOF
6249 CONFIG_HEADERS="config.h"
6250EOF
6251cat >> $CONFIG_STATUS <<\EOF
6252fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006253for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006254 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006255 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006256 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006257 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6258 *) ac_file_in="${ac_file}.in" ;;
6259 esac
6260
Guido van Rossum7f43da71994-08-01 12:15:30 +00006261 echo creating $ac_file
6262
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006263 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006264 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6265 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006266
6267EOF
6268
6269# Transform confdefs.h into a sed script conftest.vals that substitutes
6270# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006271# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006272# Protect against being in an unquoted here document in config.status.
6273rm -f conftest.vals
6274cat > conftest.hdr <<\EOF
6275s/[\\&%]/\\&/g
6276s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006277s%#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 +00006278s%ac_d%ac_u%gp
6279s%ac_u%ac_e%gp
6280EOF
6281sed -n -f conftest.hdr confdefs.h > conftest.vals
6282rm -f conftest.hdr
6283
6284# This sed command replaces #undef with comments. This is necessary, for
6285# example, in the case of _POSIX_SOURCE, which is predefined and required
6286# on some systems where configure will not decide to define it.
6287cat >> conftest.vals <<\EOF
6288s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6289EOF
6290
6291# Break up conftest.vals because some shells have a limit on
6292# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006293
6294rm -f conftest.tail
6295while :
6296do
6297 ac_lines=`grep -c . conftest.vals`
6298 # grep -c gives empty output for an empty file on some AIX systems.
6299 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6300 # Write a limited-size here document to conftest.frag.
6301 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6302 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6303 echo 'CEOF
6304 sed -f conftest.frag conftest.in > conftest.out
6305 rm -f conftest.in
6306 mv conftest.out conftest.in
6307' >> $CONFIG_STATUS
6308 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6309 rm -f conftest.vals
6310 mv conftest.tail conftest.vals
6311done
6312rm -f conftest.vals
6313
6314cat >> $CONFIG_STATUS <<\EOF
6315 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006316 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006317 cat conftest.in >> conftest.h
6318 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006319 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006320 echo "$ac_file is unchanged"
6321 rm -f conftest.h
6322 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006323 # Remove last slash and all that follows it. Not all systems have dirname.
6324 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6325 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6326 # The file is in a subdirectory.
6327 test ! -d "$ac_dir" && mkdir "$ac_dir"
6328 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006329 rm -f $ac_file
6330 mv conftest.h $ac_file
6331 fi
6332fi; done
6333
Guido van Rossumf78abae1997-01-21 22:02:36 +00006334EOF
6335cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006336
Guido van Rossumf78abae1997-01-21 22:02:36 +00006337EOF
6338cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006339
6340exit 0
6341EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006342chmod +x $CONFIG_STATUS
6343rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006344test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006345