blob: dffd9cbeae3c30246b334f4e381082da6a8b58e5 [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 Rossum40951012000-10-07 16:21:27 +00003# From configure.in Revision: 1.168
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004
Guido van Rossum627b2d71993-12-24 10:39:16 +00005# Guess values for system-dependent variables and create Makefiles.
Fred Drake5790be12000-10-09 17:06:13 +00006# Generated automatically using autoconf version 2.14.1
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000011
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# Defaults:
13ac_help=
14ac_default_prefix=/usr/local
15# Any additions from configure.in:
16ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000017 --with-next-archs='arch1 arch2 ..' build MAB binary"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000018ac_help="$ac_help
Guido van Rossum3dc0a512000-10-05 18:00:06 +000019 --with-next-framework Build (OpenStep|Rhapsody|MacOSX|Darwin) framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000020ac_help="$ac_help
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021 --with-dyld Use (OpenStep|Rhapsody|MacOSX|Darwin) dynamic linker"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000022ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000023 --without-gcc never use gcc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000025 --with-cxx=<compiler> enable C++ support"
Guido van Rossum95012191999-12-16 17:50:52 +000026ac_help="$ac_help
Guido van Rossumff555e32000-09-22 15:38:21 +000027 --with-suffix=.exe set executable suffix"
28ac_help="$ac_help
Skip Montanarocb853262000-08-30 22:29:48 +000029 --with-pydebug build with Py_DEBUG defined"
30ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000031 --with-libs='lib1 ...' link against additional libs"
Guido van Rossuma68acba1996-07-31 17:36:39 +000032ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000033 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000034ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000035 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000036ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000037 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000038ac_help="$ac_help
Guido van Rossum9e8181b2000-09-19 00:46:46 +000039 --with-pth use GNU pth threading libraries"
40ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000041 --with(out)-cycle-gc disable/enable garbage collection"
42ac_help="$ac_help
Fred Drakea50d6ec2000-08-31 16:13:20 +000043 --with(out)-libdb disable/enable bsddb module"
44ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000045 --with-wctype-functions use wctype.h functions"
46ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000047 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000048ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000049 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000050ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000051 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000052ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000053 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000054ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000055 --with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000056
Guido van Rossum7f43da71994-08-01 12:15:30 +000057# Initialize some variables set by options.
58# The variables have the same names as the options, with
59# dashes changed to underlines.
60build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000061cache_file=./config.cache
62exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000063host=NONE
64no_create=
65nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000066no_recursion=
67prefix=NONE
68program_prefix=NONE
69program_suffix=NONE
70program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000071silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000072site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000073srcdir=
74target=NONE
75verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000076x_includes=NONE
77x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000078bindir='${exec_prefix}/bin'
79sbindir='${exec_prefix}/sbin'
80libexecdir='${exec_prefix}/libexec'
81datadir='${prefix}/share'
82sysconfdir='${prefix}/etc'
83sharedstatedir='${prefix}/com'
84localstatedir='${prefix}/var'
85libdir='${exec_prefix}/lib'
86includedir='${prefix}/include'
87oldincludedir='/usr/include'
88infodir='${prefix}/info'
89mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000090
91# Initialize some other variables.
92subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000093MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000094SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +000095# Maximum number of lines to put in a shell here document.
96ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +000097
98ac_prev=
99for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000100do
Guido van Rossum627b2d71993-12-24 10:39:16 +0000101
Guido van Rossum7f43da71994-08-01 12:15:30 +0000102 # If the previous option needs an argument, assign it.
103 if test -n "$ac_prev"; then
104 eval "$ac_prev=\$ac_option"
105 ac_prev=
106 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000107 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000108
Guido van Rossum7f43da71994-08-01 12:15:30 +0000109 case "$ac_option" in
110 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
111 *) ac_optarg= ;;
112 esac
113
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000114 # Accept the important Cygnus configure options, so we can diagnose typos.
115
Guido van Rossum7f43da71994-08-01 12:15:30 +0000116 case "$ac_option" in
117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000118 -bindir | --bindir | --bindi | --bind | --bin | --bi)
119 ac_prev=bindir ;;
120 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
121 bindir="$ac_optarg" ;;
122
123 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000124 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000125 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000126 build="$ac_optarg" ;;
127
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000128 -cache-file | --cache-file | --cache-fil | --cache-fi \
129 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
130 ac_prev=cache_file ;;
131 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
132 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
133 cache_file="$ac_optarg" ;;
134
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000135 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
136 ac_prev=datadir ;;
137 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
138 | --da=*)
139 datadir="$ac_optarg" ;;
140
Guido van Rossum7f43da71994-08-01 12:15:30 +0000141 -disable-* | --disable-*)
142 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000143 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000144 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000145 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000146 fi
147 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
148 eval "enable_${ac_feature}=no" ;;
149
150 -enable-* | --enable-*)
151 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000152 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000153 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000154 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000155 fi
156 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
157 case "$ac_option" in
158 *=*) ;;
159 *) ac_optarg=yes ;;
160 esac
161 eval "enable_${ac_feature}='$ac_optarg'" ;;
162
Guido van Rossum7f43da71994-08-01 12:15:30 +0000163 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
164 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
165 | --exec | --exe | --ex)
166 ac_prev=exec_prefix ;;
167 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
168 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
169 | --exec=* | --exe=* | --ex=*)
170 exec_prefix="$ac_optarg" ;;
171
172 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000173 # Obsolete; use --with-gas.
174 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000175
176 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000177 # Omit some internal or obsolete options to make the list less imposing.
178 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000179 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000180Usage: configure [options] [host]
181Options: [defaults in brackets after descriptions]
182Configuration:
183 --cache-file=FILE cache test results in FILE
184 --help print this message
185 --no-create do not create output files
186 --quiet, --silent do not print \`checking...' messages
187 --version print the version of autoconf that created configure
188Directory and file names:
189 --prefix=PREFIX install architecture-independent files in PREFIX
190 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000191 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000192 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000193 --bindir=DIR user executables in DIR [EPREFIX/bin]
194 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
195 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
196 --datadir=DIR read-only architecture-independent data in DIR
197 [PREFIX/share]
198 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
199 --sharedstatedir=DIR modifiable architecture-independent data in DIR
200 [PREFIX/com]
201 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
202 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
203 --includedir=DIR C header files in DIR [PREFIX/include]
204 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
205 --infodir=DIR info documentation in DIR [PREFIX/info]
206 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000207 --srcdir=DIR find the sources in DIR [configure dir or ..]
208 --program-prefix=PREFIX prepend PREFIX to installed program names
209 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000210 --program-transform-name=PROGRAM
211 run sed PROGRAM on installed program names
212EOF
213 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000214Host type:
215 --build=BUILD configure for building on BUILD [BUILD=HOST]
216 --host=HOST configure for HOST [guessed]
217 --target=TARGET configure for TARGET [TARGET=HOST]
218Features and packages:
219 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
220 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
221 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
222 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
223 --x-includes=DIR X include files are in DIR
224 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000225EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000226 if test -n "$ac_help"; then
227 echo "--enable and --with options recognized:$ac_help"
228 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000229 exit 0 ;;
230
231 -host | --host | --hos | --ho)
232 ac_prev=host ;;
233 -host=* | --host=* | --hos=* | --ho=*)
234 host="$ac_optarg" ;;
235
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000236 -includedir | --includedir | --includedi | --included | --include \
237 | --includ | --inclu | --incl | --inc)
238 ac_prev=includedir ;;
239 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
240 | --includ=* | --inclu=* | --incl=* | --inc=*)
241 includedir="$ac_optarg" ;;
242
243 -infodir | --infodir | --infodi | --infod | --info | --inf)
244 ac_prev=infodir ;;
245 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
246 infodir="$ac_optarg" ;;
247
248 -libdir | --libdir | --libdi | --libd)
249 ac_prev=libdir ;;
250 -libdir=* | --libdir=* | --libdi=* | --libd=*)
251 libdir="$ac_optarg" ;;
252
253 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
254 | --libexe | --libex | --libe)
255 ac_prev=libexecdir ;;
256 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
257 | --libexe=* | --libex=* | --libe=*)
258 libexecdir="$ac_optarg" ;;
259
260 -localstatedir | --localstatedir | --localstatedi | --localstated \
261 | --localstate | --localstat | --localsta | --localst \
262 | --locals | --local | --loca | --loc | --lo)
263 ac_prev=localstatedir ;;
264 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
265 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
266 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
267 localstatedir="$ac_optarg" ;;
268
269 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
270 ac_prev=mandir ;;
271 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
272 mandir="$ac_optarg" ;;
273
Guido van Rossum7f43da71994-08-01 12:15:30 +0000274 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000275 # Obsolete; use --without-fp.
276 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000277
278 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
279 | --no-cr | --no-c)
280 no_create=yes ;;
281
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000282 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
283 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
284 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000285
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000286 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
287 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
288 | --oldin | --oldi | --old | --ol | --o)
289 ac_prev=oldincludedir ;;
290 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
291 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
292 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
293 oldincludedir="$ac_optarg" ;;
294
Guido van Rossum7f43da71994-08-01 12:15:30 +0000295 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
296 ac_prev=prefix ;;
297 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
298 prefix="$ac_optarg" ;;
299
300 -program-prefix | --program-prefix | --program-prefi | --program-pref \
301 | --program-pre | --program-pr | --program-p)
302 ac_prev=program_prefix ;;
303 -program-prefix=* | --program-prefix=* | --program-prefi=* \
304 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
305 program_prefix="$ac_optarg" ;;
306
307 -program-suffix | --program-suffix | --program-suffi | --program-suff \
308 | --program-suf | --program-su | --program-s)
309 ac_prev=program_suffix ;;
310 -program-suffix=* | --program-suffix=* | --program-suffi=* \
311 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
312 program_suffix="$ac_optarg" ;;
313
314 -program-transform-name | --program-transform-name \
315 | --program-transform-nam | --program-transform-na \
316 | --program-transform-n | --program-transform- \
317 | --program-transform | --program-transfor \
318 | --program-transfo | --program-transf \
319 | --program-trans | --program-tran \
320 | --progr-tra | --program-tr | --program-t)
321 ac_prev=program_transform_name ;;
322 -program-transform-name=* | --program-transform-name=* \
323 | --program-transform-nam=* | --program-transform-na=* \
324 | --program-transform-n=* | --program-transform-=* \
325 | --program-transform=* | --program-transfor=* \
326 | --program-transfo=* | --program-transf=* \
327 | --program-trans=* | --program-tran=* \
328 | --progr-tra=* | --program-tr=* | --program-t=*)
329 program_transform_name="$ac_optarg" ;;
330
331 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
332 | -silent | --silent | --silen | --sile | --sil)
333 silent=yes ;;
334
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000335 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
336 ac_prev=sbindir ;;
337 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
338 | --sbi=* | --sb=*)
339 sbindir="$ac_optarg" ;;
340
341 -sharedstatedir | --sharedstatedir | --sharedstatedi \
342 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
343 | --sharedst | --shareds | --shared | --share | --shar \
344 | --sha | --sh)
345 ac_prev=sharedstatedir ;;
346 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
347 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
348 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
349 | --sha=* | --sh=*)
350 sharedstatedir="$ac_optarg" ;;
351
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000352 -site | --site | --sit)
353 ac_prev=site ;;
354 -site=* | --site=* | --sit=*)
355 site="$ac_optarg" ;;
356
Guido van Rossum7f43da71994-08-01 12:15:30 +0000357 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
358 ac_prev=srcdir ;;
359 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
360 srcdir="$ac_optarg" ;;
361
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000362 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
363 | --syscon | --sysco | --sysc | --sys | --sy)
364 ac_prev=sysconfdir ;;
365 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
366 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
367 sysconfdir="$ac_optarg" ;;
368
Guido van Rossum7f43da71994-08-01 12:15:30 +0000369 -target | --target | --targe | --targ | --tar | --ta | --t)
370 ac_prev=target ;;
371 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
372 target="$ac_optarg" ;;
373
374 -v | -verbose | --verbose | --verbos | --verbo | --verb)
375 verbose=yes ;;
376
377 -version | --version | --versio | --versi | --vers)
Fred Drake5790be12000-10-09 17:06:13 +0000378 echo "configure generated by autoconf version 2.14.1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000379 exit 0 ;;
380
381 -with-* | --with-*)
382 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000384 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000385 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000386 fi
387 ac_package=`echo $ac_package| sed 's/-/_/g'`
388 case "$ac_option" in
389 *=*) ;;
390 *) ac_optarg=yes ;;
391 esac
392 eval "with_${ac_package}='$ac_optarg'" ;;
393
394 -without-* | --without-*)
395 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000396 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000397 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000398 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 fi
400 ac_package=`echo $ac_package| sed 's/-/_/g'`
401 eval "with_${ac_package}=no" ;;
402
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000403 --x)
404 # Obsolete; use --with-x.
405 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000406
407 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
408 | --x-incl | --x-inc | --x-in | --x-i)
409 ac_prev=x_includes ;;
410 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
411 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
412 x_includes="$ac_optarg" ;;
413
414 -x-libraries | --x-libraries | --x-librarie | --x-librari \
415 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
416 ac_prev=x_libraries ;;
417 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
418 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
419 x_libraries="$ac_optarg" ;;
420
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000421 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000422 ;;
423
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000424 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000425 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000426 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000428 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000429 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000430 fi
431 nonopt="$ac_option"
432 ;;
433
434 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000435done
436
Guido van Rossum7f43da71994-08-01 12:15:30 +0000437if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000438 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000439fi
440
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000441trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000442
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000443# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000444# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000445# 1 file creation
446# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000447# 3 some systems may open it to /dev/tty
448# 4 used on the Kubota Titan
449# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000450# 5 compiler messages saved in config.log
451if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000452 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000453else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000454 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000455fi
456exec 5>./config.log
457
458echo "\
459This file contains any messages produced by compilers while
460running configure, to aid debugging if configure makes a mistake.
461" 1>&5
462
463# Strip out --no-create and --no-recursion so they do not pile up.
464# Also quote any args containing shell metacharacters.
465ac_configure_args=
466for ac_arg
467do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000468 case "$ac_arg" in
469 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
470 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000471 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
472 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
473 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
474 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
475 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000476 esac
477done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000478
479# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000480# Only set these to C if already set. These must not be set unconditionally
481# because not all systems understand e.g. LANG=C (notably SCO).
482# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
483# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000484if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000485if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
486if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
487if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000488
Guido van Rossum7f43da71994-08-01 12:15:30 +0000489# confdefs.h avoids OS command line length limits that DEFS can exceed.
490rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000491# AIX cpp loses on an empty file, so make sure it contains at least a newline.
492echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000493
494# A filename unique to this package, relative to the directory that
495# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000496ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000497
498# Find the source files, if location was not specified.
499if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000500 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000501 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000502 ac_prog=$0
503 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
504 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
505 srcdir=$ac_confdir
506 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000507 srcdir=..
508 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000509else
510 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000511fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000512if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000513 if test "$ac_srcdir_defaulted" = yes; then
514 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000515 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000516 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000517 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000518fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000519srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
520
521# Prefer explicitly selected file to automatically selected ones.
522if test -z "$CONFIG_SITE"; then
523 if test "x$prefix" != xNONE; then
524 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
525 else
526 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
527 fi
528fi
529for ac_site_file in $CONFIG_SITE; do
530 if test -r "$ac_site_file"; then
531 echo "loading site script $ac_site_file"
532 . "$ac_site_file"
533 fi
534done
535
536if test -r "$cache_file"; then
537 echo "loading cache $cache_file"
Fred Drake5790be12000-10-09 17:06:13 +0000538 test -f "$cache_file" && . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000539else
540 echo "creating cache $cache_file"
541 > $cache_file
542fi
543
Guido van Rossum7f43da71994-08-01 12:15:30 +0000544ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000545# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000546ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000547ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000548ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000549cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000550
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000551ac_exeext=
552ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000553if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
554 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
555 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
556 ac_n= ac_c='
557' ac_t=' '
558 else
559 ac_n=-n ac_c= ac_t=
560 fi
561else
562 ac_n= ac_c='\c' ac_t=
563fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000564
Guido van Rossum0a516c91994-09-12 10:58:40 +0000565
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000566
Guido van Rossum627b2d71993-12-24 10:39:16 +0000567
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000568# Set VERSION so we only need to edit in one place (i.e., here)
569
Guido van Rossumb9a22a12000-06-30 02:48:53 +0000570VERSION=2.0
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000571
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000572# NEXTSTEP|MacOSX|Darwin stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000573if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000574
575 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +0000576echo "configure:577: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000577 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000578if test "${with_next_archs+set}" = set; then
579 withval="$with_next_archs"
580
Guido van Rossum563e7081996-09-10 18:20:48 +0000581 if test -n "$withval"; then
582 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
583 # GCC does not currently support multi archs on the NeXT
584 with_gcc=no
585 fi
586 echo "$ac_t""$with_next_archs" 1>&6
587
588else
589 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000590fi
591
Guido van Rossum563e7081996-09-10 18:20:48 +0000592
593 if test -z "$MACHDEP"
594 then
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000595 ac_sys_system=`uname -s`
596 if test "$ac_sys_system" = "Darwin" ; then
597 ac_sys_release=`uname -r`
598 else
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000599 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000600 sed -e 's/://' -e 's/\./_/'` && \
601 ac_sys_system=next && ac_sys_release=$4
602 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000603
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000604 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000605 fi
606fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000607
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000608# Check whether --with-next-framework or --without-next-framework was given.
609if test "${with_next_framework+set}" = set; then
610 withval="$with_next_framework"
611 :
612fi
613
614# Check whether --with-dyld or --without-dyld was given.
615if test "${with_dyld+set}" = set; then
616 withval="$with_dyld"
617 :
618fi
619
Guido van Rossum91922671997-10-09 20:24:13 +0000620
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000621# Set name for machine-dependent library files
622
623echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000624echo "configure:625: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000625if test -z "$MACHDEP"
626then
Guido van Rossum563e7081996-09-10 18:20:48 +0000627 ac_sys_system=`uname -s`
Trent Mick635f6fb2000-08-23 21:33:05 +0000628 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000629 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000630 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000631 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000632 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000633 ac_md_system=`echo $ac_sys_system |
634 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
635 ac_md_release=`echo $ac_sys_release |
636 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000637 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000638
Guido van Rossum07397971997-04-29 21:49:50 +0000639 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000640 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000641 esac
642fi
Guido van Rossum91922671997-10-09 20:24:13 +0000643
644#
645# SGI compilers allow the specification of the both the ABI and the
646# ISA on the command line. Depending on the values of these switches,
647# different and often incompatable code will be generated.
648#
649# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
650# thus supply support for various ABI/ISA combinations. The MACHDEP
651# variable is also adjusted.
652#
653
654if test ! -z "$SGI_ABI"
655then
656 CC="cc $SGI_ABI"
657 LDFLAGS="$SGI_ABI $LDFLAGS"
658 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
659fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000660echo "$ac_t""$MACHDEP" 1>&6
661
Guido van Rossum91922671997-10-09 20:24:13 +0000662#
663# CCC is the command that compiles C++ programs
664#
665# Not all make programs have this predefined.
666#
Guido van Rossum95012191999-12-16 17:50:52 +0000667#AC_SUBST(SET_CCC)
668#AC_MSG_CHECKING(CCC)
669#if test -z "$CCC"
670#then
671# case $ac_sys_system in
672# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
673# Linux*) SET_CCC="CCC= g++";;
674# *) SET_CCC=""
675# esac
676#else
677# SET_CCC="CCC= ${CCC}"
678#fi
679#AC_MSG_RESULT($SET_CCC)
Guido van Rossum91922671997-10-09 20:24:13 +0000680
681
Guido van Rossum627b2d71993-12-24 10:39:16 +0000682# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000683echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000684echo "configure:685: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000685# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000686if test "${with_gcc+set}" = set; then
687 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000688
689 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000690 no) CC=cc
691 without_gcc=yes;;
692 yes) CC=gcc
693 without_gcc=no;;
694 *) CC=$withval
695 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000696 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000697else
Guido van Rossume77438c1995-09-13 18:59:59 +0000698
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000699 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000700 OSF1) CC=cc
701 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000702 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000703 case $BE_HOST_CPU in
704 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000705 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000706 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000707 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
708 CCSHARED="UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000709 LDFLAGS="$LDFLAGS -nodup"
710
711 AR="$PWD/BeOS/ar-fake"
712 RANLIB=:
713
714 cat >> confdefs.h <<\EOF
715#define DL_EXPORT_HEADER "dl_export.h"
716EOF
717
718 ;;
719 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000720 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000721 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000722 OPT=-O
723 # Really should use srcdir instead of PWD
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000724 AR="$PWD/BeOS/ar-fake"
725 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000726 ;;
727 *)
Fred Drake5790be12000-10-09 17:06:13 +0000728 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000729 ;;
730 esac
731 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000732 Monterey*)
733 RANLIB=:
734 without_gcc=;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000735 *) without_gcc=no;;
736 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000737fi
738
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000739echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000740
Guido van Rossum95012191999-12-16 17:50:52 +0000741
742
743MAINOBJ=python.o
744echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +0000745echo "configure:746: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000746# Check whether --with-cxx or --without-cxx was given.
747if test "${with_cxx+set}" = set; then
748 withval="$with_cxx"
749
750 case $withval in
751 no) CXX=
752 with_cxx=no;;
753 *) CXX=$withval
754 MAINOBJ=ccpython.o
755 with_cxx=$withval;;
756 esac
757else
758
759 with_cxx=no
760
761fi
762
763echo "$ac_t""$with_cxx" 1>&6
Guido van Rossume1262332000-09-22 19:41:56 +0000764SET_CXX="CXX=$CXX"
Guido van Rossum95012191999-12-16 17:50:52 +0000765
766#AC_MSG_CHECKING(CCC)
767#if test -z "$CCC"
768#then
769# case $ac_sys_system in
770# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
771# Linux*) SET_CCC="CCC= g++";;
772# *) SET_CCC=""
773# esac
774#else
775# SET_CCC="CCC= ${CCC}"
776#fi
777#AC_MSG_RESULT($SET_CCC)
778
Guido van Rossum8b131c51995-03-09 14:10:13 +0000779# If the user switches compilers, we can't believe the cache
780if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
781then
782 { echo "configure: error: cached CC is different -- throw away $cache_file
783(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
784fi
785
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000786# Extract the first word of "gcc", so it can be a program name with args.
787set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000788echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +0000789echo "configure:790: checking for $ac_word" >&5
790if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000791 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792else
793 if test -n "$CC"; then
794 ac_cv_prog_CC="$CC" # Let the user override the test.
795else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000796 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
797 ac_dummy="$PATH"
798 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799 test -z "$ac_dir" && ac_dir=.
800 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000801 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000802 break
803 fi
804 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000806fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000807fi
808CC="$ac_cv_prog_CC"
809if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000810 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000812 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000813fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000814
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000815if test -z "$CC"; then
816 # Extract the first word of "cc", so it can be a program name with args.
817set dummy cc; ac_word=$2
818echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +0000819echo "configure:820: checking for $ac_word" >&5
820if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000821 echo $ac_n "(cached) $ac_c" 1>&6
822else
823 if test -n "$CC"; then
824 ac_cv_prog_CC="$CC" # Let the user override the test.
825else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000826 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000828 ac_dummy="$PATH"
829 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000830 test -z "$ac_dir" && ac_dir=.
831 if test -f $ac_dir/$ac_word; then
832 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
833 ac_prog_rejected=yes
834 continue
835 fi
836 ac_cv_prog_CC="cc"
837 break
838 fi
839 done
840 IFS="$ac_save_ifs"
841if test $ac_prog_rejected = yes; then
842 # We found a bogon in the path, so make sure we never use it.
843 set dummy $ac_cv_prog_CC
844 shift
845 if test $# -gt 0; then
846 # We chose a different compiler from the bogus one.
847 # However, it has the same basename, so the bogon will be chosen
848 # first if we set CC to just the basename; use the full file name.
849 shift
850 set dummy "$ac_dir/$ac_word" "$@"
851 shift
852 ac_cv_prog_CC="$@"
853 fi
854fi
855fi
856fi
857CC="$ac_cv_prog_CC"
858if test -n "$CC"; then
859 echo "$ac_t""$CC" 1>&6
860else
861 echo "$ac_t""no" 1>&6
862fi
863
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000864 if test -z "$CC"; then
865 case "`uname -s`" in
Fred Drake5790be12000-10-09 17:06:13 +0000866 *win32* | *WIN32* | *CYGWIN*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000867 # Extract the first word of "cl", so it can be a program name with args.
868set dummy cl; ac_word=$2
869echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +0000870echo "configure:871: checking for $ac_word" >&5
871if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000872 echo $ac_n "(cached) $ac_c" 1>&6
873else
874 if test -n "$CC"; then
875 ac_cv_prog_CC="$CC" # Let the user override the test.
876else
877 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
878 ac_dummy="$PATH"
879 for ac_dir in $ac_dummy; do
880 test -z "$ac_dir" && ac_dir=.
881 if test -f $ac_dir/$ac_word; then
882 ac_cv_prog_CC="cl"
883 break
884 fi
885 done
886 IFS="$ac_save_ifs"
887fi
888fi
889CC="$ac_cv_prog_CC"
890if test -n "$CC"; then
891 echo "$ac_t""$CC" 1>&6
892else
893 echo "$ac_t""no" 1>&6
894fi
895 ;;
896 esac
897 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
899fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000900
Fred Drake5790be12000-10-09 17:06:13 +0000901echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
902echo "configure:903: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000903
904ac_ext=c
905# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
906ac_cpp='$CPP $CPPFLAGS'
907ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000908ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000909cross_compiling=$ac_cv_prog_cc_cross
910
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000911cat > conftest.$ac_ext << EOF
912
Fred Drake5790be12000-10-09 17:06:13 +0000913#line 914 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000914#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000915
Guido van Rossumf78abae1997-01-21 22:02:36 +0000916main(){return(0);}
917EOF
Fred Drake5790be12000-10-09 17:06:13 +0000918if { (eval echo configure:919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000919 ac_cv_prog_cc_works=yes
920 # If we can't run a trivial program, we are probably using a cross compiler.
921 if (./conftest; exit) 2>/dev/null; then
922 ac_cv_prog_cc_cross=no
923 else
924 ac_cv_prog_cc_cross=yes
925 fi
926else
927 echo "configure: failed program was:" >&5
928 cat conftest.$ac_ext >&5
929 ac_cv_prog_cc_works=no
930fi
931rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000932ac_ext=c
933# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
934ac_cpp='$CPP $CPPFLAGS'
935ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
936ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
937cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000938
939echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
940if test $ac_cv_prog_cc_works = no; then
941 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
942fi
Fred Drake5790be12000-10-09 17:06:13 +0000943echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
944echo "configure:945: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000945echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
946cross_compiling=$ac_cv_prog_cc_cross
947
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000948echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +0000949echo "configure:950: checking whether we are using GNU C" >&5
950if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000951 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952else
953 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000954#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000956#endif
957EOF
Fred Drake5790be12000-10-09 17:06:13 +0000958if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 ac_cv_prog_gcc=yes
960else
961 ac_cv_prog_gcc=no
962fi
963fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000965echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000966
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967if test $ac_cv_prog_gcc = yes; then
968 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000969else
970 GCC=
971fi
972
973ac_test_CFLAGS="${CFLAGS+set}"
974ac_save_CFLAGS="$CFLAGS"
975CFLAGS=
976echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +0000977echo "configure:978: checking whether ${CC-cc} accepts -g" >&5
978if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000979 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000980else
981 echo 'void f(){}' > conftest.c
982if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000983 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000985 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000986fi
987rm -f conftest*
988
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000989fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000990
Guido van Rossumf78abae1997-01-21 22:02:36 +0000991echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000992if test "$ac_test_CFLAGS" = set; then
993 CFLAGS="$ac_save_CFLAGS"
994elif test $ac_cv_prog_cc_g = yes; then
995 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000996 CFLAGS="-g -O2"
997 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000998 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000999 fi
1000else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001001 if test "$GCC" = yes; then
1002 CFLAGS="-O2"
1003 else
1004 CFLAGS=
1005 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001006fi
1007
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001008
Guido van Rossumff555e32000-09-22 15:38:21 +00001009echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001010echo "configure:1011: checking for --with-suffix" >&5
Guido van Rossumff555e32000-09-22 15:38:21 +00001011# Check whether --with-suffix or --without-suffix was given.
1012if test "${with_suffix+set}" = set; then
1013 withval="$with_suffix"
1014
1015 case $withval in
1016 no) EXE=;;
1017 yes) EXE=.exe;;
1018 *) EXE=$withval;;
1019 esac
1020fi
1021
1022echo "$ac_t""$EXE" 1>&6
1023
Guido van Rossumdd997f71998-10-07 19:58:26 +00001024case $MACHDEP in
1025bsdos*)
1026 case $CC in
1027 gcc) CC="$CC -D_HAVE_BSDI";;
1028 esac;;
1029esac
1030
Guido van Rossum24b1e751997-08-21 02:29:16 +00001031case $ac_sys_system in
1032hp*|HP*)
1033 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001034 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001035 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001036Monterey*)
1037 case $CC in
1038 cc) CC="$CC -Wl,-Bexport";;
1039 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001040esac
1041
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001042# LDLIBRARY is the name of the library to link against (as opposed to the
1043# name of the library into which to insert object files). On systems
1044# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
1045# the Makefiles).
1046
1047
1048LDLIBRARY=''
1049
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001050# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001051# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001052# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001053
1054echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001055echo "configure:1056: checking LINKCC" >&5
Guido van Rossum95012191999-12-16 17:50:52 +00001056if test -z "$LINKCC" -a ! -z "$CXX"
1057then
1058 LINKCC="$CXX"
1059fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001060if test -z "$LINKCC"
1061then
1062 case $ac_sys_system in
1063 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001064 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001065 dgux*)
1066 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001067 Monterey64*)
1068 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001069 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001070 esac
1071fi
1072echo "$ac_t""$LINKCC" 1>&6
1073
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001074echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001075echo "configure:1076: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001076
1077# NeXT framework builds require that the 'ar' library be converted into
1078# a bundle using libtool.
1079if test "$with_next_framework"
1080then
1081 LDLIBRARY='libpython$(VERSION).dylib'
1082fi
1083
1084# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001085case $MACHDEP in
1086dguxR4)
1087 LDLIBRARY='libpython$(VERSION).so'
1088 OPT="$OPT -pic"
1089 ;;
1090beos*)
1091 LDLIBRARY='libpython$(VERSION).so'
1092 ;;
1093esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001094echo "$ac_t""$LDLIBRARY" 1>&6
1095
1096# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1097if test -z "$LDLIBRARY"
1098then
1099 LDLIBRARY='libpython$(VERSION).a'
1100 MAKE_LDLIBRARY="true"
1101else
1102 MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
1103fi
1104
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105# Extract the first word of "ranlib", so it can be a program name with args.
1106set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001107echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001108echo "configure:1109: checking for $ac_word" >&5
1109if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001110 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001111else
1112 if test -n "$RANLIB"; then
1113 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1114else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001115 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1116 ac_dummy="$PATH"
1117 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118 test -z "$ac_dir" && ac_dir=.
1119 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001120 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001121 break
1122 fi
1123 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001125 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001126fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127fi
1128RANLIB="$ac_cv_prog_RANLIB"
1129if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001130 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001131else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001132 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001133fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001134
1135
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136for ac_prog in ar aal
1137do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138# Extract the first word of "$ac_prog", so it can be a program name with args.
1139set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001140echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001141echo "configure:1142: checking for $ac_word" >&5
1142if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001143 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144else
1145 if test -n "$AR"; then
1146 ac_cv_prog_AR="$AR" # Let the user override the test.
1147else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001148 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1149 ac_dummy="$PATH"
1150 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151 test -z "$ac_dir" && ac_dir=.
1152 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001153 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154 break
1155 fi
1156 done
1157 IFS="$ac_save_ifs"
1158fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001159fi
1160AR="$ac_cv_prog_AR"
1161if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001162 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001163else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001164 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001165fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
1167test -n "$AR" && break
1168done
1169test -n "$AR" || AR="ar"
1170
1171
Guido van Rossumda88dad1995-01-26 00:46:29 +00001172
1173
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001174# Install just never works :-(
1175if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001176then
1177 INSTALL=cp
1178 INSTALL_PROGRAM=cp
1179 INSTALL_DATA=cp
1180else
1181 INSTALL_PROGRAM="$INSTALL"
1182 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001183fi
1184
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001185# Not every filesystem supports hard links
1186
1187if test -z "$LN" ; then
1188 case $ac_sys_system in
1189 BeOS*) LN="ln -s";;
1190 *) LN=ln;;
1191 esac
1192fi
1193
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001194# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001195
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001196if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001197then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001198 case $GCC in
1199 yes)
1200 case $ac_cv_prog_cc_g in
1201 yes) OPT="-g -O2";;
1202 *) OPT="-O2";;
1203 esac
1204 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001205 *) OPT="-O";;
1206 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001207fi
1208
Trent Mick635f6fb2000-08-23 21:33:05 +00001209# The current (beta) Monterey compiler dies with optimizations
1210case $ac_sys_system in
1211Monterey*) OPT="";;
1212esac
1213
Guido van Rossum563e7081996-09-10 18:20:48 +00001214if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001215then
1216 OPT="$OPT $ac_arch_flags"
1217fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001218# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001219echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001220echo "configure:1221: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001221# On Suns, sometimes $CPP names a directory.
1222if test -n "$CPP" && test -d "$CPP"; then
1223 CPP=
1224fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001225if test -z "$CPP"; then
Fred Drake5790be12000-10-09 17:06:13 +00001226if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001227 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001228else
1229 # This must be in double quotes, not single quotes, because CPP may get
1230 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001231 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001232 # On the NeXT, cc -E runs the code through the compiler's parser,
1233 # not just through cpp.
1234 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001235#line 1236 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001237#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238Syntax Error
1239EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001240ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake5790be12000-10-09 17:06:13 +00001241{ (eval echo configure:1242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001242ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1243if test -z "$ac_err"; then
1244 :
1245else
1246 echo "$ac_err" >&5
1247 echo "configure: failed program was:" >&5
1248 cat conftest.$ac_ext >&5
1249 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001250 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001251 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001252#line 1253 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001253#include "confdefs.h"
1254#include <assert.h>
1255Syntax Error
1256EOF
1257ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake5790be12000-10-09 17:06:13 +00001258{ (eval echo configure:1259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001259ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001261 :
1262else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001263 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001264 echo "configure: failed program was:" >&5
1265 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001266 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001267 CPP="${CC-cc} -nologo -E"
1268 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001269#line 1270 "configure"
Guido van Rossumff555e32000-09-22 15:38:21 +00001270#include "confdefs.h"
1271#include <assert.h>
1272Syntax Error
1273EOF
1274ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake5790be12000-10-09 17:06:13 +00001275{ (eval echo configure:1276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumff555e32000-09-22 15:38:21 +00001276ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1277if test -z "$ac_err"; then
1278 :
1279else
1280 echo "$ac_err" >&5
1281 echo "configure: failed program was:" >&5
1282 cat conftest.$ac_ext >&5
1283 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001284 CPP=/lib/cpp
1285fi
1286rm -f conftest*
1287fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001288rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001289fi
1290rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001291 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001292fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001293 CPP="$ac_cv_prog_CPP"
1294else
1295 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001296fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001297echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001298
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001299echo $ac_n "checking for AIX""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001300echo "configure:1301: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001301cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001302#line 1303 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303#include "confdefs.h"
1304#ifdef _AIX
1305 yes
1306#endif
1307
1308EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001309if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1310 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001312 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001313#define _ALL_SOURCE 1
1314EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316else
1317 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001318 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319fi
1320rm -f conftest*
1321
1322
Guido van Rossumf78abae1997-01-21 22:02:36 +00001323ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001324echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001325echo "configure:1326: checking for minix/config.h" >&5
1326if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001327 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001328else
1329 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001330#line 1331 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001331#include "confdefs.h"
1332#include <minix/config.h>
1333EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001334ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake5790be12000-10-09 17:06:13 +00001335{ (eval echo configure:1336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001336ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001337if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001338 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001339 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001340else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001341 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001342 echo "configure: failed program was:" >&5
1343 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001344 rm -rf conftest*
1345 eval "ac_cv_header_$ac_safe=no"
1346fi
1347rm -f conftest*
1348fi
1349if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001350 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001351 MINIX=yes
1352else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001353 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001354MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001355fi
1356
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001357if test "$MINIX" = yes; then
1358 cat >> confdefs.h <<\EOF
1359#define _POSIX_SOURCE 1
1360EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001361
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001362 cat >> confdefs.h <<\EOF
1363#define _POSIX_1_SOURCE 2
1364EOF
1365
1366 cat >> confdefs.h <<\EOF
1367#define _MINIX 1
1368EOF
1369
1370fi
1371
Guido van Rossumda88dad1995-01-26 00:46:29 +00001372
Guido van Rossum91922671997-10-09 20:24:13 +00001373echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001374echo "configure:1375: checking whether $CC accepts -OPT:Olimit=0" >&5
1375if eval "test \"\${ac_cv_opt_olimit_ok+set}\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001376 echo $ac_n "(cached) $ac_c" 1>&6
1377else
1378 ac_save_cc="$CC"
1379CC="$CC -OPT:Olimit=0"
1380if test "$cross_compiling" = yes; then
1381 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1382else
1383 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001384#line 1385 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001385#include "confdefs.h"
1386int main() { return 0; }
1387EOF
Fred Drake5790be12000-10-09 17:06:13 +00001388if { (eval echo configure:1389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossum91922671997-10-09 20:24:13 +00001389then
1390 ac_cv_opt_olimit_ok=yes
1391else
1392 echo "configure: failed program was:" >&5
1393 cat conftest.$ac_ext >&5
1394 rm -fr conftest*
1395 ac_cv_opt_olimit_ok=no
1396fi
1397rm -fr conftest*
1398fi
1399
1400CC="$ac_save_cc"
1401fi
1402
1403echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001404if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001405 OPT="$OPT -OPT:Olimit=0"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001406else
1407 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001408echo "configure:1409: checking whether $CC accepts -Olimit 1500" >&5
1409 if eval "test \"\${ac_cv_olimit_ok+set}\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001410 echo $ac_n "(cached) $ac_c" 1>&6
1411else
1412 ac_save_cc="$CC"
1413 CC="$CC -Olimit 1500"
1414 if test "$cross_compiling" = yes; then
1415 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1416else
1417 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001418#line 1419 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001419#include "confdefs.h"
1420int main() { return 0; }
1421EOF
Fred Drake5790be12000-10-09 17:06:13 +00001422if { (eval echo configure:1423: \"$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 +00001423then
1424 ac_cv_olimit_ok=yes
1425else
1426 echo "configure: failed program was:" >&5
1427 cat conftest.$ac_ext >&5
1428 rm -fr conftest*
1429 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001430fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001431rm -fr conftest*
1432fi
1433
1434 CC="$ac_save_cc"
1435fi
1436
1437 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1438 if test $ac_cv_olimit_ok = yes; then
1439 OPT="$OPT -Olimit 1500"
1440 fi
1441fi
1442
Guido van Rossum84e7b241996-08-19 21:59:00 +00001443
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001444# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001445echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001446echo "configure:1447: checking for ANSI C header files" >&5
1447if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001448 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001449else
1450 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001451#line 1452 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001452#include "confdefs.h"
1453#include <stdlib.h>
1454#include <stdarg.h>
1455#include <string.h>
1456#include <float.h>
1457EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001458ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake5790be12000-10-09 17:06:13 +00001459{ (eval echo configure:1460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001460ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001461if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001462 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001463 ac_cv_header_stdc=yes
1464else
1465 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001466 echo "configure: failed program was:" >&5
1467 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001468 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001469 ac_cv_header_stdc=no
1470fi
1471rm -f conftest*
1472
1473if test $ac_cv_header_stdc = yes; then
1474 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1475cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001476#line 1477 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001477#include "confdefs.h"
1478#include <string.h>
1479EOF
1480if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1481 egrep "memchr" >/dev/null 2>&1; then
1482 :
1483else
1484 rm -rf conftest*
1485 ac_cv_header_stdc=no
1486fi
1487rm -f conftest*
1488
1489fi
1490
1491if test $ac_cv_header_stdc = yes; then
1492 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1493cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001494#line 1495 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001495#include "confdefs.h"
1496#include <stdlib.h>
1497EOF
1498if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1499 egrep "free" >/dev/null 2>&1; then
1500 :
1501else
1502 rm -rf conftest*
1503 ac_cv_header_stdc=no
1504fi
1505rm -f conftest*
1506
1507fi
1508
1509if test $ac_cv_header_stdc = yes; then
1510 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1511if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001512 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001513else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001514 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001515#line 1516 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001516#include "confdefs.h"
1517#include <ctype.h>
1518#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1519#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001520#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001521int main () { int i; for (i = 0; i < 256; i++)
1522if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1523exit (0); }
1524
1525EOF
Fred Drake5790be12000-10-09 17:06:13 +00001526if { (eval echo configure:1527: \"$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 +00001527then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001528 :
1529else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001530 echo "configure: failed program was:" >&5
1531 cat conftest.$ac_ext >&5
1532 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001533 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001534fi
1535rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001536fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001537
1538fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001539fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001540
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001541echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001542if test $ac_cv_header_stdc = yes; then
1543 cat >> confdefs.h <<\EOF
1544#define STDC_HEADERS 1
1545EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001546
1547fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001548
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00001549for 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 +00001550signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Fred Drakea50d6ec2000-08-31 16:13:20 +00001551sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001552sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00001553sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
1554ndbm.h db1/ndbm.h gdbm/ndbm.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001555do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001556ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001557echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001558echo "configure:1559: checking for $ac_hdr" >&5
1559if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001560 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001561else
1562 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001563#line 1564 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001564#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001565#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001566EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001567ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake5790be12000-10-09 17:06:13 +00001568{ (eval echo configure:1569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001569ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001570if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001571 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001572 eval "ac_cv_header_$ac_safe=yes"
1573else
1574 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001575 echo "configure: failed program was:" >&5
1576 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001577 rm -rf conftest*
1578 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001579fi
1580rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001581fi
1582if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001583 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001584 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001585 cat >> confdefs.h <<EOF
1586#define $ac_tr_hdr 1
1587EOF
1588
1589else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001590 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001591fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001592done
1593
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001594ac_header_dirent=no
1595for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1596do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001597ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001598echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001599echo "configure:1600: checking for $ac_hdr that defines DIR" >&5
1600if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001601 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001602else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001603 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001604#line 1605 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001605#include "confdefs.h"
1606#include <sys/types.h>
1607#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001608int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001609DIR *dirp = 0;
1610; return 0; }
1611EOF
Fred Drake5790be12000-10-09 17:06:13 +00001612if { (eval echo configure:1613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001613 rm -rf conftest*
1614 eval "ac_cv_header_dirent_$ac_safe=yes"
1615else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001616 echo "configure: failed program was:" >&5
1617 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001618 rm -rf conftest*
1619 eval "ac_cv_header_dirent_$ac_safe=no"
1620fi
1621rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001622fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001623if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001624 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001625 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001626 cat >> confdefs.h <<EOF
1627#define $ac_tr_hdr 1
1628EOF
1629 ac_header_dirent=$ac_hdr; break
1630else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001631 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001632fi
1633done
1634# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1635if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001636echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001637echo "configure:1638: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001638ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Fred Drake5790be12000-10-09 17:06:13 +00001639if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001640 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001641else
1642 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001643LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001644cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001645#line 1646 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001646#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001647/* Override any gcc2 internal prototype to avoid an error. */
1648/* We use char because int might match the return type of a gcc2
1649 builtin and then its argument prototype would still apply. */
1650char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001651
Guido van Rossumf78abae1997-01-21 22:02:36 +00001652int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001653opendir()
1654; return 0; }
1655EOF
Fred Drake5790be12000-10-09 17:06:13 +00001656if { (eval echo configure:1657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001657 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001658 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001659else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001660 echo "configure: failed program was:" >&5
1661 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001662 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001663 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001664fi
1665rm -f conftest*
1666LIBS="$ac_save_LIBS"
1667
1668fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001669if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001670 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001671 LIBS="$LIBS -ldir"
1672else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001673 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001674fi
1675
1676else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001677echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001678echo "configure:1679: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001679ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Fred Drake5790be12000-10-09 17:06:13 +00001680if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001681 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001682else
1683 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001684LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001686#line 1687 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001687#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001688/* Override any gcc2 internal prototype to avoid an error. */
1689/* We use char because int might match the return type of a gcc2
1690 builtin and then its argument prototype would still apply. */
1691char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001692
Guido van Rossumf78abae1997-01-21 22:02:36 +00001693int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001694opendir()
1695; return 0; }
1696EOF
Fred Drake5790be12000-10-09 17:06:13 +00001697if { (eval echo configure:1698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001698 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001699 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001700else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001701 echo "configure: failed program was:" >&5
1702 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001704 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001705fi
1706rm -f conftest*
1707LIBS="$ac_save_LIBS"
1708
1709fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001710if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001711 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712 LIBS="$LIBS -lx"
1713else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001714 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001715fi
1716
1717fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001718
1719
1720# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001721was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001722echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001723echo "configure:1724: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001724cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001725#line 1726 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001726#include "confdefs.h"
1727#include <time.h>
1728EOF
1729if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1730 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001731 rm -rf conftest*
1732 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001733else
1734 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001735 cat >> confdefs.h <<\EOF
1736#define clock_t long
1737EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001738
1739fi
1740rm -f conftest*
1741
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001742echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001743
Guido van Rossum84e7b241996-08-19 21:59:00 +00001744# Add some code to confdefs.h so that the test for off_t works on SCO
1745cat >> confdefs.h <<\EOF
1746#if defined(SCO_DS)
1747#undef _OFF_T
1748#endif
1749EOF
1750
Guido van Rossumef2255b2000-03-10 22:30:29 +00001751# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001752echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001753echo "configure:1754: checking for mode_t" >&5
1754if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001755 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001756else
1757 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001758#line 1759 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001759#include "confdefs.h"
1760#include <sys/types.h>
1761#if STDC_HEADERS
1762#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001763#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001764#endif
1765EOF
1766if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001767 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 +00001768 rm -rf conftest*
Fred Drake5790be12000-10-09 17:06:13 +00001769 eval "ac_cv_type_mode_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001770else
1771 rm -rf conftest*
Fred Drake5790be12000-10-09 17:06:13 +00001772 eval "ac_cv_type_mode_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001773fi
1774rm -f conftest*
1775
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001776fi
Fred Drake5790be12000-10-09 17:06:13 +00001777if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
1778 echo "$ac_t""yes" 1>&6
1779else
1780 echo "$ac_t""no" 1>&6
1781 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001782#define mode_t int
1783EOF
1784
1785fi
1786
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001787echo $ac_n "checking for off_t""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001788echo "configure:1789: checking for off_t" >&5
1789if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001790 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001791else
1792 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001793#line 1794 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001794#include "confdefs.h"
1795#include <sys/types.h>
1796#if STDC_HEADERS
1797#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001798#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001799#endif
1800EOF
1801if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001802 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 +00001803 rm -rf conftest*
Fred Drake5790be12000-10-09 17:06:13 +00001804 eval "ac_cv_type_off_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001805else
1806 rm -rf conftest*
Fred Drake5790be12000-10-09 17:06:13 +00001807 eval "ac_cv_type_off_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001808fi
1809rm -f conftest*
1810
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811fi
Fred Drake5790be12000-10-09 17:06:13 +00001812if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
1813 echo "$ac_t""yes" 1>&6
1814else
1815 echo "$ac_t""no" 1>&6
1816 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001817#define off_t long
1818EOF
1819
1820fi
1821
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001822echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001823echo "configure:1824: checking for pid_t" >&5
1824if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001825 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001826else
1827 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001828#line 1829 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001829#include "confdefs.h"
1830#include <sys/types.h>
1831#if STDC_HEADERS
1832#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001833#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001834#endif
1835EOF
1836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001837 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 +00001838 rm -rf conftest*
Fred Drake5790be12000-10-09 17:06:13 +00001839 eval "ac_cv_type_pid_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001840else
1841 rm -rf conftest*
Fred Drake5790be12000-10-09 17:06:13 +00001842 eval "ac_cv_type_pid_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001843fi
1844rm -f conftest*
1845
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001846fi
Fred Drake5790be12000-10-09 17:06:13 +00001847if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
1848 echo "$ac_t""yes" 1>&6
1849else
1850 echo "$ac_t""no" 1>&6
1851 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001852#define pid_t int
1853EOF
1854
1855fi
1856
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001857echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001858echo "configure:1859: checking return type of signal handlers" >&5
1859if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001860 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001861else
1862 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001863#line 1864 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001864#include "confdefs.h"
1865#include <sys/types.h>
1866#include <signal.h>
1867#ifdef signal
1868#undef signal
1869#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001870#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001871extern "C" void (*signal (int, void (*)(int)))(int);
1872#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001873void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001874#endif
1875
Guido van Rossumf78abae1997-01-21 22:02:36 +00001876int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001877int i;
1878; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001879EOF
Fred Drake5790be12000-10-09 17:06:13 +00001880if { (eval echo configure:1881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001881 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001882 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001883else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001884 echo "configure: failed program was:" >&5
1885 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001886 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001887 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001888fi
1889rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001890fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001891
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001892echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001893cat >> confdefs.h <<EOF
1894#define RETSIGTYPE $ac_cv_type_signal
1895EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001896
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001897
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001898echo $ac_n "checking for size_t""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001899echo "configure:1900: checking for size_t" >&5
1900if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001901 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001902else
1903 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001904#line 1905 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001905#include "confdefs.h"
1906#include <sys/types.h>
1907#if STDC_HEADERS
1908#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001909#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001910#endif
1911EOF
1912if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001913 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 +00001914 rm -rf conftest*
Fred Drake5790be12000-10-09 17:06:13 +00001915 eval "ac_cv_type_size_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001916else
1917 rm -rf conftest*
Fred Drake5790be12000-10-09 17:06:13 +00001918 eval "ac_cv_type_size_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001919fi
1920rm -f conftest*
1921
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001922fi
Fred Drake5790be12000-10-09 17:06:13 +00001923if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
1924 echo "$ac_t""yes" 1>&6
1925else
1926 echo "$ac_t""no" 1>&6
1927 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001928#define size_t unsigned
1929EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001930
1931fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001932
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001933echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001934echo "configure:1935: checking for uid_t in sys/types.h" >&5
1935if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001936 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001937else
1938 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001939#line 1940 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001940#include "confdefs.h"
1941#include <sys/types.h>
1942EOF
1943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1944 egrep "uid_t" >/dev/null 2>&1; then
1945 rm -rf conftest*
1946 ac_cv_type_uid_t=yes
1947else
1948 rm -rf conftest*
1949 ac_cv_type_uid_t=no
1950fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001951rm -f conftest*
1952
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001953fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001954
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001955echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001956if test $ac_cv_type_uid_t = no; then
1957 cat >> confdefs.h <<\EOF
1958#define uid_t int
1959EOF
1960
1961 cat >> confdefs.h <<\EOF
1962#define gid_t int
1963EOF
1964
1965fi
1966
Guido van Rossum627b2d71993-12-24 10:39:16 +00001967
Guido van Rossumef2255b2000-03-10 22:30:29 +00001968# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001969echo $ac_n "checking size of int""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00001970echo "configure:1971: checking size of int" >&5
1971if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001972 echo $ac_n "(cached) $ac_c" 1>&6
1973else
1974 if test "$cross_compiling" = yes; then
1975 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1976else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001977 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00001978#line 1979 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001979#include "confdefs.h"
1980#include <stdio.h>
1981main()
1982{
1983 FILE *f=fopen("conftestval", "w");
1984 if (!f) exit(1);
1985 fprintf(f, "%d\n", sizeof(int));
1986 exit(0);
1987}
1988EOF
Fred Drake5790be12000-10-09 17:06:13 +00001989if { (eval echo configure:1990: \"$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 +00001990then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001991 ac_cv_sizeof_int=`cat conftestval`
1992else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001993 echo "configure: failed program was:" >&5
1994 cat conftest.$ac_ext >&5
1995 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001996 ac_cv_sizeof_int=0
1997fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001998rm -fr conftest*
1999fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002000
2001fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002002echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2003cat >> confdefs.h <<EOF
2004#define SIZEOF_INT $ac_cv_sizeof_int
2005EOF
2006
2007
2008echo $ac_n "checking size of long""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002009echo "configure:2010: checking size of long" >&5
2010if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002011 echo $ac_n "(cached) $ac_c" 1>&6
2012else
2013 if test "$cross_compiling" = yes; then
2014 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2015else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002016 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002017#line 2018 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002018#include "confdefs.h"
2019#include <stdio.h>
2020main()
2021{
2022 FILE *f=fopen("conftestval", "w");
2023 if (!f) exit(1);
2024 fprintf(f, "%d\n", sizeof(long));
2025 exit(0);
2026}
2027EOF
Fred Drake5790be12000-10-09 17:06:13 +00002028if { (eval echo configure:2029: \"$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 +00002029then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002030 ac_cv_sizeof_long=`cat conftestval`
2031else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002032 echo "configure: failed program was:" >&5
2033 cat conftest.$ac_ext >&5
2034 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002035 ac_cv_sizeof_long=0
2036fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002037rm -fr conftest*
2038fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002039
2040fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002041echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2042cat >> confdefs.h <<EOF
2043#define SIZEOF_LONG $ac_cv_sizeof_long
2044EOF
2045
2046
Guido van Rossumad678af1998-10-02 14:42:15 +00002047echo $ac_n "checking size of void *""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002048echo "configure:2049: checking size of void *" >&5
2049if eval "test \"\${ac_cv_sizeof_void_p+set}\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002050 echo $ac_n "(cached) $ac_c" 1>&6
2051else
2052 if test "$cross_compiling" = yes; then
2053 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2054else
2055 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002056#line 2057 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002057#include "confdefs.h"
2058#include <stdio.h>
2059main()
2060{
2061 FILE *f=fopen("conftestval", "w");
2062 if (!f) exit(1);
2063 fprintf(f, "%d\n", sizeof(void *));
2064 exit(0);
2065}
2066EOF
Fred Drake5790be12000-10-09 17:06:13 +00002067if { (eval echo configure:2068: \"$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 +00002068then
2069 ac_cv_sizeof_void_p=`cat conftestval`
2070else
2071 echo "configure: failed program was:" >&5
2072 cat conftest.$ac_ext >&5
2073 rm -fr conftest*
2074 ac_cv_sizeof_void_p=0
2075fi
2076rm -fr conftest*
2077fi
2078
2079fi
2080echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2081cat >> confdefs.h <<EOF
2082#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2083EOF
2084
2085
Guido van Rossumef2255b2000-03-10 22:30:29 +00002086echo $ac_n "checking size of char""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002087echo "configure:2088: checking size of char" >&5
2088if eval "test \"\${ac_cv_sizeof_char+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002089 echo $ac_n "(cached) $ac_c" 1>&6
2090else
2091 if test "$cross_compiling" = yes; then
2092 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2093else
2094 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002095#line 2096 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002096#include "confdefs.h"
2097#include <stdio.h>
2098main()
2099{
2100 FILE *f=fopen("conftestval", "w");
2101 if (!f) exit(1);
2102 fprintf(f, "%d\n", sizeof(char));
2103 exit(0);
2104}
2105EOF
Fred Drake5790be12000-10-09 17:06:13 +00002106if { (eval echo configure:2107: \"$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 +00002107then
2108 ac_cv_sizeof_char=`cat conftestval`
2109else
2110 echo "configure: failed program was:" >&5
2111 cat conftest.$ac_ext >&5
2112 rm -fr conftest*
2113 ac_cv_sizeof_char=0
2114fi
2115rm -fr conftest*
2116fi
2117
2118fi
2119echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2120cat >> confdefs.h <<EOF
2121#define SIZEOF_CHAR $ac_cv_sizeof_char
2122EOF
2123
2124
2125echo $ac_n "checking size of short""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002126echo "configure:2127: checking size of short" >&5
2127if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002128 echo $ac_n "(cached) $ac_c" 1>&6
2129else
2130 if test "$cross_compiling" = yes; then
2131 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2132else
2133 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002134#line 2135 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002135#include "confdefs.h"
2136#include <stdio.h>
2137main()
2138{
2139 FILE *f=fopen("conftestval", "w");
2140 if (!f) exit(1);
2141 fprintf(f, "%d\n", sizeof(short));
2142 exit(0);
2143}
2144EOF
Fred Drake5790be12000-10-09 17:06:13 +00002145if { (eval echo configure:2146: \"$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 +00002146then
2147 ac_cv_sizeof_short=`cat conftestval`
2148else
2149 echo "configure: failed program was:" >&5
2150 cat conftest.$ac_ext >&5
2151 rm -fr conftest*
2152 ac_cv_sizeof_short=0
2153fi
2154rm -fr conftest*
2155fi
2156
2157fi
2158echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2159cat >> confdefs.h <<EOF
2160#define SIZEOF_SHORT $ac_cv_sizeof_short
2161EOF
2162
2163
2164echo $ac_n "checking size of float""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002165echo "configure:2166: checking size of float" >&5
2166if eval "test \"\${ac_cv_sizeof_float+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002167 echo $ac_n "(cached) $ac_c" 1>&6
2168else
2169 if test "$cross_compiling" = yes; then
2170 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2171else
2172 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002173#line 2174 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002174#include "confdefs.h"
2175#include <stdio.h>
2176main()
2177{
2178 FILE *f=fopen("conftestval", "w");
2179 if (!f) exit(1);
2180 fprintf(f, "%d\n", sizeof(float));
2181 exit(0);
2182}
2183EOF
Fred Drake5790be12000-10-09 17:06:13 +00002184if { (eval echo configure:2185: \"$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 +00002185then
2186 ac_cv_sizeof_float=`cat conftestval`
2187else
2188 echo "configure: failed program was:" >&5
2189 cat conftest.$ac_ext >&5
2190 rm -fr conftest*
2191 ac_cv_sizeof_float=0
2192fi
2193rm -fr conftest*
2194fi
2195
2196fi
2197echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2198cat >> confdefs.h <<EOF
2199#define SIZEOF_FLOAT $ac_cv_sizeof_float
2200EOF
2201
2202
2203echo $ac_n "checking size of double""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002204echo "configure:2205: checking size of double" >&5
2205if eval "test \"\${ac_cv_sizeof_double+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002206 echo $ac_n "(cached) $ac_c" 1>&6
2207else
2208 if test "$cross_compiling" = yes; then
2209 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2210else
2211 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002212#line 2213 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002213#include "confdefs.h"
2214#include <stdio.h>
2215main()
2216{
2217 FILE *f=fopen("conftestval", "w");
2218 if (!f) exit(1);
2219 fprintf(f, "%d\n", sizeof(double));
2220 exit(0);
2221}
2222EOF
Fred Drake5790be12000-10-09 17:06:13 +00002223if { (eval echo configure:2224: \"$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 +00002224then
2225 ac_cv_sizeof_double=`cat conftestval`
2226else
2227 echo "configure: failed program was:" >&5
2228 cat conftest.$ac_ext >&5
2229 rm -fr conftest*
2230 ac_cv_sizeof_double=0
2231fi
2232rm -fr conftest*
2233fi
2234
2235fi
2236echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2237cat >> confdefs.h <<EOF
2238#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2239EOF
2240
2241
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002242echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002243echo "configure:2244: checking size of fpos_t" >&5
2244if eval "test \"\${ac_cv_sizeof_fpos_t+set}\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002245 echo $ac_n "(cached) $ac_c" 1>&6
2246else
2247 if test "$cross_compiling" = yes; then
2248 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2249else
2250 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002251#line 2252 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002252#include "confdefs.h"
2253#include <stdio.h>
2254main()
2255{
2256 FILE *f=fopen("conftestval", "w");
2257 if (!f) exit(1);
2258 fprintf(f, "%d\n", sizeof(fpos_t));
2259 exit(0);
2260}
2261EOF
Fred Drake5790be12000-10-09 17:06:13 +00002262if { (eval echo configure:2263: \"$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 +00002263then
2264 ac_cv_sizeof_fpos_t=`cat conftestval`
2265else
2266 echo "configure: failed program was:" >&5
2267 cat conftest.$ac_ext >&5
2268 rm -fr conftest*
2269 ac_cv_sizeof_fpos_t=0
2270fi
2271rm -fr conftest*
2272fi
2273
2274fi
2275echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2276cat >> confdefs.h <<EOF
2277#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2278EOF
2279
2280
Guido van Rossum0a516c91994-09-12 10:58:40 +00002281
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002282echo $ac_n "checking for long long support""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002283echo "configure:2284: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002284have_long_long=no
2285cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002286#line 2287 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002287#include "confdefs.h"
2288
2289int main() {
2290long long x; x = (long long)0;
2291; return 0; }
2292EOF
Fred Drake5790be12000-10-09 17:06:13 +00002293if { (eval echo configure:2294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002294 rm -rf conftest*
2295 cat >> confdefs.h <<\EOF
2296#define HAVE_LONG_LONG 1
2297EOF
2298 have_long_long=yes
2299else
2300 echo "configure: failed program was:" >&5
2301 cat conftest.$ac_ext >&5
2302fi
2303rm -f conftest*
2304echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002305if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002306echo $ac_n "checking size of long long""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002307echo "configure:2308: checking size of long long" >&5
2308if eval "test \"\${ac_cv_sizeof_long_long+set}\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002309 echo $ac_n "(cached) $ac_c" 1>&6
2310else
2311 if test "$cross_compiling" = yes; then
2312 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2313else
2314 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002315#line 2316 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002316#include "confdefs.h"
2317#include <stdio.h>
2318main()
2319{
2320 FILE *f=fopen("conftestval", "w");
2321 if (!f) exit(1);
2322 fprintf(f, "%d\n", sizeof(long long));
2323 exit(0);
2324}
2325EOF
Fred Drake5790be12000-10-09 17:06:13 +00002326if { (eval echo configure:2327: \"$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 +00002327then
2328 ac_cv_sizeof_long_long=`cat conftestval`
2329else
2330 echo "configure: failed program was:" >&5
2331 cat conftest.$ac_ext >&5
2332 rm -fr conftest*
2333 ac_cv_sizeof_long_long=0
2334fi
2335rm -fr conftest*
2336fi
2337
2338fi
2339echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2340cat >> confdefs.h <<EOF
2341#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2342EOF
2343
2344
2345fi
2346
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002347echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002348echo "configure:2349: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002349have_uintptr_t=no
2350cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002351#line 2352 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002352#include "confdefs.h"
2353
2354int main() {
2355uintptr_t x; x = (uintptr_t)0;
2356; return 0; }
2357EOF
Fred Drake5790be12000-10-09 17:06:13 +00002358if { (eval echo configure:2359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002359 rm -rf conftest*
2360 cat >> confdefs.h <<\EOF
2361#define HAVE_UINTPTR_T 1
2362EOF
2363 have_uintptr_t=yes
2364else
2365 echo "configure: failed program was:" >&5
2366 cat conftest.$ac_ext >&5
2367fi
2368rm -f conftest*
2369echo "$ac_t""$have_uintptr_t" 1>&6
2370if test "$have_uintptr_t" = yes ; then
2371echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002372echo "configure:2373: checking size of uintptr_t" >&5
2373if eval "test \"\${ac_cv_sizeof_uintptr_t+set}\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002374 echo $ac_n "(cached) $ac_c" 1>&6
2375else
2376 if test "$cross_compiling" = yes; then
2377 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2378else
2379 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002380#line 2381 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002381#include "confdefs.h"
2382#include <stdio.h>
2383main()
2384{
2385 FILE *f=fopen("conftestval", "w");
2386 if (!f) exit(1);
2387 fprintf(f, "%d\n", sizeof(uintptr_t));
2388 exit(0);
2389}
2390EOF
Fred Drake5790be12000-10-09 17:06:13 +00002391if { (eval echo configure:2392: \"$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 +00002392then
2393 ac_cv_sizeof_uintptr_t=`cat conftestval`
2394else
2395 echo "configure: failed program was:" >&5
2396 cat conftest.$ac_ext >&5
2397 rm -fr conftest*
2398 ac_cv_sizeof_uintptr_t=0
2399fi
2400rm -fr conftest*
2401fi
2402
2403fi
2404echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2405cat >> confdefs.h <<EOF
2406#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2407EOF
2408
2409
2410fi
2411
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002412# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2413echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002414echo "configure:2415: checking size of off_t" >&5
2415if eval "test \"\${ac_cv_sizeof_off_t+set}\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002416 echo $ac_n "(cached) $ac_c" 1>&6
2417else
2418 if test "$cross_compiling" = yes; then
2419 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2420else
2421 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002422#line 2423 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002423#include "confdefs.h"
2424#include <stdio.h>
2425#include <sys/types.h>
2426main()
2427{
2428 FILE *f=fopen("conftestval", "w");
2429 if (!f) exit(1);
2430 fprintf(f, "%d\n", sizeof(off_t));
2431 exit(0);
2432}
2433EOF
Fred Drake5790be12000-10-09 17:06:13 +00002434if { (eval echo configure:2435: \"$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 +00002435then
2436 ac_cv_sizeof_off_t=`cat conftestval`
2437else
2438 echo "configure: failed program was:" >&5
2439 cat conftest.$ac_ext >&5
2440 rm -fr conftest*
2441 ac_cv_sizeof_off_t=0
2442fi
2443rm -fr conftest*
2444fi
2445
2446
2447fi
2448
2449echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2450cat >> confdefs.h <<EOF
2451#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2452EOF
2453
2454
2455echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002456echo "configure:2457: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002457if test "$have_long_long" = yes -a \
2458 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2459 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002460 cat >> confdefs.h <<\EOF
2461#define HAVE_LARGEFILE_SUPPORT 1
2462EOF
2463
2464 echo "$ac_t""yes" 1>&6
2465else
2466 echo "$ac_t""no" 1>&6
2467fi
2468
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002469# AC_CHECK_SIZEOF() doesn't include <time.h>.
2470echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002471echo "configure:2472: checking size of time_t" >&5
2472if eval "test \"\${ac_cv_sizeof_time_t+set}\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002473 echo $ac_n "(cached) $ac_c" 1>&6
2474else
2475 if test "$cross_compiling" = yes; then
2476 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2477else
2478 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002479#line 2480 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002480#include "confdefs.h"
2481#include <stdio.h>
2482#include <time.h>
2483main()
2484{
2485 FILE *f=fopen("conftestval", "w");
2486 if (!f) exit(1);
2487 fprintf(f, "%d\n", sizeof(time_t));
2488 exit(0);
2489}
2490EOF
Fred Drake5790be12000-10-09 17:06:13 +00002491if { (eval echo configure:2492: \"$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 +00002492then
2493 ac_cv_sizeof_time_t=`cat conftestval`
2494else
2495 echo "configure: failed program was:" >&5
2496 cat conftest.$ac_ext >&5
2497 rm -fr conftest*
2498 ac_cv_sizeof_time_t=0
2499fi
2500rm -fr conftest*
2501fi
2502
2503
2504fi
2505
2506echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2507cat >> confdefs.h <<EOF
2508#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2509EOF
2510
2511
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002512
Trent Mick635f6fb2000-08-23 21:33:05 +00002513# if have pthread_t then define SIZEOF_PTHREAD_T
2514echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002515echo "configure:2516: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002516have_pthread_t=no
2517cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002518#line 2519 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002519#include "confdefs.h"
2520#include <pthread.h>
2521int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002522pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002523; return 0; }
2524EOF
Fred Drake5790be12000-10-09 17:06:13 +00002525if { (eval echo configure:2526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002526 rm -rf conftest*
2527 have_pthread_t=yes
2528else
2529 echo "configure: failed program was:" >&5
2530 cat conftest.$ac_ext >&5
2531fi
2532rm -f conftest*
2533echo "$ac_t""$have_pthread_t" 1>&6
2534if test "$have_pthread_t" = yes ; then
2535 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2536 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002537echo "configure:2538: checking size of pthread_t" >&5
2538 if eval "test \"\${ac_cv_sizeof_pthread_t+set}\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002539 echo $ac_n "(cached) $ac_c" 1>&6
2540else
2541 if test "$cross_compiling" = yes; then
2542 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2543else
2544 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002545#line 2546 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002546#include "confdefs.h"
2547#include <stdio.h>
2548 #include <pthread.h>
2549 main()
2550 {
2551 FILE *f=fopen("conftestval", "w");
2552 if (!f) exit(1);
2553 fprintf(f, "%d\n", sizeof(pthread_t));
2554 exit(0);
2555 }
2556EOF
Fred Drake5790be12000-10-09 17:06:13 +00002557if { (eval echo configure:2558: \"$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 +00002558then
2559 ac_cv_sizeof_pthread_t=`cat conftestval`
2560else
2561 echo "configure: failed program was:" >&5
2562 cat conftest.$ac_ext >&5
2563 rm -fr conftest*
2564 ac_cv_sizeof_pthread_t=0
2565fi
2566rm -fr conftest*
2567fi
2568
2569
2570fi
2571
2572 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2573 cat >> confdefs.h <<EOF
2574#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2575EOF
2576
2577fi
2578
2579
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002580# Minor variations in building a framework between NextStep versions 4 and 5
2581
2582case $ac_sys_system/$ac_sys_release in
2583 next/4*)
2584 ns_undef_sym='__environ'
2585 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2586 next/5*)
2587 ns_undef_sym='_environ'
2588 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2589esac
2590
2591echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002592echo "configure:2593: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002593if test "$with_next_framework"
2594then
2595 OPT="$OPT -fno-common"
2596 # -U __environ is needed since bundles don't have access
2597 # to crt0 when built but will always be linked against it
2598 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2599 cat >> confdefs.h <<\EOF
2600#define WITH_NEXT_FRAMEWORK 1
2601EOF
2602
2603 echo "$ac_t""yes" 1>&6
2604else
2605 echo "$ac_t""no" 1>&6
2606fi
2607
2608echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002609echo "configure:2610: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002610if test "$with_next_framework" -o "$with_dyld"
2611then
2612 if test "$with_dyld"
2613 then
2614 echo "$ac_t""yes" 1>&6
2615 else
2616 echo "$ac_t""required for framework build" 1>&6
2617 fi
2618 cat >> confdefs.h <<\EOF
2619#define WITH_DYLD 1
2620EOF
2621
2622 ns_dyld='set'
2623else
2624 echo "$ac_t""no" 1>&6
2625fi
2626
Guido van Rossum0a516c91994-09-12 10:58:40 +00002627# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002628
2629
2630
2631
Guido van Rossum0a516c91994-09-12 10:58:40 +00002632# SO is the extension of shared libraries `(including the dot!)
2633# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002634echo $ac_n "checking SO""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002635echo "configure:2636: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002636if test -z "$SO"
2637then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002638 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002639 hp*|HP*) SO=.sl;;
2640 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002641 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002642fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002643echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002644# LDSHARED is the ld *command* used to create shared library
2645# -- "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 +00002646# (Shared libraries in this instance are shared modules to be loaded into
2647# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002648echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002649echo "configure:2650: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002650if test -z "$LDSHARED"
2651then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002652 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002653 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002654 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002655 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002656 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002657 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00002658 SunOS/5*)
2659 if test "$GCC" = "yes"
2660 then LDSHARED='$(CC) -G'
2661 else LDSHARED="ld -G";
2662 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002663 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002664 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2665 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002666 Darwin/*|next/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002667 if test "$ns_dyld"
2668 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2669 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2670 fi
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002671 if test "$with_next_framework" ; then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002672 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2673 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002674 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002675 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002676 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002677 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002678 NetBSD*)
2679 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2680 then
2681 LDSHARED="cc -shared"
2682 else
2683 LDSHARED="ld -Bshareable"
2684 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002685 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00002686 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00002687 then
2688 LDSHARED="cc -shared ${LDFLAGS}"
2689 else
2690 LDSHARED="ld -Bshareable ${LDFLAGS}"
2691 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002692 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002693 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002694 *) LDSHARED="ld";;
2695 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002696fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002697echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002698# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002699# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002700echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002701echo "configure:2702: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002702if test -z "$CCSHARED"
2703then
Guido van Rossum07397971997-04-29 21:49:50 +00002704 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002705 hp*|HP*) if test "$GCC" = yes;
2706 then CCSHARED="-fpic";
2707 else CCSHARED="+z";
2708 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002709 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002710 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002711 OpenBSD*) CCSHARED="-fpic";;
2712 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002713 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002714 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002715 IRIX*/6*) case $CC in
2716 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002717 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002718 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002719 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002720fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002721echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002722# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002723# the python executable -- this is only needed for a few systems
2724echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002725echo "configure:2726: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002726if test -z "$LINKFORSHARED"
2727then
Guido van Rossum07397971997-04-29 21:49:50 +00002728 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002729 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002730 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002731 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002732 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002733 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002734 # -u libsys_s pulls in all symbols in libsys
2735 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2736 # -u __dummy makes the linker aware of the objc runtime
2737 # in System.framework; otherwise, __objcInit (referenced in
2738 # crt1.o) gets erroneously defined as common, which breaks dynamic
2739 # loading of any modules which reference it in System.framework
2740 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002741 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00002742 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002743 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00002744 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2745 then
2746 LINKFORSHARED="-Wl,--export-dynamic"
2747 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002748 SunOS/5*) case $CC in
2749 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002750 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002751 then
2752 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002753 fi;;
2754 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002755 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002756fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002757echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002758
Guido van Rossum627b2d71993-12-24 10:39:16 +00002759# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002760echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002761echo "configure:2762: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002762ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Fred Drake5790be12000-10-09 17:06:13 +00002763if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002764 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002765else
2766 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002767LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002768cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002769#line 2770 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002770#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002771/* Override any gcc2 internal prototype to avoid an error. */
2772/* We use char because int might match the return type of a gcc2
2773 builtin and then its argument prototype would still apply. */
2774char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002775
Guido van Rossumf78abae1997-01-21 22:02:36 +00002776int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002777dlopen()
2778; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002779EOF
Fred Drake5790be12000-10-09 17:06:13 +00002780if { (eval echo configure:2781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002781 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002782 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002783else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002784 echo "configure: failed program was:" >&5
2785 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002786 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002787 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002788fi
2789rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002790LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002791
Guido van Rossum627b2d71993-12-24 10:39:16 +00002792fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002793if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002794 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002795 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2796 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002797 cat >> confdefs.h <<EOF
2798#define $ac_tr_lib 1
2799EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002800
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002801 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002802
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002803else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002804 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002805fi
2806 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002807echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002808echo "configure:2809: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002809ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Fred Drake5790be12000-10-09 17:06:13 +00002810if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002811 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002812else
2813 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002814LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002815cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002816#line 2817 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002817#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002818/* Override any gcc2 internal prototype to avoid an error. */
2819/* We use char because int might match the return type of a gcc2
2820 builtin and then its argument prototype would still apply. */
2821char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002822
Guido van Rossumf78abae1997-01-21 22:02:36 +00002823int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002824shl_load()
2825; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002826EOF
Fred Drake5790be12000-10-09 17:06:13 +00002827if { (eval echo configure:2828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002828 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002829 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002830else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002831 echo "configure: failed program was:" >&5
2832 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002833 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002834 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002835fi
2836rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002837LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002838
Guido van Rossum627b2d71993-12-24 10:39:16 +00002839fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002840if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002841 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002842 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2843 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002844 cat >> confdefs.h <<EOF
2845#define $ac_tr_lib 1
2846EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002847
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002848 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002849
2850else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002851 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002852fi
2853 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002854
Skip Montanarocb853262000-08-30 22:29:48 +00002855# Check for --with-pydebug
2856echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002857echo "configure:2858: checking for --with-pydebug" >&5
Skip Montanarocb853262000-08-30 22:29:48 +00002858# Check whether --with-pydebug or --without-pydebug was given.
2859if test "${with_pydebug+set}" = set; then
2860 withval="$with_pydebug"
2861
2862if test "$withval" != no
2863then cat >> confdefs.h <<\EOF
2864#define Py_DEBUG 1
2865EOF
2866 echo "$ac_t""yes" 1>&6
2867else echo "$ac_t""no" 1>&6
2868fi
2869else
2870 echo "$ac_t""no" 1>&6
2871fi
2872
2873
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002874# checks for system dependent C++ extensions support
2875case "$ac_sys_system" in
2876 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002877echo "configure:2878: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002878 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002879#line 2880 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002880#include "confdefs.h"
2881#include "/usr/lpp/xlC/include/load.h"
2882int main() {
2883loadAndInit("", 0, "")
2884; return 0; }
2885EOF
Fred Drake5790be12000-10-09 17:06:13 +00002886if { (eval echo configure:2887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002887 rm -rf conftest*
2888 cat >> confdefs.h <<\EOF
2889#define AIX_GENUINE_CPLUSPLUS 1
2890EOF
2891
2892 echo "$ac_t""yes" 1>&6
2893else
2894 echo "configure: failed program was:" >&5
2895 cat conftest.$ac_ext >&5
2896 rm -rf conftest*
2897 echo "$ac_t""no" 1>&6
2898fi
2899rm -f conftest*;;
2900 *) ;;
2901esac
2902
Guido van Rossum70c7f481998-03-26 18:44:10 +00002903# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2904# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002905# BeOS' sockets are stashed in libnet.
2906case "$ac_sys_system" in
2907IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002908*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002909echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002910echo "configure:2911: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002911ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Fred Drake5790be12000-10-09 17:06:13 +00002912if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002913 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002914else
2915 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002916LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002917cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002918#line 2919 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002919#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002920/* Override any gcc2 internal prototype to avoid an error. */
2921/* We use char because int might match the return type of a gcc2
2922 builtin and then its argument prototype would still apply. */
2923char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002924
Guido van Rossumf78abae1997-01-21 22:02:36 +00002925int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002926t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002927; return 0; }
2928EOF
Fred Drake5790be12000-10-09 17:06:13 +00002929if { (eval echo configure:2930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002930 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002931 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002932else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002933 echo "configure: failed program was:" >&5
2934 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002935 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002936 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002937fi
2938rm -f conftest*
2939LIBS="$ac_save_LIBS"
2940
2941fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002942if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002943 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002944 LIBS="-lnsl $LIBS"
2945else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002946 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002947fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002948 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002949echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002950echo "configure:2951: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002951ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Fred Drake5790be12000-10-09 17:06:13 +00002952if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002953 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002954else
2955 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002956LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002957cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00002958#line 2959 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002959#include "confdefs.h"
2960/* Override any gcc2 internal prototype to avoid an error. */
2961/* We use char because int might match the return type of a gcc2
2962 builtin and then its argument prototype would still apply. */
2963char socket();
2964
2965int main() {
2966socket()
2967; return 0; }
2968EOF
Fred Drake5790be12000-10-09 17:06:13 +00002969if { (eval echo configure:2970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002970 rm -rf conftest*
2971 eval "ac_cv_lib_$ac_lib_var=yes"
2972else
2973 echo "configure: failed program was:" >&5
2974 cat conftest.$ac_ext >&5
2975 rm -rf conftest*
2976 eval "ac_cv_lib_$ac_lib_var=no"
2977fi
2978rm -f conftest*
2979LIBS="$ac_save_LIBS"
2980
2981fi
2982if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2983 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002984 LIBS="-lsocket $LIBS"
2985else
2986 echo "$ac_t""no" 1>&6
2987fi
2988 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00002989;;
2990esac
2991case "$ac_sys_system" in
2992BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00002993echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00002994echo "configure:2995: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002995ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Fred Drake5790be12000-10-09 17:06:13 +00002996if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002997 echo $ac_n "(cached) $ac_c" 1>&6
2998else
2999 ac_save_LIBS="$LIBS"
3000LIBS="-lnet $LIBS $LIBS"
3001cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00003002#line 3003 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003003#include "confdefs.h"
3004/* Override any gcc2 internal prototype to avoid an error. */
3005/* We use char because int might match the return type of a gcc2
3006 builtin and then its argument prototype would still apply. */
3007char socket();
3008
3009int main() {
3010socket()
3011; return 0; }
3012EOF
Fred Drake5790be12000-10-09 17:06:13 +00003013if { (eval echo configure:3014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003014 rm -rf conftest*
3015 eval "ac_cv_lib_$ac_lib_var=yes"
3016else
3017 echo "configure: failed program was:" >&5
3018 cat conftest.$ac_ext >&5
3019 rm -rf conftest*
3020 eval "ac_cv_lib_$ac_lib_var=no"
3021fi
3022rm -f conftest*
3023LIBS="$ac_save_LIBS"
3024
3025fi
3026if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3027 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003028 LIBS="-lnet $LIBS"
3029else
3030 echo "$ac_t""no" 1>&6
3031fi
3032 # BeOS
3033;;
3034esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003035
Guido van Rossuma68acba1996-07-31 17:36:39 +00003036echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003037echo "configure:3038: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003038# Check whether --with-libs or --without-libs was given.
3039if test "${with_libs+set}" = set; then
3040 withval="$with_libs"
3041
3042echo "$ac_t""$withval" 1>&6
3043LIBS="$withval $LIBS"
3044
3045else
3046 echo "$ac_t""no" 1>&6
3047fi
3048
Guido van Rossum7f43da71994-08-01 12:15:30 +00003049
Guido van Rossum009f7871997-12-04 00:51:42 +00003050
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003051USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003052
Guido van Rossumec2f0731997-01-22 20:54:01 +00003053echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003054echo "configure:3055: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003055
3056# Check whether --with-dec-threads or --without-dec-threads was given.
3057if test "${with_dec_threads+set}" = set; then
3058 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003059
3060echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003061LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003062if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003063 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003064fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003065else
3066 echo "$ac_t""no" 1>&6
3067fi
3068
3069
3070echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003071echo "configure:3072: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003072# Check whether --with-threads or --without-threads was given.
3073if test "${with_threads+set}" = set; then
3074 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003075 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003076fi
3077
3078
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003079# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003080# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003081if test "${with_thread+set}" = set; then
3082 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003083
3084with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003085fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003086
3087
3088if test -z "$with_threads"
3089then with_threads="yes"
3090fi
3091echo "$ac_t""$with_threads" 1>&6
3092
3093if test "$with_threads" = "no"
3094then
3095 USE_THREAD_MODULE="#"
3096else
Guido van Rossum40951012000-10-07 16:21:27 +00003097 if test ! -z "$with_threads" -a -d "$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003098 then LDFLAGS="$LDFLAGS -L$with_threads"
3099 fi
Guido van Rossum40951012000-10-07 16:21:27 +00003100 if test ! -z "$withval" -a -d "$withval"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003101 then LDFLAGS="$LDFLAGS -L$withval"
3102 fi
3103 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003104#define _REENTRANT 1
3105EOF
3106
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003107 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003108echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003109echo "configure:3110: checking for mach/cthreads.h" >&5
3110if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003111 echo $ac_n "(cached) $ac_c" 1>&6
3112else
3113 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00003114#line 3115 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003115#include "confdefs.h"
3116#include <mach/cthreads.h>
3117EOF
3118ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake5790be12000-10-09 17:06:13 +00003119{ (eval echo configure:3120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003120ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003121if test -z "$ac_err"; then
3122 rm -rf conftest*
3123 eval "ac_cv_header_$ac_safe=yes"
3124else
3125 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003126 echo "configure: failed program was:" >&5
3127 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003128 rm -rf conftest*
3129 eval "ac_cv_header_$ac_safe=no"
3130fi
3131rm -f conftest*
3132fi
3133if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3134 echo "$ac_t""yes" 1>&6
3135 cat >> confdefs.h <<\EOF
3136#define WITH_THREAD 1
3137EOF
3138
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003139 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003140#define C_THREADS 1
3141EOF
3142
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003143 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003144else
3145 echo "$ac_t""no" 1>&6
3146
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003147 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003148echo "configure:3149: checking for --with-pth" >&5
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003149 # Check whether --with-pth or --without-pth was given.
3150if test "${with_pth+set}" = set; then
3151 withval="$with_pth"
3152
3153 echo "$ac_t""$withval" 1>&6
3154 cat >> confdefs.h <<\EOF
3155#define WITH_THREAD 1
3156EOF
3157
3158 cat >> confdefs.h <<\EOF
3159#define HAVE_PTH 1
3160EOF
3161
3162 LIBS="-lpth $LIBS"
3163 LIBOBJS="$LIBOBJS thread.o"
3164else
3165
3166 echo "$ac_t""no" 1>&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003167 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003168echo "configure:3169: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003169ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Fred Drake5790be12000-10-09 17:06:13 +00003170if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003171 echo $ac_n "(cached) $ac_c" 1>&6
3172else
3173 ac_save_LIBS="$LIBS"
3174LIBS="-lpthread $LIBS"
3175cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00003176#line 3177 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003177#include "confdefs.h"
3178/* Override any gcc2 internal prototype to avoid an error. */
3179/* We use char because int might match the return type of a gcc2
3180 builtin and then its argument prototype would still apply. */
3181char pthread_create();
3182
3183int main() {
3184pthread_create()
3185; return 0; }
3186EOF
Fred Drake5790be12000-10-09 17:06:13 +00003187if { (eval echo configure:3188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003188 rm -rf conftest*
3189 eval "ac_cv_lib_$ac_lib_var=yes"
3190else
3191 echo "configure: failed program was:" >&5
3192 cat conftest.$ac_ext >&5
3193 rm -rf conftest*
3194 eval "ac_cv_lib_$ac_lib_var=no"
3195fi
3196rm -f conftest*
3197LIBS="$ac_save_LIBS"
3198
3199fi
3200if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3201 echo "$ac_t""yes" 1>&6
3202 cat >> confdefs.h <<\EOF
3203#define WITH_THREAD 1
3204EOF
3205
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003206 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003207#define _POSIX_THREADS 1
3208EOF
3209
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003210 LIBS="-lpthread $LIBS"
3211 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003212else
3213 echo "$ac_t""no" 1>&6
3214
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003215 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003216echo "configure:3217: checking for pthread_detach" >&5
3217if eval "test \"\${ac_cv_func_pthread_detach+set}\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003218 echo $ac_n "(cached) $ac_c" 1>&6
3219else
3220 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00003221#line 3222 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003222#include "confdefs.h"
3223/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003224 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003225#include <assert.h>
3226/* Override any gcc2 internal prototype to avoid an error. */
3227/* We use char because int might match the return type of a gcc2
3228 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003229char pthread_detach();
Fred Drake5790be12000-10-09 17:06:13 +00003230char (*f)();
Guido van Rossumad678af1998-10-02 14:42:15 +00003231
3232int main() {
3233
3234/* The GNU C library defines this for functions which it implements
3235 to always fail with ENOSYS. Some functions are actually named
3236 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003237#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003238choke me
3239#else
Fred Drake5790be12000-10-09 17:06:13 +00003240f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00003241#endif
3242
3243; return 0; }
3244EOF
Fred Drake5790be12000-10-09 17:06:13 +00003245if { (eval echo configure:3246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003246 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003247 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003248else
3249 echo "configure: failed program was:" >&5
3250 cat conftest.$ac_ext >&5
3251 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003252 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003253fi
3254rm -f conftest*
3255fi
3256
Guido van Rossumea516321998-12-17 18:08:55 +00003257if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003258 echo "$ac_t""yes" 1>&6
3259 cat >> confdefs.h <<\EOF
3260#define WITH_THREAD 1
3261EOF
3262
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003263 cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003264#define _POSIX_THREADS 1
3265EOF
3266
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003267 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003268else
3269 echo "$ac_t""no" 1>&6
3270
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003271 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003272echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003273echo "configure:3274: checking for kernel/OS.h" >&5
3274if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003275 echo $ac_n "(cached) $ac_c" 1>&6
3276else
3277 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00003278#line 3279 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003279#include "confdefs.h"
3280#include <kernel/OS.h>
3281EOF
3282ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake5790be12000-10-09 17:06:13 +00003283{ (eval echo configure:3284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003284ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003285if test -z "$ac_err"; then
3286 rm -rf conftest*
3287 eval "ac_cv_header_$ac_safe=yes"
3288else
3289 echo "$ac_err" >&5
3290 echo "configure: failed program was:" >&5
3291 cat conftest.$ac_ext >&5
3292 rm -rf conftest*
3293 eval "ac_cv_header_$ac_safe=no"
3294fi
3295rm -f conftest*
3296fi
3297if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3298 echo "$ac_t""yes" 1>&6
3299 cat >> confdefs.h <<\EOF
3300#define WITH_THREAD 1
3301EOF
3302
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003303 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003304#define BEOS_THREADS 1
3305EOF
3306
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003307 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003308else
3309 echo "$ac_t""no" 1>&6
3310
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003311 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003312echo "configure:3313: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003313ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Fred Drake5790be12000-10-09 17:06:13 +00003314if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003315 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003316else
3317 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003318LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003319cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00003320#line 3321 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003321#include "confdefs.h"
3322/* Override any gcc2 internal prototype to avoid an error. */
3323/* We use char because int might match the return type of a gcc2
3324 builtin and then its argument prototype would still apply. */
3325char pthread_create();
3326
3327int main() {
3328pthread_create()
3329; return 0; }
3330EOF
Fred Drake5790be12000-10-09 17:06:13 +00003331if { (eval echo configure:3332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003332 rm -rf conftest*
3333 eval "ac_cv_lib_$ac_lib_var=yes"
3334else
3335 echo "configure: failed program was:" >&5
3336 cat conftest.$ac_ext >&5
3337 rm -rf conftest*
3338 eval "ac_cv_lib_$ac_lib_var=no"
3339fi
3340rm -f conftest*
3341LIBS="$ac_save_LIBS"
3342
3343fi
3344if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3345 echo "$ac_t""yes" 1>&6
3346 cat >> confdefs.h <<\EOF
3347#define WITH_THREAD 1
3348EOF
3349
3350 cat >> confdefs.h <<\EOF
3351#define _POSIX_THREADS 1
3352EOF
3353
3354 LIBS="$LIBS -lpthreads"
3355 LIBOBJS="$LIBOBJS thread.o"
3356else
3357 echo "$ac_t""no" 1>&6
3358
3359 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003360echo "configure:3361: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003361ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Fred Drake5790be12000-10-09 17:06:13 +00003362if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003363 echo $ac_n "(cached) $ac_c" 1>&6
3364else
3365 ac_save_LIBS="$LIBS"
3366LIBS="-lc_r $LIBS"
3367cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00003368#line 3369 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003369#include "confdefs.h"
3370/* Override any gcc2 internal prototype to avoid an error. */
3371/* We use char because int might match the return type of a gcc2
3372 builtin and then its argument prototype would still apply. */
3373char pthread_create();
3374
3375int main() {
3376pthread_create()
3377; return 0; }
3378EOF
Fred Drake5790be12000-10-09 17:06:13 +00003379if { (eval echo configure:3380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003380 rm -rf conftest*
3381 eval "ac_cv_lib_$ac_lib_var=yes"
3382else
3383 echo "configure: failed program was:" >&5
3384 cat conftest.$ac_ext >&5
3385 rm -rf conftest*
3386 eval "ac_cv_lib_$ac_lib_var=no"
3387fi
3388rm -f conftest*
3389LIBS="$ac_save_LIBS"
3390
3391fi
3392if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3393 echo "$ac_t""yes" 1>&6
3394 cat >> confdefs.h <<\EOF
3395#define WITH_THREAD 1
3396EOF
3397
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003398 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003399#define _POSIX_THREADS 1
3400EOF
3401
Greg Steinadf63d62000-07-05 10:38:09 +00003402 LIBS="$LIBS -lc_r"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003403 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003404else
3405 echo "$ac_t""no" 1>&6
3406
Greg Steinadf63d62000-07-05 10:38:09 +00003407 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003408echo "configure:3409: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003409ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Fred Drake5790be12000-10-09 17:06:13 +00003410if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003411 echo $ac_n "(cached) $ac_c" 1>&6
3412else
3413 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003414LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003415cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00003416#line 3417 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003417#include "confdefs.h"
3418/* Override any gcc2 internal prototype to avoid an error. */
3419/* We use char because int might match the return type of a gcc2
3420 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003421char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003422
3423int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003424__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003425; return 0; }
3426EOF
Fred Drake5790be12000-10-09 17:06:13 +00003427if { (eval echo configure:3428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003428 rm -rf conftest*
3429 eval "ac_cv_lib_$ac_lib_var=yes"
3430else
3431 echo "configure: failed program was:" >&5
3432 cat conftest.$ac_ext >&5
3433 rm -rf conftest*
3434 eval "ac_cv_lib_$ac_lib_var=no"
3435fi
3436rm -f conftest*
3437LIBS="$ac_save_LIBS"
3438
3439fi
3440if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3441 echo "$ac_t""yes" 1>&6
3442 cat >> confdefs.h <<\EOF
3443#define WITH_THREAD 1
3444EOF
3445
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003446 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003447#define _POSIX_THREADS 1
3448EOF
3449
Greg Steinadf63d62000-07-05 10:38:09 +00003450 LIBS="$LIBS -lthread"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003451 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003452else
3453 echo "$ac_t""no" 1>&6
3454
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003455 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003456echo "configure:3457: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003457ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Fred Drake5790be12000-10-09 17:06:13 +00003458if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003459 echo $ac_n "(cached) $ac_c" 1>&6
3460else
3461 ac_save_LIBS="$LIBS"
3462LIBS="-lcma $LIBS"
3463cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00003464#line 3465 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003465#include "confdefs.h"
3466/* Override any gcc2 internal prototype to avoid an error. */
3467/* We use char because int might match the return type of a gcc2
3468 builtin and then its argument prototype would still apply. */
3469char pthread_create();
3470
3471int main() {
3472pthread_create()
3473; return 0; }
3474EOF
Fred Drake5790be12000-10-09 17:06:13 +00003475if { (eval echo configure:3476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003476 rm -rf conftest*
3477 eval "ac_cv_lib_$ac_lib_var=yes"
3478else
3479 echo "configure: failed program was:" >&5
3480 cat conftest.$ac_ext >&5
3481 rm -rf conftest*
3482 eval "ac_cv_lib_$ac_lib_var=no"
3483fi
3484rm -f conftest*
3485LIBS="$ac_save_LIBS"
3486
3487fi
3488if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3489 echo "$ac_t""yes" 1>&6
3490 cat >> confdefs.h <<\EOF
3491#define WITH_THREAD 1
3492EOF
3493
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003494 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003495#define _POSIX_THREADS 1
3496EOF
3497
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003498 LIBS="$LIBS -lcma"
3499 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003500else
3501 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003502
3503 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003504fi
3505
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003506
Guido van Rossum627b2d71993-12-24 10:39:16 +00003507fi
3508
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003509fi
3510
Guido van Rossum0be3e491997-05-22 20:33:33 +00003511fi
3512
Guido van Rossum49545951997-12-02 19:28:29 +00003513fi
3514
Guido van Rossumb93a8621998-05-07 13:27:32 +00003515fi
3516
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003517fi
3518
Guido van Rossumad678af1998-10-02 14:42:15 +00003519fi
3520
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003521fi
3522
Guido van Rossum0be3e491997-05-22 20:33:33 +00003523
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003524 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003525echo "configure:3526: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003526ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Fred Drake5790be12000-10-09 17:06:13 +00003527if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003528 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003529else
3530 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003531LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003532cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00003533#line 3534 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003534#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003535/* Override any gcc2 internal prototype to avoid an error. */
3536/* We use char because int might match the return type of a gcc2
3537 builtin and then its argument prototype would still apply. */
3538char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003539
Guido van Rossumf78abae1997-01-21 22:02:36 +00003540int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003541usconfig()
3542; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003543EOF
Fred Drake5790be12000-10-09 17:06:13 +00003544if { (eval echo configure:3545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003545 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003546 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003547else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003548 echo "configure: failed program was:" >&5
3549 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003550 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003551 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003552fi
3553rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003554LIBS="$ac_save_LIBS"
3555
3556fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003557if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003558 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003559 cat >> confdefs.h <<\EOF
3560#define WITH_THREAD 1
3561EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003562
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003563 LIBS="$LIBS -lmpc"
3564 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003565 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003566else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003567 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003568fi
3569
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003570 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003571echo "configure:3572: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003572ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Fred Drake5790be12000-10-09 17:06:13 +00003573if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003574 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003575else
3576 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003577LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003578cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00003579#line 3580 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003580#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003581/* Override any gcc2 internal prototype to avoid an error. */
3582/* We use char because int might match the return type of a gcc2
3583 builtin and then its argument prototype would still apply. */
3584char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003585
Guido van Rossumf78abae1997-01-21 22:02:36 +00003586int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003587thr_create()
3588; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003589EOF
Fred Drake5790be12000-10-09 17:06:13 +00003590if { (eval echo configure:3591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003591 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003592 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003593else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003594 echo "configure: failed program was:" >&5
3595 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003596 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003597 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003598fi
3599rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003600LIBS="$ac_save_LIBS"
3601
3602fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003603if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003604 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003605 cat >> confdefs.h <<\EOF
3606#define WITH_THREAD 1
3607EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003608
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003609 LIBS="$LIBS -lthread"
3610 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003611 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003612else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003613 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003614fi
3615
Guido van Rossum627b2d71993-12-24 10:39:16 +00003616fi
3617
Barry Warsawef82cd72000-06-30 16:21:01 +00003618# Check for GC support
3619
3620USE_GC_MODULE=""
3621echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003622echo "configure:3623: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003623# Check whether --with-cycle-gc or --without-cycle-gc was given.
3624if test "${with_cycle_gc+set}" = set; then
3625 withval="$with_cycle_gc"
3626 :
3627fi
3628
3629
3630if test -z "$with_cycle_gc"
3631then with_cycle_gc="yes"
3632fi
3633if test "$with_cycle_gc" = "no"
3634then
3635 USE_GC_MODULE="#"
3636else
3637 cat >> confdefs.h <<\EOF
3638#define WITH_CYCLE_GC 1
3639EOF
3640
3641fi
3642echo "$ac_t""$with_cycle_gc" 1>&6
3643
Fred Drakea50d6ec2000-08-31 16:13:20 +00003644# Check for LIBDB support
3645# either --with-libdb or, in its absence, the presence of db.h
3646
3647USE_BSDDB_MODULE=""
3648echo $ac_n "checking for --with-libdb""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003649echo "configure:3650: checking for --with-libdb" >&5
Fred Drakea50d6ec2000-08-31 16:13:20 +00003650# Check whether --with-libdb or --without-libdb was given.
3651if test "${with_libdb+set}" = set; then
3652 withval="$with_libdb"
3653 :
3654fi
3655
3656
Skip Montanarob89f41e2000-09-04 04:06:05 +00003657# enabled by default, but db.h must be found
3658if test "$ac_cv_header_db_h" = "yes"
3659then
3660 if test "$with_libdb" != "no"
3661 then with_libdb="yes"
3662 fi
3663else
Fred Drake5790be12000-10-09 17:06:13 +00003664 # make sure user knows why bsddb support wasn't enabled even
Skip Montanarob89f41e2000-09-04 04:06:05 +00003665 # though s/he requested it
3666 if test "$with_libdb" = "yes"
3667 then echo $ac_n "(requested, but db.h was not found) $ac_c"
3668 fi
3669 with_libdb="no"
Fred Drakea50d6ec2000-08-31 16:13:20 +00003670fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00003671
Fred Drakea50d6ec2000-08-31 16:13:20 +00003672if test "$with_libdb" = "no"
3673then
3674 USE_BSDDB_MODULE="#"
3675else
3676 cat >> confdefs.h <<\EOF
3677#define WITH_LIBDB 1
3678EOF
3679
3680fi
3681echo "$ac_t""$with_libdb" 1>&6
3682
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003683if test "$with_libdb" = "yes"
3684then
3685 # check for libdb; BSD systems have the DB routines in libc --tg
3686
Martin v. Löwis05a65d62000-09-24 19:40:25 +00003687 # If dbopen is not in libc, then checking whether it is in libdb
3688 # is difficult: db_185.h may #define it as __db185_open
Fred Drake02706f52000-09-25 15:08:46 +00003689 # Instead, we just trust it is in libdb; linking will fail if it
3690 # is not.
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003691 echo $ac_n "checking for dbopen""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003692echo "configure:3693: checking for dbopen" >&5
3693if eval "test \"\${ac_cv_func_dbopen+set}\" = set"; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003694 echo $ac_n "(cached) $ac_c" 1>&6
3695else
3696 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00003697#line 3698 "configure"
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003698#include "confdefs.h"
3699/* System header to define __stub macros and hopefully few prototypes,
3700 which can conflict with char dbopen(); below. */
3701#include <assert.h>
3702/* Override any gcc2 internal prototype to avoid an error. */
3703/* We use char because int might match the return type of a gcc2
3704 builtin and then its argument prototype would still apply. */
3705char dbopen();
Fred Drake5790be12000-10-09 17:06:13 +00003706char (*f)();
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003707
3708int main() {
3709
3710/* The GNU C library defines this for functions which it implements
3711 to always fail with ENOSYS. Some functions are actually named
3712 something starting with __ and the normal name is an alias. */
3713#if defined (__stub_dbopen) || defined (__stub___dbopen)
3714choke me
3715#else
Fred Drake5790be12000-10-09 17:06:13 +00003716f = dbopen;
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003717#endif
3718
3719; return 0; }
3720EOF
Fred Drake5790be12000-10-09 17:06:13 +00003721if { (eval echo configure:3722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003722 rm -rf conftest*
3723 eval "ac_cv_func_dbopen=yes"
3724else
3725 echo "configure: failed program was:" >&5
3726 cat conftest.$ac_ext >&5
3727 rm -rf conftest*
3728 eval "ac_cv_func_dbopen=no"
3729fi
3730rm -f conftest*
3731fi
3732
3733if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
3734 echo "$ac_t""yes" 1>&6
3735 HAVE_LIBDB=
3736else
3737 echo "$ac_t""no" 1>&6
Martin v. Löwis05a65d62000-09-24 19:40:25 +00003738HAVE_LIBDB=-ldb
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003739fi
3740
3741fi
3742
Barry Warsawef82cd72000-06-30 16:21:01 +00003743# Check for --with-wctype-functions
3744echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003745echo "configure:3746: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003746# Check whether --with-wctype-functions or --without-wctype-functions was given.
3747if test "${with_wctype_functions+set}" = set; then
3748 withval="$with_wctype_functions"
3749
3750if test "$withval" != no
3751then cat >> confdefs.h <<\EOF
3752#define WANT_WCTYPE_FUNCTIONS 1
3753EOF
3754 echo "$ac_t""yes" 1>&6
3755else echo "$ac_t""no" 1>&6
3756fi
3757else
3758 echo "$ac_t""no" 1>&6
3759fi
3760
3761
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003762# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00003763
3764DLINCLDIR=/
3765
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003766echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003767echo "configure:3768: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003768# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769if test "${with_sgi_dl+set}" = set; then
3770 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003771
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003772echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003773cat >> confdefs.h <<\EOF
3774#define WITH_SGI_DL 1
3775EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003776
Guido van Rossume97ee181999-12-20 21:27:22 +00003777DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003778dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00003779if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003780then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003781else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003782fi
3783DLINCLDIR=${dldir}
3784LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003785else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003786 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003787fi
3788
3789
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003790echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003791echo "configure:3792: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003792# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003793if test "${with_dl_dld+set}" = set; then
3794 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003795
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003796echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003797cat >> confdefs.h <<\EOF
3798#define WITH_DL_DLD 1
3799EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003800
Guido van Rossume97ee181999-12-20 21:27:22 +00003801DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003802dldir=`echo "$withval" | sed 's/,.*//'`
3803dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00003804if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003805then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003806else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003807fi
3808DLINCLDIR=${dldir}
3809LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003810else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003811 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003812fi
3813
3814
Guido van Rossume97ee181999-12-20 21:27:22 +00003815# the dlopen() function means we might want to use dynload_shlib.o. some
3816# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00003817for ac_func in dlopen
3818do
3819echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003820echo "configure:3821: checking for $ac_func" >&5
3821if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003822 echo $ac_n "(cached) $ac_c" 1>&6
3823else
3824 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00003825#line 3826 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00003826#include "confdefs.h"
3827/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00003828 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00003829#include <assert.h>
3830/* Override any gcc2 internal prototype to avoid an error. */
3831/* We use char because int might match the return type of a gcc2
3832 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003833char $ac_func();
Fred Drake5790be12000-10-09 17:06:13 +00003834char (*f)();
Guido van Rossume97ee181999-12-20 21:27:22 +00003835
3836int main() {
3837
3838/* The GNU C library defines this for functions which it implements
3839 to always fail with ENOSYS. Some functions are actually named
3840 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003841#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00003842choke me
3843#else
Fred Drake5790be12000-10-09 17:06:13 +00003844f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +00003845#endif
3846
3847; return 0; }
3848EOF
Fred Drake5790be12000-10-09 17:06:13 +00003849if { (eval echo configure:3850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003850 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003851 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00003852else
3853 echo "configure: failed program was:" >&5
3854 cat conftest.$ac_ext >&5
3855 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003856 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00003857fi
3858rm -f conftest*
3859fi
3860
Thomas Wouters3a584202000-08-05 23:28:51 +00003861if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003862 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00003863 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3864 cat >> confdefs.h <<EOF
3865#define $ac_tr_func 1
3866EOF
3867
Guido van Rossume97ee181999-12-20 21:27:22 +00003868else
3869 echo "$ac_t""no" 1>&6
3870fi
Thomas Wouters3a584202000-08-05 23:28:51 +00003871done
Guido van Rossume97ee181999-12-20 21:27:22 +00003872
3873
3874# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3875# loading of modules.
3876
3877echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003878echo "configure:3879: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00003879if test -z "$DYNLOADFILE"
3880then
3881 case $ac_sys_system/$ac_sys_release in
3882 AIX*) DYNLOADFILE="dynload_aix.o";;
3883 BeOS*) DYNLOADFILE="dynload_beos.o";;
3884 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
3885 next/*) DYNLOADFILE="dynload_next.o";;
3886 *)
3887 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
3888 # out any dynamic loading
3889 if test "$ac_cv_func_dlopen" = yes
3890 then DYNLOADFILE="dynload_shlib.o"
3891 else DYNLOADFILE="dynload_stub.o"
3892 fi
3893 ;;
3894 esac
3895fi
3896echo "$ac_t""$DYNLOADFILE" 1>&6
3897if test "$DYNLOADFILE" != "dynload_stub.o"
3898then
3899 cat >> confdefs.h <<\EOF
3900#define HAVE_DYNAMIC_LOADING 1
3901EOF
3902
3903fi
3904
Guido van Rossum627b2d71993-12-24 10:39:16 +00003905# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00003906for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00003907 flock fork fsync fdatasync fpathconf ftime ftruncate \
Thomas Wouters3a584202000-08-05 23:28:51 +00003908 getgroups getlogin getpeername getpid getpwent getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00003909 kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00003910 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00003911 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003912 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00003913 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00003914 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00003915 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters70c21a12000-07-14 14:28:33 +00003916 truncate uname waitpid _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003917do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003918echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003919echo "configure:3920: checking for $ac_func" >&5
3920if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003921 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003922else
3923 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00003924#line 3925 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003925#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003926/* System header to define __stub macros and hopefully few prototypes,
3927 which can conflict with char $ac_func(); below. */
3928#include <assert.h>
3929/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003930/* We use char because int might match the return type of a gcc2
3931 builtin and then its argument prototype would still apply. */
3932char $ac_func();
Fred Drake5790be12000-10-09 17:06:13 +00003933char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003934
Guido van Rossumf78abae1997-01-21 22:02:36 +00003935int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003936
Guido van Rossum627b2d71993-12-24 10:39:16 +00003937/* The GNU C library defines this for functions which it implements
3938 to always fail with ENOSYS. Some functions are actually named
3939 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003940#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003941choke me
3942#else
Fred Drake5790be12000-10-09 17:06:13 +00003943f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003944#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003945
Guido van Rossum7f43da71994-08-01 12:15:30 +00003946; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003947EOF
Fred Drake5790be12000-10-09 17:06:13 +00003948if { (eval echo configure:3949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003949 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003950 eval "ac_cv_func_$ac_func=yes"
3951else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003952 echo "configure: failed program was:" >&5
3953 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003954 rm -rf conftest*
3955 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003956fi
3957rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003958fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003959
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003960if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003961 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003962 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003963 cat >> confdefs.h <<EOF
3964#define $ac_tr_func 1
3965EOF
3966
3967else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003968 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003969fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003970done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003971
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003972
Fred Drake8cef4cf2000-06-28 16:40:38 +00003973# check for openpty and forkpty
3974
3975for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003976do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003977echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00003978echo "configure:3979: checking for $ac_func" >&5
3979if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003980 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003981else
3982 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00003983#line 3984 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003984#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003985/* System header to define __stub macros and hopefully few prototypes,
3986 which can conflict with char $ac_func(); below. */
3987#include <assert.h>
3988/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003989/* We use char because int might match the return type of a gcc2
3990 builtin and then its argument prototype would still apply. */
3991char $ac_func();
Fred Drake5790be12000-10-09 17:06:13 +00003992char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003993
Guido van Rossumf78abae1997-01-21 22:02:36 +00003994int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003995
Guido van Rossum627b2d71993-12-24 10:39:16 +00003996/* The GNU C library defines this for functions which it implements
3997 to always fail with ENOSYS. Some functions are actually named
3998 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003999#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004000choke me
4001#else
Fred Drake5790be12000-10-09 17:06:13 +00004002f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +00004003#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004004
Guido van Rossum7f43da71994-08-01 12:15:30 +00004005; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004006EOF
Fred Drake5790be12000-10-09 17:06:13 +00004007if { (eval echo configure:4008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004008 rm -rf conftest*
4009 eval "ac_cv_func_$ac_func=yes"
4010else
4011 echo "configure: failed program was:" >&5
4012 cat conftest.$ac_ext >&5
4013 rm -rf conftest*
4014 eval "ac_cv_func_$ac_func=no"
4015fi
4016rm -f conftest*
4017fi
4018
4019if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4020 echo "$ac_t""yes" 1>&6
4021 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4022 cat >> confdefs.h <<EOF
4023#define $ac_tr_func 1
4024EOF
4025
4026else
4027 echo "$ac_t""no" 1>&6
4028echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004029echo "configure:4030: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004030ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Fred Drake5790be12000-10-09 17:06:13 +00004031if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004032 echo $ac_n "(cached) $ac_c" 1>&6
4033else
4034 ac_save_LIBS="$LIBS"
4035LIBS="-lutil $LIBS"
4036cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004037#line 4038 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004038#include "confdefs.h"
4039/* Override any gcc2 internal prototype to avoid an error. */
4040/* We use char because int might match the return type of a gcc2
4041 builtin and then its argument prototype would still apply. */
4042char openpty();
4043
4044int main() {
4045openpty()
4046; return 0; }
4047EOF
Fred Drake5790be12000-10-09 17:06:13 +00004048if { (eval echo configure:4049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004049 rm -rf conftest*
4050 eval "ac_cv_lib_$ac_lib_var=yes"
4051else
4052 echo "configure: failed program was:" >&5
4053 cat conftest.$ac_ext >&5
4054 rm -rf conftest*
4055 eval "ac_cv_lib_$ac_lib_var=no"
4056fi
4057rm -f conftest*
4058LIBS="$ac_save_LIBS"
4059
4060fi
4061if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4062 echo "$ac_t""yes" 1>&6
4063 cat >> confdefs.h <<\EOF
4064#define HAVE_OPENPTY 1
4065EOF
4066 LIBS="$LIBS -lutil"
4067else
4068 echo "$ac_t""no" 1>&6
4069fi
4070
4071fi
4072done
4073
4074for ac_func in forkpty
4075do
4076echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004077echo "configure:4078: checking for $ac_func" >&5
4078if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004079 echo $ac_n "(cached) $ac_c" 1>&6
4080else
4081 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004082#line 4083 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004083#include "confdefs.h"
4084/* System header to define __stub macros and hopefully few prototypes,
4085 which can conflict with char $ac_func(); below. */
4086#include <assert.h>
4087/* Override any gcc2 internal prototype to avoid an error. */
4088/* We use char because int might match the return type of a gcc2
4089 builtin and then its argument prototype would still apply. */
4090char $ac_func();
Fred Drake5790be12000-10-09 17:06:13 +00004091char (*f)();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004092
4093int main() {
4094
4095/* The GNU C library defines this for functions which it implements
4096 to always fail with ENOSYS. Some functions are actually named
4097 something starting with __ and the normal name is an alias. */
4098#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4099choke me
4100#else
Fred Drake5790be12000-10-09 17:06:13 +00004101f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +00004102#endif
4103
4104; return 0; }
4105EOF
Fred Drake5790be12000-10-09 17:06:13 +00004106if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004107 rm -rf conftest*
4108 eval "ac_cv_func_$ac_func=yes"
4109else
4110 echo "configure: failed program was:" >&5
4111 cat conftest.$ac_ext >&5
4112 rm -rf conftest*
4113 eval "ac_cv_func_$ac_func=no"
4114fi
4115rm -f conftest*
4116fi
4117
4118if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4119 echo "$ac_t""yes" 1>&6
4120 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4121 cat >> confdefs.h <<EOF
4122#define $ac_tr_func 1
4123EOF
4124
4125else
4126 echo "$ac_t""no" 1>&6
4127echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004128echo "configure:4129: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004129ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Fred Drake5790be12000-10-09 17:06:13 +00004130if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004131 echo $ac_n "(cached) $ac_c" 1>&6
4132else
4133 ac_save_LIBS="$LIBS"
4134LIBS="-lutil $LIBS"
4135cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004136#line 4137 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004137#include "confdefs.h"
4138/* Override any gcc2 internal prototype to avoid an error. */
4139/* We use char because int might match the return type of a gcc2
4140 builtin and then its argument prototype would still apply. */
4141char forkpty();
4142
4143int main() {
4144forkpty()
4145; return 0; }
4146EOF
Fred Drake5790be12000-10-09 17:06:13 +00004147if { (eval echo configure:4148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004148 rm -rf conftest*
4149 eval "ac_cv_lib_$ac_lib_var=yes"
4150else
4151 echo "configure: failed program was:" >&5
4152 cat conftest.$ac_ext >&5
4153 rm -rf conftest*
4154 eval "ac_cv_lib_$ac_lib_var=no"
4155fi
4156rm -f conftest*
4157LIBS="$ac_save_LIBS"
4158
4159fi
4160if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4161 echo "$ac_t""yes" 1>&6
4162 cat >> confdefs.h <<\EOF
4163#define HAVE_FORKPTY 1
4164EOF
4165 LIBS="$LIBS -lutil"
4166else
4167 echo "$ac_t""no" 1>&6
4168fi
4169
4170fi
4171done
4172
4173
4174# check for long file support functions
4175for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4176do
4177echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004178echo "configure:4179: checking for $ac_func" >&5
4179if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004180 echo $ac_n "(cached) $ac_c" 1>&6
4181else
4182 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004183#line 4184 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004184#include "confdefs.h"
4185/* System header to define __stub macros and hopefully few prototypes,
4186 which can conflict with char $ac_func(); below. */
4187#include <assert.h>
4188/* Override any gcc2 internal prototype to avoid an error. */
4189/* We use char because int might match the return type of a gcc2
4190 builtin and then its argument prototype would still apply. */
4191char $ac_func();
Fred Drake5790be12000-10-09 17:06:13 +00004192char (*f)();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004193
4194int main() {
4195
4196/* The GNU C library defines this for functions which it implements
4197 to always fail with ENOSYS. Some functions are actually named
4198 something starting with __ and the normal name is an alias. */
4199#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4200choke me
4201#else
Fred Drake5790be12000-10-09 17:06:13 +00004202f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +00004203#endif
4204
4205; return 0; }
4206EOF
Fred Drake5790be12000-10-09 17:06:13 +00004207if { (eval echo configure:4208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004208 rm -rf conftest*
4209 eval "ac_cv_func_$ac_func=yes"
4210else
4211 echo "configure: failed program was:" >&5
4212 cat conftest.$ac_ext >&5
4213 rm -rf conftest*
4214 eval "ac_cv_func_$ac_func=no"
4215fi
4216rm -f conftest*
4217fi
4218
4219if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4220 echo "$ac_t""yes" 1>&6
4221 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4222 cat >> confdefs.h <<EOF
4223#define $ac_tr_func 1
4224EOF
4225
4226else
4227 echo "$ac_t""no" 1>&6
4228fi
4229done
4230
4231
4232for ac_func in dup2 getcwd strdup strerror memmove
4233do
4234echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004235echo "configure:4236: checking for $ac_func" >&5
4236if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004237 echo $ac_n "(cached) $ac_c" 1>&6
4238else
4239 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004240#line 4241 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004241#include "confdefs.h"
4242/* System header to define __stub macros and hopefully few prototypes,
4243 which can conflict with char $ac_func(); below. */
4244#include <assert.h>
4245/* Override any gcc2 internal prototype to avoid an error. */
4246/* We use char because int might match the return type of a gcc2
4247 builtin and then its argument prototype would still apply. */
4248char $ac_func();
Fred Drake5790be12000-10-09 17:06:13 +00004249char (*f)();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004250
4251int main() {
4252
4253/* The GNU C library defines this for functions which it implements
4254 to always fail with ENOSYS. Some functions are actually named
4255 something starting with __ and the normal name is an alias. */
4256#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4257choke me
4258#else
Fred Drake5790be12000-10-09 17:06:13 +00004259f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004260#endif
4261
4262; return 0; }
4263EOF
Guido van Rossum3dc0a512000-10-05 18:00:06 +00004264if { (eval echo configure:4265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265 rm -rf conftest*
4266 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004267else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004268 echo "configure: failed program was:" >&5
4269 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004270 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004271 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004272fi
4273rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004275
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004276if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004277 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004278 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4279 cat >> confdefs.h <<EOF
4280#define $ac_tr_func 1
4281EOF
4282
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004283else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004284 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004285LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004286fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004287done
4288
Guido van Rossumf78abae1997-01-21 22:02:36 +00004289
Thomas Wouters3a584202000-08-05 23:28:51 +00004290for ac_func in getpgrp
4291do
4292echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum3dc0a512000-10-05 18:00:06 +00004293echo "configure:4294: checking for $ac_func" >&5
Fred Drake5790be12000-10-09 17:06:13 +00004294if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004295 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004296else
4297 cat > conftest.$ac_ext <<EOF
Guido van Rossum3dc0a512000-10-05 18:00:06 +00004298#line 4299 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004299#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004300/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004301 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004302#include <assert.h>
4303/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004304/* We use char because int might match the return type of a gcc2
4305 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004306char $ac_func();
Fred Drake5790be12000-10-09 17:06:13 +00004307char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004308
Guido van Rossumf78abae1997-01-21 22:02:36 +00004309int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004310
Guido van Rossum627b2d71993-12-24 10:39:16 +00004311/* The GNU C library defines this for functions which it implements
4312 to always fail with ENOSYS. Some functions are actually named
4313 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004314#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004315choke me
4316#else
Fred Drake5790be12000-10-09 17:06:13 +00004317f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +00004318#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004319
4320; return 0; }
4321EOF
Fred Drake5790be12000-10-09 17:06:13 +00004322if { (eval echo configure:4323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004323 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004324 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004325else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004326 echo "configure: failed program was:" >&5
4327 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004328 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004329 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004330fi
4331rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004332fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004333
Thomas Wouters3a584202000-08-05 23:28:51 +00004334if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004335 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004336 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4337 cat >> confdefs.h <<EOF
4338#define $ac_tr_func 1
4339EOF
4340 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004341#line 4342 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004342#include "confdefs.h"
4343#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004344int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004345getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004346; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004347EOF
Fred Drake5790be12000-10-09 17:06:13 +00004348if { (eval echo configure:4349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004349 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004350 cat >> confdefs.h <<\EOF
4351#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004352EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004353
Guido van Rossumf78abae1997-01-21 22:02:36 +00004354else
4355 echo "configure: failed program was:" >&5
4356 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004357fi
4358rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004359else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004360 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004361fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004362done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004363
Thomas Wouters3a584202000-08-05 23:28:51 +00004364for ac_func in setpgrp
4365do
4366echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004367echo "configure:4368: checking for $ac_func" >&5
4368if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004369 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004370else
4371 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004372#line 4373 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004373#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004374/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004375 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004376#include <assert.h>
4377/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004378/* We use char because int might match the return type of a gcc2
4379 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004380char $ac_func();
Fred Drake5790be12000-10-09 17:06:13 +00004381char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004382
Guido van Rossumf78abae1997-01-21 22:02:36 +00004383int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004384
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004385/* The GNU C library defines this for functions which it implements
4386 to always fail with ENOSYS. Some functions are actually named
4387 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004388#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004389choke me
4390#else
Fred Drake5790be12000-10-09 17:06:13 +00004391f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004392#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004393
4394; return 0; }
4395EOF
Fred Drake5790be12000-10-09 17:06:13 +00004396if { (eval echo configure:4397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004397 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004398 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004399else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004400 echo "configure: failed program was:" >&5
4401 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004402 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004403 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004404fi
4405rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004406fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004407
Thomas Wouters3a584202000-08-05 23:28:51 +00004408if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004409 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004410 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4411 cat >> confdefs.h <<EOF
4412#define $ac_tr_func 1
4413EOF
4414 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004415#line 4416 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004416#include "confdefs.h"
4417#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004418int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004419setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004420; return 0; }
4421EOF
Fred Drake5790be12000-10-09 17:06:13 +00004422if { (eval echo configure:4423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004423 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004424 cat >> confdefs.h <<\EOF
4425#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004426EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004427
Guido van Rossumf78abae1997-01-21 22:02:36 +00004428else
4429 echo "configure: failed program was:" >&5
4430 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004431fi
4432rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004433else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004434 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004435fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004436done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004437
Thomas Wouters3a584202000-08-05 23:28:51 +00004438for ac_func in gettimeofday
4439do
4440echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004441echo "configure:4442: checking for $ac_func" >&5
4442if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004443 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004444else
4445 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004446#line 4447 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004447#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004448/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004449 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004450#include <assert.h>
4451/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004452/* We use char because int might match the return type of a gcc2
4453 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004454char $ac_func();
Fred Drake5790be12000-10-09 17:06:13 +00004455char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004456
Guido van Rossumf78abae1997-01-21 22:02:36 +00004457int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004458
4459/* The GNU C library defines this for functions which it implements
4460 to always fail with ENOSYS. Some functions are actually named
4461 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004462#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004463choke me
4464#else
Fred Drake5790be12000-10-09 17:06:13 +00004465f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004466#endif
4467
4468; return 0; }
4469EOF
Fred Drake5790be12000-10-09 17:06:13 +00004470if { (eval echo configure:4471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004471 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004472 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004473else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004474 echo "configure: failed program was:" >&5
4475 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004476 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004477 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004478fi
4479rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004480fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004481
Thomas Wouters3a584202000-08-05 23:28:51 +00004482if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004483 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004484 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4485 cat >> confdefs.h <<EOF
4486#define $ac_tr_func 1
4487EOF
4488 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004489#line 4490 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004490#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004491#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004492int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004493gettimeofday((struct timeval*)0,(struct timezone*)0);
4494; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004495EOF
Fred Drake5790be12000-10-09 17:06:13 +00004496if { (eval echo configure:4497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004497 :
4498else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004499 echo "configure: failed program was:" >&5
4500 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004501 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004502 cat >> confdefs.h <<\EOF
4503#define GETTIMEOFDAY_NO_TZ 1
4504EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004505
4506fi
4507rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004508else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004509 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004510fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004511done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004512
4513
4514# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004515echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004516echo "configure:4517: checking whether time.h and sys/time.h may both be included" >&5
4517if eval "test \"\${ac_cv_header_time+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004518 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004519else
4520 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004521#line 4522 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004522#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004523#include <sys/types.h>
4524#include <sys/time.h>
4525#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004526int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004527struct tm *tp;
4528; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004529EOF
Fred Drake5790be12000-10-09 17:06:13 +00004530if { (eval echo configure:4531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004531 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004532 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004533else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004534 echo "configure: failed program was:" >&5
4535 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004536 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004537 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004538fi
4539rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004540fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004541
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004542echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004543if test $ac_cv_header_time = yes; then
4544 cat >> confdefs.h <<\EOF
4545#define TIME_WITH_SYS_TIME 1
4546EOF
4547
4548fi
4549
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004550echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004551echo "configure:4552: checking whether struct tm is in sys/time.h or time.h" >&5
4552if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004553 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004554else
4555 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004556#line 4557 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004557#include "confdefs.h"
4558#include <sys/types.h>
4559#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004560int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004561struct tm *tp; tp->tm_sec;
4562; return 0; }
4563EOF
Fred Drake5790be12000-10-09 17:06:13 +00004564if { (eval echo configure:4565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004565 rm -rf conftest*
4566 ac_cv_struct_tm=time.h
4567else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004568 echo "configure: failed program was:" >&5
4569 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004570 rm -rf conftest*
4571 ac_cv_struct_tm=sys/time.h
4572fi
4573rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004574fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004575
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004576echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004577if test $ac_cv_struct_tm = sys/time.h; then
4578 cat >> confdefs.h <<\EOF
4579#define TM_IN_SYS_TIME 1
4580EOF
4581
4582fi
4583
Fred Drake5790be12000-10-09 17:06:13 +00004584echo $ac_n "checking for member tm_zone in aggregate type struct tm""... $ac_c" 1>&6
4585echo "configure:4586: checking for member tm_zone in aggregate type struct tm" >&5
4586if eval "test \"\${ac_cv_c_struct_member_tm_zone+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004587 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004588else
4589 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004590#line 4591 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004591#include "confdefs.h"
4592#include <sys/types.h>
4593#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004594int main() {
Fred Drake5790be12000-10-09 17:06:13 +00004595struct tm foo; foo.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004596; return 0; }
4597EOF
Fred Drake5790be12000-10-09 17:06:13 +00004598if { (eval echo configure:4599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004599 rm -rf conftest*
Fred Drake5790be12000-10-09 17:06:13 +00004600 ac_cv_c_struct_member_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004601else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004602 echo "configure: failed program was:" >&5
4603 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004604 rm -rf conftest*
Fred Drake5790be12000-10-09 17:06:13 +00004605 ac_cv_c_struct_member_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004606fi
4607rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004608fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004609
Fred Drake5790be12000-10-09 17:06:13 +00004610echo "$ac_t""$ac_cv_c_struct_member_tm_zone" 1>&6
4611tm_zone="$ac_cv_c_struct_member_tm_zone"
4612if test "$ac_cv_c_struct_member_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004613 cat >> confdefs.h <<\EOF
4614#define HAVE_TM_ZONE 1
4615EOF
4616
4617else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004618 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004619echo "configure:4620: checking for tzname" >&5
4620if eval "test \"\${ac_cv_var_tzname+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004621 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004622else
4623 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004624#line 4625 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004625#include "confdefs.h"
4626#include <time.h>
4627#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004628extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004629#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004630int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004631atoi(*tzname);
4632; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004633EOF
Fred Drake5790be12000-10-09 17:06:13 +00004634if { (eval echo configure:4635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004635 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004636 ac_cv_var_tzname=yes
4637else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004638 echo "configure: failed program was:" >&5
4639 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004640 rm -rf conftest*
4641 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004642fi
4643rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004644fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004645
4646echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004647 if test $ac_cv_var_tzname = yes; then
4648 cat >> confdefs.h <<\EOF
4649#define HAVE_TZNAME 1
4650EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004651
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004652 fi
4653fi
4654
4655
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004656echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004657echo "configure:4658: checking for time.h that defines altzone" >&5
4658if eval "test \"\${ac_cv_header_time_altzone+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004659 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004660else
4661 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004662#line 4663 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004663#include "confdefs.h"
4664#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004665int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004666return altzone;
4667; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004668EOF
Fred Drake5790be12000-10-09 17:06:13 +00004669if { (eval echo configure:4670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004670 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004671 ac_cv_header_time_altzone=yes
4672else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004673 echo "configure: failed program was:" >&5
4674 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004675 rm -rf conftest*
4676 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004677fi
4678rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004679fi
4680
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004681echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004682if test $ac_cv_header_time_altzone = yes; then
4683 cat >> confdefs.h <<\EOF
4684#define HAVE_ALTZONE 1
4685EOF
4686
4687fi
4688
Guido van Rossumda88dad1995-01-26 00:46:29 +00004689was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004690echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004691echo "configure:4692: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004692cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004693#line 4694 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004694#include "confdefs.h"
4695
4696#include <sys/types.h>
4697#include <sys/select.h>
4698#include <sys/time.h>
4699
Guido van Rossumf78abae1997-01-21 22:02:36 +00004700int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004701;
4702; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004703EOF
Fred Drake5790be12000-10-09 17:06:13 +00004704if { (eval echo configure:4705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004705 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004706 cat >> confdefs.h <<\EOF
4707#define SYS_SELECT_WITH_SYS_TIME 1
4708EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004709 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004710else
4711 echo "configure: failed program was:" >&5
4712 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004713fi
4714rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004715echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004716
4717# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004718
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004719echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004720echo "configure:4721: checking whether char is unsigned" >&5
4721if eval "test \"\${ac_cv_c_char_unsigned+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004722 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004723else
4724 if test "$GCC" = yes; then
4725 # GCC predefines this symbol on systems where it applies.
4726cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004727#line 4728 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004728#include "confdefs.h"
4729#ifdef __CHAR_UNSIGNED__
4730 yes
4731#endif
4732
4733EOF
4734if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4735 egrep "yes" >/dev/null 2>&1; then
4736 rm -rf conftest*
4737 ac_cv_c_char_unsigned=yes
4738else
4739 rm -rf conftest*
4740 ac_cv_c_char_unsigned=no
4741fi
4742rm -f conftest*
4743
4744else
4745if test "$cross_compiling" = yes; then
4746 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4747else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004748 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004749#line 4750 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004750#include "confdefs.h"
4751/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004752#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00004753#define volatile
4754#endif
4755main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00004756 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004757}
4758EOF
Fred Drake5790be12000-10-09 17:06:13 +00004759if { (eval echo configure:4760: \"$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 +00004760then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004761 ac_cv_c_char_unsigned=yes
4762else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004763 echo "configure: failed program was:" >&5
4764 cat conftest.$ac_ext >&5
4765 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004766 ac_cv_c_char_unsigned=no
4767fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004768rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004769fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004770
4771fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004772fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004773
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004774echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004775if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
4776 cat >> confdefs.h <<\EOF
4777#define __CHAR_UNSIGNED__ 1
4778EOF
4779
4780fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004781
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004782echo $ac_n "checking for working const""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004783echo "configure:4784: checking for working const" >&5
4784if eval "test \"\${ac_cv_c_const+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004785 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004786else
4787 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004788#line 4789 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004789#include "confdefs.h"
4790
Guido van Rossumf78abae1997-01-21 22:02:36 +00004791int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004792
4793/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004794typedef int charset[2]; const charset x;
4795/* SunOS 4.1.1 cc rejects this. */
4796char const *const *ccp;
4797char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004798/* NEC SVR4.0.2 mips cc rejects this. */
4799struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004800static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004801/* AIX XL C 1.02.0.0 rejects this.
4802 It does not let you subtract one const X* pointer from another in an arm
4803 of an if-expression whose if-part is not a constant expression */
4804const char *g = "string";
4805ccp = &g + (g ? g-g : 0);
4806/* HPUX 7.0 cc rejects these. */
4807++ccp;
4808p = (char**) ccp;
4809ccp = (char const *const *) p;
4810{ /* SCO 3.2v4 cc rejects this. */
4811 char *t;
4812 char const *s = 0 ? (char *) 0 : (char const *) 0;
4813
4814 *t++ = 0;
4815}
4816{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004817 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004818 const int *foo = &x[0];
4819 ++foo;
4820}
4821{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4822 typedef const int *iptr;
4823 iptr p = 0;
4824 ++p;
4825}
4826{ /* AIX XL C 1.02.0.0 rejects this saying
4827 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4828 struct s { int j; const int *ap[3]; };
4829 struct s *b; b->j = 5;
4830}
4831{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4832 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004833}
4834
4835; return 0; }
4836EOF
Fred Drake5790be12000-10-09 17:06:13 +00004837if { (eval echo configure:4838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004838 rm -rf conftest*
4839 ac_cv_c_const=yes
4840else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004841 echo "configure: failed program was:" >&5
4842 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004843 rm -rf conftest*
4844 ac_cv_c_const=no
4845fi
4846rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004847fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004848
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004849echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004850if test $ac_cv_c_const = no; then
4851 cat >> confdefs.h <<\EOF
4852#define const
4853EOF
4854
4855fi
4856
Guido van Rossumef2255b2000-03-10 22:30:29 +00004857echo $ac_n "checking for inline""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004858echo "configure:4859: checking for inline" >&5
4859if eval "test \"\${ac_cv_c_inline+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004860 echo $ac_n "(cached) $ac_c" 1>&6
4861else
4862 ac_cv_c_inline=no
4863for ac_kw in inline __inline__ __inline; do
4864 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004865#line 4866 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00004866#include "confdefs.h"
4867
4868int main() {
4869} $ac_kw foo() {
4870; return 0; }
4871EOF
Fred Drake5790be12000-10-09 17:06:13 +00004872if { (eval echo configure:4873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004873 rm -rf conftest*
4874 ac_cv_c_inline=$ac_kw; break
4875else
4876 echo "configure: failed program was:" >&5
4877 cat conftest.$ac_ext >&5
4878fi
4879rm -f conftest*
4880done
4881
4882fi
4883
4884echo "$ac_t""$ac_cv_c_inline" 1>&6
4885case "$ac_cv_c_inline" in
4886 inline | yes) ;;
4887 no) cat >> confdefs.h <<\EOF
4888#define inline
4889EOF
4890 ;;
4891 *) cat >> confdefs.h <<EOF
4892#define inline $ac_cv_c_inline
4893EOF
4894 ;;
4895esac
4896
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004897
Guido van Rossumda88dad1995-01-26 00:46:29 +00004898works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004899echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004900echo "configure:4901: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004901cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004902#line 4903 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004903#include "confdefs.h"
4904
Guido van Rossumf78abae1997-01-21 22:02:36 +00004905int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004906volatile int x; x = 0;
4907; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004908EOF
Fred Drake5790be12000-10-09 17:06:13 +00004909if { (eval echo configure:4910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004910 rm -rf conftest*
4911 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004912else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004913 echo "configure: failed program was:" >&5
4914 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004915 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004916 cat >> confdefs.h <<\EOF
4917#define volatile
4918EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004919
4920fi
4921rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004922echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004923
Guido van Rossumda88dad1995-01-26 00:46:29 +00004924works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004925echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004926echo "configure:4927: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004927cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004928#line 4929 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004929#include "confdefs.h"
4930
Guido van Rossumf78abae1997-01-21 22:02:36 +00004931int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004932signed char c;
4933; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004934EOF
Fred Drake5790be12000-10-09 17:06:13 +00004935if { (eval echo configure:4936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004936 rm -rf conftest*
4937 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004938else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004939 echo "configure: failed program was:" >&5
4940 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004941 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004942 cat >> confdefs.h <<\EOF
4943#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00004944EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004945
4946fi
4947rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004948echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004949
Guido van Rossumda88dad1995-01-26 00:46:29 +00004950have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004951echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004952echo "configure:4953: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004953cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004954#line 4955 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004955#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004956int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00004957int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004958return foo(10);
4959; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004960EOF
Fred Drake5790be12000-10-09 17:06:13 +00004961if { (eval echo configure:4962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004962 rm -rf conftest*
4963 cat >> confdefs.h <<\EOF
4964#define HAVE_PROTOTYPES 1
4965EOF
4966 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004967else
4968 echo "configure: failed program was:" >&5
4969 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004970fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004971rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004972echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004973
Guido van Rossumda88dad1995-01-26 00:46:29 +00004974works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004975echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00004976echo "configure:4977: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004977cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00004978#line 4979 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004979#include "confdefs.h"
4980
4981#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00004982int foo(int x, ...) {
4983 va_list va;
4984 va_start(va, x);
4985 va_arg(va, int);
4986 va_arg(va, char *);
4987 va_arg(va, double);
4988 return 0;
4989}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004990
Guido van Rossumf78abae1997-01-21 22:02:36 +00004991int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00004992return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004993; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004994EOF
Fred Drake5790be12000-10-09 17:06:13 +00004995if { (eval echo configure:4996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004996 rm -rf conftest*
4997 cat >> confdefs.h <<\EOF
4998#define HAVE_STDARG_PROTOTYPES 1
4999EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005000 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005001else
5002 echo "configure: failed program was:" >&5
5003 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005004fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005005rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005006echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005007
Guido van Rossumda88dad1995-01-26 00:46:29 +00005008if test "$have_prototypes" = yes; then
5009bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005010echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005011echo "configure:5012: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005012cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005013#line 5014 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005014#include "confdefs.h"
5015#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005016int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005017char **t;execve("@",t,t);
5018; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005019EOF
Fred Drake5790be12000-10-09 17:06:13 +00005020if { (eval echo configure:5021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005021 :
5022else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005023 echo "configure: failed program was:" >&5
5024 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005025 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005026 cat >> confdefs.h <<\EOF
5027#define BAD_EXEC_PROTOTYPES 1
5028EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005029 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005030fi
5031rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005032echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005033fi
5034
Guido van Rossumda88dad1995-01-26 00:46:29 +00005035bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005036echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005037echo "configure:5038: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005038if test "$cross_compiling" = yes; then
5039 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5040else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005041 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005042#line 5043 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005043#include "confdefs.h"
5044
5045struct s { int a; int b; };
5046static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005047int foobar() {
5048 static int random;
5049 random = (int) &foo;
5050 return random;
5051}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005052static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005053main() {
5054 exit(!((int)&foo == foobar()));
5055}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005056
5057EOF
Fred Drake5790be12000-10-09 17:06:13 +00005058if { (eval echo configure:5059: \"$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 +00005059then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005060 :
5061else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005062 echo "configure: failed program was:" >&5
5063 cat conftest.$ac_ext >&5
5064 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005065 cat >> confdefs.h <<\EOF
5066#define BAD_STATIC_FORWARD 1
5067EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005068 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005069fi
5070rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005071fi
5072
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005073echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005074
Guido van Rossumda88dad1995-01-26 00:46:29 +00005075va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005076echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005077echo "configure:5078: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005078cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005079#line 5080 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005080#include "confdefs.h"
5081
5082#ifdef HAVE_STDARG_PROTOTYPES
5083#include <stdarg.h>
5084#else
5085#include <varargs.h>
5086#endif
5087
Guido van Rossumf78abae1997-01-21 22:02:36 +00005088int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005089va_list list1, list2; list1 = list2;
5090; return 0; }
5091EOF
Fred Drake5790be12000-10-09 17:06:13 +00005092if { (eval echo configure:5093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005093 :
5094else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005095 echo "configure: failed program was:" >&5
5096 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005097 rm -rf conftest*
5098 cat >> confdefs.h <<\EOF
5099#define VA_LIST_IS_ARRAY 1
5100EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005101 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005102fi
5103rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005104echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005105
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005106# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5107echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005108echo "configure:5109: checking for gethostbyname_r" >&5
5109if eval "test \"\${ac_cv_func_gethostbyname_r+set}\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005110 echo $ac_n "(cached) $ac_c" 1>&6
5111else
5112 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005113#line 5114 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005114#include "confdefs.h"
5115/* System header to define __stub macros and hopefully few prototypes,
5116 which can conflict with char gethostbyname_r(); below. */
5117#include <assert.h>
5118/* Override any gcc2 internal prototype to avoid an error. */
5119/* We use char because int might match the return type of a gcc2
5120 builtin and then its argument prototype would still apply. */
5121char gethostbyname_r();
Fred Drake5790be12000-10-09 17:06:13 +00005122char (*f)();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005123
5124int main() {
5125
5126/* The GNU C library defines this for functions which it implements
5127 to always fail with ENOSYS. Some functions are actually named
5128 something starting with __ and the normal name is an alias. */
5129#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5130choke me
5131#else
Fred Drake5790be12000-10-09 17:06:13 +00005132f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005133#endif
5134
5135; return 0; }
5136EOF
Fred Drake5790be12000-10-09 17:06:13 +00005137if { (eval echo configure:5138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005138 rm -rf conftest*
5139 eval "ac_cv_func_gethostbyname_r=yes"
5140else
5141 echo "configure: failed program was:" >&5
5142 cat conftest.$ac_ext >&5
5143 rm -rf conftest*
5144 eval "ac_cv_func_gethostbyname_r=no"
5145fi
5146rm -f conftest*
5147fi
5148
5149if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5150 echo "$ac_t""yes" 1>&6
5151
5152 cat >> confdefs.h <<\EOF
5153#define HAVE_GETHOSTBYNAME_R 1
5154EOF
5155
5156 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005157echo "configure:5158: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005158 OLD_CFLAGS=$CFLAGS
5159 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
5160 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005161#line 5162 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005162#include "confdefs.h"
5163
5164# include <netdb.h>
5165
5166int main() {
5167
5168 char *name;
5169 struct hostent *he, *res;
5170 char buffer[2048];
5171 int buflen = 2048;
5172 int h_errnop;
5173
5174 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
5175
5176; return 0; }
5177EOF
Fred Drake5790be12000-10-09 17:06:13 +00005178if { (eval echo configure:5179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005179 rm -rf conftest*
5180
5181 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005182#define HAVE_GETHOSTBYNAME_R 1
5183EOF
5184
5185 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005186#define HAVE_GETHOSTBYNAME_R_6_ARG 1
5187EOF
5188
5189 echo "$ac_t""yes" 1>&6
5190
5191else
5192 echo "configure: failed program was:" >&5
5193 cat conftest.$ac_ext >&5
5194 rm -rf conftest*
5195
5196 echo "$ac_t""no" 1>&6
5197 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005198echo "configure:5199: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005199 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005200#line 5201 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005201#include "confdefs.h"
5202
5203# include <netdb.h>
5204
5205int main() {
5206
5207 char *name;
5208 struct hostent *he;
5209 char buffer[2048];
5210 int buflen = 2048;
5211 int h_errnop;
5212
5213 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
5214
5215; return 0; }
5216EOF
Fred Drake5790be12000-10-09 17:06:13 +00005217if { (eval echo configure:5218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005218 rm -rf conftest*
5219
5220 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005221#define HAVE_GETHOSTBYNAME_R 1
5222EOF
5223
5224 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005225#define HAVE_GETHOSTBYNAME_R_5_ARG 1
5226EOF
5227
5228 echo "$ac_t""yes" 1>&6
5229
5230else
5231 echo "configure: failed program was:" >&5
5232 cat conftest.$ac_ext >&5
5233 rm -rf conftest*
5234
5235 echo "$ac_t""no" 1>&6
5236 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005237echo "configure:5238: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005238 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005239#line 5240 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005240#include "confdefs.h"
5241
5242# include <netdb.h>
5243
5244int main() {
5245
5246 char *name;
5247 struct hostent *he;
5248 struct hostent_data data;
5249
5250 (void) gethostbyname_r(name, he, &data);
5251
5252; return 0; }
5253EOF
Fred Drake5790be12000-10-09 17:06:13 +00005254if { (eval echo configure:5255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005255 rm -rf conftest*
5256
5257 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005258#define HAVE_GETHOSTBYNAME_R 1
5259EOF
5260
5261 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005262#define HAVE_GETHOSTBYNAME_R_3_ARG 1
5263EOF
5264
5265 echo "$ac_t""yes" 1>&6
5266
5267else
5268 echo "configure: failed program was:" >&5
5269 cat conftest.$ac_ext >&5
5270 rm -rf conftest*
5271
5272 echo "$ac_t""no" 1>&6
5273
5274fi
5275rm -f conftest*
5276
5277fi
5278rm -f conftest*
5279
5280fi
5281rm -f conftest*
5282 CFLAGS=$OLD_CFLAGS
5283
5284else
5285 echo "$ac_t""no" 1>&6
5286
Thomas Wouters3a584202000-08-05 23:28:51 +00005287 for ac_func in gethostbyname
5288do
5289echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005290echo "configure:5291: checking for $ac_func" >&5
5291if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005292 echo $ac_n "(cached) $ac_c" 1>&6
5293else
5294 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005295#line 5296 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005296#include "confdefs.h"
5297/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005298 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005299#include <assert.h>
5300/* Override any gcc2 internal prototype to avoid an error. */
5301/* We use char because int might match the return type of a gcc2
5302 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005303char $ac_func();
Fred Drake5790be12000-10-09 17:06:13 +00005304char (*f)();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005305
5306int main() {
5307
5308/* The GNU C library defines this for functions which it implements
5309 to always fail with ENOSYS. Some functions are actually named
5310 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005311#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005312choke me
5313#else
Fred Drake5790be12000-10-09 17:06:13 +00005314f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005315#endif
5316
5317; return 0; }
5318EOF
Fred Drake5790be12000-10-09 17:06:13 +00005319if { (eval echo configure:5320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005320 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005321 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005322else
5323 echo "configure: failed program was:" >&5
5324 cat conftest.$ac_ext >&5
5325 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005326 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005327fi
5328rm -f conftest*
5329fi
5330
Thomas Wouters3a584202000-08-05 23:28:51 +00005331if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005332 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005333 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5334 cat >> confdefs.h <<EOF
5335#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005336EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00005337
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005338else
5339 echo "$ac_t""no" 1>&6
5340fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005341done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005342
5343
5344fi
5345
5346
5347
5348
5349
5350
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005351
Guido van Rossum627b2d71993-12-24 10:39:16 +00005352# checks for system services
5353# (none yet)
5354
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005355# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005356echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005357echo "configure:5358: checking for __fpu_control" >&5
5358if eval "test \"\${ac_cv_func___fpu_control+set}\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005359 echo $ac_n "(cached) $ac_c" 1>&6
5360else
5361 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005362#line 5363 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005363#include "confdefs.h"
5364/* System header to define __stub macros and hopefully few prototypes,
5365 which can conflict with char __fpu_control(); below. */
5366#include <assert.h>
5367/* Override any gcc2 internal prototype to avoid an error. */
5368/* We use char because int might match the return type of a gcc2
5369 builtin and then its argument prototype would still apply. */
5370char __fpu_control();
Fred Drake5790be12000-10-09 17:06:13 +00005371char (*f)();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005372
5373int main() {
5374
5375/* The GNU C library defines this for functions which it implements
5376 to always fail with ENOSYS. Some functions are actually named
5377 something starting with __ and the normal name is an alias. */
5378#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5379choke me
5380#else
Fred Drake5790be12000-10-09 17:06:13 +00005381f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005382#endif
5383
5384; return 0; }
5385EOF
Fred Drake5790be12000-10-09 17:06:13 +00005386if { (eval echo configure:5387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005387 rm -rf conftest*
5388 eval "ac_cv_func___fpu_control=yes"
5389else
5390 echo "configure: failed program was:" >&5
5391 cat conftest.$ac_ext >&5
5392 rm -rf conftest*
5393 eval "ac_cv_func___fpu_control=no"
5394fi
5395rm -f conftest*
5396fi
5397
5398if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5399 echo "$ac_t""yes" 1>&6
5400 :
5401else
5402 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005403echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005404echo "configure:5405: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005405ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Fred Drake5790be12000-10-09 17:06:13 +00005406if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005407 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005408else
5409 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005410LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005411cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005412#line 5413 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005413#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005414/* Override any gcc2 internal prototype to avoid an error. */
5415/* We use char because int might match the return type of a gcc2
5416 builtin and then its argument prototype would still apply. */
5417char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005418
Guido van Rossumf78abae1997-01-21 22:02:36 +00005419int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005420__fpu_control()
5421; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005422EOF
Fred Drake5790be12000-10-09 17:06:13 +00005423if { (eval echo configure:5424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005424 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005425 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005426else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005427 echo "configure: failed program was:" >&5
5428 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005429 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005430 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005431fi
5432rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005433LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005434
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005435fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005436if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005437 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005438 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5439 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005440 cat >> confdefs.h <<EOF
5441#define $ac_tr_lib 1
5442EOF
5443
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005444 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005445
5446else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005447 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005448fi
5449
5450
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005451fi
5452
5453
Guido van Rossum7f253911997-05-09 02:42:48 +00005454# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005455echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005456echo "configure:5457: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005457# Check whether --with-fpectl or --without-fpectl was given.
5458if test "${with_fpectl+set}" = set; then
5459 withval="$with_fpectl"
5460
5461if test "$withval" != no
5462then cat >> confdefs.h <<\EOF
5463#define WANT_SIGFPE_HANDLER 1
5464EOF
5465 echo "$ac_t""yes" 1>&6
5466else echo "$ac_t""no" 1>&6
5467fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005468else
5469 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005470fi
5471
5472
Guido van Rossum7f43da71994-08-01 12:15:30 +00005473# check for --with-libm=...
5474
Guido van Rossum563e7081996-09-10 18:20:48 +00005475case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00005476Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005477next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005478BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005479*) LIBM=-lm
5480esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005481echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005482echo "configure:5483: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005483# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005484if test "${with_libm+set}" = set; then
5485 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005486
Guido van Rossum7f253911997-05-09 02:42:48 +00005487if test "$withval" = no
5488then LIBM=
5489 echo "$ac_t""force LIBM empty" 1>&6
5490elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005491then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005492 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005493else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005494fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005495else
5496 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005497fi
5498
5499
5500# check for --with-libc=...
5501
Guido van Rossum7f253911997-05-09 02:42:48 +00005502echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005503echo "configure:5504: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005504# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005505if test "${with_libc+set}" = set; then
5506 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005507
Guido van Rossum7f253911997-05-09 02:42:48 +00005508if test "$withval" = no
5509then LIBC=
5510 echo "$ac_t""force LIBC empty" 1>&6
5511elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005512then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005513 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005514else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005515fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005516else
5517 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005518fi
5519
5520
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005521# check for hypot() in math library
5522LIBS_SAVE=$LIBS
5523LIBS="$LIBS $LIBM"
5524for ac_func in hypot
5525do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005526echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005527echo "configure:5528: checking for $ac_func" >&5
5528if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005529 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005530else
5531 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005532#line 5533 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005533#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005534/* System header to define __stub macros and hopefully few prototypes,
5535 which can conflict with char $ac_func(); below. */
5536#include <assert.h>
5537/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005538/* We use char because int might match the return type of a gcc2
5539 builtin and then its argument prototype would still apply. */
5540char $ac_func();
Fred Drake5790be12000-10-09 17:06:13 +00005541char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005542
Guido van Rossumf78abae1997-01-21 22:02:36 +00005543int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005544
5545/* The GNU C library defines this for functions which it implements
5546 to always fail with ENOSYS. Some functions are actually named
5547 something starting with __ and the normal name is an alias. */
5548#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5549choke me
5550#else
Fred Drake5790be12000-10-09 17:06:13 +00005551f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005552#endif
5553
5554; return 0; }
5555EOF
Fred Drake5790be12000-10-09 17:06:13 +00005556if { (eval echo configure:5557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005557 rm -rf conftest*
5558 eval "ac_cv_func_$ac_func=yes"
5559else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005560 echo "configure: failed program was:" >&5
5561 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005562 rm -rf conftest*
5563 eval "ac_cv_func_$ac_func=no"
5564fi
5565rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005566fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005567
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005568if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5569 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005570 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5571 cat >> confdefs.h <<EOF
5572#define $ac_tr_func 1
5573EOF
5574
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005575else
5576 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005577LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005578fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005579done
5580
Guido van Rossumf78abae1997-01-21 22:02:36 +00005581
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005582LIBS=$LIBS_SAVE
5583
Guido van Rossumda88dad1995-01-26 00:46:29 +00005584# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005585echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005586echo "configure:5587: checking for genuine getopt" >&5
5587if eval "test \"\${ac_cv_func_getopt+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005588 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005589else
5590 if test "$cross_compiling" = yes; then
5591 ac_cv_func_getopt=no
5592else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005593 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005594#line 5595 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00005595#include "confdefs.h"
5596#include <stdio.h>
5597extern int optind, opterr, getopt();
5598extern char* optarg;
5599int main() {
5600 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
5601 opterr = 0;
5602 if (getopt(3, av, "f:") == 'f') { exit(1); }
5603 exit(0);
5604}
5605EOF
Fred Drake5790be12000-10-09 17:06:13 +00005606if { (eval echo configure:5607: \"$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 +00005607then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005608 ac_cv_func_getopt=yes
5609else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005610 echo "configure: failed program was:" >&5
5611 cat conftest.$ac_ext >&5
5612 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00005613 ac_cv_func_getopt=no
5614fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00005615rm -fr conftest*
5616fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005617
5618fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005619echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005620test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
5621
Guido van Rossumad713701997-07-10 22:42:38 +00005622# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005623echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005624echo "configure:5625: checking what malloc(0) returns" >&5
5625if eval "test \"\${ac_cv_malloc_zero+set}\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005626 echo $ac_n "(cached) $ac_c" 1>&6
5627else
5628 if test "$cross_compiling" = yes; then
5629 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5630else
5631 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005632#line 5633 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005633#include "confdefs.h"
5634#include <stdio.h>
5635#ifdef HAVE_STDLIB
5636#include <stdlib.h>
5637#else
5638char *malloc(), *realloc();
5639int *free();
5640#endif
5641main() {
5642 char *p;
5643 p = malloc(0);
5644 if (p == NULL) exit(1);
5645 p = realloc(p, 0);
5646 if (p == NULL) exit(1);
5647 free(p);
5648 exit(0);
5649}
5650EOF
Fred Drake5790be12000-10-09 17:06:13 +00005651if { (eval echo configure:5652: \"$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 +00005652then
5653 ac_cv_malloc_zero=nonnull
5654else
5655 echo "configure: failed program was:" >&5
5656 cat conftest.$ac_ext >&5
5657 rm -fr conftest*
5658 ac_cv_malloc_zero=null
5659fi
5660rm -fr conftest*
5661fi
5662
5663fi
5664
5665echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5666if test "$ac_cv_malloc_zero" = null
5667then
5668 cat >> confdefs.h <<\EOF
5669#define MALLOC_ZERO_RETURNS_NULL 1
5670EOF
5671
5672fi
5673
Guido van Rossumef2255b2000-03-10 22:30:29 +00005674# check for wchar.h
5675ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5676echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005677echo "configure:5678: checking for wchar.h" >&5
5678if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005679 echo $ac_n "(cached) $ac_c" 1>&6
5680else
5681 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005682#line 5683 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005683#include "confdefs.h"
5684#include <wchar.h>
5685EOF
5686ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake5790be12000-10-09 17:06:13 +00005687{ (eval echo configure:5688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005688ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5689if test -z "$ac_err"; then
5690 rm -rf conftest*
5691 eval "ac_cv_header_$ac_safe=yes"
5692else
5693 echo "$ac_err" >&5
5694 echo "configure: failed program was:" >&5
5695 cat conftest.$ac_ext >&5
5696 rm -rf conftest*
5697 eval "ac_cv_header_$ac_safe=no"
5698fi
5699rm -f conftest*
5700fi
5701if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5702 echo "$ac_t""yes" 1>&6
5703 cat >> confdefs.h <<\EOF
5704#define HAVE_WCHAR_H 1
5705EOF
5706 wchar_h="yes"
5707else
5708 echo "$ac_t""no" 1>&6
5709wchar_h="no"
5710
5711fi
5712
5713
5714# check for usable wchar_t
5715usable_wchar_t="unkown"
5716echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005717echo "configure:5718: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005718if test "$cross_compiling" = yes; then
5719 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5720else
5721 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005722#line 5723 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005723#include "confdefs.h"
5724
5725#include "wchar.h"
5726#include "wctype.h"
5727main() {
5728 wchar_t s;
5729 if (sizeof(s) == 2)
5730 exit(0);
5731 else
5732 exit(1);
5733}
5734
5735EOF
Fred Drake5790be12000-10-09 17:06:13 +00005736if { (eval echo configure:5737: \"$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 +00005737then
5738 cat >> confdefs.h <<\EOF
5739#define HAVE_USABLE_WCHAR_T 1
5740EOF
5741 usable_wchar_t="yes"
5742else
5743 echo "configure: failed program was:" >&5
5744 cat conftest.$ac_ext >&5
5745 rm -fr conftest*
5746 usable_wchar_t="no"
5747fi
5748rm -fr conftest*
5749fi
5750
5751echo "$ac_t""$usable_wchar_t" 1>&6
5752
5753# check for endianness
5754echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005755echo "configure:5756: checking whether byte ordering is bigendian" >&5
5756if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005757 echo $ac_n "(cached) $ac_c" 1>&6
5758else
5759 ac_cv_c_bigendian=unknown
5760# See if sys/param.h defines the BYTE_ORDER macro.
5761cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005762#line 5763 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005763#include "confdefs.h"
5764#include <sys/types.h>
5765#include <sys/param.h>
5766int main() {
5767
5768#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5769 bogus endian macros
5770#endif
5771; return 0; }
5772EOF
Fred Drake5790be12000-10-09 17:06:13 +00005773if { (eval echo configure:5774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005774 rm -rf conftest*
5775 # It does; now see whether it defined to BIG_ENDIAN or not.
5776cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005777#line 5778 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005778#include "confdefs.h"
5779#include <sys/types.h>
5780#include <sys/param.h>
5781int main() {
5782
5783#if BYTE_ORDER != BIG_ENDIAN
5784 not big endian
5785#endif
5786; return 0; }
5787EOF
Fred Drake5790be12000-10-09 17:06:13 +00005788if { (eval echo configure:5789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005789 rm -rf conftest*
5790 ac_cv_c_bigendian=yes
5791else
5792 echo "configure: failed program was:" >&5
5793 cat conftest.$ac_ext >&5
5794 rm -rf conftest*
5795 ac_cv_c_bigendian=no
5796fi
5797rm -f conftest*
5798else
5799 echo "configure: failed program was:" >&5
5800 cat conftest.$ac_ext >&5
5801fi
5802rm -f conftest*
5803if test $ac_cv_c_bigendian = unknown; then
5804if test "$cross_compiling" = yes; then
5805 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5806else
5807 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005808#line 5809 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005809#include "confdefs.h"
5810main () {
5811 /* Are we little or big endian? From Harbison&Steele. */
5812 union
5813 {
5814 long l;
5815 char c[sizeof (long)];
5816 } u;
5817 u.l = 1;
5818 exit (u.c[sizeof (long) - 1] == 1);
5819}
5820EOF
Fred Drake5790be12000-10-09 17:06:13 +00005821if { (eval echo configure:5822: \"$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 +00005822then
5823 ac_cv_c_bigendian=no
5824else
5825 echo "configure: failed program was:" >&5
5826 cat conftest.$ac_ext >&5
5827 rm -fr conftest*
5828 ac_cv_c_bigendian=yes
5829fi
5830rm -fr conftest*
5831fi
5832
5833fi
5834fi
5835
5836echo "$ac_t""$ac_cv_c_bigendian" 1>&6
5837if test $ac_cv_c_bigendian = yes; then
5838 cat >> confdefs.h <<\EOF
5839#define WORDS_BIGENDIAN 1
5840EOF
5841
5842fi
5843
5844
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005845# Check whether right shifting a negative integer extends the sign bit
5846# or fills with zeros (like the Cray J90, according to Tim Peters).
5847echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005848echo "configure:5849: checking whether right shift extends the sign bit" >&5
5849if eval "test \"\${ac_cv_rshift_extends_sign+set}\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00005850 echo $ac_n "(cached) $ac_c" 1>&6
5851else
5852
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005853if test "$cross_compiling" = yes; then
5854 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5855else
5856 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005857#line 5858 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005858#include "confdefs.h"
5859
5860int main()
5861{
Vladimir Marangozova6180282000-07-12 05:05:06 +00005862 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005863}
5864
5865EOF
Fred Drake5790be12000-10-09 17:06:13 +00005866if { (eval echo configure:5867: \"$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 +00005867then
5868 ac_cv_rshift_extends_sign=yes
5869else
5870 echo "configure: failed program was:" >&5
5871 cat conftest.$ac_ext >&5
5872 rm -fr conftest*
5873 ac_cv_rshift_extends_sign=no
5874fi
5875rm -fr conftest*
5876fi
5877
5878fi
5879
5880echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
5881if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005882then
5883 cat >> confdefs.h <<\EOF
5884#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
5885EOF
5886
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005887fi
5888
5889
Guido van Rossum95713eb2000-05-18 20:53:31 +00005890# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
5891# Add sys/socket.h to confdefs.h
5892cat >> confdefs.h <<\EOF
5893#ifdef HAVE_SYS_SOCKET_H
5894#include <sys/socket.h>
5895#endif
5896EOF
5897echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Fred Drake5790be12000-10-09 17:06:13 +00005898echo "configure:5899: checking for socklen_t" >&5
5899if eval "test \"\${ac_cv_type_socklen_t+set}\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00005900 echo $ac_n "(cached) $ac_c" 1>&6
5901else
5902 cat > conftest.$ac_ext <<EOF
Fred Drake5790be12000-10-09 17:06:13 +00005903#line 5904 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005904#include "confdefs.h"
5905#include <sys/types.h>
5906#if STDC_HEADERS
5907#include <stdlib.h>
5908#include <stddef.h>
5909#endif
5910EOF
5911if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5912 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5913 rm -rf conftest*
Fred Drake5790be12000-10-09 17:06:13 +00005914 eval "ac_cv_type_socklen_t=yes"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005915else
5916 rm -rf conftest*
Fred Drake5790be12000-10-09 17:06:13 +00005917 eval "ac_cv_type_socklen_t=no"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005918fi
5919rm -f conftest*
5920
5921fi
Fred Drake5790be12000-10-09 17:06:13 +00005922if eval "test \"`echo '$ac_cv_type_'socklen_t`\" = yes"; then
5923 echo "$ac_t""yes" 1>&6
5924else
5925 echo "$ac_t""no" 1>&6
5926 cat >> confdefs.h <<EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00005927#define socklen_t int
5928EOF
5929
5930fi
5931
5932
Guido van Rossum627b2d71993-12-24 10:39:16 +00005933# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005934trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005935cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005936# This file is a shell script that caches the results of configure
5937# tests run on this system so they can be shared between configure
5938# scripts and configure runs. It is not useful on other systems.
5939# If it contains results you don't want to keep, you may remove or edit it.
5940#
5941# By default, configure uses ./config.cache as the cache file,
5942# creating it if it does not exist already. You can give configure
5943# the --cache-file=FILE option to use a different cache file; that is
5944# what configure does when it calls configure scripts in
5945# subdirectories, so they share the cache.
5946# Giving --cache-file=/dev/null disables caching, for debugging configure.
5947# config.status only pays attention to the cache file if you give it the
5948# --recheck option to rerun configure.
5949#
5950EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005951# The following way of writing the cache mishandles newlines in values,
5952# but we know of no workaround that is simple, portable, and efficient.
5953# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005954# Ultrix sh set writes to stderr and can't be redirected directly,
5955# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005956(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005957 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005958 *ac_space=\ *)
5959 # `set' does not quote correctly, so add quotes (double-quote substitution
5960 # turns \\\\ into \\, and sed turns \\ into \).
5961 sed -n \
5962 -e "s/'/'\\\\''/g" \
5963 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5964 ;;
5965 *)
5966 # `set' quotes correctly as required by POSIX, so do not add quotes.
5967 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5968 ;;
5969 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005970if cmp -s $cache_file confcache; then
5971 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005972else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005973 if test -w $cache_file; then
5974 echo "updating cache $cache_file"
5975 cat confcache > $cache_file
5976 else
5977 echo "not updating unwritable cache $cache_file"
5978 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005979fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005980rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00005981
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005982trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005983
5984test "x$prefix" = xNONE && prefix=$ac_default_prefix
5985# Let make expand exec_prefix.
5986test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00005987
Guido van Rossum7f43da71994-08-01 12:15:30 +00005988# Any assignment to VPATH causes Sun make to only execute
5989# the first set of double-colon rules, so remove it if not needed.
5990# If there is a colon in the path, we need to keep it.
5991if test "x$srcdir" = x.; then
5992 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5993fi
5994
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005995trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00005996
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005997DEFS=-DHAVE_CONFIG_H
5998
5999# Without the "./", some shells look in PATH for config.status.
6000: ${CONFIG_STATUS=./config.status}
6001
6002echo creating $CONFIG_STATUS
6003rm -f $CONFIG_STATUS
6004cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006005#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00006006# Generated automatically by configure.
6007# Run this file to recreate the current configuration.
6008# This directory was configured as follows,
6009# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6010#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006011# $0 $ac_configure_args
6012#
6013# Compiler output produced by configure, useful for debugging
6014# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00006015
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006016ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006017for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00006018do
Guido van Rossum7f43da71994-08-01 12:15:30 +00006019 case "\$ac_option" in
6020 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006021 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6022 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00006023 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Fred Drake5790be12000-10-09 17:06:13 +00006024 echo "$CONFIG_STATUS generated by autoconf version 2.14.1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006025 exit 0 ;;
6026 -help | --help | --hel | --he | --h)
6027 echo "\$ac_cs_usage"; exit 0 ;;
6028 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006029 esac
6030done
6031
Guido van Rossum7f43da71994-08-01 12:15:30 +00006032ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00006033
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006034trap 'rm -fr `echo "Makefile \
6035 Objects/Makefile \
6036 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006037 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006038 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006039 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006040 Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006041EOF
6042cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006043
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006044# Protect against being on the right side of a sed subst in config.status.
6045sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6046 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006047$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00006048$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006049s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006050s%@CFLAGS@%$CFLAGS%g
6051s%@CPPFLAGS@%$CPPFLAGS%g
6052s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006053s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006054s%@DEFS@%$DEFS%g
6055s%@LDFLAGS@%$LDFLAGS%g
6056s%@LIBS@%$LIBS%g
6057s%@exec_prefix@%$exec_prefix%g
6058s%@prefix@%$prefix%g
6059s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006060s%@bindir@%$bindir%g
6061s%@sbindir@%$sbindir%g
6062s%@libexecdir@%$libexecdir%g
6063s%@datadir@%$datadir%g
6064s%@sysconfdir@%$sysconfdir%g
6065s%@sharedstatedir@%$sharedstatedir%g
6066s%@localstatedir@%$localstatedir%g
6067s%@libdir@%$libdir%g
6068s%@includedir@%$includedir%g
6069s%@oldincludedir@%$oldincludedir%g
6070s%@infodir@%$infodir%g
6071s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00006072s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006073s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00006074s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00006075s%@SET_CXX@%$SET_CXX%g
6076s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006077s%@CC@%$CC%g
Guido van Rossumff555e32000-09-22 15:38:21 +00006078s%@EXE@%$EXE%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006079s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
6080s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00006081s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006082s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006083s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006084s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006085s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6086s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006087s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006088s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006089s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006090s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006091s%@SO@%$SO%g
6092s%@LDSHARED@%$LDSHARED%g
6093s%@CCSHARED@%$CCSHARED%g
6094s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00006095s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00006096s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00006097s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Fred Drakea50d6ec2000-08-31 16:13:20 +00006098s%@USE_BSDDB_MODULE@%$USE_BSDDB_MODULE%g
Skip Montanaroed33c9a2000-09-08 02:17:15 +00006099s%@HAVE_LIBDB@%$HAVE_LIBDB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006100s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00006101s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006102s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006103s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
6104s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
6105s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006106s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006107s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006108s%@LIBM@%$LIBM%g
6109s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006110
6111CEOF
6112EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006113
6114cat >> $CONFIG_STATUS <<\EOF
6115
6116# Split the substitutions into bite-sized pieces for seds with
6117# small command number limits, like on Digital OSF/1 and HP-UX.
6118ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6119ac_file=1 # Number of current file.
6120ac_beg=1 # First line for current file.
6121ac_end=$ac_max_sed_cmds # Line after last line for current file.
6122ac_more_lines=:
6123ac_sed_cmds=""
6124while $ac_more_lines; do
6125 if test $ac_beg -gt 1; then
6126 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6127 else
6128 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6129 fi
6130 if test ! -s conftest.s$ac_file; then
6131 ac_more_lines=false
6132 rm -f conftest.s$ac_file
6133 else
6134 if test -z "$ac_sed_cmds"; then
6135 ac_sed_cmds="sed -f conftest.s$ac_file"
6136 else
6137 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6138 fi
6139 ac_file=`expr $ac_file + 1`
6140 ac_beg=$ac_end
6141 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6142 fi
6143done
6144if test -z "$ac_sed_cmds"; then
6145 ac_sed_cmds=cat
6146fi
6147EOF
6148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006149cat >> $CONFIG_STATUS <<EOF
6150
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006151CONFIG_FILES=\${CONFIG_FILES-"Makefile \
6152 Objects/Makefile \
6153 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006154 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006155 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006156 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006157 Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006158EOF
6159cat >> $CONFIG_STATUS <<\EOF
6160for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006161 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006162 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006163 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006164 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6165 *) ac_file_in="${ac_file}.in" ;;
6166 esac
6167
Guido van Rossumf78abae1997-01-21 22:02:36 +00006168 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006169
6170 # Remove last slash and all that follows it. Not all systems have dirname.
6171 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6172 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6173 # The file is in a subdirectory.
6174 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006175 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006176 # A "../" for each directory in $ac_dir_suffix.
6177 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6178 else
6179 ac_dir_suffix= ac_dots=
6180 fi
6181
6182 case "$ac_given_srcdir" in
6183 .) srcdir=.
6184 if test -z "$ac_dots"; then top_srcdir=.
6185 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6186 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6187 *) # Relative path.
6188 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6189 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6190 esac
6191
Guido van Rossumf78abae1997-01-21 22:02:36 +00006192
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006193 echo creating "$ac_file"
6194 rm -f "$ac_file"
6195 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6196 case "$ac_file" in
6197 *Makefile*) ac_comsub="1i\\
6198# $configure_input" ;;
6199 *) ac_comsub= ;;
6200 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006201
6202 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 +00006203 sed -e "$ac_comsub
6204s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006205s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006206s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00006207" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00006208fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00006209rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006210
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006211# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6212# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00006213#
6214# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006215ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6216ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006217ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006218ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006219# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006220ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6221ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006222ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006223ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006224# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006225ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6226ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006227ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006228ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006229
Guido van Rossumf78abae1997-01-21 22:02:36 +00006230if test "${CONFIG_HEADERS+set}" != set; then
6231EOF
6232cat >> $CONFIG_STATUS <<EOF
6233 CONFIG_HEADERS="config.h"
6234EOF
6235cat >> $CONFIG_STATUS <<\EOF
6236fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006237for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006238 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006239 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006240 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006241 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6242 *) ac_file_in="${ac_file}.in" ;;
6243 esac
6244
Guido van Rossum7f43da71994-08-01 12:15:30 +00006245 echo creating $ac_file
6246
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006247 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006248 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6249 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006250
6251EOF
6252
6253# Transform confdefs.h into a sed script conftest.vals that substitutes
6254# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006255# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006256# Protect against being in an unquoted here document in config.status.
6257rm -f conftest.vals
6258cat > conftest.hdr <<\EOF
6259s/[\\&%]/\\&/g
6260s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006261s%#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 +00006262s%ac_d%ac_u%gp
6263s%ac_u%ac_e%gp
6264EOF
6265sed -n -f conftest.hdr confdefs.h > conftest.vals
6266rm -f conftest.hdr
6267
6268# This sed command replaces #undef with comments. This is necessary, for
6269# example, in the case of _POSIX_SOURCE, which is predefined and required
6270# on some systems where configure will not decide to define it.
6271cat >> conftest.vals <<\EOF
6272s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6273EOF
6274
6275# Break up conftest.vals because some shells have a limit on
6276# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006277
6278rm -f conftest.tail
6279while :
6280do
6281 ac_lines=`grep -c . conftest.vals`
6282 # grep -c gives empty output for an empty file on some AIX systems.
6283 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6284 # Write a limited-size here document to conftest.frag.
6285 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6286 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6287 echo 'CEOF
6288 sed -f conftest.frag conftest.in > conftest.out
6289 rm -f conftest.in
6290 mv conftest.out conftest.in
6291' >> $CONFIG_STATUS
6292 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6293 rm -f conftest.vals
6294 mv conftest.tail conftest.vals
6295done
6296rm -f conftest.vals
6297
6298cat >> $CONFIG_STATUS <<\EOF
6299 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006300 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006301 cat conftest.in >> conftest.h
6302 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006303 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006304 echo "$ac_file is unchanged"
6305 rm -f conftest.h
6306 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006307 # Remove last slash and all that follows it. Not all systems have dirname.
6308 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6309 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6310 # The file is in a subdirectory.
6311 test ! -d "$ac_dir" && mkdir "$ac_dir"
6312 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006313 rm -f $ac_file
6314 mv conftest.h $ac_file
6315 fi
6316fi; done
6317
Guido van Rossumf78abae1997-01-21 22:02:36 +00006318EOF
6319cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006320
Guido van Rossumf78abae1997-01-21 22:02:36 +00006321EOF
6322cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006323
6324exit 0
6325EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006326chmod +x $CONFIG_STATUS
6327rm -fr confdefs* $ac_clean_files
Fred Drake5790be12000-10-09 17:06:13 +00006328test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006329