blob: e7be82868fee60e1ff6f7843141bd55de9d06988 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Guido van Rossum29201d42000-09-01 19:22:55 +00003# From configure.in Revision: 1.154
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 Drake8cef4cf2000-06-28 16:40:38 +00001545sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001546do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001547ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001548echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001549echo "configure:1550: checking for $ac_hdr" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00001550if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001551 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001552else
1553 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001554#line 1555 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001555#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001556#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001557EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001558ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001559{ (eval echo configure:1560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001560ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001561if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001562 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001563 eval "ac_cv_header_$ac_safe=yes"
1564else
1565 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001566 echo "configure: failed program was:" >&5
1567 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001568 rm -rf conftest*
1569 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001570fi
1571rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001572fi
1573if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001574 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001575 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001576 cat >> confdefs.h <<EOF
1577#define $ac_tr_hdr 1
1578EOF
1579
1580else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001581 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001582fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001583done
1584
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001585ac_header_dirent=no
1586for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1587do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001588ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001589echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001590echo "configure:1591: checking for $ac_hdr that defines DIR" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00001591if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001592 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001593else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001594 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001595#line 1596 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001596#include "confdefs.h"
1597#include <sys/types.h>
1598#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001599int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001600DIR *dirp = 0;
1601; return 0; }
1602EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001603if { (eval echo configure:1604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001604 rm -rf conftest*
1605 eval "ac_cv_header_dirent_$ac_safe=yes"
1606else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001607 echo "configure: failed program was:" >&5
1608 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001609 rm -rf conftest*
1610 eval "ac_cv_header_dirent_$ac_safe=no"
1611fi
1612rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001613fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001614if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001615 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001616 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001617 cat >> confdefs.h <<EOF
1618#define $ac_tr_hdr 1
1619EOF
1620 ac_header_dirent=$ac_hdr; break
1621else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001622 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001623fi
1624done
1625# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1626if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001627echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001628echo "configure:1629: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001629ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00001630if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001631 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001632else
1633 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001634LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001635cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001636#line 1637 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001637#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001638/* Override any gcc2 internal prototype to avoid an error. */
1639/* We use char because int might match the return type of a gcc2
1640 builtin and then its argument prototype would still apply. */
1641char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001642
Guido van Rossumf78abae1997-01-21 22:02:36 +00001643int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001644opendir()
1645; return 0; }
1646EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001647if { (eval echo configure:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001648 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001649 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001650else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001651 echo "configure: failed program was:" >&5
1652 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001653 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001654 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001655fi
1656rm -f conftest*
1657LIBS="$ac_save_LIBS"
1658
1659fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001660if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001661 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001662 LIBS="$LIBS -ldir"
1663else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001664 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001665fi
1666
1667else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001668echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001669echo "configure:1670: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001670ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00001671if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001672 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001673else
1674 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001675LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001676cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001677#line 1678 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001678#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001679/* Override any gcc2 internal prototype to avoid an error. */
1680/* We use char because int might match the return type of a gcc2
1681 builtin and then its argument prototype would still apply. */
1682char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001683
Guido van Rossumf78abae1997-01-21 22:02:36 +00001684int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685opendir()
1686; return 0; }
1687EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001688if { (eval echo configure:1689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001690 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001691else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001692 echo "configure: failed program was:" >&5
1693 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001694 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001695 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001696fi
1697rm -f conftest*
1698LIBS="$ac_save_LIBS"
1699
1700fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001701if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001702 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703 LIBS="$LIBS -lx"
1704else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001705 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706fi
1707
1708fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001709
1710
1711# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001712was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001713echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001714echo "configure:1715: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001715cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001716#line 1717 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001717#include "confdefs.h"
1718#include <time.h>
1719EOF
1720if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1721 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001722 rm -rf conftest*
1723 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001724else
1725 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001726 cat >> confdefs.h <<\EOF
1727#define clock_t long
1728EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001729
1730fi
1731rm -f conftest*
1732
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001733echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001734
Guido van Rossum84e7b241996-08-19 21:59:00 +00001735# Add some code to confdefs.h so that the test for off_t works on SCO
1736cat >> confdefs.h <<\EOF
1737#if defined(SCO_DS)
1738#undef _OFF_T
1739#endif
1740EOF
1741
Guido van Rossumef2255b2000-03-10 22:30:29 +00001742# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001743echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001744echo "configure:1745: checking for mode_t" >&5
Skip Montanarob89f41e2000-09-04 04:06:05 +00001745if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001746 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001747else
1748 cat > conftest.$ac_ext <<EOF
Vladimir Marangozov0cf8cde2000-08-31 16:40:08 +00001749#line 1750 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001750#include "confdefs.h"
1751#include <sys/types.h>
1752#if STDC_HEADERS
1753#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001754#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001755#endif
1756EOF
1757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001758 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 +00001759 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00001760 eval "ac_cv_type_mode_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001761else
1762 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00001763 eval "ac_cv_type_mode_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001764fi
1765rm -f conftest*
1766
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001767fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00001768if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
1769 echo "$ac_t""yes" 1>&6
1770else
1771 echo "$ac_t""no" 1>&6
1772 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001773#define mode_t int
1774EOF
1775
1776fi
1777
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001778echo $ac_n "checking for off_t""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00001779echo "configure:1780: checking for off_t" >&5
1780if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001781 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001782else
1783 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00001784#line 1785 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001785#include "confdefs.h"
1786#include <sys/types.h>
1787#if STDC_HEADERS
1788#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001789#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001790#endif
1791EOF
1792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001793 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 +00001794 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00001795 eval "ac_cv_type_off_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001796else
1797 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00001798 eval "ac_cv_type_off_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001799fi
1800rm -f conftest*
1801
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001802fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00001803if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
1804 echo "$ac_t""yes" 1>&6
1805else
1806 echo "$ac_t""no" 1>&6
1807 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001808#define off_t long
1809EOF
1810
1811fi
1812
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001813echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00001814echo "configure:1815: checking for pid_t" >&5
1815if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001816 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001817else
1818 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00001819#line 1820 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001820#include "confdefs.h"
1821#include <sys/types.h>
1822#if STDC_HEADERS
1823#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001824#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001825#endif
1826EOF
1827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001828 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 +00001829 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00001830 eval "ac_cv_type_pid_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001831else
1832 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00001833 eval "ac_cv_type_pid_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001834fi
1835rm -f conftest*
1836
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001837fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00001838if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
1839 echo "$ac_t""yes" 1>&6
1840else
1841 echo "$ac_t""no" 1>&6
1842 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001843#define pid_t int
1844EOF
1845
1846fi
1847
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001848echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00001849echo "configure:1850: checking return type of signal handlers" >&5
1850if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001851 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001852else
1853 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00001854#line 1855 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001855#include "confdefs.h"
1856#include <sys/types.h>
1857#include <signal.h>
1858#ifdef signal
1859#undef signal
1860#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001861#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001862extern "C" void (*signal (int, void (*)(int)))(int);
1863#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001864void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001865#endif
1866
Guido van Rossumf78abae1997-01-21 22:02:36 +00001867int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001868int i;
1869; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001870EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00001871if { (eval echo configure:1872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001872 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001873 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001874else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001875 echo "configure: failed program was:" >&5
1876 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001877 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001878 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001879fi
1880rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001881fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001882
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001883echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001884cat >> confdefs.h <<EOF
1885#define RETSIGTYPE $ac_cv_type_signal
1886EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001887
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001888
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001889echo $ac_n "checking for size_t""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00001890echo "configure:1891: checking for size_t" >&5
1891if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001892 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001893else
1894 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00001895#line 1896 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001896#include "confdefs.h"
1897#include <sys/types.h>
1898#if STDC_HEADERS
1899#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001900#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001901#endif
1902EOF
1903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001904 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 +00001905 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00001906 eval "ac_cv_type_size_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001907else
1908 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00001909 eval "ac_cv_type_size_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001910fi
1911rm -f conftest*
1912
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001913fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00001914if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
1915 echo "$ac_t""yes" 1>&6
1916else
1917 echo "$ac_t""no" 1>&6
1918 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001919#define size_t unsigned
1920EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001921
1922fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001923
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001924echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00001925echo "configure:1926: checking for uid_t in sys/types.h" >&5
1926if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001927 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001928else
1929 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00001930#line 1931 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001931#include "confdefs.h"
1932#include <sys/types.h>
1933EOF
1934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1935 egrep "uid_t" >/dev/null 2>&1; then
1936 rm -rf conftest*
1937 ac_cv_type_uid_t=yes
1938else
1939 rm -rf conftest*
1940 ac_cv_type_uid_t=no
1941fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001942rm -f conftest*
1943
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001944fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001945
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001946echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001947if test $ac_cv_type_uid_t = no; then
1948 cat >> confdefs.h <<\EOF
1949#define uid_t int
1950EOF
1951
1952 cat >> confdefs.h <<\EOF
1953#define gid_t int
1954EOF
1955
1956fi
1957
Guido van Rossum627b2d71993-12-24 10:39:16 +00001958
Guido van Rossumef2255b2000-03-10 22:30:29 +00001959# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001960echo $ac_n "checking size of int""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00001961echo "configure:1962: checking size of int" >&5
1962if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001963 echo $ac_n "(cached) $ac_c" 1>&6
1964else
1965 if test "$cross_compiling" = yes; then
1966 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1967else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001968 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00001969#line 1970 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001970#include "confdefs.h"
1971#include <stdio.h>
1972main()
1973{
1974 FILE *f=fopen("conftestval", "w");
1975 if (!f) exit(1);
1976 fprintf(f, "%d\n", sizeof(int));
1977 exit(0);
1978}
1979EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00001980if { (eval echo configure:1981: \"$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 +00001981then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001982 ac_cv_sizeof_int=`cat conftestval`
1983else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001984 echo "configure: failed program was:" >&5
1985 cat conftest.$ac_ext >&5
1986 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001987 ac_cv_sizeof_int=0
1988fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001989rm -fr conftest*
1990fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001991
1992fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001993echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1994cat >> confdefs.h <<EOF
1995#define SIZEOF_INT $ac_cv_sizeof_int
1996EOF
1997
1998
1999echo $ac_n "checking size of long""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002000echo "configure:2001: checking size of long" >&5
2001if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002002 echo $ac_n "(cached) $ac_c" 1>&6
2003else
2004 if test "$cross_compiling" = yes; then
2005 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2006else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002007 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002008#line 2009 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002009#include "confdefs.h"
2010#include <stdio.h>
2011main()
2012{
2013 FILE *f=fopen("conftestval", "w");
2014 if (!f) exit(1);
2015 fprintf(f, "%d\n", sizeof(long));
2016 exit(0);
2017}
2018EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002019if { (eval echo configure:2020: \"$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 +00002020then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002021 ac_cv_sizeof_long=`cat conftestval`
2022else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002023 echo "configure: failed program was:" >&5
2024 cat conftest.$ac_ext >&5
2025 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002026 ac_cv_sizeof_long=0
2027fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002028rm -fr conftest*
2029fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002030
2031fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002032echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2033cat >> confdefs.h <<EOF
2034#define SIZEOF_LONG $ac_cv_sizeof_long
2035EOF
2036
2037
Guido van Rossumad678af1998-10-02 14:42:15 +00002038echo $ac_n "checking size of void *""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002039echo "configure:2040: checking size of void *" >&5
2040if eval "test \"\${ac_cv_sizeof_void_p+set}\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002041 echo $ac_n "(cached) $ac_c" 1>&6
2042else
2043 if test "$cross_compiling" = yes; then
2044 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2045else
2046 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002047#line 2048 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002048#include "confdefs.h"
2049#include <stdio.h>
2050main()
2051{
2052 FILE *f=fopen("conftestval", "w");
2053 if (!f) exit(1);
2054 fprintf(f, "%d\n", sizeof(void *));
2055 exit(0);
2056}
2057EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002058if { (eval echo configure:2059: \"$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 +00002059then
2060 ac_cv_sizeof_void_p=`cat conftestval`
2061else
2062 echo "configure: failed program was:" >&5
2063 cat conftest.$ac_ext >&5
2064 rm -fr conftest*
2065 ac_cv_sizeof_void_p=0
2066fi
2067rm -fr conftest*
2068fi
2069
2070fi
2071echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2072cat >> confdefs.h <<EOF
2073#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2074EOF
2075
2076
Guido van Rossumef2255b2000-03-10 22:30:29 +00002077echo $ac_n "checking size of char""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002078echo "configure:2079: checking size of char" >&5
2079if eval "test \"\${ac_cv_sizeof_char+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002080 echo $ac_n "(cached) $ac_c" 1>&6
2081else
2082 if test "$cross_compiling" = yes; then
2083 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2084else
2085 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002086#line 2087 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002087#include "confdefs.h"
2088#include <stdio.h>
2089main()
2090{
2091 FILE *f=fopen("conftestval", "w");
2092 if (!f) exit(1);
2093 fprintf(f, "%d\n", sizeof(char));
2094 exit(0);
2095}
2096EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002097if { (eval echo configure:2098: \"$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 +00002098then
2099 ac_cv_sizeof_char=`cat conftestval`
2100else
2101 echo "configure: failed program was:" >&5
2102 cat conftest.$ac_ext >&5
2103 rm -fr conftest*
2104 ac_cv_sizeof_char=0
2105fi
2106rm -fr conftest*
2107fi
2108
2109fi
2110echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2111cat >> confdefs.h <<EOF
2112#define SIZEOF_CHAR $ac_cv_sizeof_char
2113EOF
2114
2115
2116echo $ac_n "checking size of short""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002117echo "configure:2118: checking size of short" >&5
2118if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002119 echo $ac_n "(cached) $ac_c" 1>&6
2120else
2121 if test "$cross_compiling" = yes; then
2122 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2123else
2124 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002125#line 2126 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002126#include "confdefs.h"
2127#include <stdio.h>
2128main()
2129{
2130 FILE *f=fopen("conftestval", "w");
2131 if (!f) exit(1);
2132 fprintf(f, "%d\n", sizeof(short));
2133 exit(0);
2134}
2135EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002136if { (eval echo configure:2137: \"$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 +00002137then
2138 ac_cv_sizeof_short=`cat conftestval`
2139else
2140 echo "configure: failed program was:" >&5
2141 cat conftest.$ac_ext >&5
2142 rm -fr conftest*
2143 ac_cv_sizeof_short=0
2144fi
2145rm -fr conftest*
2146fi
2147
2148fi
2149echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2150cat >> confdefs.h <<EOF
2151#define SIZEOF_SHORT $ac_cv_sizeof_short
2152EOF
2153
2154
2155echo $ac_n "checking size of float""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002156echo "configure:2157: checking size of float" >&5
2157if eval "test \"\${ac_cv_sizeof_float+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002158 echo $ac_n "(cached) $ac_c" 1>&6
2159else
2160 if test "$cross_compiling" = yes; then
2161 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2162else
2163 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002164#line 2165 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002165#include "confdefs.h"
2166#include <stdio.h>
2167main()
2168{
2169 FILE *f=fopen("conftestval", "w");
2170 if (!f) exit(1);
2171 fprintf(f, "%d\n", sizeof(float));
2172 exit(0);
2173}
2174EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002175if { (eval echo configure:2176: \"$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 +00002176then
2177 ac_cv_sizeof_float=`cat conftestval`
2178else
2179 echo "configure: failed program was:" >&5
2180 cat conftest.$ac_ext >&5
2181 rm -fr conftest*
2182 ac_cv_sizeof_float=0
2183fi
2184rm -fr conftest*
2185fi
2186
2187fi
2188echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2189cat >> confdefs.h <<EOF
2190#define SIZEOF_FLOAT $ac_cv_sizeof_float
2191EOF
2192
2193
2194echo $ac_n "checking size of double""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002195echo "configure:2196: checking size of double" >&5
2196if eval "test \"\${ac_cv_sizeof_double+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002197 echo $ac_n "(cached) $ac_c" 1>&6
2198else
2199 if test "$cross_compiling" = yes; then
2200 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2201else
2202 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002203#line 2204 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002204#include "confdefs.h"
2205#include <stdio.h>
2206main()
2207{
2208 FILE *f=fopen("conftestval", "w");
2209 if (!f) exit(1);
2210 fprintf(f, "%d\n", sizeof(double));
2211 exit(0);
2212}
2213EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002214if { (eval echo configure:2215: \"$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 +00002215then
2216 ac_cv_sizeof_double=`cat conftestval`
2217else
2218 echo "configure: failed program was:" >&5
2219 cat conftest.$ac_ext >&5
2220 rm -fr conftest*
2221 ac_cv_sizeof_double=0
2222fi
2223rm -fr conftest*
2224fi
2225
2226fi
2227echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2228cat >> confdefs.h <<EOF
2229#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2230EOF
2231
2232
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002233echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002234echo "configure:2235: checking size of fpos_t" >&5
2235if eval "test \"\${ac_cv_sizeof_fpos_t+set}\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002236 echo $ac_n "(cached) $ac_c" 1>&6
2237else
2238 if test "$cross_compiling" = yes; then
2239 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2240else
2241 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002242#line 2243 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002243#include "confdefs.h"
2244#include <stdio.h>
2245main()
2246{
2247 FILE *f=fopen("conftestval", "w");
2248 if (!f) exit(1);
2249 fprintf(f, "%d\n", sizeof(fpos_t));
2250 exit(0);
2251}
2252EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002253if { (eval echo configure:2254: \"$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 +00002254then
2255 ac_cv_sizeof_fpos_t=`cat conftestval`
2256else
2257 echo "configure: failed program was:" >&5
2258 cat conftest.$ac_ext >&5
2259 rm -fr conftest*
2260 ac_cv_sizeof_fpos_t=0
2261fi
2262rm -fr conftest*
2263fi
2264
2265fi
2266echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2267cat >> confdefs.h <<EOF
2268#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2269EOF
2270
2271
Guido van Rossum0a516c91994-09-12 10:58:40 +00002272
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002273echo $ac_n "checking for long long support""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002274echo "configure:2275: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002275have_long_long=no
2276cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002277#line 2278 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002278#include "confdefs.h"
2279
2280int main() {
2281long long x; x = (long long)0;
2282; return 0; }
2283EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002284if { (eval echo configure:2285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002285 rm -rf conftest*
2286 cat >> confdefs.h <<\EOF
2287#define HAVE_LONG_LONG 1
2288EOF
2289 have_long_long=yes
2290else
2291 echo "configure: failed program was:" >&5
2292 cat conftest.$ac_ext >&5
2293fi
2294rm -f conftest*
2295echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002296if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002297echo $ac_n "checking size of long long""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002298echo "configure:2299: checking size of long long" >&5
2299if eval "test \"\${ac_cv_sizeof_long_long+set}\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002300 echo $ac_n "(cached) $ac_c" 1>&6
2301else
2302 if test "$cross_compiling" = yes; then
2303 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2304else
2305 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002306#line 2307 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002307#include "confdefs.h"
2308#include <stdio.h>
2309main()
2310{
2311 FILE *f=fopen("conftestval", "w");
2312 if (!f) exit(1);
2313 fprintf(f, "%d\n", sizeof(long long));
2314 exit(0);
2315}
2316EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002317if { (eval echo configure:2318: \"$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 +00002318then
2319 ac_cv_sizeof_long_long=`cat conftestval`
2320else
2321 echo "configure: failed program was:" >&5
2322 cat conftest.$ac_ext >&5
2323 rm -fr conftest*
2324 ac_cv_sizeof_long_long=0
2325fi
2326rm -fr conftest*
2327fi
2328
2329fi
2330echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2331cat >> confdefs.h <<EOF
2332#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2333EOF
2334
2335
2336fi
2337
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002338echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002339echo "configure:2340: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002340have_uintptr_t=no
2341cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002342#line 2343 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002343#include "confdefs.h"
2344
2345int main() {
2346uintptr_t x; x = (uintptr_t)0;
2347; return 0; }
2348EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002349if { (eval echo configure:2350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002350 rm -rf conftest*
2351 cat >> confdefs.h <<\EOF
2352#define HAVE_UINTPTR_T 1
2353EOF
2354 have_uintptr_t=yes
2355else
2356 echo "configure: failed program was:" >&5
2357 cat conftest.$ac_ext >&5
2358fi
2359rm -f conftest*
2360echo "$ac_t""$have_uintptr_t" 1>&6
2361if test "$have_uintptr_t" = yes ; then
2362echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002363echo "configure:2364: checking size of uintptr_t" >&5
2364if eval "test \"\${ac_cv_sizeof_uintptr_t+set}\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002365 echo $ac_n "(cached) $ac_c" 1>&6
2366else
2367 if test "$cross_compiling" = yes; then
2368 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2369else
2370 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002371#line 2372 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002372#include "confdefs.h"
2373#include <stdio.h>
2374main()
2375{
2376 FILE *f=fopen("conftestval", "w");
2377 if (!f) exit(1);
2378 fprintf(f, "%d\n", sizeof(uintptr_t));
2379 exit(0);
2380}
2381EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002382if { (eval echo configure:2383: \"$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 +00002383then
2384 ac_cv_sizeof_uintptr_t=`cat conftestval`
2385else
2386 echo "configure: failed program was:" >&5
2387 cat conftest.$ac_ext >&5
2388 rm -fr conftest*
2389 ac_cv_sizeof_uintptr_t=0
2390fi
2391rm -fr conftest*
2392fi
2393
2394fi
2395echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2396cat >> confdefs.h <<EOF
2397#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2398EOF
2399
2400
2401fi
2402
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002403# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2404echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002405echo "configure:2406: checking size of off_t" >&5
2406if eval "test \"\${ac_cv_sizeof_off_t+set}\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002407 echo $ac_n "(cached) $ac_c" 1>&6
2408else
2409 if test "$cross_compiling" = yes; then
2410 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2411else
2412 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002413#line 2414 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002414#include "confdefs.h"
2415#include <stdio.h>
2416#include <sys/types.h>
2417main()
2418{
2419 FILE *f=fopen("conftestval", "w");
2420 if (!f) exit(1);
2421 fprintf(f, "%d\n", sizeof(off_t));
2422 exit(0);
2423}
2424EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002425if { (eval echo configure:2426: \"$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 +00002426then
2427 ac_cv_sizeof_off_t=`cat conftestval`
2428else
2429 echo "configure: failed program was:" >&5
2430 cat conftest.$ac_ext >&5
2431 rm -fr conftest*
2432 ac_cv_sizeof_off_t=0
2433fi
2434rm -fr conftest*
2435fi
2436
2437
2438fi
2439
2440echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2441cat >> confdefs.h <<EOF
2442#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2443EOF
2444
2445
2446echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002447echo "configure:2448: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002448if test "$have_long_long" = yes -a \
2449 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2450 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002451 cat >> confdefs.h <<\EOF
2452#define HAVE_LARGEFILE_SUPPORT 1
2453EOF
2454
2455 echo "$ac_t""yes" 1>&6
2456else
2457 echo "$ac_t""no" 1>&6
2458fi
2459
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002460# AC_CHECK_SIZEOF() doesn't include <time.h>.
2461echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002462echo "configure:2463: checking size of time_t" >&5
2463if eval "test \"\${ac_cv_sizeof_time_t+set}\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002464 echo $ac_n "(cached) $ac_c" 1>&6
2465else
2466 if test "$cross_compiling" = yes; then
2467 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2468else
2469 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002470#line 2471 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002471#include "confdefs.h"
2472#include <stdio.h>
2473#include <time.h>
2474main()
2475{
2476 FILE *f=fopen("conftestval", "w");
2477 if (!f) exit(1);
2478 fprintf(f, "%d\n", sizeof(time_t));
2479 exit(0);
2480}
2481EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002482if { (eval echo configure:2483: \"$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 +00002483then
2484 ac_cv_sizeof_time_t=`cat conftestval`
2485else
2486 echo "configure: failed program was:" >&5
2487 cat conftest.$ac_ext >&5
2488 rm -fr conftest*
2489 ac_cv_sizeof_time_t=0
2490fi
2491rm -fr conftest*
2492fi
2493
2494
2495fi
2496
2497echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2498cat >> confdefs.h <<EOF
2499#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2500EOF
2501
2502
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002503
Trent Mick635f6fb2000-08-23 21:33:05 +00002504# if have pthread_t then define SIZEOF_PTHREAD_T
2505echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002506echo "configure:2507: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002507have_pthread_t=no
2508cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002509#line 2510 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002510#include "confdefs.h"
2511#include <pthread.h>
2512int main() {
2513pthread_t x; x = (pthread_t)0;
2514; return 0; }
2515EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002516if { (eval echo configure:2517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002517 rm -rf conftest*
2518 have_pthread_t=yes
2519else
2520 echo "configure: failed program was:" >&5
2521 cat conftest.$ac_ext >&5
2522fi
2523rm -f conftest*
2524echo "$ac_t""$have_pthread_t" 1>&6
2525if test "$have_pthread_t" = yes ; then
2526 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2527 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002528echo "configure:2529: checking size of pthread_t" >&5
2529 if eval "test \"\${ac_cv_sizeof_pthread_t+set}\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002530 echo $ac_n "(cached) $ac_c" 1>&6
2531else
2532 if test "$cross_compiling" = yes; then
2533 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2534else
2535 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002536#line 2537 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002537#include "confdefs.h"
2538#include <stdio.h>
2539 #include <pthread.h>
2540 main()
2541 {
2542 FILE *f=fopen("conftestval", "w");
2543 if (!f) exit(1);
2544 fprintf(f, "%d\n", sizeof(pthread_t));
2545 exit(0);
2546 }
2547EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002548if { (eval echo configure:2549: \"$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 +00002549then
2550 ac_cv_sizeof_pthread_t=`cat conftestval`
2551else
2552 echo "configure: failed program was:" >&5
2553 cat conftest.$ac_ext >&5
2554 rm -fr conftest*
2555 ac_cv_sizeof_pthread_t=0
2556fi
2557rm -fr conftest*
2558fi
2559
2560
2561fi
2562
2563 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2564 cat >> confdefs.h <<EOF
2565#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2566EOF
2567
2568fi
2569
2570
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002571# Minor variations in building a framework between NextStep versions 4 and 5
2572
2573case $ac_sys_system/$ac_sys_release in
2574 next/4*)
2575 ns_undef_sym='__environ'
2576 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2577 next/5*)
2578 ns_undef_sym='_environ'
2579 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2580esac
2581
2582echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002583echo "configure:2584: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002584if test "$with_next_framework"
2585then
2586 OPT="$OPT -fno-common"
2587 # -U __environ is needed since bundles don't have access
2588 # to crt0 when built but will always be linked against it
2589 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2590 cat >> confdefs.h <<\EOF
2591#define WITH_NEXT_FRAMEWORK 1
2592EOF
2593
2594 echo "$ac_t""yes" 1>&6
2595else
2596 echo "$ac_t""no" 1>&6
2597fi
2598
2599echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002600echo "configure:2601: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002601if test "$with_next_framework" -o "$with_dyld"
2602then
2603 if test "$with_dyld"
2604 then
2605 echo "$ac_t""yes" 1>&6
2606 else
2607 echo "$ac_t""required for framework build" 1>&6
2608 fi
2609 cat >> confdefs.h <<\EOF
2610#define WITH_DYLD 1
2611EOF
2612
2613 ns_dyld='set'
2614else
2615 echo "$ac_t""no" 1>&6
2616fi
2617
Guido van Rossum0a516c91994-09-12 10:58:40 +00002618# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002619
2620
2621
2622
Guido van Rossum0a516c91994-09-12 10:58:40 +00002623# SO is the extension of shared libraries `(including the dot!)
2624# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002625echo $ac_n "checking SO""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002626echo "configure:2627: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002627if test -z "$SO"
2628then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002629 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002630 hp*|HP*) SO=.sl;;
2631 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002632 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002633fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002634echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002635# LDSHARED is the ld *command* used to create shared library
2636# -- "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 +00002637# (Shared libraries in this instance are shared modules to be loaded into
2638# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002639echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002640echo "configure:2641: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002641if test -z "$LDSHARED"
2642then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002643 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002644 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002645 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002646 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002647 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002648 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a662000-05-26 12:22:54 +00002649 SunOS/5*)
2650 if test "$GCC" = "yes"
2651 then LDSHARED='$(CC) -G'
2652 else LDSHARED="ld -G";
2653 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002654 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002655 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2656 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002657 next/*)
2658 if test "$ns_dyld"
2659 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2660 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2661 fi
2662 if test "$with_next_framework" ; then
2663 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2664 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002665 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002666 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002667 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002668 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002669 NetBSD*)
2670 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2671 then
2672 LDSHARED="cc -shared"
2673 else
2674 LDSHARED="ld -Bshareable"
2675 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002676 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00002677 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00002678 then
2679 LDSHARED="cc -shared ${LDFLAGS}"
2680 else
2681 LDSHARED="ld -Bshareable ${LDFLAGS}"
2682 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002683 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002684 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002685 *) LDSHARED="ld";;
2686 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002687fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002688echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002689# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002690# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002691echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002692echo "configure:2693: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002693if test -z "$CCSHARED"
2694then
Guido van Rossum07397971997-04-29 21:49:50 +00002695 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002696 hp*|HP*) if test "$GCC" = yes;
2697 then CCSHARED="-fpic";
2698 else CCSHARED="+z";
2699 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002700 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002701 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002702 OpenBSD*) CCSHARED="-fpic";;
2703 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002704 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002705 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002706 IRIX*/6*) case $CC in
2707 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002708 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002709 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002710 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002711fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002712echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002713# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002714# the python executable -- this is only needed for a few systems
2715echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002716echo "configure:2717: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002717if test -z "$LINKFORSHARED"
2718then
Guido van Rossum07397971997-04-29 21:49:50 +00002719 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002720 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002721 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002722 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002723 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002724 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002725 # -u libsys_s pulls in all symbols in libsys
2726 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2727 # -u __dummy makes the linker aware of the objc runtime
2728 # in System.framework; otherwise, __objcInit (referenced in
2729 # crt1.o) gets erroneously defined as common, which breaks dynamic
2730 # loading of any modules which reference it in System.framework
2731 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002732 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002733 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00002734 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2735 then
2736 LINKFORSHARED="-Wl,--export-dynamic"
2737 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002738 SunOS/5*) case $CC in
2739 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002740 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002741 then
2742 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002743 fi;;
2744 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002745 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002746fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002747echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002748
Guido van Rossum627b2d71993-12-24 10:39:16 +00002749# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002750echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002751echo "configure:2752: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002752ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00002753if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002754 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002755else
2756 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002757LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002758cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002759#line 2760 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002760#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002761/* Override any gcc2 internal prototype to avoid an error. */
2762/* We use char because int might match the return type of a gcc2
2763 builtin and then its argument prototype would still apply. */
2764char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002765
Guido van Rossumf78abae1997-01-21 22:02:36 +00002766int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002767dlopen()
2768; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002769EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002770if { (eval echo configure:2771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002771 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002772 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002773else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002774 echo "configure: failed program was:" >&5
2775 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002776 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002777 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002778fi
2779rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002780LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002781
Guido van Rossum627b2d71993-12-24 10:39:16 +00002782fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002783if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002784 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002785 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2786 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002787 cat >> confdefs.h <<EOF
2788#define $ac_tr_lib 1
2789EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002790
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002791 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002792
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002793else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002794 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002795fi
2796 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002797echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002798echo "configure:2799: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002799ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00002800if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002801 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002802else
2803 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002804LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002805cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002806#line 2807 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002807#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002808/* Override any gcc2 internal prototype to avoid an error. */
2809/* We use char because int might match the return type of a gcc2
2810 builtin and then its argument prototype would still apply. */
2811char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002812
Guido van Rossumf78abae1997-01-21 22:02:36 +00002813int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002814shl_load()
2815; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002816EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002817if { (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002818 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002819 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002820else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002821 echo "configure: failed program was:" >&5
2822 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002823 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002824 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002825fi
2826rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002827LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002828
Guido van Rossum627b2d71993-12-24 10:39:16 +00002829fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002830if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002831 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002832 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2833 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002834 cat >> confdefs.h <<EOF
2835#define $ac_tr_lib 1
2836EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002837
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002838 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002839
2840else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002841 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002842fi
2843 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002844
Skip Montanarocb853262000-08-30 22:29:48 +00002845# Check for --with-pydebug
2846echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002847echo "configure:2848: checking for --with-pydebug" >&5
Skip Montanarocb853262000-08-30 22:29:48 +00002848# Check whether --with-pydebug or --without-pydebug was given.
2849if test "${with_pydebug+set}" = set; then
2850 withval="$with_pydebug"
2851
2852if test "$withval" != no
2853then cat >> confdefs.h <<\EOF
2854#define Py_DEBUG 1
2855EOF
2856 echo "$ac_t""yes" 1>&6
2857else echo "$ac_t""no" 1>&6
2858fi
2859else
2860 echo "$ac_t""no" 1>&6
2861fi
2862
2863
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002864# checks for system dependent C++ extensions support
2865case "$ac_sys_system" in
2866 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002867echo "configure:2868: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002868 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002869#line 2870 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002870#include "confdefs.h"
2871#include "/usr/lpp/xlC/include/load.h"
2872int main() {
2873loadAndInit("", 0, "")
2874; return 0; }
2875EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002876if { (eval echo configure:2877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002877 rm -rf conftest*
2878 cat >> confdefs.h <<\EOF
2879#define AIX_GENUINE_CPLUSPLUS 1
2880EOF
2881
2882 echo "$ac_t""yes" 1>&6
2883else
2884 echo "configure: failed program was:" >&5
2885 cat conftest.$ac_ext >&5
2886 rm -rf conftest*
2887 echo "$ac_t""no" 1>&6
2888fi
2889rm -f conftest*;;
2890 *) ;;
2891esac
2892
Guido van Rossum70c7f481998-03-26 18:44:10 +00002893# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2894# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002895# BeOS' sockets are stashed in libnet.
2896case "$ac_sys_system" in
2897IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002898*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002899echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002900echo "configure:2901: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002901ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00002902if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002903 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002904else
2905 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002906LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002907cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002908#line 2909 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002909#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002910/* Override any gcc2 internal prototype to avoid an error. */
2911/* We use char because int might match the return type of a gcc2
2912 builtin and then its argument prototype would still apply. */
2913char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002914
Guido van Rossumf78abae1997-01-21 22:02:36 +00002915int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002916t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002917; return 0; }
2918EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002919if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002920 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002921 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002922else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002923 echo "configure: failed program was:" >&5
2924 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002925 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002926 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002927fi
2928rm -f conftest*
2929LIBS="$ac_save_LIBS"
2930
2931fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002932if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002933 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002934 LIBS="-lnsl $LIBS"
2935else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002936 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002937fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002938 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002939echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002940echo "configure:2941: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002941ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00002942if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002943 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002944else
2945 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002946LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002947cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002948#line 2949 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002949#include "confdefs.h"
2950/* Override any gcc2 internal prototype to avoid an error. */
2951/* We use char because int might match the return type of a gcc2
2952 builtin and then its argument prototype would still apply. */
2953char socket();
2954
2955int main() {
2956socket()
2957; return 0; }
2958EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002959if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002960 rm -rf conftest*
2961 eval "ac_cv_lib_$ac_lib_var=yes"
2962else
2963 echo "configure: failed program was:" >&5
2964 cat conftest.$ac_ext >&5
2965 rm -rf conftest*
2966 eval "ac_cv_lib_$ac_lib_var=no"
2967fi
2968rm -f conftest*
2969LIBS="$ac_save_LIBS"
2970
2971fi
2972if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2973 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002974 LIBS="-lsocket $LIBS"
2975else
2976 echo "$ac_t""no" 1>&6
2977fi
2978 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00002979;;
2980esac
2981case "$ac_sys_system" in
2982BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00002983echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00002984echo "configure:2985: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002985ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00002986if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002987 echo $ac_n "(cached) $ac_c" 1>&6
2988else
2989 ac_save_LIBS="$LIBS"
2990LIBS="-lnet $LIBS $LIBS"
2991cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00002992#line 2993 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002993#include "confdefs.h"
2994/* Override any gcc2 internal prototype to avoid an error. */
2995/* We use char because int might match the return type of a gcc2
2996 builtin and then its argument prototype would still apply. */
2997char socket();
2998
2999int main() {
3000socket()
3001; return 0; }
3002EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003003if { (eval echo configure:3004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003004 rm -rf conftest*
3005 eval "ac_cv_lib_$ac_lib_var=yes"
3006else
3007 echo "configure: failed program was:" >&5
3008 cat conftest.$ac_ext >&5
3009 rm -rf conftest*
3010 eval "ac_cv_lib_$ac_lib_var=no"
3011fi
3012rm -f conftest*
3013LIBS="$ac_save_LIBS"
3014
3015fi
3016if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3017 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003018 LIBS="-lnet $LIBS"
3019else
3020 echo "$ac_t""no" 1>&6
3021fi
3022 # BeOS
3023;;
3024esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003025
Guido van Rossuma68acba1996-07-31 17:36:39 +00003026echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003027echo "configure:3028: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003028# Check whether --with-libs or --without-libs was given.
3029if test "${with_libs+set}" = set; then
3030 withval="$with_libs"
3031
3032echo "$ac_t""$withval" 1>&6
3033LIBS="$withval $LIBS"
3034
3035else
3036 echo "$ac_t""no" 1>&6
3037fi
3038
Guido van Rossum7f43da71994-08-01 12:15:30 +00003039
Guido van Rossum009f7871997-12-04 00:51:42 +00003040
Barry Warsawc0d24d82000-06-29 16:12:00 +00003041USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003042
Guido van Rossumec2f0731997-01-22 20:54:01 +00003043echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003044echo "configure:3045: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003045
3046# Check whether --with-dec-threads or --without-dec-threads was given.
3047if test "${with_dec_threads+set}" = set; then
3048 withval="$with_dec_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003049
3050echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003051LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003052if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003053 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003054fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003055else
3056 echo "$ac_t""no" 1>&6
3057fi
3058
3059
3060echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003061echo "configure:3062: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003062# Check whether --with-threads or --without-threads was given.
3063if test "${with_threads+set}" = set; then
3064 withval="$with_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003065 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003066fi
3067
3068
Barry Warsawc0d24d82000-06-29 16:12:00 +00003069# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003070# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003071if test "${with_thread+set}" = set; then
3072 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003073
3074with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003075fi
Barry Warsawc0d24d82000-06-29 16:12:00 +00003076
3077
3078if test -z "$with_threads"
3079then with_threads="yes"
3080fi
3081echo "$ac_t""$with_threads" 1>&6
3082
3083if test "$with_threads" = "no"
3084then
3085 USE_THREAD_MODULE="#"
3086else
3087 if test -d "$with_threads"
3088 then LDFLAGS="$LDFLAGS -L$with_threads"
3089 fi
3090 if test -d "$withval"
3091 then LDFLAGS="$LDFLAGS -L$withval"
3092 fi
3093 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003094#define _REENTRANT 1
3095EOF
3096
Barry Warsawc0d24d82000-06-29 16:12:00 +00003097 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003098echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003099echo "configure:3100: checking for mach/cthreads.h" >&5
3100if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003101 echo $ac_n "(cached) $ac_c" 1>&6
3102else
3103 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003104#line 3105 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003105#include "confdefs.h"
3106#include <mach/cthreads.h>
3107EOF
3108ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Skip Montanarob89f41e2000-09-04 04:06:05 +00003109{ (eval echo configure:3110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003110ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003111if test -z "$ac_err"; then
3112 rm -rf conftest*
3113 eval "ac_cv_header_$ac_safe=yes"
3114else
3115 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003116 echo "configure: failed program was:" >&5
3117 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003118 rm -rf conftest*
3119 eval "ac_cv_header_$ac_safe=no"
3120fi
3121rm -f conftest*
3122fi
3123if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3124 echo "$ac_t""yes" 1>&6
3125 cat >> confdefs.h <<\EOF
3126#define WITH_THREAD 1
3127EOF
3128
Barry Warsawc0d24d82000-06-29 16:12:00 +00003129 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003130#define C_THREADS 1
3131EOF
3132
Barry Warsawc0d24d82000-06-29 16:12:00 +00003133 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003134else
3135 echo "$ac_t""no" 1>&6
3136
Barry Warsawc0d24d82000-06-29 16:12:00 +00003137 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003138echo "configure:3139: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003139ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00003140if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003141 echo $ac_n "(cached) $ac_c" 1>&6
3142else
3143 ac_save_LIBS="$LIBS"
3144LIBS="-lpthread $LIBS"
3145cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003146#line 3147 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003147#include "confdefs.h"
3148/* Override any gcc2 internal prototype to avoid an error. */
3149/* We use char because int might match the return type of a gcc2
3150 builtin and then its argument prototype would still apply. */
3151char pthread_create();
3152
3153int main() {
3154pthread_create()
3155; return 0; }
3156EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003157if { (eval echo configure:3158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003158 rm -rf conftest*
3159 eval "ac_cv_lib_$ac_lib_var=yes"
3160else
3161 echo "configure: failed program was:" >&5
3162 cat conftest.$ac_ext >&5
3163 rm -rf conftest*
3164 eval "ac_cv_lib_$ac_lib_var=no"
3165fi
3166rm -f conftest*
3167LIBS="$ac_save_LIBS"
3168
3169fi
3170if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3171 echo "$ac_t""yes" 1>&6
3172 cat >> confdefs.h <<\EOF
3173#define WITH_THREAD 1
3174EOF
3175
Barry Warsawc0d24d82000-06-29 16:12:00 +00003176 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003177#define _POSIX_THREADS 1
3178EOF
3179
Barry Warsawc0d24d82000-06-29 16:12:00 +00003180 LIBS="-lpthread $LIBS"
3181 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003182else
3183 echo "$ac_t""no" 1>&6
3184
Barry Warsawc0d24d82000-06-29 16:12:00 +00003185 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003186echo "configure:3187: checking for pthread_detach" >&5
3187if eval "test \"\${ac_cv_func_pthread_detach+set}\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003188 echo $ac_n "(cached) $ac_c" 1>&6
3189else
3190 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003191#line 3192 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003192#include "confdefs.h"
3193/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003194 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003195#include <assert.h>
3196/* Override any gcc2 internal prototype to avoid an error. */
3197/* We use char because int might match the return type of a gcc2
3198 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003199char pthread_detach();
Skip Montanarob89f41e2000-09-04 04:06:05 +00003200char (*f)();
Guido van Rossumad678af1998-10-02 14:42:15 +00003201
3202int main() {
3203
3204/* The GNU C library defines this for functions which it implements
3205 to always fail with ENOSYS. Some functions are actually named
3206 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003207#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003208choke me
3209#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00003210f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00003211#endif
3212
3213; return 0; }
3214EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003215if { (eval echo configure:3216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003216 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003217 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003218else
3219 echo "configure: failed program was:" >&5
3220 cat conftest.$ac_ext >&5
3221 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003222 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003223fi
3224rm -f conftest*
3225fi
3226
Guido van Rossumea516321998-12-17 18:08:55 +00003227if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003228 echo "$ac_t""yes" 1>&6
3229 cat >> confdefs.h <<\EOF
3230#define WITH_THREAD 1
3231EOF
3232
Barry Warsawc0d24d82000-06-29 16:12:00 +00003233 cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003234#define _POSIX_THREADS 1
3235EOF
3236
Barry Warsawc0d24d82000-06-29 16:12:00 +00003237 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003238else
3239 echo "$ac_t""no" 1>&6
3240
Barry Warsawc0d24d82000-06-29 16:12:00 +00003241 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003242echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003243echo "configure:3244: checking for kernel/OS.h" >&5
3244if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003245 echo $ac_n "(cached) $ac_c" 1>&6
3246else
3247 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003248#line 3249 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003249#include "confdefs.h"
3250#include <kernel/OS.h>
3251EOF
3252ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Skip Montanarob89f41e2000-09-04 04:06:05 +00003253{ (eval echo configure:3254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003254ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003255if test -z "$ac_err"; then
3256 rm -rf conftest*
3257 eval "ac_cv_header_$ac_safe=yes"
3258else
3259 echo "$ac_err" >&5
3260 echo "configure: failed program was:" >&5
3261 cat conftest.$ac_ext >&5
3262 rm -rf conftest*
3263 eval "ac_cv_header_$ac_safe=no"
3264fi
3265rm -f conftest*
3266fi
3267if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3268 echo "$ac_t""yes" 1>&6
3269 cat >> confdefs.h <<\EOF
3270#define WITH_THREAD 1
3271EOF
3272
Barry Warsawc0d24d82000-06-29 16:12:00 +00003273 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003274#define BEOS_THREADS 1
3275EOF
3276
Barry Warsawc0d24d82000-06-29 16:12:00 +00003277 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003278else
3279 echo "$ac_t""no" 1>&6
3280
Barry Warsawc0d24d82000-06-29 16:12:00 +00003281 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003282echo "configure:3283: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003283ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00003284if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003285 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003286else
3287 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003288LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003289cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003290#line 3291 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003291#include "confdefs.h"
3292/* Override any gcc2 internal prototype to avoid an error. */
3293/* We use char because int might match the return type of a gcc2
3294 builtin and then its argument prototype would still apply. */
3295char pthread_create();
3296
3297int main() {
3298pthread_create()
3299; return 0; }
3300EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003301if { (eval echo configure:3302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003302 rm -rf conftest*
3303 eval "ac_cv_lib_$ac_lib_var=yes"
3304else
3305 echo "configure: failed program was:" >&5
3306 cat conftest.$ac_ext >&5
3307 rm -rf conftest*
3308 eval "ac_cv_lib_$ac_lib_var=no"
3309fi
3310rm -f conftest*
3311LIBS="$ac_save_LIBS"
3312
3313fi
3314if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3315 echo "$ac_t""yes" 1>&6
3316 cat >> confdefs.h <<\EOF
3317#define WITH_THREAD 1
3318EOF
3319
3320 cat >> confdefs.h <<\EOF
3321#define _POSIX_THREADS 1
3322EOF
3323
3324 LIBS="$LIBS -lpthreads"
3325 LIBOBJS="$LIBOBJS thread.o"
3326else
3327 echo "$ac_t""no" 1>&6
3328
3329 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003330echo "configure:3331: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003331ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00003332if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003333 echo $ac_n "(cached) $ac_c" 1>&6
3334else
3335 ac_save_LIBS="$LIBS"
3336LIBS="-lc_r $LIBS"
3337cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003338#line 3339 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003339#include "confdefs.h"
3340/* Override any gcc2 internal prototype to avoid an error. */
3341/* We use char because int might match the return type of a gcc2
3342 builtin and then its argument prototype would still apply. */
3343char pthread_create();
3344
3345int main() {
3346pthread_create()
3347; return 0; }
3348EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003349if { (eval echo configure:3350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003350 rm -rf conftest*
3351 eval "ac_cv_lib_$ac_lib_var=yes"
3352else
3353 echo "configure: failed program was:" >&5
3354 cat conftest.$ac_ext >&5
3355 rm -rf conftest*
3356 eval "ac_cv_lib_$ac_lib_var=no"
3357fi
3358rm -f conftest*
3359LIBS="$ac_save_LIBS"
3360
3361fi
3362if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3363 echo "$ac_t""yes" 1>&6
3364 cat >> confdefs.h <<\EOF
3365#define WITH_THREAD 1
3366EOF
3367
Barry Warsawc0d24d82000-06-29 16:12:00 +00003368 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003369#define _POSIX_THREADS 1
3370EOF
3371
Greg Steinadf63d62000-07-05 10:38:09 +00003372 LIBS="$LIBS -lc_r"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003373 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003374else
3375 echo "$ac_t""no" 1>&6
3376
Greg Steinadf63d62000-07-05 10:38:09 +00003377 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003378echo "configure:3379: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003379ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00003380if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003381 echo $ac_n "(cached) $ac_c" 1>&6
3382else
3383 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003384LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003385cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003386#line 3387 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003387#include "confdefs.h"
3388/* Override any gcc2 internal prototype to avoid an error. */
3389/* We use char because int might match the return type of a gcc2
3390 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003391char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003392
3393int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003394__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003395; return 0; }
3396EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003397if { (eval echo configure:3398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003398 rm -rf conftest*
3399 eval "ac_cv_lib_$ac_lib_var=yes"
3400else
3401 echo "configure: failed program was:" >&5
3402 cat conftest.$ac_ext >&5
3403 rm -rf conftest*
3404 eval "ac_cv_lib_$ac_lib_var=no"
3405fi
3406rm -f conftest*
3407LIBS="$ac_save_LIBS"
3408
3409fi
3410if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3411 echo "$ac_t""yes" 1>&6
3412 cat >> confdefs.h <<\EOF
3413#define WITH_THREAD 1
3414EOF
3415
Barry Warsawc0d24d82000-06-29 16:12:00 +00003416 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003417#define _POSIX_THREADS 1
3418EOF
3419
Greg Steinadf63d62000-07-05 10:38:09 +00003420 LIBS="$LIBS -lthread"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003421 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003422else
3423 echo "$ac_t""no" 1>&6
3424
Greg Steinadf63d62000-07-05 10:38:09 +00003425 echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003426echo "configure:3427: checking for pth_init in -lpth" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003427ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00003428if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00003429 echo $ac_n "(cached) $ac_c" 1>&6
3430else
3431 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003432LIBS="-lpth $LIBS"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003433cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003434#line 3435 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003435#include "confdefs.h"
3436/* Override any gcc2 internal prototype to avoid an error. */
3437/* We use char because int might match the return type of a gcc2
3438 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003439char pth_init();
Guido van Rossum0be3e491997-05-22 20:33:33 +00003440
3441int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003442pth_init()
Guido van Rossum0be3e491997-05-22 20:33:33 +00003443; return 0; }
3444EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003445if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00003446 rm -rf conftest*
3447 eval "ac_cv_lib_$ac_lib_var=yes"
3448else
3449 echo "configure: failed program was:" >&5
3450 cat conftest.$ac_ext >&5
3451 rm -rf conftest*
3452 eval "ac_cv_lib_$ac_lib_var=no"
3453fi
3454rm -f conftest*
3455LIBS="$ac_save_LIBS"
3456
3457fi
3458if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3459 echo "$ac_t""yes" 1>&6
3460 cat >> confdefs.h <<\EOF
3461#define WITH_THREAD 1
3462EOF
3463
Barry Warsawc0d24d82000-06-29 16:12:00 +00003464 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003465#define _GNU_PTH 1
Guido van Rossum0be3e491997-05-22 20:33:33 +00003466EOF
3467
Greg Steinadf63d62000-07-05 10:38:09 +00003468 LIBS="-lpth $LIBS"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003469 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003470else
3471 echo "$ac_t""no" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003472
Barry Warsawc0d24d82000-06-29 16:12:00 +00003473 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003474echo "configure:3475: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003475ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00003476if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003477 echo $ac_n "(cached) $ac_c" 1>&6
3478else
3479 ac_save_LIBS="$LIBS"
3480LIBS="-lcma $LIBS"
3481cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003482#line 3483 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003483#include "confdefs.h"
3484/* Override any gcc2 internal prototype to avoid an error. */
3485/* We use char because int might match the return type of a gcc2
3486 builtin and then its argument prototype would still apply. */
3487char pthread_create();
3488
3489int main() {
3490pthread_create()
3491; return 0; }
3492EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003493if { (eval echo configure:3494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003494 rm -rf conftest*
3495 eval "ac_cv_lib_$ac_lib_var=yes"
3496else
3497 echo "configure: failed program was:" >&5
3498 cat conftest.$ac_ext >&5
3499 rm -rf conftest*
3500 eval "ac_cv_lib_$ac_lib_var=no"
3501fi
3502rm -f conftest*
3503LIBS="$ac_save_LIBS"
3504
3505fi
3506if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3507 echo "$ac_t""yes" 1>&6
3508 cat >> confdefs.h <<\EOF
3509#define WITH_THREAD 1
3510EOF
3511
Barry Warsawc0d24d82000-06-29 16:12:00 +00003512 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003513#define _POSIX_THREADS 1
3514EOF
3515
Barry Warsawc0d24d82000-06-29 16:12:00 +00003516 LIBS="$LIBS -lcma"
3517 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003518else
3519 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003520
3521 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003522fi
3523
Barry Warsawc0d24d82000-06-29 16:12:00 +00003524
Guido van Rossum627b2d71993-12-24 10:39:16 +00003525fi
3526
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003527fi
3528
Guido van Rossum0be3e491997-05-22 20:33:33 +00003529fi
3530
Guido van Rossum49545951997-12-02 19:28:29 +00003531fi
3532
Guido van Rossumb93a8621998-05-07 13:27:32 +00003533fi
3534
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003535fi
3536
Guido van Rossumad678af1998-10-02 14:42:15 +00003537fi
3538
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003539fi
3540
Guido van Rossum0be3e491997-05-22 20:33:33 +00003541
Barry Warsawc0d24d82000-06-29 16:12:00 +00003542 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003543echo "configure:3544: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003544ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00003545if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003546 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003547else
3548 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003549LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003550cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003551#line 3552 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003552#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003553/* Override any gcc2 internal prototype to avoid an error. */
3554/* We use char because int might match the return type of a gcc2
3555 builtin and then its argument prototype would still apply. */
3556char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003557
Guido van Rossumf78abae1997-01-21 22:02:36 +00003558int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003559usconfig()
3560; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003561EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003562if { (eval echo configure:3563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003563 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003564 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003565else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003566 echo "configure: failed program was:" >&5
3567 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003568 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003569 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003570fi
3571rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003572LIBS="$ac_save_LIBS"
3573
3574fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003575if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003576 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003577 cat >> confdefs.h <<\EOF
3578#define WITH_THREAD 1
3579EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003580
Barry Warsawc0d24d82000-06-29 16:12:00 +00003581 LIBS="$LIBS -lmpc"
3582 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003583 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003584else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003585 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003586fi
3587
Barry Warsawc0d24d82000-06-29 16:12:00 +00003588 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003589echo "configure:3590: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003590ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00003591if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003592 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003593else
3594 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003595LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003596cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003597#line 3598 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003598#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003599/* Override any gcc2 internal prototype to avoid an error. */
3600/* We use char because int might match the return type of a gcc2
3601 builtin and then its argument prototype would still apply. */
3602char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003603
Guido van Rossumf78abae1997-01-21 22:02:36 +00003604int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003605thr_create()
3606; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003607EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003608if { (eval echo configure:3609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003609 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003610 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003611else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003612 echo "configure: failed program was:" >&5
3613 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003614 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003615 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003616fi
3617rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003618LIBS="$ac_save_LIBS"
3619
3620fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003621if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003622 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003623 cat >> confdefs.h <<\EOF
3624#define WITH_THREAD 1
3625EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003626
Barry Warsawc0d24d82000-06-29 16:12:00 +00003627 LIBS="$LIBS -lthread"
3628 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003629 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003630else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003631 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003632fi
3633
Guido van Rossum627b2d71993-12-24 10:39:16 +00003634fi
3635
Barry Warsawef82cd72000-06-30 16:21:01 +00003636# Check for GC support
3637
3638USE_GC_MODULE=""
3639echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003640echo "configure:3641: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003641# Check whether --with-cycle-gc or --without-cycle-gc was given.
3642if test "${with_cycle_gc+set}" = set; then
3643 withval="$with_cycle_gc"
3644 :
3645fi
3646
3647
3648if test -z "$with_cycle_gc"
3649then with_cycle_gc="yes"
3650fi
3651if test "$with_cycle_gc" = "no"
3652then
3653 USE_GC_MODULE="#"
3654else
3655 cat >> confdefs.h <<\EOF
3656#define WITH_CYCLE_GC 1
3657EOF
3658
3659fi
3660echo "$ac_t""$with_cycle_gc" 1>&6
3661
Fred Drakea50d6ec2000-08-31 16:13:20 +00003662# Check for LIBDB support
3663# either --with-libdb or, in its absence, the presence of db.h
3664
3665USE_BSDDB_MODULE=""
3666echo $ac_n "checking for --with-libdb""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003667echo "configure:3668: checking for --with-libdb" >&5
Fred Drakea50d6ec2000-08-31 16:13:20 +00003668# Check whether --with-libdb or --without-libdb was given.
3669if test "${with_libdb+set}" = set; then
3670 withval="$with_libdb"
3671 :
3672fi
3673
3674
Skip Montanarob89f41e2000-09-04 04:06:05 +00003675# enabled by default, but db.h must be found
3676if test "$ac_cv_header_db_h" = "yes"
3677then
3678 if test "$with_libdb" != "no"
3679 then with_libdb="yes"
3680 fi
3681else
3682 # make sure user knows why bsddb support wasn't enabled event
3683 # though s/he requested it
3684 if test "$with_libdb" = "yes"
3685 then echo $ac_n "(requested, but db.h was not found) $ac_c"
3686 fi
3687 with_libdb="no"
Fred Drakea50d6ec2000-08-31 16:13:20 +00003688fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00003689
Fred Drakea50d6ec2000-08-31 16:13:20 +00003690if test "$with_libdb" = "no"
3691then
3692 USE_BSDDB_MODULE="#"
3693else
3694 cat >> confdefs.h <<\EOF
3695#define WITH_LIBDB 1
3696EOF
3697
3698fi
3699echo "$ac_t""$with_libdb" 1>&6
3700
Barry Warsawef82cd72000-06-30 16:21:01 +00003701# Check for --with-wctype-functions
3702echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003703echo "configure:3704: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003704# Check whether --with-wctype-functions or --without-wctype-functions was given.
3705if test "${with_wctype_functions+set}" = set; then
3706 withval="$with_wctype_functions"
3707
3708if test "$withval" != no
3709then cat >> confdefs.h <<\EOF
3710#define WANT_WCTYPE_FUNCTIONS 1
3711EOF
3712 echo "$ac_t""yes" 1>&6
3713else echo "$ac_t""no" 1>&6
3714fi
3715else
3716 echo "$ac_t""no" 1>&6
3717fi
3718
3719
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003720# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00003721
3722DLINCLDIR=/
3723
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003724echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003725echo "configure:3726: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003726# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003727if test "${with_sgi_dl+set}" = set; then
3728 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003729
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003730echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003731cat >> confdefs.h <<\EOF
3732#define WITH_SGI_DL 1
3733EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003734
Guido van Rossume97ee181999-12-20 21:27:22 +00003735DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003736dldir=$withval
3737if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003738then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003739else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003740fi
3741DLINCLDIR=${dldir}
3742LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003743else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003744 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003745fi
3746
3747
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003748echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003749echo "configure:3750: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003750# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003751if test "${with_dl_dld+set}" = set; then
3752 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003753
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003754echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003755cat >> confdefs.h <<\EOF
3756#define WITH_DL_DLD 1
3757EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003758
Guido van Rossume97ee181999-12-20 21:27:22 +00003759DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003760dldir=`echo "$withval" | sed 's/,.*//'`
3761dlddir=`echo "$withval" | sed 's/.*,//'`
3762if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003763then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003764else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003765fi
3766DLINCLDIR=${dldir}
3767LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003768else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003769 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003770fi
3771
3772
Guido van Rossume97ee181999-12-20 21:27:22 +00003773# the dlopen() function means we might want to use dynload_shlib.o. some
3774# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00003775for ac_func in dlopen
3776do
3777echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003778echo "configure:3779: checking for $ac_func" >&5
3779if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003780 echo $ac_n "(cached) $ac_c" 1>&6
3781else
3782 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003783#line 3784 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00003784#include "confdefs.h"
3785/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00003786 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00003787#include <assert.h>
3788/* Override any gcc2 internal prototype to avoid an error. */
3789/* We use char because int might match the return type of a gcc2
3790 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003791char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00003792char (*f)();
Guido van Rossume97ee181999-12-20 21:27:22 +00003793
3794int main() {
3795
3796/* The GNU C library defines this for functions which it implements
3797 to always fail with ENOSYS. Some functions are actually named
3798 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003799#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00003800choke me
3801#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00003802f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +00003803#endif
3804
3805; return 0; }
3806EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003807if { (eval echo configure:3808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003808 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003809 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00003810else
3811 echo "configure: failed program was:" >&5
3812 cat conftest.$ac_ext >&5
3813 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003814 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00003815fi
3816rm -f conftest*
3817fi
3818
Thomas Wouters3a584202000-08-05 23:28:51 +00003819if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003820 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00003821 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3822 cat >> confdefs.h <<EOF
3823#define $ac_tr_func 1
3824EOF
3825
Guido van Rossume97ee181999-12-20 21:27:22 +00003826else
3827 echo "$ac_t""no" 1>&6
3828fi
Thomas Wouters3a584202000-08-05 23:28:51 +00003829done
Guido van Rossume97ee181999-12-20 21:27:22 +00003830
3831
3832# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3833# loading of modules.
3834
3835echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003836echo "configure:3837: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00003837if test -z "$DYNLOADFILE"
3838then
3839 case $ac_sys_system/$ac_sys_release in
3840 AIX*) DYNLOADFILE="dynload_aix.o";;
3841 BeOS*) DYNLOADFILE="dynload_beos.o";;
3842 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
3843 next/*) DYNLOADFILE="dynload_next.o";;
3844 *)
3845 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
3846 # out any dynamic loading
3847 if test "$ac_cv_func_dlopen" = yes
3848 then DYNLOADFILE="dynload_shlib.o"
3849 else DYNLOADFILE="dynload_stub.o"
3850 fi
3851 ;;
3852 esac
3853fi
3854echo "$ac_t""$DYNLOADFILE" 1>&6
3855if test "$DYNLOADFILE" != "dynload_stub.o"
3856then
3857 cat >> confdefs.h <<\EOF
3858#define HAVE_DYNAMIC_LOADING 1
3859EOF
3860
3861fi
3862
Guido van Rossum627b2d71993-12-24 10:39:16 +00003863# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00003864for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00003865 flock fork fsync fdatasync fpathconf ftime ftruncate \
Thomas Wouters3a584202000-08-05 23:28:51 +00003866 getgroups getlogin getpeername getpid getpwent getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00003867 kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00003868 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00003869 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003870 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00003871 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00003872 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00003873 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters70c21a12000-07-14 14:28:33 +00003874 truncate uname waitpid _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003875do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003876echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003877echo "configure:3878: checking for $ac_func" >&5
3878if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003879 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003880else
3881 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003882#line 3883 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003883#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003884/* System header to define __stub macros and hopefully few prototypes,
3885 which can conflict with char $ac_func(); below. */
3886#include <assert.h>
3887/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003888/* We use char because int might match the return type of a gcc2
3889 builtin and then its argument prototype would still apply. */
3890char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00003891char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003892
Guido van Rossumf78abae1997-01-21 22:02:36 +00003893int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003894
Guido van Rossum627b2d71993-12-24 10:39:16 +00003895/* The GNU C library defines this for functions which it implements
3896 to always fail with ENOSYS. Some functions are actually named
3897 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003898#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003899choke me
3900#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00003901f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003902#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003903
Guido van Rossum7f43da71994-08-01 12:15:30 +00003904; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003905EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003906if { (eval echo configure:3907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003907 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003908 eval "ac_cv_func_$ac_func=yes"
3909else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003910 echo "configure: failed program was:" >&5
3911 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003912 rm -rf conftest*
3913 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003914fi
3915rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003916fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003917
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003918if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003919 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003920 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003921 cat >> confdefs.h <<EOF
3922#define $ac_tr_func 1
3923EOF
3924
3925else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003926 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003927fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003928done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003929
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003930
Fred Drake8cef4cf2000-06-28 16:40:38 +00003931# check for openpty and forkpty
3932
3933for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003934do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003935echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003936echo "configure:3937: checking for $ac_func" >&5
3937if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003938 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003939else
3940 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003941#line 3942 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003942#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003943/* System header to define __stub macros and hopefully few prototypes,
3944 which can conflict with char $ac_func(); below. */
3945#include <assert.h>
3946/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003947/* We use char because int might match the return type of a gcc2
3948 builtin and then its argument prototype would still apply. */
3949char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00003950char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003951
Guido van Rossumf78abae1997-01-21 22:02:36 +00003952int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003953
Guido van Rossum627b2d71993-12-24 10:39:16 +00003954/* The GNU C library defines this for functions which it implements
3955 to always fail with ENOSYS. Some functions are actually named
3956 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003957#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003958choke me
3959#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00003960f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003961#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003962
Guido van Rossum7f43da71994-08-01 12:15:30 +00003963; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003964EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003965if { (eval echo configure:3966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003966 rm -rf conftest*
3967 eval "ac_cv_func_$ac_func=yes"
3968else
3969 echo "configure: failed program was:" >&5
3970 cat conftest.$ac_ext >&5
3971 rm -rf conftest*
3972 eval "ac_cv_func_$ac_func=no"
3973fi
3974rm -f conftest*
3975fi
3976
3977if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3978 echo "$ac_t""yes" 1>&6
3979 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3980 cat >> confdefs.h <<EOF
3981#define $ac_tr_func 1
3982EOF
3983
3984else
3985 echo "$ac_t""no" 1>&6
3986echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00003987echo "configure:3988: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00003988ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00003989if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003990 echo $ac_n "(cached) $ac_c" 1>&6
3991else
3992 ac_save_LIBS="$LIBS"
3993LIBS="-lutil $LIBS"
3994cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00003995#line 3996 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00003996#include "confdefs.h"
3997/* Override any gcc2 internal prototype to avoid an error. */
3998/* We use char because int might match the return type of a gcc2
3999 builtin and then its argument prototype would still apply. */
4000char openpty();
4001
4002int main() {
4003openpty()
4004; return 0; }
4005EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004006if { (eval echo configure:4007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004007 rm -rf conftest*
4008 eval "ac_cv_lib_$ac_lib_var=yes"
4009else
4010 echo "configure: failed program was:" >&5
4011 cat conftest.$ac_ext >&5
4012 rm -rf conftest*
4013 eval "ac_cv_lib_$ac_lib_var=no"
4014fi
4015rm -f conftest*
4016LIBS="$ac_save_LIBS"
4017
4018fi
4019if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4020 echo "$ac_t""yes" 1>&6
4021 cat >> confdefs.h <<\EOF
4022#define HAVE_OPENPTY 1
4023EOF
4024 LIBS="$LIBS -lutil"
4025else
4026 echo "$ac_t""no" 1>&6
4027fi
4028
4029fi
4030done
4031
4032for ac_func in forkpty
4033do
4034echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004035echo "configure:4036: checking for $ac_func" >&5
4036if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004037 echo $ac_n "(cached) $ac_c" 1>&6
4038else
4039 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004040#line 4041 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004041#include "confdefs.h"
4042/* System header to define __stub macros and hopefully few prototypes,
4043 which can conflict with char $ac_func(); below. */
4044#include <assert.h>
4045/* Override any gcc2 internal prototype to avoid an error. */
4046/* We use char because int might match the return type of a gcc2
4047 builtin and then its argument prototype would still apply. */
4048char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00004049char (*f)();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004050
4051int main() {
4052
4053/* The GNU C library defines this for functions which it implements
4054 to always fail with ENOSYS. Some functions are actually named
4055 something starting with __ and the normal name is an alias. */
4056#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4057choke me
4058#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00004059f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +00004060#endif
4061
4062; return 0; }
4063EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004064if { (eval echo configure:4065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004065 rm -rf conftest*
4066 eval "ac_cv_func_$ac_func=yes"
4067else
4068 echo "configure: failed program was:" >&5
4069 cat conftest.$ac_ext >&5
4070 rm -rf conftest*
4071 eval "ac_cv_func_$ac_func=no"
4072fi
4073rm -f conftest*
4074fi
4075
4076if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4077 echo "$ac_t""yes" 1>&6
4078 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4079 cat >> confdefs.h <<EOF
4080#define $ac_tr_func 1
4081EOF
4082
4083else
4084 echo "$ac_t""no" 1>&6
4085echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004086echo "configure:4087: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004087ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00004088if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004089 echo $ac_n "(cached) $ac_c" 1>&6
4090else
4091 ac_save_LIBS="$LIBS"
4092LIBS="-lutil $LIBS"
4093cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004094#line 4095 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004095#include "confdefs.h"
4096/* Override any gcc2 internal prototype to avoid an error. */
4097/* We use char because int might match the return type of a gcc2
4098 builtin and then its argument prototype would still apply. */
4099char forkpty();
4100
4101int main() {
4102forkpty()
4103; return 0; }
4104EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004105if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004106 rm -rf conftest*
4107 eval "ac_cv_lib_$ac_lib_var=yes"
4108else
4109 echo "configure: failed program was:" >&5
4110 cat conftest.$ac_ext >&5
4111 rm -rf conftest*
4112 eval "ac_cv_lib_$ac_lib_var=no"
4113fi
4114rm -f conftest*
4115LIBS="$ac_save_LIBS"
4116
4117fi
4118if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4119 echo "$ac_t""yes" 1>&6
4120 cat >> confdefs.h <<\EOF
4121#define HAVE_FORKPTY 1
4122EOF
4123 LIBS="$LIBS -lutil"
4124else
4125 echo "$ac_t""no" 1>&6
4126fi
4127
4128fi
4129done
4130
4131
4132# check for long file support functions
4133for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4134do
4135echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004136echo "configure:4137: checking for $ac_func" >&5
4137if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004138 echo $ac_n "(cached) $ac_c" 1>&6
4139else
4140 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004141#line 4142 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004142#include "confdefs.h"
4143/* System header to define __stub macros and hopefully few prototypes,
4144 which can conflict with char $ac_func(); below. */
4145#include <assert.h>
4146/* Override any gcc2 internal prototype to avoid an error. */
4147/* We use char because int might match the return type of a gcc2
4148 builtin and then its argument prototype would still apply. */
4149char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00004150char (*f)();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004151
4152int main() {
4153
4154/* The GNU C library defines this for functions which it implements
4155 to always fail with ENOSYS. Some functions are actually named
4156 something starting with __ and the normal name is an alias. */
4157#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4158choke me
4159#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00004160f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +00004161#endif
4162
4163; return 0; }
4164EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004165if { (eval echo configure:4166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004166 rm -rf conftest*
4167 eval "ac_cv_func_$ac_func=yes"
4168else
4169 echo "configure: failed program was:" >&5
4170 cat conftest.$ac_ext >&5
4171 rm -rf conftest*
4172 eval "ac_cv_func_$ac_func=no"
4173fi
4174rm -f conftest*
4175fi
4176
4177if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4178 echo "$ac_t""yes" 1>&6
4179 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4180 cat >> confdefs.h <<EOF
4181#define $ac_tr_func 1
4182EOF
4183
4184else
4185 echo "$ac_t""no" 1>&6
4186fi
4187done
4188
4189
4190for ac_func in dup2 getcwd strdup strerror memmove
4191do
4192echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004193echo "configure:4194: checking for $ac_func" >&5
4194if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004195 echo $ac_n "(cached) $ac_c" 1>&6
4196else
4197 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004198#line 4199 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004199#include "confdefs.h"
4200/* System header to define __stub macros and hopefully few prototypes,
4201 which can conflict with char $ac_func(); below. */
4202#include <assert.h>
4203/* Override any gcc2 internal prototype to avoid an error. */
4204/* We use char because int might match the return type of a gcc2
4205 builtin and then its argument prototype would still apply. */
4206char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00004207char (*f)();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004208
4209int main() {
4210
4211/* The GNU C library defines this for functions which it implements
4212 to always fail with ENOSYS. Some functions are actually named
4213 something starting with __ and the normal name is an alias. */
4214#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4215choke me
4216#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00004217f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004218#endif
4219
4220; return 0; }
4221EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004222if { (eval echo configure:4223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004223 rm -rf conftest*
4224 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004225else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004226 echo "configure: failed program was:" >&5
4227 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004228 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004229 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004230fi
4231rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004232fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004233
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004234if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004235 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004236 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4237 cat >> confdefs.h <<EOF
4238#define $ac_tr_func 1
4239EOF
4240
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004241else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004242 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004243LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004245done
4246
Guido van Rossumf78abae1997-01-21 22:02:36 +00004247
Thomas Wouters3a584202000-08-05 23:28:51 +00004248for ac_func in getpgrp
4249do
4250echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004251echo "configure:4252: checking for $ac_func" >&5
4252if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004253 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254else
4255 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004256#line 4257 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004257#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004258/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004259 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004260#include <assert.h>
4261/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004262/* We use char because int might match the return type of a gcc2
4263 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004264char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00004265char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004266
Guido van Rossumf78abae1997-01-21 22:02:36 +00004267int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268
Guido van Rossum627b2d71993-12-24 10:39:16 +00004269/* The GNU C library defines this for functions which it implements
4270 to always fail with ENOSYS. Some functions are actually named
4271 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004272#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004273choke me
4274#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00004275f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +00004276#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004277
4278; return 0; }
4279EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004280if { (eval echo configure:4281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004281 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004282 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004283else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004284 echo "configure: failed program was:" >&5
4285 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004286 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004287 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288fi
4289rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004290fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004291
Thomas Wouters3a584202000-08-05 23:28:51 +00004292if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004293 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004294 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4295 cat >> confdefs.h <<EOF
4296#define $ac_tr_func 1
4297EOF
4298 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004299#line 4300 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004300#include "confdefs.h"
4301#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004302int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004303getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004304; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004305EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004306if { (eval echo configure:4307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004307 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004308 cat >> confdefs.h <<\EOF
4309#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004310EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004311
Guido van Rossumf78abae1997-01-21 22:02:36 +00004312else
4313 echo "configure: failed program was:" >&5
4314 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004315fi
4316rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004317else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004318 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004319fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004320done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004321
Thomas Wouters3a584202000-08-05 23:28:51 +00004322for ac_func in setpgrp
4323do
4324echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004325echo "configure:4326: checking for $ac_func" >&5
4326if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004327 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004328else
4329 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004330#line 4331 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004331#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004332/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004333 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004334#include <assert.h>
4335/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004336/* We use char because int might match the return type of a gcc2
4337 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004338char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00004339char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004340
Guido van Rossumf78abae1997-01-21 22:02:36 +00004341int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004342
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004343/* The GNU C library defines this for functions which it implements
4344 to always fail with ENOSYS. Some functions are actually named
4345 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004346#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004347choke me
4348#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00004349f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004350#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004351
4352; return 0; }
4353EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004354if { (eval echo configure:4355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004355 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004356 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004357else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004358 echo "configure: failed program was:" >&5
4359 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004360 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004361 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004362fi
4363rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004364fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004365
Thomas Wouters3a584202000-08-05 23:28:51 +00004366if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004367 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004368 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4369 cat >> confdefs.h <<EOF
4370#define $ac_tr_func 1
4371EOF
4372 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004373#line 4374 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004374#include "confdefs.h"
4375#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004376int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004377setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004378; return 0; }
4379EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004380if { (eval echo configure:4381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004381 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004382 cat >> confdefs.h <<\EOF
4383#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004384EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004385
Guido van Rossumf78abae1997-01-21 22:02:36 +00004386else
4387 echo "configure: failed program was:" >&5
4388 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004389fi
4390rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004391else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004392 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004393fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004394done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004395
Thomas Wouters3a584202000-08-05 23:28:51 +00004396for ac_func in gettimeofday
4397do
4398echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004399echo "configure:4400: checking for $ac_func" >&5
4400if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004401 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004402else
4403 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004404#line 4405 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004405#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004406/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004407 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004408#include <assert.h>
4409/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004410/* We use char because int might match the return type of a gcc2
4411 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004412char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00004413char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004414
Guido van Rossumf78abae1997-01-21 22:02:36 +00004415int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004416
4417/* The GNU C library defines this for functions which it implements
4418 to always fail with ENOSYS. Some functions are actually named
4419 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004420#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004421choke me
4422#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00004423f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004424#endif
4425
4426; return 0; }
4427EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004428if { (eval echo configure:4429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004429 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004430 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004431else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004432 echo "configure: failed program was:" >&5
4433 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004434 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004435 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004436fi
4437rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004438fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004439
Thomas Wouters3a584202000-08-05 23:28:51 +00004440if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004441 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004442 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4443 cat >> confdefs.h <<EOF
4444#define $ac_tr_func 1
4445EOF
4446 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004447#line 4448 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004448#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004449#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004450int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004451gettimeofday((struct timeval*)0,(struct timezone*)0);
4452; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004453EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004454if { (eval echo configure:4455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004455 :
4456else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004457 echo "configure: failed program was:" >&5
4458 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004459 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004460 cat >> confdefs.h <<\EOF
4461#define GETTIMEOFDAY_NO_TZ 1
4462EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004463
4464fi
4465rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004466else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004467 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004468fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004469done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004470
4471
4472# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004473echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004474echo "configure:4475: checking whether time.h and sys/time.h may both be included" >&5
4475if eval "test \"\${ac_cv_header_time+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004476 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004477else
4478 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004479#line 4480 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004480#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004481#include <sys/types.h>
4482#include <sys/time.h>
4483#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004484int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004485struct tm *tp;
4486; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004487EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004488if { (eval echo configure:4489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004489 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004490 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004491else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004492 echo "configure: failed program was:" >&5
4493 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004494 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004495 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004496fi
4497rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004498fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004499
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004500echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004501if test $ac_cv_header_time = yes; then
4502 cat >> confdefs.h <<\EOF
4503#define TIME_WITH_SYS_TIME 1
4504EOF
4505
4506fi
4507
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004508echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004509echo "configure:4510: checking whether struct tm is in sys/time.h or time.h" >&5
4510if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004511 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004512else
4513 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004514#line 4515 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004515#include "confdefs.h"
4516#include <sys/types.h>
4517#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004518int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004519struct tm *tp; tp->tm_sec;
4520; return 0; }
4521EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004522if { (eval echo configure:4523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004523 rm -rf conftest*
4524 ac_cv_struct_tm=time.h
4525else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004526 echo "configure: failed program was:" >&5
4527 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004528 rm -rf conftest*
4529 ac_cv_struct_tm=sys/time.h
4530fi
4531rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004532fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004533
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004534echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004535if test $ac_cv_struct_tm = sys/time.h; then
4536 cat >> confdefs.h <<\EOF
4537#define TM_IN_SYS_TIME 1
4538EOF
4539
4540fi
4541
Skip Montanarob89f41e2000-09-04 04:06:05 +00004542echo $ac_n "checking for member tm_zone in aggregate type struct tm""... $ac_c" 1>&6
4543echo "configure:4544: checking for member tm_zone in aggregate type struct tm" >&5
4544if eval "test \"\${ac_cv_c_struct_member_tm_zone+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004545 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004546else
4547 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004548#line 4549 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004549#include "confdefs.h"
4550#include <sys/types.h>
4551#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004552int main() {
Skip Montanarob89f41e2000-09-04 04:06:05 +00004553struct tm foo; foo.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004554; return 0; }
4555EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004556if { (eval echo configure:4557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004557 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00004558 ac_cv_c_struct_member_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004559else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004560 echo "configure: failed program was:" >&5
4561 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004562 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00004563 ac_cv_c_struct_member_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004564fi
4565rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004566fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004567
Skip Montanarob89f41e2000-09-04 04:06:05 +00004568echo "$ac_t""$ac_cv_c_struct_member_tm_zone" 1>&6
4569tm_zone="$ac_cv_c_struct_member_tm_zone"
4570if test "$ac_cv_c_struct_member_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004571 cat >> confdefs.h <<\EOF
4572#define HAVE_TM_ZONE 1
4573EOF
4574
4575else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004576 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004577echo "configure:4578: checking for tzname" >&5
4578if eval "test \"\${ac_cv_var_tzname+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004579 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004580else
4581 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004582#line 4583 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004583#include "confdefs.h"
4584#include <time.h>
4585#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004586extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004587#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004588int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004589atoi(*tzname);
4590; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004591EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004592if { (eval echo configure:4593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004593 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004594 ac_cv_var_tzname=yes
4595else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004596 echo "configure: failed program was:" >&5
4597 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004598 rm -rf conftest*
4599 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004600fi
4601rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004602fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004603
4604echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004605 if test $ac_cv_var_tzname = yes; then
4606 cat >> confdefs.h <<\EOF
4607#define HAVE_TZNAME 1
4608EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004609
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004610 fi
4611fi
4612
4613
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004614echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004615echo "configure:4616: checking for time.h that defines altzone" >&5
4616if eval "test \"\${ac_cv_header_time_altzone+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004617 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004618else
4619 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004620#line 4621 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004621#include "confdefs.h"
4622#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004623int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004624return altzone;
4625; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004626EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004627if { (eval echo configure:4628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004628 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004629 ac_cv_header_time_altzone=yes
4630else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004631 echo "configure: failed program was:" >&5
4632 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004633 rm -rf conftest*
4634 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004635fi
4636rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004637fi
4638
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004639echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004640if test $ac_cv_header_time_altzone = yes; then
4641 cat >> confdefs.h <<\EOF
4642#define HAVE_ALTZONE 1
4643EOF
4644
4645fi
4646
Guido van Rossumda88dad1995-01-26 00:46:29 +00004647was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004648echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004649echo "configure:4650: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004650cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004651#line 4652 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004652#include "confdefs.h"
4653
4654#include <sys/types.h>
4655#include <sys/select.h>
4656#include <sys/time.h>
4657
Guido van Rossumf78abae1997-01-21 22:02:36 +00004658int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004659;
4660; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004661EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004662if { (eval echo configure:4663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004663 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004664 cat >> confdefs.h <<\EOF
4665#define SYS_SELECT_WITH_SYS_TIME 1
4666EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004667 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004668else
4669 echo "configure: failed program was:" >&5
4670 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004671fi
4672rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004673echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004674
4675# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004676
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004677echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004678echo "configure:4679: checking whether char is unsigned" >&5
4679if eval "test \"\${ac_cv_c_char_unsigned+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004680 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004681else
4682 if test "$GCC" = yes; then
4683 # GCC predefines this symbol on systems where it applies.
4684cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004685#line 4686 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004686#include "confdefs.h"
4687#ifdef __CHAR_UNSIGNED__
4688 yes
4689#endif
4690
4691EOF
4692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4693 egrep "yes" >/dev/null 2>&1; then
4694 rm -rf conftest*
4695 ac_cv_c_char_unsigned=yes
4696else
4697 rm -rf conftest*
4698 ac_cv_c_char_unsigned=no
4699fi
4700rm -f conftest*
4701
4702else
4703if test "$cross_compiling" = yes; then
4704 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4705else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004706 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004707#line 4708 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004708#include "confdefs.h"
4709/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004710#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00004711#define volatile
4712#endif
4713main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00004714 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004715}
4716EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004717if { (eval echo configure:4718: \"$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 +00004718then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004719 ac_cv_c_char_unsigned=yes
4720else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004721 echo "configure: failed program was:" >&5
4722 cat conftest.$ac_ext >&5
4723 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004724 ac_cv_c_char_unsigned=no
4725fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004726rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004727fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004728
4729fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004730fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004731
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004732echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004733if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
4734 cat >> confdefs.h <<\EOF
4735#define __CHAR_UNSIGNED__ 1
4736EOF
4737
4738fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004739
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004740echo $ac_n "checking for working const""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004741echo "configure:4742: checking for working const" >&5
4742if eval "test \"\${ac_cv_c_const+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004743 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004744else
4745 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004746#line 4747 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004747#include "confdefs.h"
4748
Guido van Rossumf78abae1997-01-21 22:02:36 +00004749int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004750
4751/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004752typedef int charset[2]; const charset x;
4753/* SunOS 4.1.1 cc rejects this. */
4754char const *const *ccp;
4755char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004756/* NEC SVR4.0.2 mips cc rejects this. */
4757struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004758static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004759/* AIX XL C 1.02.0.0 rejects this.
4760 It does not let you subtract one const X* pointer from another in an arm
4761 of an if-expression whose if-part is not a constant expression */
4762const char *g = "string";
4763ccp = &g + (g ? g-g : 0);
4764/* HPUX 7.0 cc rejects these. */
4765++ccp;
4766p = (char**) ccp;
4767ccp = (char const *const *) p;
4768{ /* SCO 3.2v4 cc rejects this. */
4769 char *t;
4770 char const *s = 0 ? (char *) 0 : (char const *) 0;
4771
4772 *t++ = 0;
4773}
4774{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004775 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004776 const int *foo = &x[0];
4777 ++foo;
4778}
4779{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4780 typedef const int *iptr;
4781 iptr p = 0;
4782 ++p;
4783}
4784{ /* AIX XL C 1.02.0.0 rejects this saying
4785 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4786 struct s { int j; const int *ap[3]; };
4787 struct s *b; b->j = 5;
4788}
4789{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4790 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004791}
4792
4793; return 0; }
4794EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004795if { (eval echo configure:4796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004796 rm -rf conftest*
4797 ac_cv_c_const=yes
4798else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004799 echo "configure: failed program was:" >&5
4800 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004801 rm -rf conftest*
4802 ac_cv_c_const=no
4803fi
4804rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004805fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004806
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004807echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004808if test $ac_cv_c_const = no; then
4809 cat >> confdefs.h <<\EOF
4810#define const
4811EOF
4812
4813fi
4814
Guido van Rossumef2255b2000-03-10 22:30:29 +00004815echo $ac_n "checking for inline""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004816echo "configure:4817: checking for inline" >&5
4817if eval "test \"\${ac_cv_c_inline+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004818 echo $ac_n "(cached) $ac_c" 1>&6
4819else
4820 ac_cv_c_inline=no
4821for ac_kw in inline __inline__ __inline; do
4822 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004823#line 4824 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00004824#include "confdefs.h"
4825
4826int main() {
4827} $ac_kw foo() {
4828; return 0; }
4829EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004830if { (eval echo configure:4831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004831 rm -rf conftest*
4832 ac_cv_c_inline=$ac_kw; break
4833else
4834 echo "configure: failed program was:" >&5
4835 cat conftest.$ac_ext >&5
4836fi
4837rm -f conftest*
4838done
4839
4840fi
4841
4842echo "$ac_t""$ac_cv_c_inline" 1>&6
4843case "$ac_cv_c_inline" in
4844 inline | yes) ;;
4845 no) cat >> confdefs.h <<\EOF
4846#define inline
4847EOF
4848 ;;
4849 *) cat >> confdefs.h <<EOF
4850#define inline $ac_cv_c_inline
4851EOF
4852 ;;
4853esac
4854
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004855
Guido van Rossumda88dad1995-01-26 00:46:29 +00004856works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004857echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004858echo "configure:4859: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004859cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004860#line 4861 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004861#include "confdefs.h"
4862
Guido van Rossumf78abae1997-01-21 22:02:36 +00004863int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004864volatile int x; x = 0;
4865; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004866EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004867if { (eval echo configure:4868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004868 rm -rf conftest*
4869 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004870else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004871 echo "configure: failed program was:" >&5
4872 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004873 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004874 cat >> confdefs.h <<\EOF
4875#define volatile
4876EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004877
4878fi
4879rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004880echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004881
Guido van Rossumda88dad1995-01-26 00:46:29 +00004882works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004883echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004884echo "configure:4885: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004885cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004886#line 4887 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004887#include "confdefs.h"
4888
Guido van Rossumf78abae1997-01-21 22:02:36 +00004889int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004890signed char c;
4891; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004892EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004893if { (eval echo configure:4894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004894 rm -rf conftest*
4895 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004896else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004897 echo "configure: failed program was:" >&5
4898 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004899 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004900 cat >> confdefs.h <<\EOF
4901#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00004902EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004903
4904fi
4905rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004906echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004907
Guido van Rossumda88dad1995-01-26 00:46:29 +00004908have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004909echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004910echo "configure:4911: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004911cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004912#line 4913 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004913#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004914int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00004915int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004916return foo(10);
4917; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004918EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004919if { (eval echo configure:4920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004920 rm -rf conftest*
4921 cat >> confdefs.h <<\EOF
4922#define HAVE_PROTOTYPES 1
4923EOF
4924 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004925else
4926 echo "configure: failed program was:" >&5
4927 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004928fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004929rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004930echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004931
Guido van Rossumda88dad1995-01-26 00:46:29 +00004932works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004933echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004934echo "configure:4935: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004935cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004936#line 4937 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004937#include "confdefs.h"
4938
4939#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00004940int foo(int x, ...) {
4941 va_list va;
4942 va_start(va, x);
4943 va_arg(va, int);
4944 va_arg(va, char *);
4945 va_arg(va, double);
4946 return 0;
4947}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004948
Guido van Rossumf78abae1997-01-21 22:02:36 +00004949int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00004950return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004951; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004952EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004953if { (eval echo configure:4954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004954 rm -rf conftest*
4955 cat >> confdefs.h <<\EOF
4956#define HAVE_STDARG_PROTOTYPES 1
4957EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004958 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004959else
4960 echo "configure: failed program was:" >&5
4961 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004962fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004963rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004964echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004965
Guido van Rossumda88dad1995-01-26 00:46:29 +00004966if test "$have_prototypes" = yes; then
4967bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004968echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004969echo "configure:4970: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004970cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004971#line 4972 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004972#include "confdefs.h"
4973#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004974int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004975char **t;execve("@",t,t);
4976; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004977EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00004978if { (eval echo configure:4979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004979 :
4980else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004981 echo "configure: failed program was:" >&5
4982 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004983 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004984 cat >> confdefs.h <<\EOF
4985#define BAD_EXEC_PROTOTYPES 1
4986EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004987 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004988fi
4989rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004990echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004991fi
4992
Guido van Rossumda88dad1995-01-26 00:46:29 +00004993bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004994echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00004995echo "configure:4996: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004996if test "$cross_compiling" = yes; then
4997 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4998else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004999 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005000#line 5001 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005001#include "confdefs.h"
5002
5003struct s { int a; int b; };
5004static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005005int foobar() {
5006 static int random;
5007 random = (int) &foo;
5008 return random;
5009}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005010static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005011main() {
5012 exit(!((int)&foo == foobar()));
5013}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005014
5015EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005016if { (eval echo configure:5017: \"$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 +00005017then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005018 :
5019else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005020 echo "configure: failed program was:" >&5
5021 cat conftest.$ac_ext >&5
5022 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005023 cat >> confdefs.h <<\EOF
5024#define BAD_STATIC_FORWARD 1
5025EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005026 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005027fi
5028rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005029fi
5030
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005031echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005032
Guido van Rossumda88dad1995-01-26 00:46:29 +00005033va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005034echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005035echo "configure:5036: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005036cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005037#line 5038 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005038#include "confdefs.h"
5039
5040#ifdef HAVE_STDARG_PROTOTYPES
5041#include <stdarg.h>
5042#else
5043#include <varargs.h>
5044#endif
5045
Guido van Rossumf78abae1997-01-21 22:02:36 +00005046int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005047va_list list1, list2; list1 = list2;
5048; return 0; }
5049EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005050if { (eval echo configure:5051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005051 :
5052else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005053 echo "configure: failed program was:" >&5
5054 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005055 rm -rf conftest*
5056 cat >> confdefs.h <<\EOF
5057#define VA_LIST_IS_ARRAY 1
5058EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005059 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005060fi
5061rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005062echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005063
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005064# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5065echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005066echo "configure:5067: checking for gethostbyname_r" >&5
5067if eval "test \"\${ac_cv_func_gethostbyname_r+set}\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005068 echo $ac_n "(cached) $ac_c" 1>&6
5069else
5070 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005071#line 5072 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005072#include "confdefs.h"
5073/* System header to define __stub macros and hopefully few prototypes,
5074 which can conflict with char gethostbyname_r(); below. */
5075#include <assert.h>
5076/* Override any gcc2 internal prototype to avoid an error. */
5077/* We use char because int might match the return type of a gcc2
5078 builtin and then its argument prototype would still apply. */
5079char gethostbyname_r();
Skip Montanarob89f41e2000-09-04 04:06:05 +00005080char (*f)();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005081
5082int main() {
5083
5084/* The GNU C library defines this for functions which it implements
5085 to always fail with ENOSYS. Some functions are actually named
5086 something starting with __ and the normal name is an alias. */
5087#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5088choke me
5089#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00005090f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005091#endif
5092
5093; return 0; }
5094EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005095if { (eval echo configure:5096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005096 rm -rf conftest*
5097 eval "ac_cv_func_gethostbyname_r=yes"
5098else
5099 echo "configure: failed program was:" >&5
5100 cat conftest.$ac_ext >&5
5101 rm -rf conftest*
5102 eval "ac_cv_func_gethostbyname_r=no"
5103fi
5104rm -f conftest*
5105fi
5106
5107if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5108 echo "$ac_t""yes" 1>&6
5109
5110 cat >> confdefs.h <<\EOF
5111#define HAVE_GETHOSTBYNAME_R 1
5112EOF
5113
5114 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005115echo "configure:5116: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005116 OLD_CFLAGS=$CFLAGS
5117 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
5118 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005119#line 5120 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005120#include "confdefs.h"
5121
5122# include <netdb.h>
5123
5124int main() {
5125
5126 char *name;
5127 struct hostent *he, *res;
5128 char buffer[2048];
5129 int buflen = 2048;
5130 int h_errnop;
5131
5132 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
5133
5134; return 0; }
5135EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005136if { (eval echo configure:5137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005137 rm -rf conftest*
5138
5139 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005140#define HAVE_GETHOSTBYNAME_R 1
5141EOF
5142
5143 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005144#define HAVE_GETHOSTBYNAME_R_6_ARG 1
5145EOF
5146
5147 echo "$ac_t""yes" 1>&6
5148
5149else
5150 echo "configure: failed program was:" >&5
5151 cat conftest.$ac_ext >&5
5152 rm -rf conftest*
5153
5154 echo "$ac_t""no" 1>&6
5155 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005156echo "configure:5157: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005157 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005158#line 5159 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005159#include "confdefs.h"
5160
5161# include <netdb.h>
5162
5163int main() {
5164
5165 char *name;
5166 struct hostent *he;
5167 char buffer[2048];
5168 int buflen = 2048;
5169 int h_errnop;
5170
5171 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
5172
5173; return 0; }
5174EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005175if { (eval echo configure:5176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005176 rm -rf conftest*
5177
5178 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005179#define HAVE_GETHOSTBYNAME_R 1
5180EOF
5181
5182 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005183#define HAVE_GETHOSTBYNAME_R_5_ARG 1
5184EOF
5185
5186 echo "$ac_t""yes" 1>&6
5187
5188else
5189 echo "configure: failed program was:" >&5
5190 cat conftest.$ac_ext >&5
5191 rm -rf conftest*
5192
5193 echo "$ac_t""no" 1>&6
5194 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005195echo "configure:5196: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005196 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005197#line 5198 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005198#include "confdefs.h"
5199
5200# include <netdb.h>
5201
5202int main() {
5203
5204 char *name;
5205 struct hostent *he;
5206 struct hostent_data data;
5207
5208 (void) gethostbyname_r(name, he, &data);
5209
5210; return 0; }
5211EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005212if { (eval echo configure:5213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005213 rm -rf conftest*
5214
5215 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005216#define HAVE_GETHOSTBYNAME_R 1
5217EOF
5218
5219 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005220#define HAVE_GETHOSTBYNAME_R_3_ARG 1
5221EOF
5222
5223 echo "$ac_t""yes" 1>&6
5224
5225else
5226 echo "configure: failed program was:" >&5
5227 cat conftest.$ac_ext >&5
5228 rm -rf conftest*
5229
5230 echo "$ac_t""no" 1>&6
5231
5232fi
5233rm -f conftest*
5234
5235fi
5236rm -f conftest*
5237
5238fi
5239rm -f conftest*
5240 CFLAGS=$OLD_CFLAGS
5241
5242else
5243 echo "$ac_t""no" 1>&6
5244
Thomas Wouters3a584202000-08-05 23:28:51 +00005245 for ac_func in gethostbyname
5246do
5247echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005248echo "configure:5249: checking for $ac_func" >&5
5249if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005250 echo $ac_n "(cached) $ac_c" 1>&6
5251else
5252 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005253#line 5254 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005254#include "confdefs.h"
5255/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005256 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005257#include <assert.h>
5258/* Override any gcc2 internal prototype to avoid an error. */
5259/* We use char because int might match the return type of a gcc2
5260 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005261char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00005262char (*f)();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005263
5264int main() {
5265
5266/* The GNU C library defines this for functions which it implements
5267 to always fail with ENOSYS. Some functions are actually named
5268 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005269#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005270choke me
5271#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00005272f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005273#endif
5274
5275; return 0; }
5276EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005277if { (eval echo configure:5278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005278 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005279 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005280else
5281 echo "configure: failed program was:" >&5
5282 cat conftest.$ac_ext >&5
5283 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005284 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005285fi
5286rm -f conftest*
5287fi
5288
Thomas Wouters3a584202000-08-05 23:28:51 +00005289if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005290 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005291 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5292 cat >> confdefs.h <<EOF
5293#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005294EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00005295
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005296else
5297 echo "$ac_t""no" 1>&6
5298fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005299done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005300
5301
5302fi
5303
5304
5305
5306
5307
5308
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005309
Guido van Rossum627b2d71993-12-24 10:39:16 +00005310# checks for system services
5311# (none yet)
5312
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005313# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005314echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005315echo "configure:5316: checking for __fpu_control" >&5
5316if eval "test \"\${ac_cv_func___fpu_control+set}\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005317 echo $ac_n "(cached) $ac_c" 1>&6
5318else
5319 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005320#line 5321 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005321#include "confdefs.h"
5322/* System header to define __stub macros and hopefully few prototypes,
5323 which can conflict with char __fpu_control(); below. */
5324#include <assert.h>
5325/* Override any gcc2 internal prototype to avoid an error. */
5326/* We use char because int might match the return type of a gcc2
5327 builtin and then its argument prototype would still apply. */
5328char __fpu_control();
Skip Montanarob89f41e2000-09-04 04:06:05 +00005329char (*f)();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005330
5331int main() {
5332
5333/* The GNU C library defines this for functions which it implements
5334 to always fail with ENOSYS. Some functions are actually named
5335 something starting with __ and the normal name is an alias. */
5336#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5337choke me
5338#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00005339f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005340#endif
5341
5342; return 0; }
5343EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005344if { (eval echo configure:5345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005345 rm -rf conftest*
5346 eval "ac_cv_func___fpu_control=yes"
5347else
5348 echo "configure: failed program was:" >&5
5349 cat conftest.$ac_ext >&5
5350 rm -rf conftest*
5351 eval "ac_cv_func___fpu_control=no"
5352fi
5353rm -f conftest*
5354fi
5355
5356if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5357 echo "$ac_t""yes" 1>&6
5358 :
5359else
5360 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005361echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005362echo "configure:5363: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005363ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Skip Montanarob89f41e2000-09-04 04:06:05 +00005364if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005365 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005366else
5367 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005368LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005369cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005370#line 5371 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005371#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005372/* Override any gcc2 internal prototype to avoid an error. */
5373/* We use char because int might match the return type of a gcc2
5374 builtin and then its argument prototype would still apply. */
5375char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005376
Guido van Rossumf78abae1997-01-21 22:02:36 +00005377int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005378__fpu_control()
5379; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005380EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005381if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005382 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005383 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005384else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005385 echo "configure: failed program was:" >&5
5386 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005387 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005388 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005389fi
5390rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005391LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005392
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005393fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005394if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005395 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005396 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5397 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005398 cat >> confdefs.h <<EOF
5399#define $ac_tr_lib 1
5400EOF
5401
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005402 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005403
5404else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005405 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005406fi
5407
5408
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005409fi
5410
5411
Guido van Rossum7f253911997-05-09 02:42:48 +00005412# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005413echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005414echo "configure:5415: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005415# Check whether --with-fpectl or --without-fpectl was given.
5416if test "${with_fpectl+set}" = set; then
5417 withval="$with_fpectl"
5418
5419if test "$withval" != no
5420then cat >> confdefs.h <<\EOF
5421#define WANT_SIGFPE_HANDLER 1
5422EOF
5423 echo "$ac_t""yes" 1>&6
5424else echo "$ac_t""no" 1>&6
5425fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005426else
5427 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005428fi
5429
5430
Guido van Rossum7f43da71994-08-01 12:15:30 +00005431# check for --with-libm=...
5432
Guido van Rossum563e7081996-09-10 18:20:48 +00005433case $ac_sys_system in
5434next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005435BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005436*) LIBM=-lm
5437esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005438echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005439echo "configure:5440: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005440# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005441if test "${with_libm+set}" = set; then
5442 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005443
Guido van Rossum7f253911997-05-09 02:42:48 +00005444if test "$withval" = no
5445then LIBM=
5446 echo "$ac_t""force LIBM empty" 1>&6
5447elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005448then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005449 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005450else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005451fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005452else
5453 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005454fi
5455
5456
5457# check for --with-libc=...
5458
Guido van Rossum7f253911997-05-09 02:42:48 +00005459echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005460echo "configure:5461: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005461# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005462if test "${with_libc+set}" = set; then
5463 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005464
Guido van Rossum7f253911997-05-09 02:42:48 +00005465if test "$withval" = no
5466then LIBC=
5467 echo "$ac_t""force LIBC empty" 1>&6
5468elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005469then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005470 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005471else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005472fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005473else
5474 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005475fi
5476
5477
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005478# check for hypot() in math library
5479LIBS_SAVE=$LIBS
5480LIBS="$LIBS $LIBM"
5481for ac_func in hypot
5482do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005483echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005484echo "configure:5485: checking for $ac_func" >&5
5485if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005486 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005487else
5488 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005489#line 5490 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005490#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005491/* System header to define __stub macros and hopefully few prototypes,
5492 which can conflict with char $ac_func(); below. */
5493#include <assert.h>
5494/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005495/* We use char because int might match the return type of a gcc2
5496 builtin and then its argument prototype would still apply. */
5497char $ac_func();
Skip Montanarob89f41e2000-09-04 04:06:05 +00005498char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005499
Guido van Rossumf78abae1997-01-21 22:02:36 +00005500int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005501
5502/* The GNU C library defines this for functions which it implements
5503 to always fail with ENOSYS. Some functions are actually named
5504 something starting with __ and the normal name is an alias. */
5505#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5506choke me
5507#else
Skip Montanarob89f41e2000-09-04 04:06:05 +00005508f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005509#endif
5510
5511; return 0; }
5512EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005513if { (eval echo configure:5514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005514 rm -rf conftest*
5515 eval "ac_cv_func_$ac_func=yes"
5516else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005517 echo "configure: failed program was:" >&5
5518 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005519 rm -rf conftest*
5520 eval "ac_cv_func_$ac_func=no"
5521fi
5522rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005523fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005524
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005525if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5526 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005527 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5528 cat >> confdefs.h <<EOF
5529#define $ac_tr_func 1
5530EOF
5531
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005532else
5533 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005534LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005535fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005536done
5537
Guido van Rossumf78abae1997-01-21 22:02:36 +00005538
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005539LIBS=$LIBS_SAVE
5540
Guido van Rossumda88dad1995-01-26 00:46:29 +00005541# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005542echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005543echo "configure:5544: checking for genuine getopt" >&5
5544if eval "test \"\${ac_cv_func_getopt+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005545 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005546else
5547 if test "$cross_compiling" = yes; then
5548 ac_cv_func_getopt=no
5549else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005550 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005551#line 5552 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00005552#include "confdefs.h"
5553#include <stdio.h>
5554extern int optind, opterr, getopt();
5555extern char* optarg;
5556int main() {
5557 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
5558 opterr = 0;
5559 if (getopt(3, av, "f:") == 'f') { exit(1); }
5560 exit(0);
5561}
5562EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005563if { (eval echo configure:5564: \"$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 +00005564then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005565 ac_cv_func_getopt=yes
5566else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005567 echo "configure: failed program was:" >&5
5568 cat conftest.$ac_ext >&5
5569 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00005570 ac_cv_func_getopt=no
5571fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00005572rm -fr conftest*
5573fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005574
5575fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005576echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005577test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
5578
Guido van Rossumad713701997-07-10 22:42:38 +00005579# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005580echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005581echo "configure:5582: checking what malloc(0) returns" >&5
5582if eval "test \"\${ac_cv_malloc_zero+set}\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005583 echo $ac_n "(cached) $ac_c" 1>&6
5584else
5585 if test "$cross_compiling" = yes; then
5586 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5587else
5588 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005589#line 5590 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005590#include "confdefs.h"
5591#include <stdio.h>
5592#ifdef HAVE_STDLIB
5593#include <stdlib.h>
5594#else
5595char *malloc(), *realloc();
5596int *free();
5597#endif
5598main() {
5599 char *p;
5600 p = malloc(0);
5601 if (p == NULL) exit(1);
5602 p = realloc(p, 0);
5603 if (p == NULL) exit(1);
5604 free(p);
5605 exit(0);
5606}
5607EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005608if { (eval echo configure:5609: \"$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 +00005609then
5610 ac_cv_malloc_zero=nonnull
5611else
5612 echo "configure: failed program was:" >&5
5613 cat conftest.$ac_ext >&5
5614 rm -fr conftest*
5615 ac_cv_malloc_zero=null
5616fi
5617rm -fr conftest*
5618fi
5619
5620fi
5621
5622echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5623if test "$ac_cv_malloc_zero" = null
5624then
5625 cat >> confdefs.h <<\EOF
5626#define MALLOC_ZERO_RETURNS_NULL 1
5627EOF
5628
5629fi
5630
Guido van Rossumef2255b2000-03-10 22:30:29 +00005631# check for wchar.h
5632ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5633echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005634echo "configure:5635: checking for wchar.h" >&5
5635if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005636 echo $ac_n "(cached) $ac_c" 1>&6
5637else
5638 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005639#line 5640 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005640#include "confdefs.h"
5641#include <wchar.h>
5642EOF
5643ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Skip Montanarob89f41e2000-09-04 04:06:05 +00005644{ (eval echo configure:5645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005645ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5646if test -z "$ac_err"; then
5647 rm -rf conftest*
5648 eval "ac_cv_header_$ac_safe=yes"
5649else
5650 echo "$ac_err" >&5
5651 echo "configure: failed program was:" >&5
5652 cat conftest.$ac_ext >&5
5653 rm -rf conftest*
5654 eval "ac_cv_header_$ac_safe=no"
5655fi
5656rm -f conftest*
5657fi
5658if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5659 echo "$ac_t""yes" 1>&6
5660 cat >> confdefs.h <<\EOF
5661#define HAVE_WCHAR_H 1
5662EOF
5663 wchar_h="yes"
5664else
5665 echo "$ac_t""no" 1>&6
5666wchar_h="no"
5667
5668fi
5669
5670
5671# check for usable wchar_t
5672usable_wchar_t="unkown"
5673echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005674echo "configure:5675: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005675if test "$cross_compiling" = yes; then
5676 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5677else
5678 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005679#line 5680 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005680#include "confdefs.h"
5681
5682#include "wchar.h"
5683#include "wctype.h"
5684main() {
5685 wchar_t s;
5686 if (sizeof(s) == 2)
5687 exit(0);
5688 else
5689 exit(1);
5690}
5691
5692EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005693if { (eval echo configure:5694: \"$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 +00005694then
5695 cat >> confdefs.h <<\EOF
5696#define HAVE_USABLE_WCHAR_T 1
5697EOF
5698 usable_wchar_t="yes"
5699else
5700 echo "configure: failed program was:" >&5
5701 cat conftest.$ac_ext >&5
5702 rm -fr conftest*
5703 usable_wchar_t="no"
5704fi
5705rm -fr conftest*
5706fi
5707
5708echo "$ac_t""$usable_wchar_t" 1>&6
5709
5710# check for endianness
5711echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005712echo "configure:5713: checking whether byte ordering is bigendian" >&5
5713if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005714 echo $ac_n "(cached) $ac_c" 1>&6
5715else
5716 ac_cv_c_bigendian=unknown
5717# See if sys/param.h defines the BYTE_ORDER macro.
5718cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005719#line 5720 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005720#include "confdefs.h"
5721#include <sys/types.h>
5722#include <sys/param.h>
5723int main() {
5724
5725#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5726 bogus endian macros
5727#endif
5728; return 0; }
5729EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005730if { (eval echo configure:5731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005731 rm -rf conftest*
5732 # It does; now see whether it defined to BIG_ENDIAN or not.
5733cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005734#line 5735 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005735#include "confdefs.h"
5736#include <sys/types.h>
5737#include <sys/param.h>
5738int main() {
5739
5740#if BYTE_ORDER != BIG_ENDIAN
5741 not big endian
5742#endif
5743; return 0; }
5744EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005745if { (eval echo configure:5746: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005746 rm -rf conftest*
5747 ac_cv_c_bigendian=yes
5748else
5749 echo "configure: failed program was:" >&5
5750 cat conftest.$ac_ext >&5
5751 rm -rf conftest*
5752 ac_cv_c_bigendian=no
5753fi
5754rm -f conftest*
5755else
5756 echo "configure: failed program was:" >&5
5757 cat conftest.$ac_ext >&5
5758fi
5759rm -f conftest*
5760if test $ac_cv_c_bigendian = unknown; then
5761if test "$cross_compiling" = yes; then
5762 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5763else
5764 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005765#line 5766 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005766#include "confdefs.h"
5767main () {
5768 /* Are we little or big endian? From Harbison&Steele. */
5769 union
5770 {
5771 long l;
5772 char c[sizeof (long)];
5773 } u;
5774 u.l = 1;
5775 exit (u.c[sizeof (long) - 1] == 1);
5776}
5777EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005778if { (eval echo configure:5779: \"$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 +00005779then
5780 ac_cv_c_bigendian=no
5781else
5782 echo "configure: failed program was:" >&5
5783 cat conftest.$ac_ext >&5
5784 rm -fr conftest*
5785 ac_cv_c_bigendian=yes
5786fi
5787rm -fr conftest*
5788fi
5789
5790fi
5791fi
5792
5793echo "$ac_t""$ac_cv_c_bigendian" 1>&6
5794if test $ac_cv_c_bigendian = yes; then
5795 cat >> confdefs.h <<\EOF
5796#define WORDS_BIGENDIAN 1
5797EOF
5798
5799fi
5800
5801
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005802# Check whether right shifting a negative integer extends the sign bit
5803# or fills with zeros (like the Cray J90, according to Tim Peters).
5804echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005805echo "configure:5806: checking whether right shift extends the sign bit" >&5
5806if eval "test \"\${ac_cv_rshift_extends_sign+set}\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00005807 echo $ac_n "(cached) $ac_c" 1>&6
5808else
5809
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005810if test "$cross_compiling" = yes; then
5811 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5812else
5813 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005814#line 5815 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005815#include "confdefs.h"
5816
5817int main()
5818{
Vladimir Marangozova6180282000-07-12 05:05:06 +00005819 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005820}
5821
5822EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005823if { (eval echo configure:5824: \"$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 +00005824then
5825 ac_cv_rshift_extends_sign=yes
5826else
5827 echo "configure: failed program was:" >&5
5828 cat conftest.$ac_ext >&5
5829 rm -fr conftest*
5830 ac_cv_rshift_extends_sign=no
5831fi
5832rm -fr conftest*
5833fi
5834
5835fi
5836
5837echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
5838if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005839then
5840 cat >> confdefs.h <<\EOF
5841#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
5842EOF
5843
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005844fi
5845
5846
Guido van Rossum95713eb2000-05-18 20:53:31 +00005847# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
5848# Add sys/socket.h to confdefs.h
5849cat >> confdefs.h <<\EOF
5850#ifdef HAVE_SYS_SOCKET_H
5851#include <sys/socket.h>
5852#endif
5853EOF
5854echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Skip Montanarob89f41e2000-09-04 04:06:05 +00005855echo "configure:5856: checking for socklen_t" >&5
5856if eval "test \"\${ac_cv_type_socklen_t+set}\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00005857 echo $ac_n "(cached) $ac_c" 1>&6
5858else
5859 cat > conftest.$ac_ext <<EOF
Skip Montanarob89f41e2000-09-04 04:06:05 +00005860#line 5861 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005861#include "confdefs.h"
5862#include <sys/types.h>
5863#if STDC_HEADERS
5864#include <stdlib.h>
5865#include <stddef.h>
5866#endif
5867EOF
5868if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5869 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5870 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00005871 eval "ac_cv_type_socklen_t=yes"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005872else
5873 rm -rf conftest*
Skip Montanarob89f41e2000-09-04 04:06:05 +00005874 eval "ac_cv_type_socklen_t=no"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005875fi
5876rm -f conftest*
5877
5878fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00005879if eval "test \"`echo '$ac_cv_type_'socklen_t`\" = yes"; then
5880 echo "$ac_t""yes" 1>&6
5881else
5882 echo "$ac_t""no" 1>&6
5883 cat >> confdefs.h <<EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00005884#define socklen_t int
5885EOF
5886
5887fi
5888
5889
Guido van Rossum627b2d71993-12-24 10:39:16 +00005890# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005891trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005892cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005893# This file is a shell script that caches the results of configure
5894# tests run on this system so they can be shared between configure
5895# scripts and configure runs. It is not useful on other systems.
5896# If it contains results you don't want to keep, you may remove or edit it.
5897#
5898# By default, configure uses ./config.cache as the cache file,
5899# creating it if it does not exist already. You can give configure
5900# the --cache-file=FILE option to use a different cache file; that is
5901# what configure does when it calls configure scripts in
5902# subdirectories, so they share the cache.
5903# Giving --cache-file=/dev/null disables caching, for debugging configure.
5904# config.status only pays attention to the cache file if you give it the
5905# --recheck option to rerun configure.
5906#
5907EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005908# The following way of writing the cache mishandles newlines in values,
5909# but we know of no workaround that is simple, portable, and efficient.
5910# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005911# Ultrix sh set writes to stderr and can't be redirected directly,
5912# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005913(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005914 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005915 *ac_space=\ *)
5916 # `set' does not quote correctly, so add quotes (double-quote substitution
5917 # turns \\\\ into \\, and sed turns \\ into \).
5918 sed -n \
5919 -e "s/'/'\\\\''/g" \
5920 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5921 ;;
5922 *)
5923 # `set' quotes correctly as required by POSIX, so do not add quotes.
5924 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5925 ;;
5926 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005927if cmp -s $cache_file confcache; then
5928 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005929else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005930 if test -w $cache_file; then
5931 echo "updating cache $cache_file"
5932 cat confcache > $cache_file
5933 else
5934 echo "not updating unwritable cache $cache_file"
5935 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005936fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005937rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00005938
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005939trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005940
5941test "x$prefix" = xNONE && prefix=$ac_default_prefix
5942# Let make expand exec_prefix.
5943test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00005944
Guido van Rossum7f43da71994-08-01 12:15:30 +00005945# Any assignment to VPATH causes Sun make to only execute
5946# the first set of double-colon rules, so remove it if not needed.
5947# If there is a colon in the path, we need to keep it.
5948if test "x$srcdir" = x.; then
5949 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5950fi
5951
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005952trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00005953
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005954DEFS=-DHAVE_CONFIG_H
5955
5956# Without the "./", some shells look in PATH for config.status.
5957: ${CONFIG_STATUS=./config.status}
5958
5959echo creating $CONFIG_STATUS
5960rm -f $CONFIG_STATUS
5961cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005962#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00005963# Generated automatically by configure.
5964# Run this file to recreate the current configuration.
5965# This directory was configured as follows,
5966# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5967#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005968# $0 $ac_configure_args
5969#
5970# Compiler output produced by configure, useful for debugging
5971# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00005972
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005973ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005974for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00005975do
Guido van Rossum7f43da71994-08-01 12:15:30 +00005976 case "\$ac_option" in
5977 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005978 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5979 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00005980 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Skip Montanarob89f41e2000-09-04 04:06:05 +00005981 echo "$CONFIG_STATUS generated by autoconf version 2.14.1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005982 exit 0 ;;
5983 -help | --help | --hel | --he | --h)
5984 echo "\$ac_cs_usage"; exit 0 ;;
5985 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005986 esac
5987done
5988
Guido van Rossum7f43da71994-08-01 12:15:30 +00005989ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00005990
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005991trap 'rm -fr `echo "Makefile \
5992 Objects/Makefile \
5993 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00005994 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005995 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00005996 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00005997 Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005998EOF
5999cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006000
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006001# Protect against being on the right side of a sed subst in config.status.
6002sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6003 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006004$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00006005$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006006s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006007s%@CFLAGS@%$CFLAGS%g
6008s%@CPPFLAGS@%$CPPFLAGS%g
6009s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006010s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006011s%@DEFS@%$DEFS%g
6012s%@LDFLAGS@%$LDFLAGS%g
6013s%@LIBS@%$LIBS%g
6014s%@exec_prefix@%$exec_prefix%g
6015s%@prefix@%$prefix%g
6016s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006017s%@bindir@%$bindir%g
6018s%@sbindir@%$sbindir%g
6019s%@libexecdir@%$libexecdir%g
6020s%@datadir@%$datadir%g
6021s%@sysconfdir@%$sysconfdir%g
6022s%@sharedstatedir@%$sharedstatedir%g
6023s%@localstatedir@%$localstatedir%g
6024s%@libdir@%$libdir%g
6025s%@includedir@%$includedir%g
6026s%@oldincludedir@%$oldincludedir%g
6027s%@infodir@%$infodir%g
6028s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00006029s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006030s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00006031s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00006032s%@SET_CXX@%$SET_CXX%g
6033s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006034s%@CC@%$CC%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006035s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
6036s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00006037s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006038s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006039s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006040s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006041s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6042s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006043s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006044s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006045s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006046s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006047s%@SO@%$SO%g
6048s%@LDSHARED@%$LDSHARED%g
6049s%@CCSHARED@%$CCSHARED%g
6050s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00006051s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00006052s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00006053s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Fred Drakea50d6ec2000-08-31 16:13:20 +00006054s%@USE_BSDDB_MODULE@%$USE_BSDDB_MODULE%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006055s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00006056s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006057s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006058s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
6059s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
6060s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006061s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006062s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006063s%@LIBM@%$LIBM%g
6064s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006065
6066CEOF
6067EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006068
6069cat >> $CONFIG_STATUS <<\EOF
6070
6071# Split the substitutions into bite-sized pieces for seds with
6072# small command number limits, like on Digital OSF/1 and HP-UX.
6073ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6074ac_file=1 # Number of current file.
6075ac_beg=1 # First line for current file.
6076ac_end=$ac_max_sed_cmds # Line after last line for current file.
6077ac_more_lines=:
6078ac_sed_cmds=""
6079while $ac_more_lines; do
6080 if test $ac_beg -gt 1; then
6081 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6082 else
6083 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6084 fi
6085 if test ! -s conftest.s$ac_file; then
6086 ac_more_lines=false
6087 rm -f conftest.s$ac_file
6088 else
6089 if test -z "$ac_sed_cmds"; then
6090 ac_sed_cmds="sed -f conftest.s$ac_file"
6091 else
6092 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6093 fi
6094 ac_file=`expr $ac_file + 1`
6095 ac_beg=$ac_end
6096 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6097 fi
6098done
6099if test -z "$ac_sed_cmds"; then
6100 ac_sed_cmds=cat
6101fi
6102EOF
6103
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006104cat >> $CONFIG_STATUS <<EOF
6105
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006106CONFIG_FILES=\${CONFIG_FILES-"Makefile \
6107 Objects/Makefile \
6108 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006109 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006110 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006111 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006112 Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006113EOF
6114cat >> $CONFIG_STATUS <<\EOF
6115for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006116 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006117 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006118 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006119 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6120 *) ac_file_in="${ac_file}.in" ;;
6121 esac
6122
Guido van Rossumf78abae1997-01-21 22:02:36 +00006123 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006124
6125 # Remove last slash and all that follows it. Not all systems have dirname.
6126 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6127 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6128 # The file is in a subdirectory.
6129 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006130 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006131 # A "../" for each directory in $ac_dir_suffix.
6132 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6133 else
6134 ac_dir_suffix= ac_dots=
6135 fi
6136
6137 case "$ac_given_srcdir" in
6138 .) srcdir=.
6139 if test -z "$ac_dots"; then top_srcdir=.
6140 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6141 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6142 *) # Relative path.
6143 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6144 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6145 esac
6146
Guido van Rossumf78abae1997-01-21 22:02:36 +00006147
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006148 echo creating "$ac_file"
6149 rm -f "$ac_file"
6150 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6151 case "$ac_file" in
6152 *Makefile*) ac_comsub="1i\\
6153# $configure_input" ;;
6154 *) ac_comsub= ;;
6155 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006156
6157 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 +00006158 sed -e "$ac_comsub
6159s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006160s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006161s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00006162" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00006163fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00006164rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006165
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006166# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6167# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00006168#
6169# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006170ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6171ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006172ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006173ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006174# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006175ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6176ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006177ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006178ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006179# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006180ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6181ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006182ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006183ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006184
Guido van Rossumf78abae1997-01-21 22:02:36 +00006185if test "${CONFIG_HEADERS+set}" != set; then
6186EOF
6187cat >> $CONFIG_STATUS <<EOF
6188 CONFIG_HEADERS="config.h"
6189EOF
6190cat >> $CONFIG_STATUS <<\EOF
6191fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006192for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006193 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006194 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006195 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006196 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6197 *) ac_file_in="${ac_file}.in" ;;
6198 esac
6199
Guido van Rossum7f43da71994-08-01 12:15:30 +00006200 echo creating $ac_file
6201
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006202 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006203 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6204 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006205
6206EOF
6207
6208# Transform confdefs.h into a sed script conftest.vals that substitutes
6209# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006210# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006211# Protect against being in an unquoted here document in config.status.
6212rm -f conftest.vals
6213cat > conftest.hdr <<\EOF
6214s/[\\&%]/\\&/g
6215s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006216s%#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 +00006217s%ac_d%ac_u%gp
6218s%ac_u%ac_e%gp
6219EOF
6220sed -n -f conftest.hdr confdefs.h > conftest.vals
6221rm -f conftest.hdr
6222
6223# This sed command replaces #undef with comments. This is necessary, for
6224# example, in the case of _POSIX_SOURCE, which is predefined and required
6225# on some systems where configure will not decide to define it.
6226cat >> conftest.vals <<\EOF
6227s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6228EOF
6229
6230# Break up conftest.vals because some shells have a limit on
6231# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006232
6233rm -f conftest.tail
6234while :
6235do
6236 ac_lines=`grep -c . conftest.vals`
6237 # grep -c gives empty output for an empty file on some AIX systems.
6238 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6239 # Write a limited-size here document to conftest.frag.
6240 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6241 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6242 echo 'CEOF
6243 sed -f conftest.frag conftest.in > conftest.out
6244 rm -f conftest.in
6245 mv conftest.out conftest.in
6246' >> $CONFIG_STATUS
6247 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6248 rm -f conftest.vals
6249 mv conftest.tail conftest.vals
6250done
6251rm -f conftest.vals
6252
6253cat >> $CONFIG_STATUS <<\EOF
6254 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006255 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006256 cat conftest.in >> conftest.h
6257 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006258 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006259 echo "$ac_file is unchanged"
6260 rm -f conftest.h
6261 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006262 # Remove last slash and all that follows it. Not all systems have dirname.
6263 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6264 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6265 # The file is in a subdirectory.
6266 test ! -d "$ac_dir" && mkdir "$ac_dir"
6267 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006268 rm -f $ac_file
6269 mv conftest.h $ac_file
6270 fi
6271fi; done
6272
Guido van Rossumf78abae1997-01-21 22:02:36 +00006273EOF
6274cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006275
Guido van Rossumf78abae1997-01-21 22:02:36 +00006276EOF
6277cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006278
6279exit 0
6280EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006281chmod +x $CONFIG_STATUS
6282rm -fr confdefs* $ac_clean_files
Skip Montanarob89f41e2000-09-04 04:06:05 +00006283test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006284