blob: 8421ddbb0baf46f7b31399ee7da870a3f46a16e2 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Fred Drakeae90f8d2000-09-15 03:38:12 +00003# From configure.in Revision: 1.157
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.
Skip Montanarob89f41e2000-09-04 04:06:05 +00006# Generated automatically using autoconf version 2.14.1
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000011
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# Defaults:
13ac_help=
14ac_default_prefix=/usr/local
15# Any additions from configure.in:
16ac_help="$ac_help
Barry 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
Barry Warsawc0d24d82000-06-29 16:12:00 +000019 --with-next-framework Build (OpenStep|Rhapsody|MacOSX) framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000020ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000021 --with-dyld Use (OpenStep|Rhapsody|MacOSX) dynamic linker"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000022ac_help="$ac_help
Barry 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
Skip Montanarocb853262000-08-30 22:29:48 +000027 --with-pydebug build with Py_DEBUG defined"
28ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000029 --with-libs='lib1 ...' link against additional libs"
Guido van Rossuma68acba1996-07-31 17:36:39 +000030ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000031 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000032ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000033 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000034ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000035 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000036ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000037 --with(out)-cycle-gc disable/enable garbage collection"
38ac_help="$ac_help
Fred Drakea50d6ec2000-08-31 16:13:20 +000039 --with(out)-libdb disable/enable bsddb module"
40ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000041 --with-wctype-functions use wctype.h functions"
42ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000043 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000044ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000045 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000046ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000047 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000048ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000049 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000050ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000051 --with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000052
Guido van Rossum7f43da71994-08-01 12:15:30 +000053# Initialize some variables set by options.
54# The variables have the same names as the options, with
55# dashes changed to underlines.
56build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000057cache_file=./config.cache
58exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000059host=NONE
60no_create=
61nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000062no_recursion=
63prefix=NONE
64program_prefix=NONE
65program_suffix=NONE
66program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000067silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000068site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000069srcdir=
70target=NONE
71verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000072x_includes=NONE
73x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000074bindir='${exec_prefix}/bin'
75sbindir='${exec_prefix}/sbin'
76libexecdir='${exec_prefix}/libexec'
77datadir='${prefix}/share'
78sysconfdir='${prefix}/etc'
79sharedstatedir='${prefix}/com'
80localstatedir='${prefix}/var'
81libdir='${exec_prefix}/lib'
82includedir='${prefix}/include'
83oldincludedir='/usr/include'
84infodir='${prefix}/info'
85mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000086
87# Initialize some other variables.
88subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000089MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000090SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +000091# Maximum number of lines to put in a shell here document.
92ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +000093
94ac_prev=
95for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +000096do
Guido van Rossum627b2d71993-12-24 10:39:16 +000097
Guido van Rossum7f43da71994-08-01 12:15:30 +000098 # If the previous option needs an argument, assign it.
99 if test -n "$ac_prev"; then
100 eval "$ac_prev=\$ac_option"
101 ac_prev=
102 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000103 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000104
Guido van Rossum7f43da71994-08-01 12:15:30 +0000105 case "$ac_option" in
106 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
107 *) ac_optarg= ;;
108 esac
109
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000110 # Accept the important Cygnus configure options, so we can diagnose typos.
111
Guido van Rossum7f43da71994-08-01 12:15:30 +0000112 case "$ac_option" in
113
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000114 -bindir | --bindir | --bindi | --bind | --bin | --bi)
115 ac_prev=bindir ;;
116 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
117 bindir="$ac_optarg" ;;
118
119 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000120 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000121 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000122 build="$ac_optarg" ;;
123
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000124 -cache-file | --cache-file | --cache-fil | --cache-fi \
125 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
126 ac_prev=cache_file ;;
127 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
128 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
129 cache_file="$ac_optarg" ;;
130
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000131 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
132 ac_prev=datadir ;;
133 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
134 | --da=*)
135 datadir="$ac_optarg" ;;
136
Guido van Rossum7f43da71994-08-01 12:15:30 +0000137 -disable-* | --disable-*)
138 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000139 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000140 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000141 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000142 fi
143 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
144 eval "enable_${ac_feature}=no" ;;
145
146 -enable-* | --enable-*)
147 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000148 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000149 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000150 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000151 fi
152 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
153 case "$ac_option" in
154 *=*) ;;
155 *) ac_optarg=yes ;;
156 esac
157 eval "enable_${ac_feature}='$ac_optarg'" ;;
158
Guido van Rossum7f43da71994-08-01 12:15:30 +0000159 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
160 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
161 | --exec | --exe | --ex)
162 ac_prev=exec_prefix ;;
163 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
164 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
165 | --exec=* | --exe=* | --ex=*)
166 exec_prefix="$ac_optarg" ;;
167
168 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000169 # Obsolete; use --with-gas.
170 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000171
172 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000173 # Omit some internal or obsolete options to make the list less imposing.
174 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000175 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000176Usage: configure [options] [host]
177Options: [defaults in brackets after descriptions]
178Configuration:
179 --cache-file=FILE cache test results in FILE
180 --help print this message
181 --no-create do not create output files
182 --quiet, --silent do not print \`checking...' messages
183 --version print the version of autoconf that created configure
184Directory and file names:
185 --prefix=PREFIX install architecture-independent files in PREFIX
186 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000187 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000188 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000189 --bindir=DIR user executables in DIR [EPREFIX/bin]
190 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
191 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
192 --datadir=DIR read-only architecture-independent data in DIR
193 [PREFIX/share]
194 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
195 --sharedstatedir=DIR modifiable architecture-independent data in DIR
196 [PREFIX/com]
197 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
198 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
199 --includedir=DIR C header files in DIR [PREFIX/include]
200 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
201 --infodir=DIR info documentation in DIR [PREFIX/info]
202 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000203 --srcdir=DIR find the sources in DIR [configure dir or ..]
204 --program-prefix=PREFIX prepend PREFIX to installed program names
205 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000206 --program-transform-name=PROGRAM
207 run sed PROGRAM on installed program names
208EOF
209 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000210Host type:
211 --build=BUILD configure for building on BUILD [BUILD=HOST]
212 --host=HOST configure for HOST [guessed]
213 --target=TARGET configure for TARGET [TARGET=HOST]
214Features and packages:
215 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
216 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
217 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
218 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
219 --x-includes=DIR X include files are in DIR
220 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000221EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000222 if test -n "$ac_help"; then
223 echo "--enable and --with options recognized:$ac_help"
224 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000225 exit 0 ;;
226
227 -host | --host | --hos | --ho)
228 ac_prev=host ;;
229 -host=* | --host=* | --hos=* | --ho=*)
230 host="$ac_optarg" ;;
231
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000232 -includedir | --includedir | --includedi | --included | --include \
233 | --includ | --inclu | --incl | --inc)
234 ac_prev=includedir ;;
235 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
236 | --includ=* | --inclu=* | --incl=* | --inc=*)
237 includedir="$ac_optarg" ;;
238
239 -infodir | --infodir | --infodi | --infod | --info | --inf)
240 ac_prev=infodir ;;
241 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
242 infodir="$ac_optarg" ;;
243
244 -libdir | --libdir | --libdi | --libd)
245 ac_prev=libdir ;;
246 -libdir=* | --libdir=* | --libdi=* | --libd=*)
247 libdir="$ac_optarg" ;;
248
249 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
250 | --libexe | --libex | --libe)
251 ac_prev=libexecdir ;;
252 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
253 | --libexe=* | --libex=* | --libe=*)
254 libexecdir="$ac_optarg" ;;
255
256 -localstatedir | --localstatedir | --localstatedi | --localstated \
257 | --localstate | --localstat | --localsta | --localst \
258 | --locals | --local | --loca | --loc | --lo)
259 ac_prev=localstatedir ;;
260 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
261 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
262 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
263 localstatedir="$ac_optarg" ;;
264
265 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
266 ac_prev=mandir ;;
267 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
268 mandir="$ac_optarg" ;;
269
Guido van Rossum7f43da71994-08-01 12:15:30 +0000270 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000271 # Obsolete; use --without-fp.
272 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000273
274 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
275 | --no-cr | --no-c)
276 no_create=yes ;;
277
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000278 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
279 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
280 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000281
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000282 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
283 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
284 | --oldin | --oldi | --old | --ol | --o)
285 ac_prev=oldincludedir ;;
286 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
287 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
288 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
289 oldincludedir="$ac_optarg" ;;
290
Guido van Rossum7f43da71994-08-01 12:15:30 +0000291 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
292 ac_prev=prefix ;;
293 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
294 prefix="$ac_optarg" ;;
295
296 -program-prefix | --program-prefix | --program-prefi | --program-pref \
297 | --program-pre | --program-pr | --program-p)
298 ac_prev=program_prefix ;;
299 -program-prefix=* | --program-prefix=* | --program-prefi=* \
300 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
301 program_prefix="$ac_optarg" ;;
302
303 -program-suffix | --program-suffix | --program-suffi | --program-suff \
304 | --program-suf | --program-su | --program-s)
305 ac_prev=program_suffix ;;
306 -program-suffix=* | --program-suffix=* | --program-suffi=* \
307 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
308 program_suffix="$ac_optarg" ;;
309
310 -program-transform-name | --program-transform-name \
311 | --program-transform-nam | --program-transform-na \
312 | --program-transform-n | --program-transform- \
313 | --program-transform | --program-transfor \
314 | --program-transfo | --program-transf \
315 | --program-trans | --program-tran \
316 | --progr-tra | --program-tr | --program-t)
317 ac_prev=program_transform_name ;;
318 -program-transform-name=* | --program-transform-name=* \
319 | --program-transform-nam=* | --program-transform-na=* \
320 | --program-transform-n=* | --program-transform-=* \
321 | --program-transform=* | --program-transfor=* \
322 | --program-transfo=* | --program-transf=* \
323 | --program-trans=* | --program-tran=* \
324 | --progr-tra=* | --program-tr=* | --program-t=*)
325 program_transform_name="$ac_optarg" ;;
326
327 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
328 | -silent | --silent | --silen | --sile | --sil)
329 silent=yes ;;
330
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000331 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
332 ac_prev=sbindir ;;
333 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
334 | --sbi=* | --sb=*)
335 sbindir="$ac_optarg" ;;
336
337 -sharedstatedir | --sharedstatedir | --sharedstatedi \
338 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
339 | --sharedst | --shareds | --shared | --share | --shar \
340 | --sha | --sh)
341 ac_prev=sharedstatedir ;;
342 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
343 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
344 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
345 | --sha=* | --sh=*)
346 sharedstatedir="$ac_optarg" ;;
347
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000348 -site | --site | --sit)
349 ac_prev=site ;;
350 -site=* | --site=* | --sit=*)
351 site="$ac_optarg" ;;
352
Guido van Rossum7f43da71994-08-01 12:15:30 +0000353 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
354 ac_prev=srcdir ;;
355 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
356 srcdir="$ac_optarg" ;;
357
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000358 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
359 | --syscon | --sysco | --sysc | --sys | --sy)
360 ac_prev=sysconfdir ;;
361 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
362 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
363 sysconfdir="$ac_optarg" ;;
364
Guido van Rossum7f43da71994-08-01 12:15:30 +0000365 -target | --target | --targe | --targ | --tar | --ta | --t)
366 ac_prev=target ;;
367 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
368 target="$ac_optarg" ;;
369
370 -v | -verbose | --verbose | --verbos | --verbo | --verb)
371 verbose=yes ;;
372
373 -version | --version | --versio | --versi | --vers)
Skip Montanarob89f41e2000-09-04 04:06:05 +0000374 echo "configure generated by autoconf version 2.14.1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000375 exit 0 ;;
376
377 -with-* | --with-*)
378 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000379 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000380 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000381 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000382 fi
383 ac_package=`echo $ac_package| sed 's/-/_/g'`
384 case "$ac_option" in
385 *=*) ;;
386 *) ac_optarg=yes ;;
387 esac
388 eval "with_${ac_package}='$ac_optarg'" ;;
389
390 -without-* | --without-*)
391 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000393 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000394 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000395 fi
396 ac_package=`echo $ac_package| sed 's/-/_/g'`
397 eval "with_${ac_package}=no" ;;
398
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000399 --x)
400 # Obsolete; use --with-x.
401 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
403 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
404 | --x-incl | --x-inc | --x-in | --x-i)
405 ac_prev=x_includes ;;
406 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
407 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
408 x_includes="$ac_optarg" ;;
409
410 -x-libraries | --x-libraries | --x-librarie | --x-librari \
411 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
412 ac_prev=x_libraries ;;
413 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
414 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
415 x_libraries="$ac_optarg" ;;
416
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000417 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000418 ;;
419
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000420 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000421 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000422 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000423 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000424 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000425 { 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 +0000426 fi
427 nonopt="$ac_option"
428 ;;
429
430 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000431done
432
Guido van Rossum7f43da71994-08-01 12:15:30 +0000433if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000434 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000435fi
436
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000437trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000438
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000439# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000440# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000441# 1 file creation
442# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000443# 3 some systems may open it to /dev/tty
444# 4 used on the Kubota Titan
445# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000446# 5 compiler messages saved in config.log
447if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000448 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000449else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000450 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000451fi
452exec 5>./config.log
453
454echo "\
455This file contains any messages produced by compilers while
456running configure, to aid debugging if configure makes a mistake.
457" 1>&5
458
459# Strip out --no-create and --no-recursion so they do not pile up.
460# Also quote any args containing shell metacharacters.
461ac_configure_args=
462for ac_arg
463do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000464 case "$ac_arg" in
465 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
466 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
468 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
469 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
470 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
471 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 esac
473done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000474
475# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000476# Only set these to C if already set. These must not be set unconditionally
477# because not all systems understand e.g. LANG=C (notably SCO).
478# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
479# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000480if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000481if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
482if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
483if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000484
Guido van Rossum7f43da71994-08-01 12:15:30 +0000485# confdefs.h avoids OS command line length limits that DEFS can exceed.
486rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000487# AIX cpp loses on an empty file, so make sure it contains at least a newline.
488echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000489
490# A filename unique to this package, relative to the directory that
491# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000492ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000493
494# Find the source files, if location was not specified.
495if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000496 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000497 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498 ac_prog=$0
499 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
500 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
501 srcdir=$ac_confdir
502 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000503 srcdir=..
504 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000505else
506 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000507fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000508if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000509 if test "$ac_srcdir_defaulted" = yes; then
510 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000511 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000512 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000513 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000514fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000515srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
516
517# Prefer explicitly selected file to automatically selected ones.
518if test -z "$CONFIG_SITE"; then
519 if test "x$prefix" != xNONE; then
520 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
521 else
522 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
523 fi
524fi
525for ac_site_file in $CONFIG_SITE; do
526 if test -r "$ac_site_file"; then
527 echo "loading site script $ac_site_file"
528 . "$ac_site_file"
529 fi
530done
531
532if test -r "$cache_file"; then
533 echo "loading cache $cache_file"
Skip Montanarob89f41e2000-09-04 04:06:05 +0000534 test -f "$cache_file" && . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000535else
536 echo "creating cache $cache_file"
537 > $cache_file
538fi
539
Guido van Rossum7f43da71994-08-01 12:15:30 +0000540ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000541# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000542ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000544ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000545cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000546
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000547ac_exeext=
548ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000549if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
550 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
551 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
552 ac_n= ac_c='
553' ac_t=' '
554 else
555 ac_n=-n ac_c= ac_t=
556 fi
557else
558 ac_n= ac_c='\c' ac_t=
559fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000560
Guido van Rossum0a516c91994-09-12 10:58:40 +0000561
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000562
Guido van Rossum627b2d71993-12-24 10:39:16 +0000563
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000564# Set VERSION so we only need to edit in one place (i.e., here)
565
Guido van Rossumb9a22a12000-06-30 02:48:53 +0000566VERSION=2.0
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000567
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000568# NEXTSTEP stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000569if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000570
571 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000572echo "configure:573: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000573 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000574if test "${with_next_archs+set}" = set; then
575 withval="$with_next_archs"
576
Guido van Rossum563e7081996-09-10 18:20:48 +0000577 if test -n "$withval"; then
578 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
579 # GCC does not currently support multi archs on the NeXT
580 with_gcc=no
581 fi
582 echo "$ac_t""$with_next_archs" 1>&6
583
584else
585 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000586fi
587
Guido van Rossum563e7081996-09-10 18:20:48 +0000588
589 if test -z "$MACHDEP"
590 then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000591 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum563e7081996-09-10 18:20:48 +0000592 sed -e 's/://' -e 's/\./_/'` && \
593 ac_sys_system=next && ac_sys_release=$4
594
Guido van Rossumb97ef171997-09-28 05:44:03 +0000595 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000596 fi
597fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000598
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000599# Check whether --with-next-framework or --without-next-framework was given.
600if test "${with_next_framework+set}" = set; then
601 withval="$with_next_framework"
602 :
603fi
604
605# Check whether --with-dyld or --without-dyld was given.
606if test "${with_dyld+set}" = set; then
607 withval="$with_dyld"
608 :
609fi
610
Guido van Rossum91922671997-10-09 20:24:13 +0000611
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000612# Set name for machine-dependent library files
613
614echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000615echo "configure:616: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000616if test -z "$MACHDEP"
617then
Guido van Rossum563e7081996-09-10 18:20:48 +0000618 ac_sys_system=`uname -s`
Trent Mick635f6fb2000-08-23 21:33:05 +0000619 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000620 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000621 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000622 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000623 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000624 ac_md_system=`echo $ac_sys_system |
625 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
626 ac_md_release=`echo $ac_sys_release |
627 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000628 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000629
Guido van Rossum07397971997-04-29 21:49:50 +0000630 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000631 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000632 esac
633fi
Guido van Rossum91922671997-10-09 20:24:13 +0000634
635#
636# SGI compilers allow the specification of the both the ABI and the
637# ISA on the command line. Depending on the values of these switches,
638# different and often incompatable code will be generated.
639#
640# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
641# thus supply support for various ABI/ISA combinations. The MACHDEP
642# variable is also adjusted.
643#
644
645if test ! -z "$SGI_ABI"
646then
647 CC="cc $SGI_ABI"
648 LDFLAGS="$SGI_ABI $LDFLAGS"
649 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
650fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000651echo "$ac_t""$MACHDEP" 1>&6
652
Guido van Rossum91922671997-10-09 20:24:13 +0000653#
654# CCC is the command that compiles C++ programs
655#
656# Not all make programs have this predefined.
657#
Guido van Rossum95012191999-12-16 17:50:52 +0000658#AC_SUBST(SET_CCC)
659#AC_MSG_CHECKING(CCC)
660#if test -z "$CCC"
661#then
662# case $ac_sys_system in
663# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
664# Linux*) SET_CCC="CCC= g++";;
665# *) SET_CCC=""
666# esac
667#else
668# SET_CCC="CCC= ${CCC}"
669#fi
670#AC_MSG_RESULT($SET_CCC)
Guido van Rossum91922671997-10-09 20:24:13 +0000671
672
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000674echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000675echo "configure:676: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000676# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000677if test "${with_gcc+set}" = set; then
678 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000679
680 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000681 no) CC=cc
682 without_gcc=yes;;
683 yes) CC=gcc
684 without_gcc=no;;
685 *) CC=$withval
686 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000687 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000688else
Guido van Rossume77438c1995-09-13 18:59:59 +0000689
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000690 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000691 OSF1) CC=cc
692 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000693 BeOS*)
694 # Dunno if it's a good idea to get this over with all at once, or
695 # to handle it in with the other goodies.
696 MACHDEP=beos
697
698 case $BE_HOST_CPU in
699 ppc)
Guido van Rossum81376801999-04-06 15:50:51 +0000700 CC="mwcc -I$PWD/BeOS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000701 without_gcc=yes
Guido van Rossum6b9da451999-03-24 17:48:12 +0000702 case `uname -r` in
703 4.0*) OPT="-DUSE_DL_EXPORT -O7 -opt schedule604 -export pragma" ;;
704 *) OPT="-DUSE_DL_EXPORT -O2 -proc 604e -export pragma" ;;
705 esac
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000706 CCSHARED=-UUSE_DL_EXPORT
707 LDFLAGS="$LDFLAGS -nodup"
708
709 AR="$PWD/BeOS/ar-fake"
710 RANLIB=:
711
712 cat >> confdefs.h <<\EOF
713#define DL_EXPORT_HEADER "dl_export.h"
714EOF
715
716 ;;
717 x86)
718 CC="gcc -I$PWD/BeOS"
719 without_gcc=no
Guido van Rossum32000e82000-05-22 21:31:50 +0000720 OPT="-DUSE_DL_EXPORT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000721 CCSHARED=-UUSE_DL_EXPORT
722
723 AR="$PWD/BeOS/ar-fake"
724 RANLIB=:
725
726 cat >> confdefs.h <<\EOF
727#define DL_EXPORT_HEADER "dl_export.h"
728EOF
729
730 ;;
731 *)
732 { echo "configure: error: Your BeOS system isn't PowerPC or x86... neat" 1>&2; exit 1; }
733 ;;
734 esac
735 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000736 Monterey*)
737 RANLIB=:
738 without_gcc=;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000739 *) without_gcc=no;;
740 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000741fi
742
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000743echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000744
Guido van Rossum95012191999-12-16 17:50:52 +0000745
746
747MAINOBJ=python.o
748echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000749echo "configure:750: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000750# Check whether --with-cxx or --without-cxx was given.
751if test "${with_cxx+set}" = set; then
752 withval="$with_cxx"
753
754 case $withval in
755 no) CXX=
756 with_cxx=no;;
757 *) CXX=$withval
758 MAINOBJ=ccpython.o
759 with_cxx=$withval;;
760 esac
761else
762
763 with_cxx=no
764
765fi
766
767echo "$ac_t""$with_cxx" 1>&6
768SET_CXX="CXX = $CXX"
769
770#AC_MSG_CHECKING(CCC)
771#if test -z "$CCC"
772#then
773# case $ac_sys_system in
774# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
775# Linux*) SET_CCC="CCC= g++";;
776# *) SET_CCC=""
777# esac
778#else
779# SET_CCC="CCC= ${CCC}"
780#fi
781#AC_MSG_RESULT($SET_CCC)
782
Guido van Rossum8b131c51995-03-09 14:10:13 +0000783# If the user switches compilers, we can't believe the cache
784if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
785then
786 { echo "configure: error: cached CC is different -- throw away $cache_file
787(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
788fi
789
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000790# Extract the first word of "gcc", so it can be a program name with args.
791set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000792echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000793echo "configure:794: checking for $ac_word" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +0000794if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000795 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796else
797 if test -n "$CC"; then
798 ac_cv_prog_CC="$CC" # Let the user override the test.
799else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000800 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
801 ac_dummy="$PATH"
802 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803 test -z "$ac_dir" && ac_dir=.
804 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000805 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000806 break
807 fi
808 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000810fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811fi
812CC="$ac_cv_prog_CC"
813if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000814 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000816 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000817fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000818
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819if test -z "$CC"; then
820 # Extract the first word of "cc", so it can be a program name with args.
821set dummy cc; ac_word=$2
822echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000823echo "configure:824: checking for $ac_word" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +0000824if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825 echo $ac_n "(cached) $ac_c" 1>&6
826else
827 if test -n "$CC"; then
828 ac_cv_prog_CC="$CC" # Let the user override the test.
829else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000830 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000831 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000832 ac_dummy="$PATH"
833 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000834 test -z "$ac_dir" && ac_dir=.
835 if test -f $ac_dir/$ac_word; then
836 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
837 ac_prog_rejected=yes
838 continue
839 fi
840 ac_cv_prog_CC="cc"
841 break
842 fi
843 done
844 IFS="$ac_save_ifs"
845if test $ac_prog_rejected = yes; then
846 # We found a bogon in the path, so make sure we never use it.
847 set dummy $ac_cv_prog_CC
848 shift
849 if test $# -gt 0; then
850 # We chose a different compiler from the bogus one.
851 # However, it has the same basename, so the bogon will be chosen
852 # first if we set CC to just the basename; use the full file name.
853 shift
854 set dummy "$ac_dir/$ac_word" "$@"
855 shift
856 ac_cv_prog_CC="$@"
857 fi
858fi
859fi
860fi
861CC="$ac_cv_prog_CC"
862if test -n "$CC"; then
863 echo "$ac_t""$CC" 1>&6
864else
865 echo "$ac_t""no" 1>&6
866fi
867
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000868 if test -z "$CC"; then
869 case "`uname -s`" in
Skip Montanarob89f41e2000-09-04 04:06:05 +0000870 *win32* | *WIN32* | *CYGWIN*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000871 # Extract the first word of "cl", so it can be a program name with args.
872set dummy cl; ac_word=$2
873echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000874echo "configure:875: checking for $ac_word" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +0000875if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000876 echo $ac_n "(cached) $ac_c" 1>&6
877else
878 if test -n "$CC"; then
879 ac_cv_prog_CC="$CC" # Let the user override the test.
880else
881 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
882 ac_dummy="$PATH"
883 for ac_dir in $ac_dummy; do
884 test -z "$ac_dir" && ac_dir=.
885 if test -f $ac_dir/$ac_word; then
886 ac_cv_prog_CC="cl"
887 break
888 fi
889 done
890 IFS="$ac_save_ifs"
891fi
892fi
893CC="$ac_cv_prog_CC"
894if test -n "$CC"; then
895 echo "$ac_t""$CC" 1>&6
896else
897 echo "$ac_t""no" 1>&6
898fi
899 ;;
900 esac
901 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000902 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
903fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904
Skip Montanarob89f41e2000-09-04 04:06:05 +0000905echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
906echo "configure:907: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000907
908ac_ext=c
909# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
910ac_cpp='$CPP $CPPFLAGS'
911ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000912ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000913cross_compiling=$ac_cv_prog_cc_cross
914
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000915cat > conftest.$ac_ext << EOF
916
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000917#line 918 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000918#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000919
Guido van Rossumf78abae1997-01-21 22:02:36 +0000920main(){return(0);}
921EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000922if { (eval echo configure:923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000923 ac_cv_prog_cc_works=yes
924 # If we can't run a trivial program, we are probably using a cross compiler.
925 if (./conftest; exit) 2>/dev/null; then
926 ac_cv_prog_cc_cross=no
927 else
928 ac_cv_prog_cc_cross=yes
929 fi
930else
931 echo "configure: failed program was:" >&5
932 cat conftest.$ac_ext >&5
933 ac_cv_prog_cc_works=no
934fi
935rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000936ac_ext=c
937# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
938ac_cpp='$CPP $CPPFLAGS'
939ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
940ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
941cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000942
943echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
944if test $ac_cv_prog_cc_works = no; then
945 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
946fi
Skip Montanarob89f41e2000-09-04 04:06:05 +0000947echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
948echo "configure:949: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000949echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
950cross_compiling=$ac_cv_prog_cc_cross
951
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000952echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000953echo "configure:954: checking whether we are using GNU C" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +0000954if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000955 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956else
957 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000958#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000960#endif
961EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000962if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963 ac_cv_prog_gcc=yes
964else
965 ac_cv_prog_gcc=no
966fi
967fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000969echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000970
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000971if test $ac_cv_prog_gcc = yes; then
972 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000973else
974 GCC=
975fi
976
977ac_test_CFLAGS="${CFLAGS+set}"
978ac_save_CFLAGS="$CFLAGS"
979CFLAGS=
980echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +0000981echo "configure:982: checking whether ${CC-cc} accepts -g" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +0000982if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000983 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984else
985 echo 'void f(){}' > conftest.c
986if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000987 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000989 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000990fi
991rm -f conftest*
992
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994
Guido van Rossumf78abae1997-01-21 22:02:36 +0000995echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000996if test "$ac_test_CFLAGS" = set; then
997 CFLAGS="$ac_save_CFLAGS"
998elif test $ac_cv_prog_cc_g = yes; then
999 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001000 CFLAGS="-g -O2"
1001 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001002 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001003 fi
1004else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001005 if test "$GCC" = yes; then
1006 CFLAGS="-O2"
1007 else
1008 CFLAGS=
1009 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001010fi
1011
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001012
Guido van Rossumdd997f71998-10-07 19:58:26 +00001013case $MACHDEP in
1014bsdos*)
1015 case $CC in
1016 gcc) CC="$CC -D_HAVE_BSDI";;
1017 esac;;
1018esac
1019
Guido van Rossum24b1e751997-08-21 02:29:16 +00001020case $ac_sys_system in
1021hp*|HP*)
1022 case $CC in
1023 cc|*/cc) CC="$CC -Aa -D_HPUX_SOURCE";;
1024 esac;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001025BeOS*)
1026 case $CC in
1027 cc) CC=cc;;
1028 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001029Monterey*)
1030 case $CC in
1031 cc) CC="$CC -Wl,-Bexport";;
1032 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001033esac
1034
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001035# LDLIBRARY is the name of the library to link against (as opposed to the
1036# name of the library into which to insert object files). On systems
1037# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
1038# the Makefiles).
1039
1040
1041LDLIBRARY=''
1042
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001043# LINKCC is the command that links the python executable -- default is $(CC).
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001044# This is altered for AIX and BeOS in order to build the export list before
1045# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001046
1047echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001048echo "configure:1049: checking LINKCC" >&5
Guido van Rossum95012191999-12-16 17:50:52 +00001049if test -z "$LINKCC" -a ! -z "$CXX"
1050then
1051 LINKCC="$CXX"
1052fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001053if test -z "$LINKCC"
1054then
1055 case $ac_sys_system in
1056 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001057 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001058 BeOS*)
Guido van Rossumea516321998-12-17 18:08:55 +00001059 LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001060 LDLIBRARY='libpython$(VERSION).so';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001061 dgux*)
1062 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001063 Monterey64*)
1064 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001065 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001066 esac
1067fi
1068echo "$ac_t""$LINKCC" 1>&6
1069
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001070echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001071echo "configure:1072: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001072
1073# NeXT framework builds require that the 'ar' library be converted into
1074# a bundle using libtool.
1075if test "$with_next_framework"
1076then
1077 LDLIBRARY='libpython$(VERSION).dylib'
1078fi
1079
1080# DG/UX requires some fancy ld contortions to produce a .so from an .a
1081if test "$MACHDEP" = "dguxR4"
1082then
1083 LDLIBRARY='libpython$(VERSION).so'
1084 OPT="$OPT -pic"
1085fi
1086echo "$ac_t""$LDLIBRARY" 1>&6
1087
1088# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1089if test -z "$LDLIBRARY"
1090then
1091 LDLIBRARY='libpython$(VERSION).a'
1092 MAKE_LDLIBRARY="true"
1093else
1094 MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
1095fi
1096
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001097# Extract the first word of "ranlib", so it can be a program name with args.
1098set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001099echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001100echo "configure:1101: checking for $ac_word" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00001101if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001102 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001103else
1104 if test -n "$RANLIB"; then
1105 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1106else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001107 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1108 ac_dummy="$PATH"
1109 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110 test -z "$ac_dir" && ac_dir=.
1111 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001112 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001113 break
1114 fi
1115 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001117 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001118fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119fi
1120RANLIB="$ac_cv_prog_RANLIB"
1121if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001122 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001123else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001124 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001125fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001126
1127
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128for ac_prog in ar aal
1129do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001130# Extract the first word of "$ac_prog", so it can be a program name with args.
1131set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001132echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001133echo "configure:1134: checking for $ac_word" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00001134if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001135 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136else
1137 if test -n "$AR"; then
1138 ac_cv_prog_AR="$AR" # Let the user override the test.
1139else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001140 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1141 ac_dummy="$PATH"
1142 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 test -z "$ac_dir" && ac_dir=.
1144 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001145 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 break
1147 fi
1148 done
1149 IFS="$ac_save_ifs"
1150fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001151fi
1152AR="$ac_cv_prog_AR"
1153if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001154 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001155else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001156 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158
1159test -n "$AR" && break
1160done
1161test -n "$AR" || AR="ar"
1162
1163
Guido van Rossumda88dad1995-01-26 00:46:29 +00001164
1165
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001166# Install just never works :-(
1167if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001168then
1169 INSTALL=cp
1170 INSTALL_PROGRAM=cp
1171 INSTALL_DATA=cp
1172else
1173 INSTALL_PROGRAM="$INSTALL"
1174 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001175fi
1176
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001177# Not every filesystem supports hard links
1178
1179if test -z "$LN" ; then
1180 case $ac_sys_system in
1181 BeOS*) LN="ln -s";;
1182 *) LN=ln;;
1183 esac
1184fi
1185
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001186# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001187
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001188if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001189then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001190 case $GCC in
1191 yes)
1192 case $ac_cv_prog_cc_g in
1193 yes) OPT="-g -O2";;
1194 *) OPT="-O2";;
1195 esac
1196 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001197 *) OPT="-O";;
1198 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001199fi
1200
Trent Mick635f6fb2000-08-23 21:33:05 +00001201# The current (beta) Monterey compiler dies with optimizations
1202case $ac_sys_system in
1203Monterey*) OPT="";;
1204esac
1205
Guido van Rossum563e7081996-09-10 18:20:48 +00001206if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001207then
1208 OPT="$OPT $ac_arch_flags"
1209fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001211echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001212echo "configure:1213: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213# On Suns, sometimes $CPP names a directory.
1214if test -n "$CPP" && test -d "$CPP"; then
1215 CPP=
1216fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217if test -z "$CPP"; then
Skip Montanarob89f41e2000-09-04 04:06:05 +00001218if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001219 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001220else
1221 # This must be in double quotes, not single quotes, because CPP may get
1222 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001223 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224 # On the NeXT, cc -E runs the code through the compiler's parser,
1225 # not just through cpp.
1226 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001227#line 1228 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001228#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001229#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001230Syntax Error
1231EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001232ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001233{ (eval echo configure:1234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001234ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235if test -z "$ac_err"; then
1236 :
1237else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001238 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001239 echo "configure: failed program was:" >&5
1240 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241 rm -rf conftest*
1242 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001243 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001244#line 1245 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001246#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247Syntax Error
1248EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001249ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001250{ (eval echo configure:1251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001251ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1252if test -z "$ac_err"; then
1253 :
1254else
1255 echo "$ac_err" >&5
1256 echo "configure: failed program was:" >&5
1257 cat conftest.$ac_ext >&5
1258 rm -rf conftest*
1259 CPP="${CC-cc} -nologo -E"
1260 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001261#line 1262 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001262#include "confdefs.h"
1263#include <assert.h>
1264Syntax Error
1265EOF
1266ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001267{ (eval echo configure:1268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001268ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270 :
1271else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001273 echo "configure: failed program was:" >&5
1274 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275 rm -rf conftest*
1276 CPP=/lib/cpp
1277fi
1278rm -f conftest*
1279fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001281fi
1282rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001283 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001285 CPP="$ac_cv_prog_CPP"
1286else
1287 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001289echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001291echo $ac_n "checking for AIX""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001292echo "configure:1293: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001293cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001294#line 1295 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295#include "confdefs.h"
1296#ifdef _AIX
1297 yes
1298#endif
1299
1300EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001301if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1302 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001304 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305#define _ALL_SOURCE 1
1306EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308else
1309 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001310 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311fi
1312rm -f conftest*
1313
1314
Guido van Rossumf78abae1997-01-21 22:02:36 +00001315ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001316echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001317echo "configure:1318: checking for minix/config.h" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00001318if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001319 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001320else
1321 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001322#line 1323 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323#include "confdefs.h"
1324#include <minix/config.h>
1325EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001326ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001327{ (eval echo configure:1328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001328ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001329if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001331 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001332else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001333 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001334 echo "configure: failed program was:" >&5
1335 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001336 rm -rf conftest*
1337 eval "ac_cv_header_$ac_safe=no"
1338fi
1339rm -f conftest*
1340fi
1341if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001342 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001343 MINIX=yes
1344else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001345 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001346MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001347fi
1348
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001349if test "$MINIX" = yes; then
1350 cat >> confdefs.h <<\EOF
1351#define _POSIX_SOURCE 1
1352EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001353
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001354 cat >> confdefs.h <<\EOF
1355#define _POSIX_1_SOURCE 2
1356EOF
1357
1358 cat >> confdefs.h <<\EOF
1359#define _MINIX 1
1360EOF
1361
1362fi
1363
Guido van Rossumda88dad1995-01-26 00:46:29 +00001364
Guido van Rossum91922671997-10-09 20:24:13 +00001365echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001366echo "configure:1367: checking whether $CC accepts -OPT:Olimit=0" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00001367if eval "test \"\${ac_cv_opt_olimit_ok+set}\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001368 echo $ac_n "(cached) $ac_c" 1>&6
1369else
1370 ac_save_cc="$CC"
1371CC="$CC -OPT:Olimit=0"
1372if test "$cross_compiling" = yes; then
1373 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1374else
1375 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001376#line 1377 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001377#include "confdefs.h"
1378int main() { return 0; }
1379EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001380if { (eval echo configure:1381: \"$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 +00001381then
1382 ac_cv_opt_olimit_ok=yes
1383else
1384 echo "configure: failed program was:" >&5
1385 cat conftest.$ac_ext >&5
1386 rm -fr conftest*
1387 ac_cv_opt_olimit_ok=no
1388fi
1389rm -fr conftest*
1390fi
1391
1392CC="$ac_save_cc"
1393fi
1394
1395echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001396if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001397 OPT="$OPT -OPT:Olimit=0"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001398else
1399 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001400echo "configure:1401: checking whether $CC accepts -Olimit 1500" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00001401 if eval "test \"\${ac_cv_olimit_ok+set}\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001402 echo $ac_n "(cached) $ac_c" 1>&6
1403else
1404 ac_save_cc="$CC"
1405 CC="$CC -Olimit 1500"
1406 if test "$cross_compiling" = yes; then
1407 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1408else
1409 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001410#line 1411 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001411#include "confdefs.h"
1412int main() { return 0; }
1413EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001414if { (eval echo configure:1415: \"$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 +00001415then
1416 ac_cv_olimit_ok=yes
1417else
1418 echo "configure: failed program was:" >&5
1419 cat conftest.$ac_ext >&5
1420 rm -fr conftest*
1421 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001422fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001423rm -fr conftest*
1424fi
1425
1426 CC="$ac_save_cc"
1427fi
1428
1429 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1430 if test $ac_cv_olimit_ok = yes; then
1431 OPT="$OPT -Olimit 1500"
1432 fi
1433fi
1434
Guido van Rossum84e7b241996-08-19 21:59:00 +00001435
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001436# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001437echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001438echo "configure:1439: checking for ANSI C header files" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00001439if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001440 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001441else
1442 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001443#line 1444 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001444#include "confdefs.h"
1445#include <stdlib.h>
1446#include <stdarg.h>
1447#include <string.h>
1448#include <float.h>
1449EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001450ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001451{ (eval echo configure:1452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001452ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001453if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001454 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001455 ac_cv_header_stdc=yes
1456else
1457 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001458 echo "configure: failed program was:" >&5
1459 cat conftest.$ac_ext >&5
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=no
1462fi
1463rm -f conftest*
1464
1465if test $ac_cv_header_stdc = yes; then
1466 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1467cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001468#line 1469 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001469#include "confdefs.h"
1470#include <string.h>
1471EOF
1472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1473 egrep "memchr" >/dev/null 2>&1; then
1474 :
1475else
1476 rm -rf conftest*
1477 ac_cv_header_stdc=no
1478fi
1479rm -f conftest*
1480
1481fi
1482
1483if test $ac_cv_header_stdc = yes; then
1484 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1485cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001486#line 1487 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001487#include "confdefs.h"
1488#include <stdlib.h>
1489EOF
1490if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1491 egrep "free" >/dev/null 2>&1; then
1492 :
1493else
1494 rm -rf conftest*
1495 ac_cv_header_stdc=no
1496fi
1497rm -f conftest*
1498
1499fi
1500
1501if test $ac_cv_header_stdc = yes; then
1502 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1503if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001504 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001505else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001506 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001507#line 1508 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001508#include "confdefs.h"
1509#include <ctype.h>
1510#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1511#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001512#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001513int main () { int i; for (i = 0; i < 256; i++)
1514if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1515exit (0); }
1516
1517EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001518if { (eval echo configure:1519: \"$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 +00001519then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001520 :
1521else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001522 echo "configure: failed program was:" >&5
1523 cat conftest.$ac_ext >&5
1524 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001525 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001526fi
1527rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001528fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001529
1530fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001531fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001532
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001533echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001534if test $ac_cv_header_stdc = yes; then
1535 cat >> confdefs.h <<\EOF
1536#define STDC_HEADERS 1
1537EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001538
1539fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001540
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00001541for 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 +00001542signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Fred Drakea50d6ec2000-08-31 16:13:20 +00001543sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001544sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00001545sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
1546ndbm.h db1/ndbm.h gdbm/ndbm.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001547do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001548ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001549echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00001550echo "configure:1551: checking for $ac_hdr" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00001551if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001552 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001553else
1554 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00001555#line 1556 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001556#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001557#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001558EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001559ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drakeae90f8d2000-09-15 03:38:12 +00001560{ (eval echo configure:1561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001561ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001562if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001563 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001564 eval "ac_cv_header_$ac_safe=yes"
1565else
1566 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001567 echo "configure: failed program was:" >&5
1568 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001569 rm -rf conftest*
1570 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001571fi
1572rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001573fi
1574if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001575 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001576 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001577 cat >> confdefs.h <<EOF
1578#define $ac_tr_hdr 1
1579EOF
1580
1581else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001582 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001583fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001584done
1585
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001586ac_header_dirent=no
1587for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1588do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001589ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001590echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00001591echo "configure:1592: checking for $ac_hdr that defines DIR" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00001592if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001593 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001594else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001595 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00001596#line 1597 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001597#include "confdefs.h"
1598#include <sys/types.h>
1599#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001600int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001601DIR *dirp = 0;
1602; return 0; }
1603EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00001604if { (eval echo configure:1605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001605 rm -rf conftest*
1606 eval "ac_cv_header_dirent_$ac_safe=yes"
1607else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001608 echo "configure: failed program was:" >&5
1609 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001610 rm -rf conftest*
1611 eval "ac_cv_header_dirent_$ac_safe=no"
1612fi
1613rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001614fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001615if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001616 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001617 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001618 cat >> confdefs.h <<EOF
1619#define $ac_tr_hdr 1
1620EOF
1621 ac_header_dirent=$ac_hdr; break
1622else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001623 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001624fi
1625done
1626# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1627if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001628echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00001629echo "configure:1630: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001630ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00001631if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001632 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001633else
1634 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001635LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001636cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00001637#line 1638 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001638#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001639/* Override any gcc2 internal prototype to avoid an error. */
1640/* We use char because int might match the return type of a gcc2
1641 builtin and then its argument prototype would still apply. */
1642char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001643
Guido van Rossumf78abae1997-01-21 22:02:36 +00001644int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001645opendir()
1646; return 0; }
1647EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00001648if { (eval echo configure:1649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001649 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001650 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001651else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001652 echo "configure: failed program was:" >&5
1653 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001654 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001655 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001656fi
1657rm -f conftest*
1658LIBS="$ac_save_LIBS"
1659
1660fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001661if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001662 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001663 LIBS="$LIBS -ldir"
1664else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001665 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001666fi
1667
1668else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001669echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00001670echo "configure:1671: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001671ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00001672if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001673 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001674else
1675 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001676LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001677cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00001678#line 1679 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001679#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001680/* Override any gcc2 internal prototype to avoid an error. */
1681/* We use char because int might match the return type of a gcc2
1682 builtin and then its argument prototype would still apply. */
1683char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001684
Guido van Rossumf78abae1997-01-21 22:02:36 +00001685int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001686opendir()
1687; return 0; }
1688EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00001689if { (eval echo configure:1690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001690 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001691 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001692else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001693 echo "configure: failed program was:" >&5
1694 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001695 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001696 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001697fi
1698rm -f conftest*
1699LIBS="$ac_save_LIBS"
1700
1701fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001702if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001703 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001704 LIBS="$LIBS -lx"
1705else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001706 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001707fi
1708
1709fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001710
1711
1712# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001713was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001714echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00001715echo "configure:1716: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001716cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00001717#line 1718 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001718#include "confdefs.h"
1719#include <time.h>
1720EOF
1721if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1722 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001723 rm -rf conftest*
1724 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001725else
1726 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001727 cat >> confdefs.h <<\EOF
1728#define clock_t long
1729EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001730
1731fi
1732rm -f conftest*
1733
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001734echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001735
Guido van Rossum84e7b241996-08-19 21:59:00 +00001736# Add some code to confdefs.h so that the test for off_t works on SCO
1737cat >> confdefs.h <<\EOF
1738#if defined(SCO_DS)
1739#undef _OFF_T
1740#endif
1741EOF
1742
Guido van Rossumef2255b2000-03-10 22:30:29 +00001743# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001744echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00001745echo "configure:1746: checking for mode_t" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00001746if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001747 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001748else
1749 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00001750#line 1751 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001751#include "confdefs.h"
1752#include <sys/types.h>
1753#if STDC_HEADERS
1754#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001755#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001756#endif
1757EOF
1758if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001759 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 +00001760 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00001761 eval "ac_cv_type_mode_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001762else
1763 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00001764 eval "ac_cv_type_mode_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001765fi
1766rm -f conftest*
1767
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001768fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00001769if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
1770 echo "$ac_t""yes" 1>&6
1771else
1772 echo "$ac_t""no" 1>&6
1773 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001774#define mode_t int
1775EOF
1776
1777fi
1778
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001779echo $ac_n "checking for off_t""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00001780echo "configure:1781: checking for off_t" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00001781if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001782 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001783else
1784 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00001785#line 1786 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001786#include "confdefs.h"
1787#include <sys/types.h>
1788#if STDC_HEADERS
1789#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001790#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001791#endif
1792EOF
1793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001794 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 +00001795 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00001796 eval "ac_cv_type_off_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001797else
1798 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00001799 eval "ac_cv_type_off_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001800fi
1801rm -f conftest*
1802
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001803fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00001804if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
1805 echo "$ac_t""yes" 1>&6
1806else
1807 echo "$ac_t""no" 1>&6
1808 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001809#define off_t long
1810EOF
1811
1812fi
1813
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001814echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00001815echo "configure:1816: checking for pid_t" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00001816if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001817 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001818else
1819 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00001820#line 1821 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001821#include "confdefs.h"
1822#include <sys/types.h>
1823#if STDC_HEADERS
1824#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001825#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001826#endif
1827EOF
1828if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001829 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 +00001830 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00001831 eval "ac_cv_type_pid_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001832else
1833 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00001834 eval "ac_cv_type_pid_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001835fi
1836rm -f conftest*
1837
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001838fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00001839if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
1840 echo "$ac_t""yes" 1>&6
1841else
1842 echo "$ac_t""no" 1>&6
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
Fred Drakeae90f8d2000-09-15 03:38:12 +00001850echo "configure:1851: checking return type of signal handlers" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00001851if eval "test \"\${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
Fred Drakeae90f8d2000-09-15 03:38:12 +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
Fred Drakeae90f8d2000-09-15 03:38:12 +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
Fred Drakeae90f8d2000-09-15 03:38:12 +00001891echo "configure:1892: checking for size_t" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00001892if eval "test \"\${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
Fred Drakeae90f8d2000-09-15 03:38:12 +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*
Skip Montanarob89f41e2000-09-04 04:06:05 +00001907 eval "ac_cv_type_size_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001908else
1909 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00001910 eval "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
Skip Montanarob89f41e2000-09-04 04:06:05 +00001915if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
1916 echo "$ac_t""yes" 1>&6
1917else
1918 echo "$ac_t""no" 1>&6
1919 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001920#define size_t unsigned
1921EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001922
1923fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001924
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001925echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00001926echo "configure:1927: checking for uid_t in sys/types.h" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00001927if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001928 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001929else
1930 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00001931#line 1932 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001932#include "confdefs.h"
1933#include <sys/types.h>
1934EOF
1935if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1936 egrep "uid_t" >/dev/null 2>&1; then
1937 rm -rf conftest*
1938 ac_cv_type_uid_t=yes
1939else
1940 rm -rf conftest*
1941 ac_cv_type_uid_t=no
1942fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001943rm -f conftest*
1944
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001945fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001946
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001947echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001948if test $ac_cv_type_uid_t = no; then
1949 cat >> confdefs.h <<\EOF
1950#define uid_t int
1951EOF
1952
1953 cat >> confdefs.h <<\EOF
1954#define gid_t int
1955EOF
1956
1957fi
1958
Guido van Rossum627b2d71993-12-24 10:39:16 +00001959
Guido van Rossumef2255b2000-03-10 22:30:29 +00001960# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001961echo $ac_n "checking size of int""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00001962echo "configure:1963: checking size of int" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00001963if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001964 echo $ac_n "(cached) $ac_c" 1>&6
1965else
1966 if test "$cross_compiling" = yes; then
1967 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1968else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001969 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00001970#line 1971 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001971#include "confdefs.h"
1972#include <stdio.h>
1973main()
1974{
1975 FILE *f=fopen("conftestval", "w");
1976 if (!f) exit(1);
1977 fprintf(f, "%d\n", sizeof(int));
1978 exit(0);
1979}
1980EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00001981if { (eval echo configure:1982: \"$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 +00001982then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001983 ac_cv_sizeof_int=`cat conftestval`
1984else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001985 echo "configure: failed program was:" >&5
1986 cat conftest.$ac_ext >&5
1987 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001988 ac_cv_sizeof_int=0
1989fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001990rm -fr conftest*
1991fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001992
1993fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001994echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1995cat >> confdefs.h <<EOF
1996#define SIZEOF_INT $ac_cv_sizeof_int
1997EOF
1998
1999
2000echo $ac_n "checking size of long""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002001echo "configure:2002: checking size of long" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00002002if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002003 echo $ac_n "(cached) $ac_c" 1>&6
2004else
2005 if test "$cross_compiling" = yes; then
2006 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2007else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002008 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002009#line 2010 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002010#include "confdefs.h"
2011#include <stdio.h>
2012main()
2013{
2014 FILE *f=fopen("conftestval", "w");
2015 if (!f) exit(1);
2016 fprintf(f, "%d\n", sizeof(long));
2017 exit(0);
2018}
2019EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002020if { (eval echo configure:2021: \"$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 +00002021then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002022 ac_cv_sizeof_long=`cat conftestval`
2023else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002024 echo "configure: failed program was:" >&5
2025 cat conftest.$ac_ext >&5
2026 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002027 ac_cv_sizeof_long=0
2028fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002029rm -fr conftest*
2030fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002031
2032fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002033echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2034cat >> confdefs.h <<EOF
2035#define SIZEOF_LONG $ac_cv_sizeof_long
2036EOF
2037
2038
Guido van Rossumad678af1998-10-02 14:42:15 +00002039echo $ac_n "checking size of void *""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002040echo "configure:2041: checking size of void *" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00002041if eval "test \"\${ac_cv_sizeof_void_p+set}\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002042 echo $ac_n "(cached) $ac_c" 1>&6
2043else
2044 if test "$cross_compiling" = yes; then
2045 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2046else
2047 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002048#line 2049 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002049#include "confdefs.h"
2050#include <stdio.h>
2051main()
2052{
2053 FILE *f=fopen("conftestval", "w");
2054 if (!f) exit(1);
2055 fprintf(f, "%d\n", sizeof(void *));
2056 exit(0);
2057}
2058EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002059if { (eval echo configure:2060: \"$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 +00002060then
2061 ac_cv_sizeof_void_p=`cat conftestval`
2062else
2063 echo "configure: failed program was:" >&5
2064 cat conftest.$ac_ext >&5
2065 rm -fr conftest*
2066 ac_cv_sizeof_void_p=0
2067fi
2068rm -fr conftest*
2069fi
2070
2071fi
2072echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2073cat >> confdefs.h <<EOF
2074#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2075EOF
2076
2077
Guido van Rossumef2255b2000-03-10 22:30:29 +00002078echo $ac_n "checking size of char""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002079echo "configure:2080: checking size of char" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00002080if eval "test \"\${ac_cv_sizeof_char+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002081 echo $ac_n "(cached) $ac_c" 1>&6
2082else
2083 if test "$cross_compiling" = yes; then
2084 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2085else
2086 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002087#line 2088 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002088#include "confdefs.h"
2089#include <stdio.h>
2090main()
2091{
2092 FILE *f=fopen("conftestval", "w");
2093 if (!f) exit(1);
2094 fprintf(f, "%d\n", sizeof(char));
2095 exit(0);
2096}
2097EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002098if { (eval echo configure:2099: \"$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 +00002099then
2100 ac_cv_sizeof_char=`cat conftestval`
2101else
2102 echo "configure: failed program was:" >&5
2103 cat conftest.$ac_ext >&5
2104 rm -fr conftest*
2105 ac_cv_sizeof_char=0
2106fi
2107rm -fr conftest*
2108fi
2109
2110fi
2111echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2112cat >> confdefs.h <<EOF
2113#define SIZEOF_CHAR $ac_cv_sizeof_char
2114EOF
2115
2116
2117echo $ac_n "checking size of short""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002118echo "configure:2119: checking size of short" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00002119if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002120 echo $ac_n "(cached) $ac_c" 1>&6
2121else
2122 if test "$cross_compiling" = yes; then
2123 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2124else
2125 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002126#line 2127 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002127#include "confdefs.h"
2128#include <stdio.h>
2129main()
2130{
2131 FILE *f=fopen("conftestval", "w");
2132 if (!f) exit(1);
2133 fprintf(f, "%d\n", sizeof(short));
2134 exit(0);
2135}
2136EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002137if { (eval echo configure:2138: \"$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 +00002138then
2139 ac_cv_sizeof_short=`cat conftestval`
2140else
2141 echo "configure: failed program was:" >&5
2142 cat conftest.$ac_ext >&5
2143 rm -fr conftest*
2144 ac_cv_sizeof_short=0
2145fi
2146rm -fr conftest*
2147fi
2148
2149fi
2150echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2151cat >> confdefs.h <<EOF
2152#define SIZEOF_SHORT $ac_cv_sizeof_short
2153EOF
2154
2155
2156echo $ac_n "checking size of float""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002157echo "configure:2158: checking size of float" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00002158if eval "test \"\${ac_cv_sizeof_float+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002159 echo $ac_n "(cached) $ac_c" 1>&6
2160else
2161 if test "$cross_compiling" = yes; then
2162 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2163else
2164 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002165#line 2166 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002166#include "confdefs.h"
2167#include <stdio.h>
2168main()
2169{
2170 FILE *f=fopen("conftestval", "w");
2171 if (!f) exit(1);
2172 fprintf(f, "%d\n", sizeof(float));
2173 exit(0);
2174}
2175EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002176if { (eval echo configure:2177: \"$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 +00002177then
2178 ac_cv_sizeof_float=`cat conftestval`
2179else
2180 echo "configure: failed program was:" >&5
2181 cat conftest.$ac_ext >&5
2182 rm -fr conftest*
2183 ac_cv_sizeof_float=0
2184fi
2185rm -fr conftest*
2186fi
2187
2188fi
2189echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2190cat >> confdefs.h <<EOF
2191#define SIZEOF_FLOAT $ac_cv_sizeof_float
2192EOF
2193
2194
2195echo $ac_n "checking size of double""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002196echo "configure:2197: checking size of double" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00002197if eval "test \"\${ac_cv_sizeof_double+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002198 echo $ac_n "(cached) $ac_c" 1>&6
2199else
2200 if test "$cross_compiling" = yes; then
2201 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2202else
2203 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002204#line 2205 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002205#include "confdefs.h"
2206#include <stdio.h>
2207main()
2208{
2209 FILE *f=fopen("conftestval", "w");
2210 if (!f) exit(1);
2211 fprintf(f, "%d\n", sizeof(double));
2212 exit(0);
2213}
2214EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002215if { (eval echo configure:2216: \"$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 +00002216then
2217 ac_cv_sizeof_double=`cat conftestval`
2218else
2219 echo "configure: failed program was:" >&5
2220 cat conftest.$ac_ext >&5
2221 rm -fr conftest*
2222 ac_cv_sizeof_double=0
2223fi
2224rm -fr conftest*
2225fi
2226
2227fi
2228echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2229cat >> confdefs.h <<EOF
2230#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2231EOF
2232
2233
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002234echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002235echo "configure:2236: checking size of fpos_t" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00002236if eval "test \"\${ac_cv_sizeof_fpos_t+set}\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002237 echo $ac_n "(cached) $ac_c" 1>&6
2238else
2239 if test "$cross_compiling" = yes; then
2240 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2241else
2242 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002243#line 2244 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002244#include "confdefs.h"
2245#include <stdio.h>
2246main()
2247{
2248 FILE *f=fopen("conftestval", "w");
2249 if (!f) exit(1);
2250 fprintf(f, "%d\n", sizeof(fpos_t));
2251 exit(0);
2252}
2253EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002254if { (eval echo configure:2255: \"$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 +00002255then
2256 ac_cv_sizeof_fpos_t=`cat conftestval`
2257else
2258 echo "configure: failed program was:" >&5
2259 cat conftest.$ac_ext >&5
2260 rm -fr conftest*
2261 ac_cv_sizeof_fpos_t=0
2262fi
2263rm -fr conftest*
2264fi
2265
2266fi
2267echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2268cat >> confdefs.h <<EOF
2269#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2270EOF
2271
2272
Guido van Rossum0a516c91994-09-12 10:58:40 +00002273
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002274echo $ac_n "checking for long long support""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002275echo "configure:2276: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002276have_long_long=no
2277cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002278#line 2279 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002279#include "confdefs.h"
2280
2281int main() {
2282long long x; x = (long long)0;
2283; return 0; }
2284EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002285if { (eval echo configure:2286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002286 rm -rf conftest*
2287 cat >> confdefs.h <<\EOF
2288#define HAVE_LONG_LONG 1
2289EOF
2290 have_long_long=yes
2291else
2292 echo "configure: failed program was:" >&5
2293 cat conftest.$ac_ext >&5
2294fi
2295rm -f conftest*
2296echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002297if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002298echo $ac_n "checking size of long long""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002299echo "configure:2300: checking size of long long" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00002300if eval "test \"\${ac_cv_sizeof_long_long+set}\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002301 echo $ac_n "(cached) $ac_c" 1>&6
2302else
2303 if test "$cross_compiling" = yes; then
2304 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2305else
2306 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002307#line 2308 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002308#include "confdefs.h"
2309#include <stdio.h>
2310main()
2311{
2312 FILE *f=fopen("conftestval", "w");
2313 if (!f) exit(1);
2314 fprintf(f, "%d\n", sizeof(long long));
2315 exit(0);
2316}
2317EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002318if { (eval echo configure:2319: \"$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 +00002319then
2320 ac_cv_sizeof_long_long=`cat conftestval`
2321else
2322 echo "configure: failed program was:" >&5
2323 cat conftest.$ac_ext >&5
2324 rm -fr conftest*
2325 ac_cv_sizeof_long_long=0
2326fi
2327rm -fr conftest*
2328fi
2329
2330fi
2331echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2332cat >> confdefs.h <<EOF
2333#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2334EOF
2335
2336
2337fi
2338
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002339echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002340echo "configure:2341: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002341have_uintptr_t=no
2342cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002343#line 2344 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002344#include "confdefs.h"
2345
2346int main() {
2347uintptr_t x; x = (uintptr_t)0;
2348; return 0; }
2349EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002350if { (eval echo configure:2351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002351 rm -rf conftest*
2352 cat >> confdefs.h <<\EOF
2353#define HAVE_UINTPTR_T 1
2354EOF
2355 have_uintptr_t=yes
2356else
2357 echo "configure: failed program was:" >&5
2358 cat conftest.$ac_ext >&5
2359fi
2360rm -f conftest*
2361echo "$ac_t""$have_uintptr_t" 1>&6
2362if test "$have_uintptr_t" = yes ; then
2363echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002364echo "configure:2365: checking size of uintptr_t" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00002365if eval "test \"\${ac_cv_sizeof_uintptr_t+set}\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002366 echo $ac_n "(cached) $ac_c" 1>&6
2367else
2368 if test "$cross_compiling" = yes; then
2369 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2370else
2371 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002372#line 2373 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002373#include "confdefs.h"
2374#include <stdio.h>
2375main()
2376{
2377 FILE *f=fopen("conftestval", "w");
2378 if (!f) exit(1);
2379 fprintf(f, "%d\n", sizeof(uintptr_t));
2380 exit(0);
2381}
2382EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002383if { (eval echo configure:2384: \"$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 +00002384then
2385 ac_cv_sizeof_uintptr_t=`cat conftestval`
2386else
2387 echo "configure: failed program was:" >&5
2388 cat conftest.$ac_ext >&5
2389 rm -fr conftest*
2390 ac_cv_sizeof_uintptr_t=0
2391fi
2392rm -fr conftest*
2393fi
2394
2395fi
2396echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2397cat >> confdefs.h <<EOF
2398#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2399EOF
2400
2401
2402fi
2403
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002404# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2405echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002406echo "configure:2407: checking size of off_t" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00002407if eval "test \"\${ac_cv_sizeof_off_t+set}\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002408 echo $ac_n "(cached) $ac_c" 1>&6
2409else
2410 if test "$cross_compiling" = yes; then
2411 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2412else
2413 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002414#line 2415 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002415#include "confdefs.h"
2416#include <stdio.h>
2417#include <sys/types.h>
2418main()
2419{
2420 FILE *f=fopen("conftestval", "w");
2421 if (!f) exit(1);
2422 fprintf(f, "%d\n", sizeof(off_t));
2423 exit(0);
2424}
2425EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002426if { (eval echo configure:2427: \"$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 +00002427then
2428 ac_cv_sizeof_off_t=`cat conftestval`
2429else
2430 echo "configure: failed program was:" >&5
2431 cat conftest.$ac_ext >&5
2432 rm -fr conftest*
2433 ac_cv_sizeof_off_t=0
2434fi
2435rm -fr conftest*
2436fi
2437
2438
2439fi
2440
2441echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2442cat >> confdefs.h <<EOF
2443#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2444EOF
2445
2446
2447echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002448echo "configure:2449: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002449if test "$have_long_long" = yes -a \
2450 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2451 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002452 cat >> confdefs.h <<\EOF
2453#define HAVE_LARGEFILE_SUPPORT 1
2454EOF
2455
2456 echo "$ac_t""yes" 1>&6
2457else
2458 echo "$ac_t""no" 1>&6
2459fi
2460
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002461# AC_CHECK_SIZEOF() doesn't include <time.h>.
2462echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002463echo "configure:2464: checking size of time_t" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00002464if eval "test \"\${ac_cv_sizeof_time_t+set}\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002465 echo $ac_n "(cached) $ac_c" 1>&6
2466else
2467 if test "$cross_compiling" = yes; then
2468 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2469else
2470 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002471#line 2472 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002472#include "confdefs.h"
2473#include <stdio.h>
2474#include <time.h>
2475main()
2476{
2477 FILE *f=fopen("conftestval", "w");
2478 if (!f) exit(1);
2479 fprintf(f, "%d\n", sizeof(time_t));
2480 exit(0);
2481}
2482EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002483if { (eval echo configure:2484: \"$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 +00002484then
2485 ac_cv_sizeof_time_t=`cat conftestval`
2486else
2487 echo "configure: failed program was:" >&5
2488 cat conftest.$ac_ext >&5
2489 rm -fr conftest*
2490 ac_cv_sizeof_time_t=0
2491fi
2492rm -fr conftest*
2493fi
2494
2495
2496fi
2497
2498echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2499cat >> confdefs.h <<EOF
2500#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2501EOF
2502
2503
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002504
Trent Mick635f6fb2000-08-23 21:33:05 +00002505# if have pthread_t then define SIZEOF_PTHREAD_T
2506echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002507echo "configure:2508: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002508have_pthread_t=no
2509cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002510#line 2511 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002511#include "confdefs.h"
2512#include <pthread.h>
2513int main() {
2514pthread_t x; x = (pthread_t)0;
2515; return 0; }
2516EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002517if { (eval echo configure:2518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002518 rm -rf conftest*
2519 have_pthread_t=yes
2520else
2521 echo "configure: failed program was:" >&5
2522 cat conftest.$ac_ext >&5
2523fi
2524rm -f conftest*
2525echo "$ac_t""$have_pthread_t" 1>&6
2526if test "$have_pthread_t" = yes ; then
2527 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2528 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002529echo "configure:2530: checking size of pthread_t" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00002530 if eval "test \"\${ac_cv_sizeof_pthread_t+set}\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002531 echo $ac_n "(cached) $ac_c" 1>&6
2532else
2533 if test "$cross_compiling" = yes; then
2534 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2535else
2536 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002537#line 2538 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002538#include "confdefs.h"
2539#include <stdio.h>
2540 #include <pthread.h>
2541 main()
2542 {
2543 FILE *f=fopen("conftestval", "w");
2544 if (!f) exit(1);
2545 fprintf(f, "%d\n", sizeof(pthread_t));
2546 exit(0);
2547 }
2548EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002549if { (eval echo configure:2550: \"$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 +00002550then
2551 ac_cv_sizeof_pthread_t=`cat conftestval`
2552else
2553 echo "configure: failed program was:" >&5
2554 cat conftest.$ac_ext >&5
2555 rm -fr conftest*
2556 ac_cv_sizeof_pthread_t=0
2557fi
2558rm -fr conftest*
2559fi
2560
2561
2562fi
2563
2564 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2565 cat >> confdefs.h <<EOF
2566#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2567EOF
2568
2569fi
2570
2571
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002572# Minor variations in building a framework between NextStep versions 4 and 5
2573
2574case $ac_sys_system/$ac_sys_release in
2575 next/4*)
2576 ns_undef_sym='__environ'
2577 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2578 next/5*)
2579 ns_undef_sym='_environ'
2580 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2581esac
2582
2583echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002584echo "configure:2585: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002585if test "$with_next_framework"
2586then
2587 OPT="$OPT -fno-common"
2588 # -U __environ is needed since bundles don't have access
2589 # to crt0 when built but will always be linked against it
2590 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2591 cat >> confdefs.h <<\EOF
2592#define WITH_NEXT_FRAMEWORK 1
2593EOF
2594
2595 echo "$ac_t""yes" 1>&6
2596else
2597 echo "$ac_t""no" 1>&6
2598fi
2599
2600echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002601echo "configure:2602: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002602if test "$with_next_framework" -o "$with_dyld"
2603then
2604 if test "$with_dyld"
2605 then
2606 echo "$ac_t""yes" 1>&6
2607 else
2608 echo "$ac_t""required for framework build" 1>&6
2609 fi
2610 cat >> confdefs.h <<\EOF
2611#define WITH_DYLD 1
2612EOF
2613
2614 ns_dyld='set'
2615else
2616 echo "$ac_t""no" 1>&6
2617fi
2618
Guido van Rossum0a516c91994-09-12 10:58:40 +00002619# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002620
2621
2622
2623
Guido van Rossum0a516c91994-09-12 10:58:40 +00002624# SO is the extension of shared libraries `(including the dot!)
2625# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002626echo $ac_n "checking SO""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002627echo "configure:2628: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002628if test -z "$SO"
2629then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002630 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002631 hp*|HP*) SO=.sl;;
2632 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002633 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002634fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002635echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002636# LDSHARED is the ld *command* used to create shared library
2637# -- "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 +00002638# (Shared libraries in this instance are shared modules to be loaded into
2639# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002640echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002641echo "configure:2642: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002642if test -z "$LDSHARED"
2643then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002644 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002645 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002646 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002647 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002648 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002649 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a662000-05-26 12:22:54 +00002650 SunOS/5*)
2651 if test "$GCC" = "yes"
2652 then LDSHARED='$(CC) -G'
2653 else LDSHARED="ld -G";
2654 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002655 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002656 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2657 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002658 next/*)
2659 if test "$ns_dyld"
2660 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2661 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2662 fi
2663 if test "$with_next_framework" ; then
2664 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2665 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002666 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002667 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002668 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002669 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002670 NetBSD*)
2671 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2672 then
2673 LDSHARED="cc -shared"
2674 else
2675 LDSHARED="ld -Bshareable"
2676 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002677 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00002678 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00002679 then
2680 LDSHARED="cc -shared ${LDFLAGS}"
2681 else
2682 LDSHARED="ld -Bshareable ${LDFLAGS}"
2683 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002684 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002685 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002686 *) LDSHARED="ld";;
2687 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002688fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002689echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002690# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002691# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002692echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002693echo "configure:2694: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002694if test -z "$CCSHARED"
2695then
Guido van Rossum07397971997-04-29 21:49:50 +00002696 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002697 hp*|HP*) if test "$GCC" = yes;
2698 then CCSHARED="-fpic";
2699 else CCSHARED="+z";
2700 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002701 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002702 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002703 OpenBSD*) CCSHARED="-fpic";;
2704 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002705 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002706 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002707 IRIX*/6*) case $CC in
2708 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002709 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002710 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002711 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002712fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002713echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002714# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002715# the python executable -- this is only needed for a few systems
2716echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002717echo "configure:2718: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002718if test -z "$LINKFORSHARED"
2719then
Guido van Rossum07397971997-04-29 21:49:50 +00002720 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002721 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002722 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002723 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002724 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002725 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002726 # -u libsys_s pulls in all symbols in libsys
2727 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2728 # -u __dummy makes the linker aware of the objc runtime
2729 # in System.framework; otherwise, __objcInit (referenced in
2730 # crt1.o) gets erroneously defined as common, which breaks dynamic
2731 # loading of any modules which reference it in System.framework
2732 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002733 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002734 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00002735 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2736 then
2737 LINKFORSHARED="-Wl,--export-dynamic"
2738 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002739 SunOS/5*) case $CC in
2740 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002741 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002742 then
2743 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002744 fi;;
2745 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002746 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002747fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002748echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002749
Guido van Rossum627b2d71993-12-24 10:39:16 +00002750# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002751echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002752echo "configure:2753: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002753ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00002754if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002755 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002756else
2757 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002758LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002759cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002760#line 2761 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002761#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002762/* Override any gcc2 internal prototype to avoid an error. */
2763/* We use char because int might match the return type of a gcc2
2764 builtin and then its argument prototype would still apply. */
2765char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002766
Guido van Rossumf78abae1997-01-21 22:02:36 +00002767int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002768dlopen()
2769; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002770EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002771if { (eval echo configure:2772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002772 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002773 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002774else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002775 echo "configure: failed program was:" >&5
2776 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002777 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002778 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002779fi
2780rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002781LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002782
Guido van Rossum627b2d71993-12-24 10:39:16 +00002783fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002784if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002785 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002786 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2787 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002788 cat >> confdefs.h <<EOF
2789#define $ac_tr_lib 1
2790EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002791
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002792 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002793
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002794else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002795 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002796fi
2797 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002798echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002799echo "configure:2800: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002800ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00002801if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002802 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002803else
2804 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002805LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002806cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002807#line 2808 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002808#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002809/* Override any gcc2 internal prototype to avoid an error. */
2810/* We use char because int might match the return type of a gcc2
2811 builtin and then its argument prototype would still apply. */
2812char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002813
Guido van Rossumf78abae1997-01-21 22:02:36 +00002814int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002815shl_load()
2816; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002817EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002818if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002819 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002820 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002821else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002822 echo "configure: failed program was:" >&5
2823 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002824 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002825 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002826fi
2827rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002828LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002829
Guido van Rossum627b2d71993-12-24 10:39:16 +00002830fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002831if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002832 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002833 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2834 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002835 cat >> confdefs.h <<EOF
2836#define $ac_tr_lib 1
2837EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002838
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002839 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002840
2841else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002842 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002843fi
2844 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002845
Skip Montanarocb853262000-08-30 22:29:48 +00002846# Check for --with-pydebug
2847echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002848echo "configure:2849: checking for --with-pydebug" >&5
Skip Montanarocb853262000-08-30 22:29:48 +00002849# Check whether --with-pydebug or --without-pydebug was given.
2850if test "${with_pydebug+set}" = set; then
2851 withval="$with_pydebug"
2852
2853if test "$withval" != no
2854then cat >> confdefs.h <<\EOF
2855#define Py_DEBUG 1
2856EOF
2857 echo "$ac_t""yes" 1>&6
2858else echo "$ac_t""no" 1>&6
2859fi
2860else
2861 echo "$ac_t""no" 1>&6
2862fi
2863
2864
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002865# checks for system dependent C++ extensions support
2866case "$ac_sys_system" in
2867 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002868echo "configure:2869: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002869 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002870#line 2871 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002871#include "confdefs.h"
2872#include "/usr/lpp/xlC/include/load.h"
2873int main() {
2874loadAndInit("", 0, "")
2875; return 0; }
2876EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002877if { (eval echo configure:2878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002878 rm -rf conftest*
2879 cat >> confdefs.h <<\EOF
2880#define AIX_GENUINE_CPLUSPLUS 1
2881EOF
2882
2883 echo "$ac_t""yes" 1>&6
2884else
2885 echo "configure: failed program was:" >&5
2886 cat conftest.$ac_ext >&5
2887 rm -rf conftest*
2888 echo "$ac_t""no" 1>&6
2889fi
2890rm -f conftest*;;
2891 *) ;;
2892esac
2893
Guido van Rossum70c7f481998-03-26 18:44:10 +00002894# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2895# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002896# BeOS' sockets are stashed in libnet.
2897case "$ac_sys_system" in
2898IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002899*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002900echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002901echo "configure:2902: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002902ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00002903if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002904 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002905else
2906 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002907LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002908cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002909#line 2910 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002910#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002911/* Override any gcc2 internal prototype to avoid an error. */
2912/* We use char because int might match the return type of a gcc2
2913 builtin and then its argument prototype would still apply. */
2914char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002915
Guido van Rossumf78abae1997-01-21 22:02:36 +00002916int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002917t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002918; return 0; }
2919EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002920if { (eval echo configure:2921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002921 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002922 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002923else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002924 echo "configure: failed program was:" >&5
2925 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002926 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002927 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002928fi
2929rm -f conftest*
2930LIBS="$ac_save_LIBS"
2931
2932fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002933if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002934 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002935 LIBS="-lnsl $LIBS"
2936else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002937 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002938fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002939 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002940echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002941echo "configure:2942: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002942ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00002943if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002944 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002945else
2946 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002947LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002948cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002949#line 2950 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002950#include "confdefs.h"
2951/* Override any gcc2 internal prototype to avoid an error. */
2952/* We use char because int might match the return type of a gcc2
2953 builtin and then its argument prototype would still apply. */
2954char socket();
2955
2956int main() {
2957socket()
2958; return 0; }
2959EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002960if { (eval echo configure:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002961 rm -rf conftest*
2962 eval "ac_cv_lib_$ac_lib_var=yes"
2963else
2964 echo "configure: failed program was:" >&5
2965 cat conftest.$ac_ext >&5
2966 rm -rf conftest*
2967 eval "ac_cv_lib_$ac_lib_var=no"
2968fi
2969rm -f conftest*
2970LIBS="$ac_save_LIBS"
2971
2972fi
2973if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2974 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002975 LIBS="-lsocket $LIBS"
2976else
2977 echo "$ac_t""no" 1>&6
2978fi
2979 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00002980;;
2981esac
2982case "$ac_sys_system" in
2983BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00002984echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00002985echo "configure:2986: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002986ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00002987if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002988 echo $ac_n "(cached) $ac_c" 1>&6
2989else
2990 ac_save_LIBS="$LIBS"
2991LIBS="-lnet $LIBS $LIBS"
2992cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00002993#line 2994 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002994#include "confdefs.h"
2995/* Override any gcc2 internal prototype to avoid an error. */
2996/* We use char because int might match the return type of a gcc2
2997 builtin and then its argument prototype would still apply. */
2998char socket();
2999
3000int main() {
3001socket()
3002; return 0; }
3003EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003004if { (eval echo configure:3005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003005 rm -rf conftest*
3006 eval "ac_cv_lib_$ac_lib_var=yes"
3007else
3008 echo "configure: failed program was:" >&5
3009 cat conftest.$ac_ext >&5
3010 rm -rf conftest*
3011 eval "ac_cv_lib_$ac_lib_var=no"
3012fi
3013rm -f conftest*
3014LIBS="$ac_save_LIBS"
3015
3016fi
3017if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3018 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003019 LIBS="-lnet $LIBS"
3020else
3021 echo "$ac_t""no" 1>&6
3022fi
3023 # BeOS
3024;;
3025esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003026
Guido van Rossuma68acba1996-07-31 17:36:39 +00003027echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003028echo "configure:3029: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003029# Check whether --with-libs or --without-libs was given.
3030if test "${with_libs+set}" = set; then
3031 withval="$with_libs"
3032
3033echo "$ac_t""$withval" 1>&6
3034LIBS="$withval $LIBS"
3035
3036else
3037 echo "$ac_t""no" 1>&6
3038fi
3039
Guido van Rossum7f43da71994-08-01 12:15:30 +00003040
Guido van Rossum009f7871997-12-04 00:51:42 +00003041
Barry Warsawc0d24d82000-06-29 16:12:00 +00003042USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003043
Guido van Rossumec2f0731997-01-22 20:54:01 +00003044echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003045echo "configure:3046: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003046
3047# Check whether --with-dec-threads or --without-dec-threads was given.
3048if test "${with_dec_threads+set}" = set; then
3049 withval="$with_dec_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003050
3051echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003052LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003053if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003054 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003055fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003056else
3057 echo "$ac_t""no" 1>&6
3058fi
3059
3060
3061echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003062echo "configure:3063: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003063# Check whether --with-threads or --without-threads was given.
3064if test "${with_threads+set}" = set; then
3065 withval="$with_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003066 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003067fi
3068
3069
Barry Warsawc0d24d82000-06-29 16:12:00 +00003070# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003071# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003072if test "${with_thread+set}" = set; then
3073 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003074
3075with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003076fi
Barry Warsawc0d24d82000-06-29 16:12:00 +00003077
3078
3079if test -z "$with_threads"
3080then with_threads="yes"
3081fi
3082echo "$ac_t""$with_threads" 1>&6
3083
3084if test "$with_threads" = "no"
3085then
3086 USE_THREAD_MODULE="#"
3087else
3088 if test -d "$with_threads"
3089 then LDFLAGS="$LDFLAGS -L$with_threads"
3090 fi
3091 if test -d "$withval"
3092 then LDFLAGS="$LDFLAGS -L$withval"
3093 fi
3094 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003095#define _REENTRANT 1
3096EOF
3097
Barry Warsawc0d24d82000-06-29 16:12:00 +00003098 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003099echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003100echo "configure:3101: checking for mach/cthreads.h" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00003101if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003102 echo $ac_n "(cached) $ac_c" 1>&6
3103else
3104 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003105#line 3106 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003106#include "confdefs.h"
3107#include <mach/cthreads.h>
3108EOF
3109ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drakeae90f8d2000-09-15 03:38:12 +00003110{ (eval echo configure:3111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003111ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003112if test -z "$ac_err"; then
3113 rm -rf conftest*
3114 eval "ac_cv_header_$ac_safe=yes"
3115else
3116 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003117 echo "configure: failed program was:" >&5
3118 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003119 rm -rf conftest*
3120 eval "ac_cv_header_$ac_safe=no"
3121fi
3122rm -f conftest*
3123fi
3124if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3125 echo "$ac_t""yes" 1>&6
3126 cat >> confdefs.h <<\EOF
3127#define WITH_THREAD 1
3128EOF
3129
Barry Warsawc0d24d82000-06-29 16:12:00 +00003130 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003131#define C_THREADS 1
3132EOF
3133
Barry Warsawc0d24d82000-06-29 16:12:00 +00003134 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003135else
3136 echo "$ac_t""no" 1>&6
3137
Barry Warsawc0d24d82000-06-29 16:12:00 +00003138 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003139echo "configure:3140: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003140ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00003141if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003142 echo $ac_n "(cached) $ac_c" 1>&6
3143else
3144 ac_save_LIBS="$LIBS"
3145LIBS="-lpthread $LIBS"
3146cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003147#line 3148 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003148#include "confdefs.h"
3149/* Override any gcc2 internal prototype to avoid an error. */
3150/* We use char because int might match the return type of a gcc2
3151 builtin and then its argument prototype would still apply. */
3152char pthread_create();
3153
3154int main() {
3155pthread_create()
3156; return 0; }
3157EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003158if { (eval echo configure:3159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003159 rm -rf conftest*
3160 eval "ac_cv_lib_$ac_lib_var=yes"
3161else
3162 echo "configure: failed program was:" >&5
3163 cat conftest.$ac_ext >&5
3164 rm -rf conftest*
3165 eval "ac_cv_lib_$ac_lib_var=no"
3166fi
3167rm -f conftest*
3168LIBS="$ac_save_LIBS"
3169
3170fi
3171if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3172 echo "$ac_t""yes" 1>&6
3173 cat >> confdefs.h <<\EOF
3174#define WITH_THREAD 1
3175EOF
3176
Barry Warsawc0d24d82000-06-29 16:12:00 +00003177 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003178#define _POSIX_THREADS 1
3179EOF
3180
Barry Warsawc0d24d82000-06-29 16:12:00 +00003181 LIBS="-lpthread $LIBS"
3182 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003183else
3184 echo "$ac_t""no" 1>&6
3185
Barry Warsawc0d24d82000-06-29 16:12:00 +00003186 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003187echo "configure:3188: checking for pthread_detach" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00003188if eval "test \"\${ac_cv_func_pthread_detach+set}\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003189 echo $ac_n "(cached) $ac_c" 1>&6
3190else
3191 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003192#line 3193 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003193#include "confdefs.h"
3194/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003195 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003196#include <assert.h>
3197/* Override any gcc2 internal prototype to avoid an error. */
3198/* We use char because int might match the return type of a gcc2
3199 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003200char pthread_detach();
Skip Montanarob89f41e2000-09-04 04:06:05 +00003201char (*f)();
Guido van Rossumad678af1998-10-02 14:42:15 +00003202
3203int main() {
3204
3205/* The GNU C library defines this for functions which it implements
3206 to always fail with ENOSYS. Some functions are actually named
3207 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003208#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003209choke me
3210#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00003211f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00003212#endif
3213
3214; return 0; }
3215EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003216if { (eval echo configure:3217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003217 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003218 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003219else
3220 echo "configure: failed program was:" >&5
3221 cat conftest.$ac_ext >&5
3222 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003223 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003224fi
3225rm -f conftest*
3226fi
3227
Guido van Rossumea516321998-12-17 18:08:55 +00003228if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003229 echo "$ac_t""yes" 1>&6
3230 cat >> confdefs.h <<\EOF
3231#define WITH_THREAD 1
3232EOF
3233
Barry Warsawc0d24d82000-06-29 16:12:00 +00003234 cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003235#define _POSIX_THREADS 1
3236EOF
3237
Barry Warsawc0d24d82000-06-29 16:12:00 +00003238 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003239else
3240 echo "$ac_t""no" 1>&6
3241
Barry Warsawc0d24d82000-06-29 16:12:00 +00003242 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003243echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003244echo "configure:3245: checking for kernel/OS.h" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00003245if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003246 echo $ac_n "(cached) $ac_c" 1>&6
3247else
3248 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003249#line 3250 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003250#include "confdefs.h"
3251#include <kernel/OS.h>
3252EOF
3253ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drakeae90f8d2000-09-15 03:38:12 +00003254{ (eval echo configure:3255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003255ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003256if test -z "$ac_err"; then
3257 rm -rf conftest*
3258 eval "ac_cv_header_$ac_safe=yes"
3259else
3260 echo "$ac_err" >&5
3261 echo "configure: failed program was:" >&5
3262 cat conftest.$ac_ext >&5
3263 rm -rf conftest*
3264 eval "ac_cv_header_$ac_safe=no"
3265fi
3266rm -f conftest*
3267fi
3268if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3269 echo "$ac_t""yes" 1>&6
3270 cat >> confdefs.h <<\EOF
3271#define WITH_THREAD 1
3272EOF
3273
Barry Warsawc0d24d82000-06-29 16:12:00 +00003274 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003275#define BEOS_THREADS 1
3276EOF
3277
Barry Warsawc0d24d82000-06-29 16:12:00 +00003278 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003279else
3280 echo "$ac_t""no" 1>&6
3281
Barry Warsawc0d24d82000-06-29 16:12:00 +00003282 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003283echo "configure:3284: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003284ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00003285if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003286 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003287else
3288 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003289LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003290cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003291#line 3292 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003292#include "confdefs.h"
3293/* Override any gcc2 internal prototype to avoid an error. */
3294/* We use char because int might match the return type of a gcc2
3295 builtin and then its argument prototype would still apply. */
3296char pthread_create();
3297
3298int main() {
3299pthread_create()
3300; return 0; }
3301EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003302if { (eval echo configure:3303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003303 rm -rf conftest*
3304 eval "ac_cv_lib_$ac_lib_var=yes"
3305else
3306 echo "configure: failed program was:" >&5
3307 cat conftest.$ac_ext >&5
3308 rm -rf conftest*
3309 eval "ac_cv_lib_$ac_lib_var=no"
3310fi
3311rm -f conftest*
3312LIBS="$ac_save_LIBS"
3313
3314fi
3315if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3316 echo "$ac_t""yes" 1>&6
3317 cat >> confdefs.h <<\EOF
3318#define WITH_THREAD 1
3319EOF
3320
3321 cat >> confdefs.h <<\EOF
3322#define _POSIX_THREADS 1
3323EOF
3324
3325 LIBS="$LIBS -lpthreads"
3326 LIBOBJS="$LIBOBJS thread.o"
3327else
3328 echo "$ac_t""no" 1>&6
3329
3330 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003331echo "configure:3332: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003332ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00003333if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003334 echo $ac_n "(cached) $ac_c" 1>&6
3335else
3336 ac_save_LIBS="$LIBS"
3337LIBS="-lc_r $LIBS"
3338cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003339#line 3340 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003340#include "confdefs.h"
3341/* Override any gcc2 internal prototype to avoid an error. */
3342/* We use char because int might match the return type of a gcc2
3343 builtin and then its argument prototype would still apply. */
3344char pthread_create();
3345
3346int main() {
3347pthread_create()
3348; return 0; }
3349EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003350if { (eval echo configure:3351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003351 rm -rf conftest*
3352 eval "ac_cv_lib_$ac_lib_var=yes"
3353else
3354 echo "configure: failed program was:" >&5
3355 cat conftest.$ac_ext >&5
3356 rm -rf conftest*
3357 eval "ac_cv_lib_$ac_lib_var=no"
3358fi
3359rm -f conftest*
3360LIBS="$ac_save_LIBS"
3361
3362fi
3363if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3364 echo "$ac_t""yes" 1>&6
3365 cat >> confdefs.h <<\EOF
3366#define WITH_THREAD 1
3367EOF
3368
Barry Warsawc0d24d82000-06-29 16:12:00 +00003369 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003370#define _POSIX_THREADS 1
3371EOF
3372
Greg Steinadf63d62000-07-05 10:38:09 +00003373 LIBS="$LIBS -lc_r"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003374 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003375else
3376 echo "$ac_t""no" 1>&6
3377
Greg Steinadf63d62000-07-05 10:38:09 +00003378 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003379echo "configure:3380: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003380ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00003381if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003382 echo $ac_n "(cached) $ac_c" 1>&6
3383else
3384 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003385LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003386cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003387#line 3388 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003388#include "confdefs.h"
3389/* Override any gcc2 internal prototype to avoid an error. */
3390/* We use char because int might match the return type of a gcc2
3391 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003392char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003393
3394int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003395__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003396; return 0; }
3397EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003398if { (eval echo configure:3399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003399 rm -rf conftest*
3400 eval "ac_cv_lib_$ac_lib_var=yes"
3401else
3402 echo "configure: failed program was:" >&5
3403 cat conftest.$ac_ext >&5
3404 rm -rf conftest*
3405 eval "ac_cv_lib_$ac_lib_var=no"
3406fi
3407rm -f conftest*
3408LIBS="$ac_save_LIBS"
3409
3410fi
3411if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3412 echo "$ac_t""yes" 1>&6
3413 cat >> confdefs.h <<\EOF
3414#define WITH_THREAD 1
3415EOF
3416
Barry Warsawc0d24d82000-06-29 16:12:00 +00003417 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003418#define _POSIX_THREADS 1
3419EOF
3420
Greg Steinadf63d62000-07-05 10:38:09 +00003421 LIBS="$LIBS -lthread"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003422 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003423else
3424 echo "$ac_t""no" 1>&6
3425
Greg Steinadf63d62000-07-05 10:38:09 +00003426 echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003427echo "configure:3428: checking for pth_init in -lpth" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003428ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00003429if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00003430 echo $ac_n "(cached) $ac_c" 1>&6
3431else
3432 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003433LIBS="-lpth $LIBS"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003434cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003435#line 3436 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003436#include "confdefs.h"
3437/* Override any gcc2 internal prototype to avoid an error. */
3438/* We use char because int might match the return type of a gcc2
3439 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003440char pth_init();
Guido van Rossum0be3e491997-05-22 20:33:33 +00003441
3442int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003443pth_init()
Guido van Rossum0be3e491997-05-22 20:33:33 +00003444; return 0; }
3445EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003446if { (eval echo configure:3447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00003447 rm -rf conftest*
3448 eval "ac_cv_lib_$ac_lib_var=yes"
3449else
3450 echo "configure: failed program was:" >&5
3451 cat conftest.$ac_ext >&5
3452 rm -rf conftest*
3453 eval "ac_cv_lib_$ac_lib_var=no"
3454fi
3455rm -f conftest*
3456LIBS="$ac_save_LIBS"
3457
3458fi
3459if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3460 echo "$ac_t""yes" 1>&6
3461 cat >> confdefs.h <<\EOF
3462#define WITH_THREAD 1
3463EOF
3464
Barry Warsawc0d24d82000-06-29 16:12:00 +00003465 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003466#define _GNU_PTH 1
Guido van Rossum0be3e491997-05-22 20:33:33 +00003467EOF
3468
Greg Steinadf63d62000-07-05 10:38:09 +00003469 LIBS="-lpth $LIBS"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003470 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003471else
3472 echo "$ac_t""no" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003473
Barry Warsawc0d24d82000-06-29 16:12:00 +00003474 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003475echo "configure:3476: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003476ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00003477if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003478 echo $ac_n "(cached) $ac_c" 1>&6
3479else
3480 ac_save_LIBS="$LIBS"
3481LIBS="-lcma $LIBS"
3482cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003483#line 3484 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003484#include "confdefs.h"
3485/* Override any gcc2 internal prototype to avoid an error. */
3486/* We use char because int might match the return type of a gcc2
3487 builtin and then its argument prototype would still apply. */
3488char pthread_create();
3489
3490int main() {
3491pthread_create()
3492; return 0; }
3493EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003494if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003495 rm -rf conftest*
3496 eval "ac_cv_lib_$ac_lib_var=yes"
3497else
3498 echo "configure: failed program was:" >&5
3499 cat conftest.$ac_ext >&5
3500 rm -rf conftest*
3501 eval "ac_cv_lib_$ac_lib_var=no"
3502fi
3503rm -f conftest*
3504LIBS="$ac_save_LIBS"
3505
3506fi
3507if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3508 echo "$ac_t""yes" 1>&6
3509 cat >> confdefs.h <<\EOF
3510#define WITH_THREAD 1
3511EOF
3512
Barry Warsawc0d24d82000-06-29 16:12:00 +00003513 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003514#define _POSIX_THREADS 1
3515EOF
3516
Barry Warsawc0d24d82000-06-29 16:12:00 +00003517 LIBS="$LIBS -lcma"
3518 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003519else
3520 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003521
3522 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003523fi
3524
Barry Warsawc0d24d82000-06-29 16:12:00 +00003525
Guido van Rossum627b2d71993-12-24 10:39:16 +00003526fi
3527
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003528fi
3529
Guido van Rossum0be3e491997-05-22 20:33:33 +00003530fi
3531
Guido van Rossum49545951997-12-02 19:28:29 +00003532fi
3533
Guido van Rossumb93a8621998-05-07 13:27:32 +00003534fi
3535
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003536fi
3537
Guido van Rossumad678af1998-10-02 14:42:15 +00003538fi
3539
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003540fi
3541
Guido van Rossum0be3e491997-05-22 20:33:33 +00003542
Barry Warsawc0d24d82000-06-29 16:12:00 +00003543 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003544echo "configure:3545: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003545ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00003546if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003547 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003548else
3549 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003550LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003551cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003552#line 3553 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003553#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003554/* Override any gcc2 internal prototype to avoid an error. */
3555/* We use char because int might match the return type of a gcc2
3556 builtin and then its argument prototype would still apply. */
3557char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003558
Guido van Rossumf78abae1997-01-21 22:02:36 +00003559int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003560usconfig()
3561; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003562EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003563if { (eval echo configure:3564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003564 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003565 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003566else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003567 echo "configure: failed program was:" >&5
3568 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003569 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003570 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003571fi
3572rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003573LIBS="$ac_save_LIBS"
3574
3575fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003576if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003577 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003578 cat >> confdefs.h <<\EOF
3579#define WITH_THREAD 1
3580EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003581
Barry Warsawc0d24d82000-06-29 16:12:00 +00003582 LIBS="$LIBS -lmpc"
3583 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003584 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003585else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003586 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003587fi
3588
Barry Warsawc0d24d82000-06-29 16:12:00 +00003589 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003590echo "configure:3591: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003591ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00003592if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003593 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003594else
3595 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003596LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003597cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003598#line 3599 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003599#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003600/* Override any gcc2 internal prototype to avoid an error. */
3601/* We use char because int might match the return type of a gcc2
3602 builtin and then its argument prototype would still apply. */
3603char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003604
Guido van Rossumf78abae1997-01-21 22:02:36 +00003605int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003606thr_create()
3607; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003608EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003609if { (eval echo configure:3610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003610 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003611 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003612else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003613 echo "configure: failed program was:" >&5
3614 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003615 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003616 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003617fi
3618rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003619LIBS="$ac_save_LIBS"
3620
3621fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003622if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003623 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003624 cat >> confdefs.h <<\EOF
3625#define WITH_THREAD 1
3626EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003627
Barry Warsawc0d24d82000-06-29 16:12:00 +00003628 LIBS="$LIBS -lthread"
3629 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003630 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003631else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003632 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003633fi
3634
Guido van Rossum627b2d71993-12-24 10:39:16 +00003635fi
3636
Barry Warsawef82cd72000-06-30 16:21:01 +00003637# Check for GC support
3638
3639USE_GC_MODULE=""
3640echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003641echo "configure:3642: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003642# Check whether --with-cycle-gc or --without-cycle-gc was given.
3643if test "${with_cycle_gc+set}" = set; then
3644 withval="$with_cycle_gc"
3645 :
3646fi
3647
3648
3649if test -z "$with_cycle_gc"
3650then with_cycle_gc="yes"
3651fi
3652if test "$with_cycle_gc" = "no"
3653then
3654 USE_GC_MODULE="#"
3655else
3656 cat >> confdefs.h <<\EOF
3657#define WITH_CYCLE_GC 1
3658EOF
3659
3660fi
3661echo "$ac_t""$with_cycle_gc" 1>&6
3662
Fred Drakea50d6ec2000-08-31 16:13:20 +00003663# Check for LIBDB support
3664# either --with-libdb or, in its absence, the presence of db.h
3665
3666USE_BSDDB_MODULE=""
3667echo $ac_n "checking for --with-libdb""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003668echo "configure:3669: checking for --with-libdb" >&5
Fred Drakea50d6ec2000-08-31 16:13:20 +00003669# Check whether --with-libdb or --without-libdb was given.
3670if test "${with_libdb+set}" = set; then
3671 withval="$with_libdb"
3672 :
3673fi
3674
3675
Skip Montanarob89f41e2000-09-04 04:06:05 +00003676# enabled by default, but db.h must be found
3677if test "$ac_cv_header_db_h" = "yes"
3678then
3679 if test "$with_libdb" != "no"
3680 then with_libdb="yes"
3681 fi
3682else
3683 # make sure user knows why bsddb support wasn't enabled event
3684 # though s/he requested it
3685 if test "$with_libdb" = "yes"
3686 then echo $ac_n "(requested, but db.h was not found) $ac_c"
3687 fi
3688 with_libdb="no"
Fred Drakea50d6ec2000-08-31 16:13:20 +00003689fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00003690
Fred Drakea50d6ec2000-08-31 16:13:20 +00003691if test "$with_libdb" = "no"
3692then
3693 USE_BSDDB_MODULE="#"
3694else
3695 cat >> confdefs.h <<\EOF
3696#define WITH_LIBDB 1
3697EOF
3698
3699fi
3700echo "$ac_t""$with_libdb" 1>&6
3701
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003702if test "$with_libdb" = "yes"
3703then
3704 # check for libdb; BSD systems have the DB routines in libc --tg
3705
3706 echo $ac_n "checking for dbopen""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003707echo "configure:3708: checking for dbopen" >&5
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003708if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
3709 echo $ac_n "(cached) $ac_c" 1>&6
3710else
3711 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003712#line 3713 "configure"
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003713#include "confdefs.h"
3714/* System header to define __stub macros and hopefully few prototypes,
3715 which can conflict with char dbopen(); below. */
3716#include <assert.h>
3717/* Override any gcc2 internal prototype to avoid an error. */
3718/* We use char because int might match the return type of a gcc2
3719 builtin and then its argument prototype would still apply. */
3720char dbopen();
3721char (*f)();
3722
3723int main() {
3724
3725/* The GNU C library defines this for functions which it implements
3726 to always fail with ENOSYS. Some functions are actually named
3727 something starting with __ and the normal name is an alias. */
3728#if defined (__stub_dbopen) || defined (__stub___dbopen)
3729choke me
3730#else
3731f = dbopen;
3732#endif
3733
3734; return 0; }
3735EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003736if { (eval echo configure:3737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003737 rm -rf conftest*
3738 eval "ac_cv_func_dbopen=yes"
3739else
3740 echo "configure: failed program was:" >&5
3741 cat conftest.$ac_ext >&5
3742 rm -rf conftest*
3743 eval "ac_cv_func_dbopen=no"
3744fi
3745rm -f conftest*
3746fi
3747
3748if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
3749 echo "$ac_t""yes" 1>&6
3750 HAVE_LIBDB=
3751else
3752 echo "$ac_t""no" 1>&6
3753echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003754echo "configure:3755: checking for dbopen in -ldb" >&5
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003755ac_lib_var=`echo db'_'dbopen | sed 'y%./+-%__p_%'`
3756if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
3757 echo $ac_n "(cached) $ac_c" 1>&6
3758else
3759 ac_save_LIBS="$LIBS"
3760LIBS="-ldb $LIBS"
3761cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003762#line 3763 "configure"
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003763#include "confdefs.h"
3764/* Override any gcc2 internal prototype to avoid an error. */
3765/* We use char because int might match the return type of a gcc2
3766 builtin and then its argument prototype would still apply. */
3767char dbopen();
3768
3769int main() {
3770dbopen()
3771; return 0; }
3772EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003773if { (eval echo configure:3774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003774 rm -rf conftest*
3775 eval "ac_cv_lib_$ac_lib_var=yes"
3776else
3777 echo "configure: failed program was:" >&5
3778 cat conftest.$ac_ext >&5
3779 rm -rf conftest*
3780 eval "ac_cv_lib_$ac_lib_var=no"
3781fi
3782rm -f conftest*
3783LIBS="$ac_save_LIBS"
3784
3785fi
3786if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3787 echo "$ac_t""yes" 1>&6
3788 HAVE_LIBDB=-ldb
3789else
3790 echo "$ac_t""no" 1>&6
3791fi
3792
3793fi
3794
3795fi
3796
Barry Warsawef82cd72000-06-30 16:21:01 +00003797# Check for --with-wctype-functions
3798echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003799echo "configure:3800: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003800# Check whether --with-wctype-functions or --without-wctype-functions was given.
3801if test "${with_wctype_functions+set}" = set; then
3802 withval="$with_wctype_functions"
3803
3804if test "$withval" != no
3805then cat >> confdefs.h <<\EOF
3806#define WANT_WCTYPE_FUNCTIONS 1
3807EOF
3808 echo "$ac_t""yes" 1>&6
3809else echo "$ac_t""no" 1>&6
3810fi
3811else
3812 echo "$ac_t""no" 1>&6
3813fi
3814
3815
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003816# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00003817
3818DLINCLDIR=/
3819
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003820echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003821echo "configure:3822: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003822# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003823if test "${with_sgi_dl+set}" = set; then
3824 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003825
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003826echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003827cat >> confdefs.h <<\EOF
3828#define WITH_SGI_DL 1
3829EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003830
Guido van Rossume97ee181999-12-20 21:27:22 +00003831DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003832dldir=$withval
3833if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003834then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003835else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003836fi
3837DLINCLDIR=${dldir}
3838LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003839else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003840 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003841fi
3842
3843
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003844echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003845echo "configure:3846: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003846# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003847if test "${with_dl_dld+set}" = set; then
3848 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003849
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003850echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003851cat >> confdefs.h <<\EOF
3852#define WITH_DL_DLD 1
3853EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003854
Guido van Rossume97ee181999-12-20 21:27:22 +00003855DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003856dldir=`echo "$withval" | sed 's/,.*//'`
3857dlddir=`echo "$withval" | sed 's/.*,//'`
3858if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003859then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003860else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003861fi
3862DLINCLDIR=${dldir}
3863LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003864else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003865 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003866fi
3867
3868
Guido van Rossume97ee181999-12-20 21:27:22 +00003869# the dlopen() function means we might want to use dynload_shlib.o. some
3870# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00003871for ac_func in dlopen
3872do
3873echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003874echo "configure:3875: checking for $ac_func" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00003875if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003876 echo $ac_n "(cached) $ac_c" 1>&6
3877else
3878 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003879#line 3880 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00003880#include "confdefs.h"
3881/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00003882 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00003883#include <assert.h>
3884/* Override any gcc2 internal prototype to avoid an error. */
3885/* We use char because int might match the return type of a gcc2
3886 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003887char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00003888char (*f)();
Guido van Rossume97ee181999-12-20 21:27:22 +00003889
3890int main() {
3891
3892/* The GNU C library defines this for functions which it implements
3893 to always fail with ENOSYS. Some functions are actually named
3894 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003895#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00003896choke me
3897#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00003898f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +00003899#endif
3900
3901; return 0; }
3902EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003903if { (eval echo configure:3904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003904 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003905 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00003906else
3907 echo "configure: failed program was:" >&5
3908 cat conftest.$ac_ext >&5
3909 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003910 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00003911fi
3912rm -f conftest*
3913fi
3914
Thomas Wouters3a584202000-08-05 23:28:51 +00003915if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003916 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00003917 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3918 cat >> confdefs.h <<EOF
3919#define $ac_tr_func 1
3920EOF
3921
Guido van Rossume97ee181999-12-20 21:27:22 +00003922else
3923 echo "$ac_t""no" 1>&6
3924fi
Thomas Wouters3a584202000-08-05 23:28:51 +00003925done
Guido van Rossume97ee181999-12-20 21:27:22 +00003926
3927
3928# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3929# loading of modules.
3930
3931echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003932echo "configure:3933: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00003933if test -z "$DYNLOADFILE"
3934then
3935 case $ac_sys_system/$ac_sys_release in
3936 AIX*) DYNLOADFILE="dynload_aix.o";;
3937 BeOS*) DYNLOADFILE="dynload_beos.o";;
3938 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
3939 next/*) DYNLOADFILE="dynload_next.o";;
3940 *)
3941 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
3942 # out any dynamic loading
3943 if test "$ac_cv_func_dlopen" = yes
3944 then DYNLOADFILE="dynload_shlib.o"
3945 else DYNLOADFILE="dynload_stub.o"
3946 fi
3947 ;;
3948 esac
3949fi
3950echo "$ac_t""$DYNLOADFILE" 1>&6
3951if test "$DYNLOADFILE" != "dynload_stub.o"
3952then
3953 cat >> confdefs.h <<\EOF
3954#define HAVE_DYNAMIC_LOADING 1
3955EOF
3956
3957fi
3958
Guido van Rossum627b2d71993-12-24 10:39:16 +00003959# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00003960for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00003961 flock fork fsync fdatasync fpathconf ftime ftruncate \
Thomas Wouters3a584202000-08-05 23:28:51 +00003962 getgroups getlogin getpeername getpid getpwent getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00003963 kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00003964 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00003965 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003966 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00003967 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00003968 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00003969 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters70c21a12000-07-14 14:28:33 +00003970 truncate uname waitpid _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003971do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003972echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00003973echo "configure:3974: checking for $ac_func" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00003974if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003975 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003976else
3977 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00003978#line 3979 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003979#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003980/* System header to define __stub macros and hopefully few prototypes,
3981 which can conflict with char $ac_func(); below. */
3982#include <assert.h>
3983/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003984/* We use char because int might match the return type of a gcc2
3985 builtin and then its argument prototype would still apply. */
3986char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00003987char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003988
Guido van Rossumf78abae1997-01-21 22:02:36 +00003989int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003990
Guido van Rossum627b2d71993-12-24 10:39:16 +00003991/* The GNU C library defines this for functions which it implements
3992 to always fail with ENOSYS. Some functions are actually named
3993 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003994#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003995choke me
3996#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00003997f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003998#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003999
Guido van Rossum7f43da71994-08-01 12:15:30 +00004000; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004001EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004002if { (eval echo configure:4003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004003 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004004 eval "ac_cv_func_$ac_func=yes"
4005else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004006 echo "configure: failed program was:" >&5
4007 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004008 rm -rf conftest*
4009 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004010fi
4011rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004012fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004013
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004014if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004015 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004016 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004017 cat >> confdefs.h <<EOF
4018#define $ac_tr_func 1
4019EOF
4020
4021else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004022 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004023fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004024done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004025
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004026
Fred Drake8cef4cf2000-06-28 16:40:38 +00004027# check for openpty and forkpty
4028
4029for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004030do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004031echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00004032echo "configure:4033: checking for $ac_func" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00004033if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004034 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004035else
4036 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004037#line 4038 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004038#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004039/* System header to define __stub macros and hopefully few prototypes,
4040 which can conflict with char $ac_func(); below. */
4041#include <assert.h>
4042/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004043/* We use char because int might match the return type of a gcc2
4044 builtin and then its argument prototype would still apply. */
4045char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00004046char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004047
Guido van Rossumf78abae1997-01-21 22:02:36 +00004048int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004049
Guido van Rossum627b2d71993-12-24 10:39:16 +00004050/* The GNU C library defines this for functions which it implements
4051 to always fail with ENOSYS. Some functions are actually named
4052 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004053#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004054choke me
4055#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00004056f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +00004057#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058
Guido van Rossum7f43da71994-08-01 12:15:30 +00004059; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004060EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004061if { (eval echo configure:4062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004062 rm -rf conftest*
4063 eval "ac_cv_func_$ac_func=yes"
4064else
4065 echo "configure: failed program was:" >&5
4066 cat conftest.$ac_ext >&5
4067 rm -rf conftest*
4068 eval "ac_cv_func_$ac_func=no"
4069fi
4070rm -f conftest*
4071fi
4072
4073if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4074 echo "$ac_t""yes" 1>&6
4075 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4076 cat >> confdefs.h <<EOF
4077#define $ac_tr_func 1
4078EOF
4079
4080else
4081 echo "$ac_t""no" 1>&6
4082echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00004083echo "configure:4084: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004084ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00004085if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004086 echo $ac_n "(cached) $ac_c" 1>&6
4087else
4088 ac_save_LIBS="$LIBS"
4089LIBS="-lutil $LIBS"
4090cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004091#line 4092 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004092#include "confdefs.h"
4093/* Override any gcc2 internal prototype to avoid an error. */
4094/* We use char because int might match the return type of a gcc2
4095 builtin and then its argument prototype would still apply. */
4096char openpty();
4097
4098int main() {
4099openpty()
4100; return 0; }
4101EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004102if { (eval echo configure:4103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004103 rm -rf conftest*
4104 eval "ac_cv_lib_$ac_lib_var=yes"
4105else
4106 echo "configure: failed program was:" >&5
4107 cat conftest.$ac_ext >&5
4108 rm -rf conftest*
4109 eval "ac_cv_lib_$ac_lib_var=no"
4110fi
4111rm -f conftest*
4112LIBS="$ac_save_LIBS"
4113
4114fi
4115if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4116 echo "$ac_t""yes" 1>&6
4117 cat >> confdefs.h <<\EOF
4118#define HAVE_OPENPTY 1
4119EOF
4120 LIBS="$LIBS -lutil"
4121else
4122 echo "$ac_t""no" 1>&6
4123fi
4124
4125fi
4126done
4127
4128for ac_func in forkpty
4129do
4130echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00004131echo "configure:4132: checking for $ac_func" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00004132if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004133 echo $ac_n "(cached) $ac_c" 1>&6
4134else
4135 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004136#line 4137 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004137#include "confdefs.h"
4138/* System header to define __stub macros and hopefully few prototypes,
4139 which can conflict with char $ac_func(); below. */
4140#include <assert.h>
4141/* Override any gcc2 internal prototype to avoid an error. */
4142/* We use char because int might match the return type of a gcc2
4143 builtin and then its argument prototype would still apply. */
4144char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00004145char (*f)();
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
Skip Montanarob89f41e2000-09-04 04:06:05 +00004155f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +00004156#endif
4157
4158; return 0; }
4159EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +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
Fred Drakeae90f8d2000-09-15 03:38:12 +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_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00004184if eval "test \"\${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
Fred Drakeae90f8d2000-09-15 03:38:12 +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
Fred Drakeae90f8d2000-09-15 03:38:12 +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
Fred Drakeae90f8d2000-09-15 03:38:12 +00004232echo "configure:4233: checking for $ac_func" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00004233if eval "test \"\${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
Fred Drakeae90f8d2000-09-15 03:38:12 +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();
Skip Montanarob89f41e2000-09-04 04:06:05 +00004246char (*f)();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004247
4248int main() {
4249
4250/* The GNU C library defines this for functions which it implements
4251 to always fail with ENOSYS. Some functions are actually named
4252 something starting with __ and the normal name is an alias. */
4253#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4254choke me
4255#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00004256f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +00004257#endif
4258
4259; return 0; }
4260EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004261if { (eval echo configure:4262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004262 rm -rf conftest*
4263 eval "ac_cv_func_$ac_func=yes"
4264else
4265 echo "configure: failed program was:" >&5
4266 cat conftest.$ac_ext >&5
4267 rm -rf conftest*
4268 eval "ac_cv_func_$ac_func=no"
4269fi
4270rm -f conftest*
4271fi
4272
4273if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4274 echo "$ac_t""yes" 1>&6
4275 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4276 cat >> confdefs.h <<EOF
4277#define $ac_tr_func 1
4278EOF
4279
4280else
4281 echo "$ac_t""no" 1>&6
4282fi
4283done
4284
4285
4286for ac_func in dup2 getcwd strdup strerror memmove
4287do
4288echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00004289echo "configure:4290: checking for $ac_func" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00004290if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004291 echo $ac_n "(cached) $ac_c" 1>&6
4292else
4293 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004294#line 4295 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004295#include "confdefs.h"
4296/* System header to define __stub macros and hopefully few prototypes,
4297 which can conflict with char $ac_func(); below. */
4298#include <assert.h>
4299/* Override any gcc2 internal prototype to avoid an error. */
4300/* We use char because int might match the return type of a gcc2
4301 builtin and then its argument prototype would still apply. */
4302char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00004303char (*f)();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004304
4305int main() {
4306
4307/* The GNU C library defines this for functions which it implements
4308 to always fail with ENOSYS. Some functions are actually named
4309 something starting with __ and the normal name is an alias. */
4310#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4311choke me
4312#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00004313f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004314#endif
4315
4316; return 0; }
4317EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004318if { (eval echo configure:4319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004319 rm -rf conftest*
4320 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004321else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004322 echo "configure: failed program was:" >&5
4323 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004324 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004325 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004326fi
4327rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004328fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004329
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004330if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004331 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004332 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4333 cat >> confdefs.h <<EOF
4334#define $ac_tr_func 1
4335EOF
4336
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004337else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004338 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004339LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004340fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004341done
4342
Guido van Rossumf78abae1997-01-21 22:02:36 +00004343
Thomas Wouters3a584202000-08-05 23:28:51 +00004344for ac_func in getpgrp
4345do
4346echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00004347echo "configure:4348: checking for $ac_func" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00004348if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004349 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004350else
4351 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004352#line 4353 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004353#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004354/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004355 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004356#include <assert.h>
4357/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004358/* We use char because int might match the return type of a gcc2
4359 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004360char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00004361char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004362
Guido van Rossumf78abae1997-01-21 22:02:36 +00004363int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004364
Guido van Rossum627b2d71993-12-24 10:39:16 +00004365/* The GNU C library defines this for functions which it implements
4366 to always fail with ENOSYS. Some functions are actually named
4367 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004368#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004369choke me
4370#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00004371f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +00004372#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004373
4374; return 0; }
4375EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004376if { (eval echo configure:4377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004377 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004378 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004379else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004380 echo "configure: failed program was:" >&5
4381 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004382 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004383 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004384fi
4385rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004386fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004387
Thomas Wouters3a584202000-08-05 23:28:51 +00004388if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004389 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004390 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4391 cat >> confdefs.h <<EOF
4392#define $ac_tr_func 1
4393EOF
4394 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004395#line 4396 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004396#include "confdefs.h"
4397#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004398int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004399getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004400; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004401EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004402if { (eval echo configure:4403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004403 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004404 cat >> confdefs.h <<\EOF
4405#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004406EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004407
Guido van Rossumf78abae1997-01-21 22:02:36 +00004408else
4409 echo "configure: failed program was:" >&5
4410 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004411fi
4412rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004413else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004414 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004415fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004416done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004417
Thomas Wouters3a584202000-08-05 23:28:51 +00004418for ac_func in setpgrp
4419do
4420echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00004421echo "configure:4422: checking for $ac_func" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00004422if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004423 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004424else
4425 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004426#line 4427 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004427#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004428/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004429 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004430#include <assert.h>
4431/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004432/* We use char because int might match the return type of a gcc2
4433 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004434char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00004435char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004436
Guido van Rossumf78abae1997-01-21 22:02:36 +00004437int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004438
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004439/* The GNU C library defines this for functions which it implements
4440 to always fail with ENOSYS. Some functions are actually named
4441 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004442#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004443choke me
4444#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00004445f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004446#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004447
4448; return 0; }
4449EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004450if { (eval echo configure:4451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004451 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004452 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004453else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004454 echo "configure: failed program was:" >&5
4455 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004456 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004457 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004458fi
4459rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004460fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004461
Thomas Wouters3a584202000-08-05 23:28:51 +00004462if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004463 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004464 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4465 cat >> confdefs.h <<EOF
4466#define $ac_tr_func 1
4467EOF
4468 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004469#line 4470 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004470#include "confdefs.h"
4471#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004472int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004473setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004474; return 0; }
4475EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004476if { (eval echo configure:4477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004477 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004478 cat >> confdefs.h <<\EOF
4479#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004480EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004481
Guido van Rossumf78abae1997-01-21 22:02:36 +00004482else
4483 echo "configure: failed program was:" >&5
4484 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004485fi
4486rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004487else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004488 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004489fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004490done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004491
Thomas Wouters3a584202000-08-05 23:28:51 +00004492for ac_func in gettimeofday
4493do
4494echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00004495echo "configure:4496: checking for $ac_func" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00004496if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004497 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004498else
4499 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004500#line 4501 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004501#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004502/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004503 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004504#include <assert.h>
4505/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004506/* We use char because int might match the return type of a gcc2
4507 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004508char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00004509char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004510
Guido van Rossumf78abae1997-01-21 22:02:36 +00004511int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004512
4513/* The GNU C library defines this for functions which it implements
4514 to always fail with ENOSYS. Some functions are actually named
4515 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004516#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004517choke me
4518#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00004519f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004520#endif
4521
4522; return 0; }
4523EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004524if { (eval echo configure:4525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
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=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004527else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004528 echo "configure: failed program was:" >&5
4529 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004530 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004531 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004532fi
4533rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004534fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004535
Thomas Wouters3a584202000-08-05 23:28:51 +00004536if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004537 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004538 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4539 cat >> confdefs.h <<EOF
4540#define $ac_tr_func 1
4541EOF
4542 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004543#line 4544 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004544#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004545#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004546int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004547gettimeofday((struct timeval*)0,(struct timezone*)0);
4548; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004549EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004550if { (eval echo configure:4551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004551 :
4552else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004553 echo "configure: failed program was:" >&5
4554 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004555 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004556 cat >> confdefs.h <<\EOF
4557#define GETTIMEOFDAY_NO_TZ 1
4558EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004559
4560fi
4561rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004562else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004563 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004564fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004565done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004566
4567
4568# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004569echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00004570echo "configure:4571: checking whether time.h and sys/time.h may both be included" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00004571if eval "test \"\${ac_cv_header_time+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004572 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004573else
4574 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004575#line 4576 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004576#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004577#include <sys/types.h>
4578#include <sys/time.h>
4579#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004580int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004581struct tm *tp;
4582; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004583EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004584if { (eval echo configure:4585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
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=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004587else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004588 echo "configure: failed program was:" >&5
4589 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004590 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004591 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004592fi
4593rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004594fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004595
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004596echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004597if test $ac_cv_header_time = yes; then
4598 cat >> confdefs.h <<\EOF
4599#define TIME_WITH_SYS_TIME 1
4600EOF
4601
4602fi
4603
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004604echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00004605echo "configure:4606: checking whether struct tm is in sys/time.h or time.h" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00004606if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004607 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004608else
4609 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004610#line 4611 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004611#include "confdefs.h"
4612#include <sys/types.h>
4613#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004614int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004615struct tm *tp; tp->tm_sec;
4616; return 0; }
4617EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004618if { (eval echo configure:4619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004619 rm -rf conftest*
4620 ac_cv_struct_tm=time.h
4621else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004622 echo "configure: failed program was:" >&5
4623 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004624 rm -rf conftest*
4625 ac_cv_struct_tm=sys/time.h
4626fi
4627rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004628fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004629
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004630echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004631if test $ac_cv_struct_tm = sys/time.h; then
4632 cat >> confdefs.h <<\EOF
4633#define TM_IN_SYS_TIME 1
4634EOF
4635
4636fi
4637
Skip Montanarob89f41e2000-09-04 04:06:05 +00004638echo $ac_n "checking for member tm_zone in aggregate type struct tm""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00004639echo "configure:4640: checking for member tm_zone in aggregate type struct tm" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00004640if eval "test \"\${ac_cv_c_struct_member_tm_zone+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004641 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004642else
4643 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004644#line 4645 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004645#include "confdefs.h"
4646#include <sys/types.h>
4647#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004648int main() {
Skip Montanarob89f41e2000-09-04 04:06:05 +00004649struct tm foo; foo.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004650; return 0; }
4651EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004652if { (eval echo configure:4653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004653 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00004654 ac_cv_c_struct_member_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004655else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004656 echo "configure: failed program was:" >&5
4657 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004658 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00004659 ac_cv_c_struct_member_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004660fi
4661rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004662fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004663
Skip Montanarob89f41e2000-09-04 04:06:05 +00004664echo "$ac_t""$ac_cv_c_struct_member_tm_zone" 1>&6
4665tm_zone="$ac_cv_c_struct_member_tm_zone"
4666if test "$ac_cv_c_struct_member_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004667 cat >> confdefs.h <<\EOF
4668#define HAVE_TM_ZONE 1
4669EOF
4670
4671else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004672 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00004673echo "configure:4674: checking for tzname" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00004674if eval "test \"\${ac_cv_var_tzname+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004675 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004676else
4677 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004678#line 4679 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004679#include "confdefs.h"
4680#include <time.h>
4681#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004682extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004683#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004684int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004685atoi(*tzname);
4686; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004687EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004688if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004689 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004690 ac_cv_var_tzname=yes
4691else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004692 echo "configure: failed program was:" >&5
4693 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004694 rm -rf conftest*
4695 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004696fi
4697rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004698fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004699
4700echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004701 if test $ac_cv_var_tzname = yes; then
4702 cat >> confdefs.h <<\EOF
4703#define HAVE_TZNAME 1
4704EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004705
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004706 fi
4707fi
4708
4709
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004710echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00004711echo "configure:4712: checking for time.h that defines altzone" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00004712if eval "test \"\${ac_cv_header_time_altzone+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004713 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004714else
4715 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004716#line 4717 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004717#include "confdefs.h"
4718#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004719int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004720return altzone;
4721; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004722EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004723if { (eval echo configure:4724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004724 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004725 ac_cv_header_time_altzone=yes
4726else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004727 echo "configure: failed program was:" >&5
4728 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004729 rm -rf conftest*
4730 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004731fi
4732rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004733fi
4734
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004735echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004736if test $ac_cv_header_time_altzone = yes; then
4737 cat >> confdefs.h <<\EOF
4738#define HAVE_ALTZONE 1
4739EOF
4740
4741fi
4742
Guido van Rossumda88dad1995-01-26 00:46:29 +00004743was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004744echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00004745echo "configure:4746: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004746cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004747#line 4748 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004748#include "confdefs.h"
4749
4750#include <sys/types.h>
4751#include <sys/select.h>
4752#include <sys/time.h>
4753
Guido van Rossumf78abae1997-01-21 22:02:36 +00004754int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004755;
4756; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004757EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004758if { (eval echo configure:4759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004759 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004760 cat >> confdefs.h <<\EOF
4761#define SYS_SELECT_WITH_SYS_TIME 1
4762EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004763 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004764else
4765 echo "configure: failed program was:" >&5
4766 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004767fi
4768rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004769echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004770
4771# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004772
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004773echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00004774echo "configure:4775: checking whether char is unsigned" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00004775if eval "test \"\${ac_cv_c_char_unsigned+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004776 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004777else
4778 if test "$GCC" = yes; then
4779 # GCC predefines this symbol on systems where it applies.
4780cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004781#line 4782 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004782#include "confdefs.h"
4783#ifdef __CHAR_UNSIGNED__
4784 yes
4785#endif
4786
4787EOF
4788if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4789 egrep "yes" >/dev/null 2>&1; then
4790 rm -rf conftest*
4791 ac_cv_c_char_unsigned=yes
4792else
4793 rm -rf conftest*
4794 ac_cv_c_char_unsigned=no
4795fi
4796rm -f conftest*
4797
4798else
4799if test "$cross_compiling" = yes; then
4800 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4801else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004802 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004803#line 4804 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004804#include "confdefs.h"
4805/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004806#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00004807#define volatile
4808#endif
4809main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00004810 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004811}
4812EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004813if { (eval echo configure:4814: \"$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 +00004814then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004815 ac_cv_c_char_unsigned=yes
4816else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004817 echo "configure: failed program was:" >&5
4818 cat conftest.$ac_ext >&5
4819 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004820 ac_cv_c_char_unsigned=no
4821fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004822rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004823fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004824
4825fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004826fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004827
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004828echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004829if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
4830 cat >> confdefs.h <<\EOF
4831#define __CHAR_UNSIGNED__ 1
4832EOF
4833
4834fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004835
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004836echo $ac_n "checking for working const""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00004837echo "configure:4838: checking for working const" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00004838if eval "test \"\${ac_cv_c_const+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004839 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004840else
4841 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004842#line 4843 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004843#include "confdefs.h"
4844
Guido van Rossumf78abae1997-01-21 22:02:36 +00004845int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004846
4847/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004848typedef int charset[2]; const charset x;
4849/* SunOS 4.1.1 cc rejects this. */
4850char const *const *ccp;
4851char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004852/* NEC SVR4.0.2 mips cc rejects this. */
4853struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004854static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004855/* AIX XL C 1.02.0.0 rejects this.
4856 It does not let you subtract one const X* pointer from another in an arm
4857 of an if-expression whose if-part is not a constant expression */
4858const char *g = "string";
4859ccp = &g + (g ? g-g : 0);
4860/* HPUX 7.0 cc rejects these. */
4861++ccp;
4862p = (char**) ccp;
4863ccp = (char const *const *) p;
4864{ /* SCO 3.2v4 cc rejects this. */
4865 char *t;
4866 char const *s = 0 ? (char *) 0 : (char const *) 0;
4867
4868 *t++ = 0;
4869}
4870{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004871 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004872 const int *foo = &x[0];
4873 ++foo;
4874}
4875{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4876 typedef const int *iptr;
4877 iptr p = 0;
4878 ++p;
4879}
4880{ /* AIX XL C 1.02.0.0 rejects this saying
4881 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4882 struct s { int j; const int *ap[3]; };
4883 struct s *b; b->j = 5;
4884}
4885{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4886 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004887}
4888
4889; return 0; }
4890EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004891if { (eval echo configure:4892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004892 rm -rf conftest*
4893 ac_cv_c_const=yes
4894else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004895 echo "configure: failed program was:" >&5
4896 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004897 rm -rf conftest*
4898 ac_cv_c_const=no
4899fi
4900rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004901fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004902
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004903echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004904if test $ac_cv_c_const = no; then
4905 cat >> confdefs.h <<\EOF
4906#define const
4907EOF
4908
4909fi
4910
Guido van Rossumef2255b2000-03-10 22:30:29 +00004911echo $ac_n "checking for inline""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00004912echo "configure:4913: checking for inline" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00004913if eval "test \"\${ac_cv_c_inline+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004914 echo $ac_n "(cached) $ac_c" 1>&6
4915else
4916 ac_cv_c_inline=no
4917for ac_kw in inline __inline__ __inline; do
4918 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004919#line 4920 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00004920#include "confdefs.h"
4921
4922int main() {
4923} $ac_kw foo() {
4924; return 0; }
4925EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004926if { (eval echo configure:4927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004927 rm -rf conftest*
4928 ac_cv_c_inline=$ac_kw; break
4929else
4930 echo "configure: failed program was:" >&5
4931 cat conftest.$ac_ext >&5
4932fi
4933rm -f conftest*
4934done
4935
4936fi
4937
4938echo "$ac_t""$ac_cv_c_inline" 1>&6
4939case "$ac_cv_c_inline" in
4940 inline | yes) ;;
4941 no) cat >> confdefs.h <<\EOF
4942#define inline
4943EOF
4944 ;;
4945 *) cat >> confdefs.h <<EOF
4946#define inline $ac_cv_c_inline
4947EOF
4948 ;;
4949esac
4950
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004951
Guido van Rossumda88dad1995-01-26 00:46:29 +00004952works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004953echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00004954echo "configure:4955: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004955cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004956#line 4957 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004957#include "confdefs.h"
4958
Guido van Rossumf78abae1997-01-21 22:02:36 +00004959int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004960volatile int x; x = 0;
4961; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004962EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004963if { (eval echo configure:4964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004964 rm -rf conftest*
4965 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004966else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004967 echo "configure: failed program was:" >&5
4968 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004969 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004970 cat >> confdefs.h <<\EOF
4971#define volatile
4972EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004973
4974fi
4975rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004976echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004977
Guido van Rossumda88dad1995-01-26 00:46:29 +00004978works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004979echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00004980echo "configure:4981: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004981cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004982#line 4983 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004983#include "confdefs.h"
4984
Guido van Rossumf78abae1997-01-21 22:02:36 +00004985int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004986signed char c;
4987; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004988EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00004989if { (eval echo configure:4990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004990 rm -rf conftest*
4991 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004992else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004993 echo "configure: failed program was:" >&5
4994 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004995 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004996 cat >> confdefs.h <<\EOF
4997#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00004998EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004999
5000fi
5001rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005002echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005003
Guido van Rossumda88dad1995-01-26 00:46:29 +00005004have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005005echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005006echo "configure:5007: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005007cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005008#line 5009 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005009#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005010int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005011int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005012return foo(10);
5013; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005014EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005015if { (eval echo configure:5016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005016 rm -rf conftest*
5017 cat >> confdefs.h <<\EOF
5018#define HAVE_PROTOTYPES 1
5019EOF
5020 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005021else
5022 echo "configure: failed program was:" >&5
5023 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005024fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005025rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005026echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005027
Guido van Rossumda88dad1995-01-26 00:46:29 +00005028works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005029echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005030echo "configure:5031: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005031cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005032#line 5033 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005033#include "confdefs.h"
5034
5035#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00005036int foo(int x, ...) {
5037 va_list va;
5038 va_start(va, x);
5039 va_arg(va, int);
5040 va_arg(va, char *);
5041 va_arg(va, double);
5042 return 0;
5043}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005044
Guido van Rossumf78abae1997-01-21 22:02:36 +00005045int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005046return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005047; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005048EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005049if { (eval echo configure:5050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005050 rm -rf conftest*
5051 cat >> confdefs.h <<\EOF
5052#define HAVE_STDARG_PROTOTYPES 1
5053EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005054 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005055else
5056 echo "configure: failed program was:" >&5
5057 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005058fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005059rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005060echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005061
Guido van Rossumda88dad1995-01-26 00:46:29 +00005062if test "$have_prototypes" = yes; then
5063bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005064echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005065echo "configure:5066: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005066cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005067#line 5068 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005068#include "confdefs.h"
5069#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005070int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005071char **t;execve("@",t,t);
5072; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005073EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005074if { (eval echo configure:5075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005075 :
5076else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005077 echo "configure: failed program was:" >&5
5078 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005079 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005080 cat >> confdefs.h <<\EOF
5081#define BAD_EXEC_PROTOTYPES 1
5082EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005083 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005084fi
5085rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005086echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005087fi
5088
Guido van Rossumda88dad1995-01-26 00:46:29 +00005089bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005090echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005091echo "configure:5092: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005092if test "$cross_compiling" = yes; then
5093 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5094else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005095 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005096#line 5097 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005097#include "confdefs.h"
5098
5099struct s { int a; int b; };
5100static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005101int foobar() {
5102 static int random;
5103 random = (int) &foo;
5104 return random;
5105}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005106static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005107main() {
5108 exit(!((int)&foo == foobar()));
5109}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005110
5111EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005112if { (eval echo configure:5113: \"$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 +00005113then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005114 :
5115else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005116 echo "configure: failed program was:" >&5
5117 cat conftest.$ac_ext >&5
5118 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005119 cat >> confdefs.h <<\EOF
5120#define BAD_STATIC_FORWARD 1
5121EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005122 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005123fi
5124rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005125fi
5126
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005127echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005128
Guido van Rossumda88dad1995-01-26 00:46:29 +00005129va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005130echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005131echo "configure:5132: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005132cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005133#line 5134 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005134#include "confdefs.h"
5135
5136#ifdef HAVE_STDARG_PROTOTYPES
5137#include <stdarg.h>
5138#else
5139#include <varargs.h>
5140#endif
5141
Guido van Rossumf78abae1997-01-21 22:02:36 +00005142int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005143va_list list1, list2; list1 = list2;
5144; return 0; }
5145EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005146if { (eval echo configure:5147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005147 :
5148else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005149 echo "configure: failed program was:" >&5
5150 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005151 rm -rf conftest*
5152 cat >> confdefs.h <<\EOF
5153#define VA_LIST_IS_ARRAY 1
5154EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005155 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005156fi
5157rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005158echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005159
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005160# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5161echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005162echo "configure:5163: checking for gethostbyname_r" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00005163if eval "test \"\${ac_cv_func_gethostbyname_r+set}\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005164 echo $ac_n "(cached) $ac_c" 1>&6
5165else
5166 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005167#line 5168 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005168#include "confdefs.h"
5169/* System header to define __stub macros and hopefully few prototypes,
5170 which can conflict with char gethostbyname_r(); below. */
5171#include <assert.h>
5172/* Override any gcc2 internal prototype to avoid an error. */
5173/* We use char because int might match the return type of a gcc2
5174 builtin and then its argument prototype would still apply. */
5175char gethostbyname_r();
Skip Montanarob89f41e2000-09-04 04:06:05 +00005176char (*f)();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005177
5178int main() {
5179
5180/* The GNU C library defines this for functions which it implements
5181 to always fail with ENOSYS. Some functions are actually named
5182 something starting with __ and the normal name is an alias. */
5183#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5184choke me
5185#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00005186f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005187#endif
5188
5189; return 0; }
5190EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005191if { (eval echo configure:5192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005192 rm -rf conftest*
5193 eval "ac_cv_func_gethostbyname_r=yes"
5194else
5195 echo "configure: failed program was:" >&5
5196 cat conftest.$ac_ext >&5
5197 rm -rf conftest*
5198 eval "ac_cv_func_gethostbyname_r=no"
5199fi
5200rm -f conftest*
5201fi
5202
5203if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5204 echo "$ac_t""yes" 1>&6
5205
5206 cat >> confdefs.h <<\EOF
5207#define HAVE_GETHOSTBYNAME_R 1
5208EOF
5209
5210 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005211echo "configure:5212: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005212 OLD_CFLAGS=$CFLAGS
5213 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
5214 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005215#line 5216 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005216#include "confdefs.h"
5217
5218# include <netdb.h>
5219
5220int main() {
5221
5222 char *name;
5223 struct hostent *he, *res;
5224 char buffer[2048];
5225 int buflen = 2048;
5226 int h_errnop;
5227
5228 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
5229
5230; return 0; }
5231EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005232if { (eval echo configure:5233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005233 rm -rf conftest*
5234
5235 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005236#define HAVE_GETHOSTBYNAME_R 1
5237EOF
5238
5239 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005240#define HAVE_GETHOSTBYNAME_R_6_ARG 1
5241EOF
5242
5243 echo "$ac_t""yes" 1>&6
5244
5245else
5246 echo "configure: failed program was:" >&5
5247 cat conftest.$ac_ext >&5
5248 rm -rf conftest*
5249
5250 echo "$ac_t""no" 1>&6
5251 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005252echo "configure:5253: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005253 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005254#line 5255 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005255#include "confdefs.h"
5256
5257# include <netdb.h>
5258
5259int main() {
5260
5261 char *name;
5262 struct hostent *he;
5263 char buffer[2048];
5264 int buflen = 2048;
5265 int h_errnop;
5266
5267 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
5268
5269; return 0; }
5270EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005271if { (eval echo configure:5272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005272 rm -rf conftest*
5273
5274 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005275#define HAVE_GETHOSTBYNAME_R 1
5276EOF
5277
5278 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005279#define HAVE_GETHOSTBYNAME_R_5_ARG 1
5280EOF
5281
5282 echo "$ac_t""yes" 1>&6
5283
5284else
5285 echo "configure: failed program was:" >&5
5286 cat conftest.$ac_ext >&5
5287 rm -rf conftest*
5288
5289 echo "$ac_t""no" 1>&6
5290 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005291echo "configure:5292: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005292 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005293#line 5294 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005294#include "confdefs.h"
5295
5296# include <netdb.h>
5297
5298int main() {
5299
5300 char *name;
5301 struct hostent *he;
5302 struct hostent_data data;
5303
5304 (void) gethostbyname_r(name, he, &data);
5305
5306; return 0; }
5307EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005308if { (eval echo configure:5309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005309 rm -rf conftest*
5310
5311 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005312#define HAVE_GETHOSTBYNAME_R 1
5313EOF
5314
5315 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005316#define HAVE_GETHOSTBYNAME_R_3_ARG 1
5317EOF
5318
5319 echo "$ac_t""yes" 1>&6
5320
5321else
5322 echo "configure: failed program was:" >&5
5323 cat conftest.$ac_ext >&5
5324 rm -rf conftest*
5325
5326 echo "$ac_t""no" 1>&6
5327
5328fi
5329rm -f conftest*
5330
5331fi
5332rm -f conftest*
5333
5334fi
5335rm -f conftest*
5336 CFLAGS=$OLD_CFLAGS
5337
5338else
5339 echo "$ac_t""no" 1>&6
5340
Thomas Wouters3a584202000-08-05 23:28:51 +00005341 for ac_func in gethostbyname
5342do
5343echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005344echo "configure:5345: checking for $ac_func" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00005345if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005346 echo $ac_n "(cached) $ac_c" 1>&6
5347else
5348 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005349#line 5350 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005350#include "confdefs.h"
5351/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005352 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005353#include <assert.h>
5354/* Override any gcc2 internal prototype to avoid an error. */
5355/* We use char because int might match the return type of a gcc2
5356 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005357char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00005358char (*f)();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005359
5360int main() {
5361
5362/* The GNU C library defines this for functions which it implements
5363 to always fail with ENOSYS. Some functions are actually named
5364 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005365#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005366choke me
5367#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00005368f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005369#endif
5370
5371; return 0; }
5372EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005373if { (eval echo configure:5374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005374 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005375 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005376else
5377 echo "configure: failed program was:" >&5
5378 cat conftest.$ac_ext >&5
5379 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005380 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005381fi
5382rm -f conftest*
5383fi
5384
Thomas Wouters3a584202000-08-05 23:28:51 +00005385if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005386 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005387 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5388 cat >> confdefs.h <<EOF
5389#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005390EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00005391
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005392else
5393 echo "$ac_t""no" 1>&6
5394fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005395done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005396
5397
5398fi
5399
5400
5401
5402
5403
5404
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005405
Guido van Rossum627b2d71993-12-24 10:39:16 +00005406# checks for system services
5407# (none yet)
5408
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005409# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005410echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005411echo "configure:5412: checking for __fpu_control" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00005412if eval "test \"\${ac_cv_func___fpu_control+set}\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005413 echo $ac_n "(cached) $ac_c" 1>&6
5414else
5415 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005416#line 5417 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005417#include "confdefs.h"
5418/* System header to define __stub macros and hopefully few prototypes,
5419 which can conflict with char __fpu_control(); below. */
5420#include <assert.h>
5421/* Override any gcc2 internal prototype to avoid an error. */
5422/* We use char because int might match the return type of a gcc2
5423 builtin and then its argument prototype would still apply. */
5424char __fpu_control();
Skip Montanarob89f41e2000-09-04 04:06:05 +00005425char (*f)();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005426
5427int main() {
5428
5429/* The GNU C library defines this for functions which it implements
5430 to always fail with ENOSYS. Some functions are actually named
5431 something starting with __ and the normal name is an alias. */
5432#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5433choke me
5434#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00005435f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005436#endif
5437
5438; return 0; }
5439EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005440if { (eval echo configure:5441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005441 rm -rf conftest*
5442 eval "ac_cv_func___fpu_control=yes"
5443else
5444 echo "configure: failed program was:" >&5
5445 cat conftest.$ac_ext >&5
5446 rm -rf conftest*
5447 eval "ac_cv_func___fpu_control=no"
5448fi
5449rm -f conftest*
5450fi
5451
5452if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5453 echo "$ac_t""yes" 1>&6
5454 :
5455else
5456 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005457echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005458echo "configure:5459: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005459ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00005460if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005461 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005462else
5463 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005464LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005465cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005466#line 5467 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005467#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005468/* Override any gcc2 internal prototype to avoid an error. */
5469/* We use char because int might match the return type of a gcc2
5470 builtin and then its argument prototype would still apply. */
5471char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005472
Guido van Rossumf78abae1997-01-21 22:02:36 +00005473int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005474__fpu_control()
5475; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005476EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005477if { (eval echo configure:5478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005478 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005479 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005480else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005481 echo "configure: failed program was:" >&5
5482 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005483 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005484 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005485fi
5486rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005487LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005488
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005489fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005490if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005491 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005492 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5493 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005494 cat >> confdefs.h <<EOF
5495#define $ac_tr_lib 1
5496EOF
5497
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005498 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005499
5500else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005501 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005502fi
5503
5504
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005505fi
5506
5507
Guido van Rossum7f253911997-05-09 02:42:48 +00005508# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005509echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005510echo "configure:5511: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005511# Check whether --with-fpectl or --without-fpectl was given.
5512if test "${with_fpectl+set}" = set; then
5513 withval="$with_fpectl"
5514
5515if test "$withval" != no
5516then cat >> confdefs.h <<\EOF
5517#define WANT_SIGFPE_HANDLER 1
5518EOF
5519 echo "$ac_t""yes" 1>&6
5520else echo "$ac_t""no" 1>&6
5521fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005522else
5523 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005524fi
5525
5526
Guido van Rossum7f43da71994-08-01 12:15:30 +00005527# check for --with-libm=...
5528
Guido van Rossum563e7081996-09-10 18:20:48 +00005529case $ac_sys_system in
5530next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005531BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005532*) LIBM=-lm
5533esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005534echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005535echo "configure:5536: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005536# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005537if test "${with_libm+set}" = set; then
5538 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005539
Guido van Rossum7f253911997-05-09 02:42:48 +00005540if test "$withval" = no
5541then LIBM=
5542 echo "$ac_t""force LIBM empty" 1>&6
5543elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005544then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005545 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005546else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005547fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005548else
5549 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005550fi
5551
5552
5553# check for --with-libc=...
5554
Guido van Rossum7f253911997-05-09 02:42:48 +00005555echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005556echo "configure:5557: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005557# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005558if test "${with_libc+set}" = set; then
5559 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005560
Guido van Rossum7f253911997-05-09 02:42:48 +00005561if test "$withval" = no
5562then LIBC=
5563 echo "$ac_t""force LIBC empty" 1>&6
5564elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005565then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005566 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005567else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005568fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005569else
5570 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005571fi
5572
5573
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005574# check for hypot() in math library
5575LIBS_SAVE=$LIBS
5576LIBS="$LIBS $LIBM"
5577for ac_func in hypot
5578do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005579echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005580echo "configure:5581: checking for $ac_func" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00005581if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005582 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005583else
5584 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005585#line 5586 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005586#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005587/* System header to define __stub macros and hopefully few prototypes,
5588 which can conflict with char $ac_func(); below. */
5589#include <assert.h>
5590/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005591/* We use char because int might match the return type of a gcc2
5592 builtin and then its argument prototype would still apply. */
5593char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00005594char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005595
Guido van Rossumf78abae1997-01-21 22:02:36 +00005596int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005597
5598/* The GNU C library defines this for functions which it implements
5599 to always fail with ENOSYS. Some functions are actually named
5600 something starting with __ and the normal name is an alias. */
5601#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5602choke me
5603#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00005604f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005605#endif
5606
5607; return 0; }
5608EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005609if { (eval echo configure:5610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005610 rm -rf conftest*
5611 eval "ac_cv_func_$ac_func=yes"
5612else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005613 echo "configure: failed program was:" >&5
5614 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005615 rm -rf conftest*
5616 eval "ac_cv_func_$ac_func=no"
5617fi
5618rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005619fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005620
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005621if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5622 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005623 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5624 cat >> confdefs.h <<EOF
5625#define $ac_tr_func 1
5626EOF
5627
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005628else
5629 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005630LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005631fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005632done
5633
Guido van Rossumf78abae1997-01-21 22:02:36 +00005634
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005635LIBS=$LIBS_SAVE
5636
Guido van Rossumda88dad1995-01-26 00:46:29 +00005637# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005638echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005639echo "configure:5640: checking for genuine getopt" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00005640if eval "test \"\${ac_cv_func_getopt+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005641 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005642else
5643 if test "$cross_compiling" = yes; then
5644 ac_cv_func_getopt=no
5645else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005646 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005647#line 5648 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00005648#include "confdefs.h"
5649#include <stdio.h>
5650extern int optind, opterr, getopt();
5651extern char* optarg;
5652int main() {
5653 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
5654 opterr = 0;
5655 if (getopt(3, av, "f:") == 'f') { exit(1); }
5656 exit(0);
5657}
5658EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005659if { (eval echo configure:5660: \"$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 +00005660then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005661 ac_cv_func_getopt=yes
5662else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005663 echo "configure: failed program was:" >&5
5664 cat conftest.$ac_ext >&5
5665 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00005666 ac_cv_func_getopt=no
5667fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00005668rm -fr conftest*
5669fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005670
5671fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005672echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005673test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
5674
Guido van Rossumad713701997-07-10 22:42:38 +00005675# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005676echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005677echo "configure:5678: checking what malloc(0) returns" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00005678if eval "test \"\${ac_cv_malloc_zero+set}\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005679 echo $ac_n "(cached) $ac_c" 1>&6
5680else
5681 if test "$cross_compiling" = yes; then
5682 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5683else
5684 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005685#line 5686 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005686#include "confdefs.h"
5687#include <stdio.h>
5688#ifdef HAVE_STDLIB
5689#include <stdlib.h>
5690#else
5691char *malloc(), *realloc();
5692int *free();
5693#endif
5694main() {
5695 char *p;
5696 p = malloc(0);
5697 if (p == NULL) exit(1);
5698 p = realloc(p, 0);
5699 if (p == NULL) exit(1);
5700 free(p);
5701 exit(0);
5702}
5703EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005704if { (eval echo configure:5705: \"$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 +00005705then
5706 ac_cv_malloc_zero=nonnull
5707else
5708 echo "configure: failed program was:" >&5
5709 cat conftest.$ac_ext >&5
5710 rm -fr conftest*
5711 ac_cv_malloc_zero=null
5712fi
5713rm -fr conftest*
5714fi
5715
5716fi
5717
5718echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5719if test "$ac_cv_malloc_zero" = null
5720then
5721 cat >> confdefs.h <<\EOF
5722#define MALLOC_ZERO_RETURNS_NULL 1
5723EOF
5724
5725fi
5726
Guido van Rossumef2255b2000-03-10 22:30:29 +00005727# check for wchar.h
5728ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5729echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005730echo "configure:5731: checking for wchar.h" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00005731if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005732 echo $ac_n "(cached) $ac_c" 1>&6
5733else
5734 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005735#line 5736 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005736#include "confdefs.h"
5737#include <wchar.h>
5738EOF
5739ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drakeae90f8d2000-09-15 03:38:12 +00005740{ (eval echo configure:5741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005741ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5742if test -z "$ac_err"; then
5743 rm -rf conftest*
5744 eval "ac_cv_header_$ac_safe=yes"
5745else
5746 echo "$ac_err" >&5
5747 echo "configure: failed program was:" >&5
5748 cat conftest.$ac_ext >&5
5749 rm -rf conftest*
5750 eval "ac_cv_header_$ac_safe=no"
5751fi
5752rm -f conftest*
5753fi
5754if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5755 echo "$ac_t""yes" 1>&6
5756 cat >> confdefs.h <<\EOF
5757#define HAVE_WCHAR_H 1
5758EOF
5759 wchar_h="yes"
5760else
5761 echo "$ac_t""no" 1>&6
5762wchar_h="no"
5763
5764fi
5765
5766
5767# check for usable wchar_t
5768usable_wchar_t="unkown"
5769echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005770echo "configure:5771: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005771if test "$cross_compiling" = yes; then
5772 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5773else
5774 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005775#line 5776 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005776#include "confdefs.h"
5777
5778#include "wchar.h"
5779#include "wctype.h"
5780main() {
5781 wchar_t s;
5782 if (sizeof(s) == 2)
5783 exit(0);
5784 else
5785 exit(1);
5786}
5787
5788EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005789if { (eval echo configure:5790: \"$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 +00005790then
5791 cat >> confdefs.h <<\EOF
5792#define HAVE_USABLE_WCHAR_T 1
5793EOF
5794 usable_wchar_t="yes"
5795else
5796 echo "configure: failed program was:" >&5
5797 cat conftest.$ac_ext >&5
5798 rm -fr conftest*
5799 usable_wchar_t="no"
5800fi
5801rm -fr conftest*
5802fi
5803
5804echo "$ac_t""$usable_wchar_t" 1>&6
5805
5806# check for endianness
5807echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005808echo "configure:5809: checking whether byte ordering is bigendian" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00005809if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005810 echo $ac_n "(cached) $ac_c" 1>&6
5811else
5812 ac_cv_c_bigendian=unknown
5813# See if sys/param.h defines the BYTE_ORDER macro.
5814cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005815#line 5816 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005816#include "confdefs.h"
5817#include <sys/types.h>
5818#include <sys/param.h>
5819int main() {
5820
5821#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5822 bogus endian macros
5823#endif
5824; return 0; }
5825EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005826if { (eval echo configure:5827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005827 rm -rf conftest*
5828 # It does; now see whether it defined to BIG_ENDIAN or not.
5829cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005830#line 5831 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005831#include "confdefs.h"
5832#include <sys/types.h>
5833#include <sys/param.h>
5834int main() {
5835
5836#if BYTE_ORDER != BIG_ENDIAN
5837 not big endian
5838#endif
5839; return 0; }
5840EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005841if { (eval echo configure:5842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005842 rm -rf conftest*
5843 ac_cv_c_bigendian=yes
5844else
5845 echo "configure: failed program was:" >&5
5846 cat conftest.$ac_ext >&5
5847 rm -rf conftest*
5848 ac_cv_c_bigendian=no
5849fi
5850rm -f conftest*
5851else
5852 echo "configure: failed program was:" >&5
5853 cat conftest.$ac_ext >&5
5854fi
5855rm -f conftest*
5856if test $ac_cv_c_bigendian = unknown; then
5857if test "$cross_compiling" = yes; then
5858 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5859else
5860 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005861#line 5862 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005862#include "confdefs.h"
5863main () {
5864 /* Are we little or big endian? From Harbison&Steele. */
5865 union
5866 {
5867 long l;
5868 char c[sizeof (long)];
5869 } u;
5870 u.l = 1;
5871 exit (u.c[sizeof (long) - 1] == 1);
5872}
5873EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005874if { (eval echo configure:5875: \"$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 +00005875then
5876 ac_cv_c_bigendian=no
5877else
5878 echo "configure: failed program was:" >&5
5879 cat conftest.$ac_ext >&5
5880 rm -fr conftest*
5881 ac_cv_c_bigendian=yes
5882fi
5883rm -fr conftest*
5884fi
5885
5886fi
5887fi
5888
5889echo "$ac_t""$ac_cv_c_bigendian" 1>&6
5890if test $ac_cv_c_bigendian = yes; then
5891 cat >> confdefs.h <<\EOF
5892#define WORDS_BIGENDIAN 1
5893EOF
5894
5895fi
5896
5897
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005898# Check whether right shifting a negative integer extends the sign bit
5899# or fills with zeros (like the Cray J90, according to Tim Peters).
5900echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005901echo "configure:5902: checking whether right shift extends the sign bit" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00005902if eval "test \"\${ac_cv_rshift_extends_sign+set}\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00005903 echo $ac_n "(cached) $ac_c" 1>&6
5904else
5905
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005906if test "$cross_compiling" = yes; then
5907 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5908else
5909 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005910#line 5911 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005911#include "confdefs.h"
5912
5913int main()
5914{
Vladimir Marangozova6180282000-07-12 05:05:06 +00005915 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005916}
5917
5918EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005919if { (eval echo configure:5920: \"$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 +00005920then
5921 ac_cv_rshift_extends_sign=yes
5922else
5923 echo "configure: failed program was:" >&5
5924 cat conftest.$ac_ext >&5
5925 rm -fr conftest*
5926 ac_cv_rshift_extends_sign=no
5927fi
5928rm -fr conftest*
5929fi
5930
5931fi
5932
5933echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
5934if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005935then
5936 cat >> confdefs.h <<\EOF
5937#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
5938EOF
5939
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005940fi
5941
5942
Guido van Rossum95713eb2000-05-18 20:53:31 +00005943# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
5944# Add sys/socket.h to confdefs.h
5945cat >> confdefs.h <<\EOF
5946#ifdef HAVE_SYS_SOCKET_H
5947#include <sys/socket.h>
5948#endif
5949EOF
5950echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Fred Drakeae90f8d2000-09-15 03:38:12 +00005951echo "configure:5952: checking for socklen_t" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00005952if eval "test \"\${ac_cv_type_socklen_t+set}\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00005953 echo $ac_n "(cached) $ac_c" 1>&6
5954else
5955 cat > conftest.$ac_ext <<EOF
Fred Drakeae90f8d2000-09-15 03:38:12 +00005956#line 5957 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005957#include "confdefs.h"
5958#include <sys/types.h>
5959#if STDC_HEADERS
5960#include <stdlib.h>
5961#include <stddef.h>
5962#endif
5963EOF
5964if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5965 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5966 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00005967 eval "ac_cv_type_socklen_t=yes"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005968else
5969 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00005970 eval "ac_cv_type_socklen_t=no"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005971fi
5972rm -f conftest*
5973
5974fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00005975if eval "test \"`echo '$ac_cv_type_'socklen_t`\" = yes"; then
5976 echo "$ac_t""yes" 1>&6
5977else
5978 echo "$ac_t""no" 1>&6
5979 cat >> confdefs.h <<EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00005980#define socklen_t int
5981EOF
5982
5983fi
5984
5985
Guido van Rossum627b2d71993-12-24 10:39:16 +00005986# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005987trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005988cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005989# This file is a shell script that caches the results of configure
5990# tests run on this system so they can be shared between configure
5991# scripts and configure runs. It is not useful on other systems.
5992# If it contains results you don't want to keep, you may remove or edit it.
5993#
5994# By default, configure uses ./config.cache as the cache file,
5995# creating it if it does not exist already. You can give configure
5996# the --cache-file=FILE option to use a different cache file; that is
5997# what configure does when it calls configure scripts in
5998# subdirectories, so they share the cache.
5999# Giving --cache-file=/dev/null disables caching, for debugging configure.
6000# config.status only pays attention to the cache file if you give it the
6001# --recheck option to rerun configure.
6002#
6003EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006004# The following way of writing the cache mishandles newlines in values,
6005# but we know of no workaround that is simple, portable, and efficient.
6006# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006007# Ultrix sh set writes to stderr and can't be redirected directly,
6008# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006009(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006010 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006011 *ac_space=\ *)
6012 # `set' does not quote correctly, so add quotes (double-quote substitution
6013 # turns \\\\ into \\, and sed turns \\ into \).
6014 sed -n \
6015 -e "s/'/'\\\\''/g" \
6016 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6017 ;;
6018 *)
6019 # `set' quotes correctly as required by POSIX, so do not add quotes.
6020 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6021 ;;
6022 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006023if cmp -s $cache_file confcache; then
6024 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006025else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006026 if test -w $cache_file; then
6027 echo "updating cache $cache_file"
6028 cat confcache > $cache_file
6029 else
6030 echo "not updating unwritable cache $cache_file"
6031 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006032fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006033rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00006034
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006035trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006036
6037test "x$prefix" = xNONE && prefix=$ac_default_prefix
6038# Let make expand exec_prefix.
6039test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00006040
Guido van Rossum7f43da71994-08-01 12:15:30 +00006041# Any assignment to VPATH causes Sun make to only execute
6042# the first set of double-colon rules, so remove it if not needed.
6043# If there is a colon in the path, we need to keep it.
6044if test "x$srcdir" = x.; then
6045 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6046fi
6047
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006048trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00006049
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006050DEFS=-DHAVE_CONFIG_H
6051
6052# Without the "./", some shells look in PATH for config.status.
6053: ${CONFIG_STATUS=./config.status}
6054
6055echo creating $CONFIG_STATUS
6056rm -f $CONFIG_STATUS
6057cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006058#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00006059# Generated automatically by configure.
6060# Run this file to recreate the current configuration.
6061# This directory was configured as follows,
6062# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6063#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006064# $0 $ac_configure_args
6065#
6066# Compiler output produced by configure, useful for debugging
6067# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00006068
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006069ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006070for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00006071do
Guido van Rossum7f43da71994-08-01 12:15:30 +00006072 case "\$ac_option" in
6073 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006074 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6075 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00006076 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Skip Montanarob89f41e2000-09-04 04:06:05 +00006077 echo "$CONFIG_STATUS generated by autoconf version 2.14.1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006078 exit 0 ;;
6079 -help | --help | --hel | --he | --h)
6080 echo "\$ac_cs_usage"; exit 0 ;;
6081 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006082 esac
6083done
6084
Guido van Rossum7f43da71994-08-01 12:15:30 +00006085ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00006086
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006087trap 'rm -fr `echo "Makefile \
6088 Objects/Makefile \
6089 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006090 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006091 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006092 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006093 Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006094EOF
6095cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006096
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006097# Protect against being on the right side of a sed subst in config.status.
6098sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6099 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006100$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00006101$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006102s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006103s%@CFLAGS@%$CFLAGS%g
6104s%@CPPFLAGS@%$CPPFLAGS%g
6105s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006106s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006107s%@DEFS@%$DEFS%g
6108s%@LDFLAGS@%$LDFLAGS%g
6109s%@LIBS@%$LIBS%g
6110s%@exec_prefix@%$exec_prefix%g
6111s%@prefix@%$prefix%g
6112s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006113s%@bindir@%$bindir%g
6114s%@sbindir@%$sbindir%g
6115s%@libexecdir@%$libexecdir%g
6116s%@datadir@%$datadir%g
6117s%@sysconfdir@%$sysconfdir%g
6118s%@sharedstatedir@%$sharedstatedir%g
6119s%@localstatedir@%$localstatedir%g
6120s%@libdir@%$libdir%g
6121s%@includedir@%$includedir%g
6122s%@oldincludedir@%$oldincludedir%g
6123s%@infodir@%$infodir%g
6124s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00006125s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006126s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00006127s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00006128s%@SET_CXX@%$SET_CXX%g
6129s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006130s%@CC@%$CC%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006131s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
6132s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00006133s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006134s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006135s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006136s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006137s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6138s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006139s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006140s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006141s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006142s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006143s%@SO@%$SO%g
6144s%@LDSHARED@%$LDSHARED%g
6145s%@CCSHARED@%$CCSHARED%g
6146s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00006147s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00006148s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00006149s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Fred Drakea50d6ec2000-08-31 16:13:20 +00006150s%@USE_BSDDB_MODULE@%$USE_BSDDB_MODULE%g
Skip Montanaroed33c9a2000-09-08 02:17:15 +00006151s%@HAVE_LIBDB@%$HAVE_LIBDB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006152s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00006153s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006154s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006155s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
6156s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
6157s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006158s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006159s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006160s%@LIBM@%$LIBM%g
6161s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006162
6163CEOF
6164EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006165
6166cat >> $CONFIG_STATUS <<\EOF
6167
6168# Split the substitutions into bite-sized pieces for seds with
6169# small command number limits, like on Digital OSF/1 and HP-UX.
6170ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6171ac_file=1 # Number of current file.
6172ac_beg=1 # First line for current file.
6173ac_end=$ac_max_sed_cmds # Line after last line for current file.
6174ac_more_lines=:
6175ac_sed_cmds=""
6176while $ac_more_lines; do
6177 if test $ac_beg -gt 1; then
6178 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6179 else
6180 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6181 fi
6182 if test ! -s conftest.s$ac_file; then
6183 ac_more_lines=false
6184 rm -f conftest.s$ac_file
6185 else
6186 if test -z "$ac_sed_cmds"; then
6187 ac_sed_cmds="sed -f conftest.s$ac_file"
6188 else
6189 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6190 fi
6191 ac_file=`expr $ac_file + 1`
6192 ac_beg=$ac_end
6193 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6194 fi
6195done
6196if test -z "$ac_sed_cmds"; then
6197 ac_sed_cmds=cat
6198fi
6199EOF
6200
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006201cat >> $CONFIG_STATUS <<EOF
6202
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006203CONFIG_FILES=\${CONFIG_FILES-"Makefile \
6204 Objects/Makefile \
6205 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006206 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006207 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006208 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006209 Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006210EOF
6211cat >> $CONFIG_STATUS <<\EOF
6212for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006213 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006214 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006215 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006216 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6217 *) ac_file_in="${ac_file}.in" ;;
6218 esac
6219
Guido van Rossumf78abae1997-01-21 22:02:36 +00006220 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006221
6222 # Remove last slash and all that follows it. Not all systems have dirname.
6223 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6224 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6225 # The file is in a subdirectory.
6226 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006227 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006228 # A "../" for each directory in $ac_dir_suffix.
6229 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6230 else
6231 ac_dir_suffix= ac_dots=
6232 fi
6233
6234 case "$ac_given_srcdir" in
6235 .) srcdir=.
6236 if test -z "$ac_dots"; then top_srcdir=.
6237 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6238 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6239 *) # Relative path.
6240 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6241 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6242 esac
6243
Guido van Rossumf78abae1997-01-21 22:02:36 +00006244
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006245 echo creating "$ac_file"
6246 rm -f "$ac_file"
6247 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6248 case "$ac_file" in
6249 *Makefile*) ac_comsub="1i\\
6250# $configure_input" ;;
6251 *) ac_comsub= ;;
6252 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006253
6254 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 +00006255 sed -e "$ac_comsub
6256s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006257s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006258s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00006259" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00006260fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00006261rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006262
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006263# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6264# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00006265#
6266# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006267ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6268ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006269ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006270ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006271# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006272ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6273ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006274ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006275ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006276# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006277ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6278ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006279ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006280ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006281
Guido van Rossumf78abae1997-01-21 22:02:36 +00006282if test "${CONFIG_HEADERS+set}" != set; then
6283EOF
6284cat >> $CONFIG_STATUS <<EOF
6285 CONFIG_HEADERS="config.h"
6286EOF
6287cat >> $CONFIG_STATUS <<\EOF
6288fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006289for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006290 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006291 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006292 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006293 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6294 *) ac_file_in="${ac_file}.in" ;;
6295 esac
6296
Guido van Rossum7f43da71994-08-01 12:15:30 +00006297 echo creating $ac_file
6298
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006299 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006300 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6301 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006302
6303EOF
6304
6305# Transform confdefs.h into a sed script conftest.vals that substitutes
6306# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006307# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006308# Protect against being in an unquoted here document in config.status.
6309rm -f conftest.vals
6310cat > conftest.hdr <<\EOF
6311s/[\\&%]/\\&/g
6312s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006313s%#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 +00006314s%ac_d%ac_u%gp
6315s%ac_u%ac_e%gp
6316EOF
6317sed -n -f conftest.hdr confdefs.h > conftest.vals
6318rm -f conftest.hdr
6319
6320# This sed command replaces #undef with comments. This is necessary, for
6321# example, in the case of _POSIX_SOURCE, which is predefined and required
6322# on some systems where configure will not decide to define it.
6323cat >> conftest.vals <<\EOF
6324s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6325EOF
6326
6327# Break up conftest.vals because some shells have a limit on
6328# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006329
6330rm -f conftest.tail
6331while :
6332do
6333 ac_lines=`grep -c . conftest.vals`
6334 # grep -c gives empty output for an empty file on some AIX systems.
6335 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6336 # Write a limited-size here document to conftest.frag.
6337 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6338 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6339 echo 'CEOF
6340 sed -f conftest.frag conftest.in > conftest.out
6341 rm -f conftest.in
6342 mv conftest.out conftest.in
6343' >> $CONFIG_STATUS
6344 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6345 rm -f conftest.vals
6346 mv conftest.tail conftest.vals
6347done
6348rm -f conftest.vals
6349
6350cat >> $CONFIG_STATUS <<\EOF
6351 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006352 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006353 cat conftest.in >> conftest.h
6354 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006355 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006356 echo "$ac_file is unchanged"
6357 rm -f conftest.h
6358 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006359 # Remove last slash and all that follows it. Not all systems have dirname.
6360 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6361 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6362 # The file is in a subdirectory.
6363 test ! -d "$ac_dir" && mkdir "$ac_dir"
6364 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006365 rm -f $ac_file
6366 mv conftest.h $ac_file
6367 fi
6368fi; done
6369
Guido van Rossumf78abae1997-01-21 22:02:36 +00006370EOF
6371cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006372
Guido van Rossumf78abae1997-01-21 22:02:36 +00006373EOF
6374cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006375
6376exit 0
6377EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006378chmod +x $CONFIG_STATUS
6379rm -fr confdefs* $ac_clean_files
Skip Montanarob89f41e2000-09-04 04:06:05 +00006380test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006381