blob: 5b4052a5ca932f7b7d771c367d44573046b4707b [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 Rossum4c3f57c2001-01-10 20:40:46 +00003# From configure.in Revision: 1.185
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004
Guido van Rossum627b2d71993-12-24 10:39:16 +00005# Guess values for system-dependent variables and create Makefiles.
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006# Generated automatically using autoconf version 2.13
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000011
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# Defaults:
13ac_help=
14ac_default_prefix=/usr/local
15# Any additions from configure.in:
16ac_help="$ac_help
Barry 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 Rossum4c3f57c2001-01-10 20:40:46 +000056ac_help="$ac_help
57 --with-check-import-case enable imported module name case checking"
Guido van Rossum627b2d71993-12-24 10:39:16 +000058
Guido van Rossum7f43da71994-08-01 12:15:30 +000059# Initialize some variables set by options.
60# The variables have the same names as the options, with
61# dashes changed to underlines.
62build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000063cache_file=./config.cache
64exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000065host=NONE
66no_create=
67nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000068no_recursion=
69prefix=NONE
70program_prefix=NONE
71program_suffix=NONE
72program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000073silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000074site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000075srcdir=
76target=NONE
77verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000078x_includes=NONE
79x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000080bindir='${exec_prefix}/bin'
81sbindir='${exec_prefix}/sbin'
82libexecdir='${exec_prefix}/libexec'
83datadir='${prefix}/share'
84sysconfdir='${prefix}/etc'
85sharedstatedir='${prefix}/com'
86localstatedir='${prefix}/var'
87libdir='${exec_prefix}/lib'
88includedir='${prefix}/include'
89oldincludedir='/usr/include'
90infodir='${prefix}/info'
91mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000092
93# Initialize some other variables.
94subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000095MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000096SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +000097# Maximum number of lines to put in a shell here document.
98ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +000099
100ac_prev=
101for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000102do
Guido van Rossum627b2d71993-12-24 10:39:16 +0000103
Guido van Rossum7f43da71994-08-01 12:15:30 +0000104 # If the previous option needs an argument, assign it.
105 if test -n "$ac_prev"; then
106 eval "$ac_prev=\$ac_option"
107 ac_prev=
108 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000109 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000110
Guido van Rossum7f43da71994-08-01 12:15:30 +0000111 case "$ac_option" in
112 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
113 *) ac_optarg= ;;
114 esac
115
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000116 # Accept the important Cygnus configure options, so we can diagnose typos.
117
Guido van Rossum7f43da71994-08-01 12:15:30 +0000118 case "$ac_option" in
119
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000120 -bindir | --bindir | --bindi | --bind | --bin | --bi)
121 ac_prev=bindir ;;
122 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
123 bindir="$ac_optarg" ;;
124
125 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000126 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000127 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000128 build="$ac_optarg" ;;
129
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000130 -cache-file | --cache-file | --cache-fil | --cache-fi \
131 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
132 ac_prev=cache_file ;;
133 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
134 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
135 cache_file="$ac_optarg" ;;
136
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000137 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
138 ac_prev=datadir ;;
139 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
140 | --da=*)
141 datadir="$ac_optarg" ;;
142
Guido van Rossum7f43da71994-08-01 12:15:30 +0000143 -disable-* | --disable-*)
144 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000145 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000146 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000147 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000148 fi
149 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
150 eval "enable_${ac_feature}=no" ;;
151
152 -enable-* | --enable-*)
153 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000154 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000155 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000156 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000157 fi
158 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
159 case "$ac_option" in
160 *=*) ;;
161 *) ac_optarg=yes ;;
162 esac
163 eval "enable_${ac_feature}='$ac_optarg'" ;;
164
Guido van Rossum7f43da71994-08-01 12:15:30 +0000165 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
166 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
167 | --exec | --exe | --ex)
168 ac_prev=exec_prefix ;;
169 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
170 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
171 | --exec=* | --exe=* | --ex=*)
172 exec_prefix="$ac_optarg" ;;
173
174 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000175 # Obsolete; use --with-gas.
176 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000177
178 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000179 # Omit some internal or obsolete options to make the list less imposing.
180 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000181 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000182Usage: configure [options] [host]
183Options: [defaults in brackets after descriptions]
184Configuration:
185 --cache-file=FILE cache test results in FILE
186 --help print this message
187 --no-create do not create output files
188 --quiet, --silent do not print \`checking...' messages
189 --version print the version of autoconf that created configure
190Directory and file names:
191 --prefix=PREFIX install architecture-independent files in PREFIX
192 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000193 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000194 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000195 --bindir=DIR user executables in DIR [EPREFIX/bin]
196 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
197 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
198 --datadir=DIR read-only architecture-independent data in DIR
199 [PREFIX/share]
200 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
201 --sharedstatedir=DIR modifiable architecture-independent data in DIR
202 [PREFIX/com]
203 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
204 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
205 --includedir=DIR C header files in DIR [PREFIX/include]
206 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
207 --infodir=DIR info documentation in DIR [PREFIX/info]
208 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000209 --srcdir=DIR find the sources in DIR [configure dir or ..]
210 --program-prefix=PREFIX prepend PREFIX to installed program names
211 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000212 --program-transform-name=PROGRAM
213 run sed PROGRAM on installed program names
214EOF
215 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000216Host type:
217 --build=BUILD configure for building on BUILD [BUILD=HOST]
218 --host=HOST configure for HOST [guessed]
219 --target=TARGET configure for TARGET [TARGET=HOST]
220Features and packages:
221 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
222 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
223 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
224 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
225 --x-includes=DIR X include files are in DIR
226 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000227EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000228 if test -n "$ac_help"; then
229 echo "--enable and --with options recognized:$ac_help"
230 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000231 exit 0 ;;
232
233 -host | --host | --hos | --ho)
234 ac_prev=host ;;
235 -host=* | --host=* | --hos=* | --ho=*)
236 host="$ac_optarg" ;;
237
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000238 -includedir | --includedir | --includedi | --included | --include \
239 | --includ | --inclu | --incl | --inc)
240 ac_prev=includedir ;;
241 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
242 | --includ=* | --inclu=* | --incl=* | --inc=*)
243 includedir="$ac_optarg" ;;
244
245 -infodir | --infodir | --infodi | --infod | --info | --inf)
246 ac_prev=infodir ;;
247 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
248 infodir="$ac_optarg" ;;
249
250 -libdir | --libdir | --libdi | --libd)
251 ac_prev=libdir ;;
252 -libdir=* | --libdir=* | --libdi=* | --libd=*)
253 libdir="$ac_optarg" ;;
254
255 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
256 | --libexe | --libex | --libe)
257 ac_prev=libexecdir ;;
258 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
259 | --libexe=* | --libex=* | --libe=*)
260 libexecdir="$ac_optarg" ;;
261
262 -localstatedir | --localstatedir | --localstatedi | --localstated \
263 | --localstate | --localstat | --localsta | --localst \
264 | --locals | --local | --loca | --loc | --lo)
265 ac_prev=localstatedir ;;
266 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
267 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
268 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
269 localstatedir="$ac_optarg" ;;
270
271 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
272 ac_prev=mandir ;;
273 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
274 mandir="$ac_optarg" ;;
275
Guido van Rossum7f43da71994-08-01 12:15:30 +0000276 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000277 # Obsolete; use --without-fp.
278 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000279
280 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
281 | --no-cr | --no-c)
282 no_create=yes ;;
283
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000284 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
285 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
286 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000287
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000288 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
289 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
290 | --oldin | --oldi | --old | --ol | --o)
291 ac_prev=oldincludedir ;;
292 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
293 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
294 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
295 oldincludedir="$ac_optarg" ;;
296
Guido van Rossum7f43da71994-08-01 12:15:30 +0000297 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
298 ac_prev=prefix ;;
299 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
300 prefix="$ac_optarg" ;;
301
302 -program-prefix | --program-prefix | --program-prefi | --program-pref \
303 | --program-pre | --program-pr | --program-p)
304 ac_prev=program_prefix ;;
305 -program-prefix=* | --program-prefix=* | --program-prefi=* \
306 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
307 program_prefix="$ac_optarg" ;;
308
309 -program-suffix | --program-suffix | --program-suffi | --program-suff \
310 | --program-suf | --program-su | --program-s)
311 ac_prev=program_suffix ;;
312 -program-suffix=* | --program-suffix=* | --program-suffi=* \
313 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
314 program_suffix="$ac_optarg" ;;
315
316 -program-transform-name | --program-transform-name \
317 | --program-transform-nam | --program-transform-na \
318 | --program-transform-n | --program-transform- \
319 | --program-transform | --program-transfor \
320 | --program-transfo | --program-transf \
321 | --program-trans | --program-tran \
322 | --progr-tra | --program-tr | --program-t)
323 ac_prev=program_transform_name ;;
324 -program-transform-name=* | --program-transform-name=* \
325 | --program-transform-nam=* | --program-transform-na=* \
326 | --program-transform-n=* | --program-transform-=* \
327 | --program-transform=* | --program-transfor=* \
328 | --program-transfo=* | --program-transf=* \
329 | --program-trans=* | --program-tran=* \
330 | --progr-tra=* | --program-tr=* | --program-t=*)
331 program_transform_name="$ac_optarg" ;;
332
333 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
334 | -silent | --silent | --silen | --sile | --sil)
335 silent=yes ;;
336
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000337 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
338 ac_prev=sbindir ;;
339 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
340 | --sbi=* | --sb=*)
341 sbindir="$ac_optarg" ;;
342
343 -sharedstatedir | --sharedstatedir | --sharedstatedi \
344 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
345 | --sharedst | --shareds | --shared | --share | --shar \
346 | --sha | --sh)
347 ac_prev=sharedstatedir ;;
348 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
349 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
350 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
351 | --sha=* | --sh=*)
352 sharedstatedir="$ac_optarg" ;;
353
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000354 -site | --site | --sit)
355 ac_prev=site ;;
356 -site=* | --site=* | --sit=*)
357 site="$ac_optarg" ;;
358
Guido van Rossum7f43da71994-08-01 12:15:30 +0000359 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
360 ac_prev=srcdir ;;
361 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
362 srcdir="$ac_optarg" ;;
363
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000364 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
365 | --syscon | --sysco | --sysc | --sys | --sy)
366 ac_prev=sysconfdir ;;
367 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
368 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
369 sysconfdir="$ac_optarg" ;;
370
Guido van Rossum7f43da71994-08-01 12:15:30 +0000371 -target | --target | --targe | --targ | --tar | --ta | --t)
372 ac_prev=target ;;
373 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
374 target="$ac_optarg" ;;
375
376 -v | -verbose | --verbose | --verbos | --verbo | --verb)
377 verbose=yes ;;
378
379 -version | --version | --versio | --versi | --vers)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000380 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 exit 0 ;;
382
383 -with-* | --with-*)
384 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000385 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000386 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000387 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000388 fi
389 ac_package=`echo $ac_package| sed 's/-/_/g'`
390 case "$ac_option" in
391 *=*) ;;
392 *) ac_optarg=yes ;;
393 esac
394 eval "with_${ac_package}='$ac_optarg'" ;;
395
396 -without-* | --without-*)
397 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000398 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000400 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000401 fi
402 ac_package=`echo $ac_package| sed 's/-/_/g'`
403 eval "with_${ac_package}=no" ;;
404
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000405 --x)
406 # Obsolete; use --with-x.
407 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000408
409 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
410 | --x-incl | --x-inc | --x-in | --x-i)
411 ac_prev=x_includes ;;
412 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
413 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
414 x_includes="$ac_optarg" ;;
415
416 -x-libraries | --x-libraries | --x-librarie | --x-librari \
417 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
418 ac_prev=x_libraries ;;
419 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
420 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
421 x_libraries="$ac_optarg" ;;
422
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000423 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000424 ;;
425
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000426 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000427 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000428 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000429 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000430 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000431 { 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 +0000432 fi
433 nonopt="$ac_option"
434 ;;
435
436 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000437done
438
Guido van Rossum7f43da71994-08-01 12:15:30 +0000439if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000440 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000441fi
442
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000443trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000444
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000445# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000446# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000447# 1 file creation
448# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000449# 3 some systems may open it to /dev/tty
450# 4 used on the Kubota Titan
451# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000452# 5 compiler messages saved in config.log
453if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000454 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000455else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000456 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000457fi
458exec 5>./config.log
459
460echo "\
461This file contains any messages produced by compilers while
462running configure, to aid debugging if configure makes a mistake.
463" 1>&5
464
465# Strip out --no-create and --no-recursion so they do not pile up.
466# Also quote any args containing shell metacharacters.
467ac_configure_args=
468for ac_arg
469do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000470 case "$ac_arg" in
471 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
472 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000473 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
474 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
475 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
476 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
477 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000478 esac
479done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000480
481# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000482# Only set these to C if already set. These must not be set unconditionally
483# because not all systems understand e.g. LANG=C (notably SCO).
484# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
485# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000486if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000487if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
488if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
489if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000490
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491# confdefs.h avoids OS command line length limits that DEFS can exceed.
492rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000493# AIX cpp loses on an empty file, so make sure it contains at least a newline.
494echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000495
496# A filename unique to this package, relative to the directory that
497# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000499
500# Find the source files, if location was not specified.
501if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000502 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000503 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000504 ac_prog=$0
505 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
506 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
507 srcdir=$ac_confdir
508 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000509 srcdir=..
510 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000511else
512 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000513fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000514if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000515 if test "$ac_srcdir_defaulted" = yes; then
516 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000517 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000518 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000519 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000520fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000521srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
522
523# Prefer explicitly selected file to automatically selected ones.
524if test -z "$CONFIG_SITE"; then
525 if test "x$prefix" != xNONE; then
526 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
527 else
528 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
529 fi
530fi
531for ac_site_file in $CONFIG_SITE; do
532 if test -r "$ac_site_file"; then
533 echo "loading site script $ac_site_file"
534 . "$ac_site_file"
535 fi
536done
537
538if test -r "$cache_file"; then
539 echo "loading cache $cache_file"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000540 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000541else
542 echo "creating cache $cache_file"
543 > $cache_file
544fi
545
Guido van Rossum7f43da71994-08-01 12:15:30 +0000546ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000547# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000549ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000550ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000551cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000552
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000553ac_exeext=
554ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000555if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
556 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
557 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
558 ac_n= ac_c='
559' ac_t=' '
560 else
561 ac_n=-n ac_c= ac_t=
562 fi
563else
564 ac_n= ac_c='\c' ac_t=
565fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000566
Guido van Rossum0a516c91994-09-12 10:58:40 +0000567
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000568
Guido van Rossum627b2d71993-12-24 10:39:16 +0000569
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000570# Set VERSION so we only need to edit in one place (i.e., here)
571
Guido van Rossumb9a22a12000-06-30 02:48:53 +0000572VERSION=2.0
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000573
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000574# NEXTSTEP|MacOSX|Darwin stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000575if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000576
577 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +0000578echo "configure:579: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000579 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000580if test "${with_next_archs+set}" = set; then
581 withval="$with_next_archs"
582
Guido van Rossum563e7081996-09-10 18:20:48 +0000583 if test -n "$withval"; then
584 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
585 # GCC does not currently support multi archs on the NeXT
586 with_gcc=no
587 fi
588 echo "$ac_t""$with_next_archs" 1>&6
589
590else
591 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000592fi
593
Guido van Rossum563e7081996-09-10 18:20:48 +0000594
595 if test -z "$MACHDEP"
596 then
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000597 ac_sys_system=`uname -s`
598 if test "$ac_sys_system" = "Darwin" ; then
599 ac_sys_release=`uname -r`
600 else
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000601 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000602 sed -e 's/://' -e 's/\./_/'` && \
603 ac_sys_system=next && ac_sys_release=$4
604 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000605
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000606 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000607 fi
608fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000609
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000610# Check whether --with-next-framework or --without-next-framework was given.
611if test "${with_next_framework+set}" = set; then
612 withval="$with_next_framework"
613 :
614fi
615
616# Check whether --with-dyld or --without-dyld was given.
617if test "${with_dyld+set}" = set; then
618 withval="$with_dyld"
619 :
620fi
621
Guido van Rossum91922671997-10-09 20:24:13 +0000622
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000623# Set name for machine-dependent library files
624
625echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +0000626echo "configure:627: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000627if test -z "$MACHDEP"
628then
Guido van Rossum563e7081996-09-10 18:20:48 +0000629 ac_sys_system=`uname -s`
Trent Mick635f6fb2000-08-23 21:33:05 +0000630 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000631 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000632 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000633 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000634 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000635 ac_md_system=`echo $ac_sys_system |
636 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
637 ac_md_release=`echo $ac_sys_release |
638 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000639 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000640
Guido van Rossum07397971997-04-29 21:49:50 +0000641 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000642 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000643 esac
644fi
Guido van Rossum91922671997-10-09 20:24:13 +0000645
646#
647# SGI compilers allow the specification of the both the ABI and the
648# ISA on the command line. Depending on the values of these switches,
649# different and often incompatable code will be generated.
650#
651# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
652# thus supply support for various ABI/ISA combinations. The MACHDEP
653# variable is also adjusted.
654#
655
656if test ! -z "$SGI_ABI"
657then
658 CC="cc $SGI_ABI"
659 LDFLAGS="$SGI_ABI $LDFLAGS"
660 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
661fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000662echo "$ac_t""$MACHDEP" 1>&6
663
Guido van Rossum91922671997-10-09 20:24:13 +0000664#
665# CCC is the command that compiles C++ programs
666#
667# Not all make programs have this predefined.
668#
Guido van Rossum95012191999-12-16 17:50:52 +0000669#AC_SUBST(SET_CCC)
670#AC_MSG_CHECKING(CCC)
671#if test -z "$CCC"
672#then
673# case $ac_sys_system in
674# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
675# Linux*) SET_CCC="CCC= g++";;
676# *) SET_CCC=""
677# esac
678#else
679# SET_CCC="CCC= ${CCC}"
680#fi
681#AC_MSG_RESULT($SET_CCC)
Guido van Rossum91922671997-10-09 20:24:13 +0000682
683
Guido van Rossum627b2d71993-12-24 10:39:16 +0000684# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000685echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +0000686echo "configure:687: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000687# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000688if test "${with_gcc+set}" = set; then
689 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000690
691 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000692 no) CC=cc
693 without_gcc=yes;;
694 yes) CC=gcc
695 without_gcc=no;;
696 *) CC=$withval
697 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000698 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000699else
Guido van Rossume77438c1995-09-13 18:59:59 +0000700
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000701 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000702 OSF1) CC=cc
703 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000704 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000705 case $BE_HOST_CPU in
706 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000707 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000708 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000709 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
710 CCSHARED="UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000711 LDFLAGS="$LDFLAGS -nodup"
712
713 AR="$PWD/BeOS/ar-fake"
714 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000715 ;;
716 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000717 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000718 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000719 OPT=-O
720 # Really should use srcdir instead of PWD
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000721 AR="$PWD/BeOS/ar-fake"
722 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000723 ;;
724 *)
Fred Drake5790be12000-10-09 17:06:13 +0000725 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000726 ;;
727 esac
728 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000729 Monterey*)
730 RANLIB=:
731 without_gcc=;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000732 *) without_gcc=no;;
733 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000734fi
735
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000736echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000737
Guido van Rossum95012191999-12-16 17:50:52 +0000738
739
740MAINOBJ=python.o
741echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +0000742echo "configure:743: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000743# Check whether --with-cxx or --without-cxx was given.
744if test "${with_cxx+set}" = set; then
745 withval="$with_cxx"
746
Martin v. Löwis22352952000-12-13 17:37:02 +0000747 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000748 case $withval in
749 no) CXX=
750 with_cxx=no;;
751 *) CXX=$withval
752 MAINOBJ=ccpython.o
753 with_cxx=$withval;;
754 esac
755else
756
757 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000758 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000759
760fi
761
762echo "$ac_t""$with_cxx" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000763
764
765if test "$check_cxx" = "yes"
766then
767 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
768do
769# Extract the first word of "$ac_prog", so it can be a program name with args.
770set dummy $ac_prog; ac_word=$2
771echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +0000772echo "configure:773: checking for $ac_word" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000773if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
774 echo $ac_n "(cached) $ac_c" 1>&6
775else
776 if test -n "$CXX"; then
777 ac_cv_prog_CXX="$CXX" # Let the user override the test.
778else
779 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
780 ac_dummy="$PATH"
781 for ac_dir in $ac_dummy; do
782 test -z "$ac_dir" && ac_dir=.
783 if test -f $ac_dir/$ac_word; then
784 ac_cv_prog_CXX="$ac_prog"
785 break
786 fi
787 done
788 IFS="$ac_save_ifs"
789fi
790fi
791CXX="$ac_cv_prog_CXX"
792if test -n "$CXX"; then
793 echo "$ac_t""$CXX" 1>&6
794else
795 echo "$ac_t""no" 1>&6
796fi
797
798test -n "$CXX" && break
799done
800test -n "$CXX" || CXX="notfound"
801
802 if test "$CXX" = "notfound"
803 then
804 CXX=
805 else
806 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +0000807echo "configure:808: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000808
809ac_ext=C
810# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
811ac_cpp='$CXXCPP $CPPFLAGS'
812ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
813ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
814cross_compiling=$ac_cv_prog_cxx_cross
815
816cat > conftest.$ac_ext << EOF
817
Guido van Rossum4c3f57c2001-01-10 20:40:46 +0000818#line 819 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000819#include "confdefs.h"
820
821int main(){return(0);}
822EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +0000823if { (eval echo configure:824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis22352952000-12-13 17:37:02 +0000824 ac_cv_prog_cxx_works=yes
825 # If we can't run a trivial program, we are probably using a cross compiler.
826 if (./conftest; exit) 2>/dev/null; then
827 ac_cv_prog_cxx_cross=no
828 else
829 ac_cv_prog_cxx_cross=yes
830 fi
831else
832 echo "configure: failed program was:" >&5
833 cat conftest.$ac_ext >&5
834 ac_cv_prog_cxx_works=no
835fi
836rm -fr conftest*
837ac_ext=c
838# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
839ac_cpp='$CPP $CPPFLAGS'
840ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
841ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
842cross_compiling=$ac_cv_prog_cc_cross
843
844echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
845if test $ac_cv_prog_cxx_works = no; then
846 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
847fi
848echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +0000849echo "configure:850: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000850echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
851cross_compiling=$ac_cv_prog_cxx_cross
852
853 fi
854fi
855
Guido van Rossume1262332000-09-22 19:41:56 +0000856SET_CXX="CXX=$CXX"
Guido van Rossum95012191999-12-16 17:50:52 +0000857
Martin v. Löwis22352952000-12-13 17:37:02 +0000858
Guido van Rossum95012191999-12-16 17:50:52 +0000859#AC_MSG_CHECKING(CCC)
860#if test -z "$CCC"
861#then
862# case $ac_sys_system in
863# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
864# Linux*) SET_CCC="CCC= g++";;
865# *) SET_CCC=""
866# esac
867#else
868# SET_CCC="CCC= ${CCC}"
869#fi
870#AC_MSG_RESULT($SET_CCC)
871
Guido van Rossum8b131c51995-03-09 14:10:13 +0000872# If the user switches compilers, we can't believe the cache
873if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
874then
875 { echo "configure: error: cached CC is different -- throw away $cache_file
876(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
877fi
878
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879# Extract the first word of "gcc", so it can be a program name with args.
880set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000881echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +0000882echo "configure:883: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000883if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000884 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885else
886 if test -n "$CC"; then
887 ac_cv_prog_CC="$CC" # Let the user override the test.
888else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000889 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
890 ac_dummy="$PATH"
891 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892 test -z "$ac_dir" && ac_dir=.
893 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000894 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000895 break
896 fi
897 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000899fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000900fi
901CC="$ac_cv_prog_CC"
902if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000903 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000905 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000907
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908if test -z "$CC"; then
909 # Extract the first word of "cc", so it can be a program name with args.
910set dummy cc; ac_word=$2
911echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +0000912echo "configure:913: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000913if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 echo $ac_n "(cached) $ac_c" 1>&6
915else
916 if test -n "$CC"; then
917 ac_cv_prog_CC="$CC" # Let the user override the test.
918else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000919 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000921 ac_dummy="$PATH"
922 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923 test -z "$ac_dir" && ac_dir=.
924 if test -f $ac_dir/$ac_word; then
925 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
926 ac_prog_rejected=yes
927 continue
928 fi
929 ac_cv_prog_CC="cc"
930 break
931 fi
932 done
933 IFS="$ac_save_ifs"
934if test $ac_prog_rejected = yes; then
935 # We found a bogon in the path, so make sure we never use it.
936 set dummy $ac_cv_prog_CC
937 shift
938 if test $# -gt 0; then
939 # We chose a different compiler from the bogus one.
940 # However, it has the same basename, so the bogon will be chosen
941 # first if we set CC to just the basename; use the full file name.
942 shift
943 set dummy "$ac_dir/$ac_word" "$@"
944 shift
945 ac_cv_prog_CC="$@"
946 fi
947fi
948fi
949fi
950CC="$ac_cv_prog_CC"
951if test -n "$CC"; then
952 echo "$ac_t""$CC" 1>&6
953else
954 echo "$ac_t""no" 1>&6
955fi
956
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000957 if test -z "$CC"; then
958 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000959 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000960 # Extract the first word of "cl", so it can be a program name with args.
961set dummy cl; ac_word=$2
962echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +0000963echo "configure:964: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000964if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000965 echo $ac_n "(cached) $ac_c" 1>&6
966else
967 if test -n "$CC"; then
968 ac_cv_prog_CC="$CC" # Let the user override the test.
969else
970 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
971 ac_dummy="$PATH"
972 for ac_dir in $ac_dummy; do
973 test -z "$ac_dir" && ac_dir=.
974 if test -f $ac_dir/$ac_word; then
975 ac_cv_prog_CC="cl"
976 break
977 fi
978 done
979 IFS="$ac_save_ifs"
980fi
981fi
982CC="$ac_cv_prog_CC"
983if test -n "$CC"; then
984 echo "$ac_t""$CC" 1>&6
985else
986 echo "$ac_t""no" 1>&6
987fi
988 ;;
989 esac
990 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
992fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000994echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +0000995echo "configure:996: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000996
997ac_ext=c
998# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
999ac_cpp='$CPP $CPPFLAGS'
1000ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001001ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +00001002cross_compiling=$ac_cv_prog_cc_cross
1003
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001004cat > conftest.$ac_ext << EOF
1005
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001006#line 1007 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +00001007#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001008
Guido van Rossumf78abae1997-01-21 22:02:36 +00001009main(){return(0);}
1010EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001011if { (eval echo configure:1012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001012 ac_cv_prog_cc_works=yes
1013 # If we can't run a trivial program, we are probably using a cross compiler.
1014 if (./conftest; exit) 2>/dev/null; then
1015 ac_cv_prog_cc_cross=no
1016 else
1017 ac_cv_prog_cc_cross=yes
1018 fi
1019else
1020 echo "configure: failed program was:" >&5
1021 cat conftest.$ac_ext >&5
1022 ac_cv_prog_cc_works=no
1023fi
1024rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001025ac_ext=c
1026# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1027ac_cpp='$CPP $CPPFLAGS'
1028ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1029ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1030cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +00001031
1032echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1033if test $ac_cv_prog_cc_works = no; then
1034 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1035fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001036echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001037echo "configure:1038: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001038echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1039cross_compiling=$ac_cv_prog_cc_cross
1040
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001041echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001042echo "configure:1043: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001043if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001044 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001045else
1046 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001047#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001048 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001049#endif
1050EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001051if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001052 ac_cv_prog_gcc=yes
1053else
1054 ac_cv_prog_gcc=no
1055fi
1056fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001058echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001059
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001060if test $ac_cv_prog_gcc = yes; then
1061 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001062else
1063 GCC=
1064fi
1065
1066ac_test_CFLAGS="${CFLAGS+set}"
1067ac_save_CFLAGS="$CFLAGS"
1068CFLAGS=
1069echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001070echo "configure:1071: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001071if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001072 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001073else
1074 echo 'void f(){}' > conftest.c
1075if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001076 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001078 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001079fi
1080rm -f conftest*
1081
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083
Guido van Rossumf78abae1997-01-21 22:02:36 +00001084echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001085if test "$ac_test_CFLAGS" = set; then
1086 CFLAGS="$ac_save_CFLAGS"
1087elif test $ac_cv_prog_cc_g = yes; then
1088 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001089 CFLAGS="-g -O2"
1090 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001091 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001092 fi
1093else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001094 if test "$GCC" = yes; then
1095 CFLAGS="-O2"
1096 else
1097 CFLAGS=
1098 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001099fi
1100
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001101
Guido van Rossumff555e32000-09-22 15:38:21 +00001102echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001103echo "configure:1104: checking for --with-suffix" >&5
Guido van Rossumff555e32000-09-22 15:38:21 +00001104# Check whether --with-suffix or --without-suffix was given.
1105if test "${with_suffix+set}" = set; then
1106 withval="$with_suffix"
1107
1108 case $withval in
1109 no) EXE=;;
1110 yes) EXE=.exe;;
1111 *) EXE=$withval;;
1112 esac
1113fi
1114
1115echo "$ac_t""$EXE" 1>&6
1116
Guido van Rossumdd997f71998-10-07 19:58:26 +00001117case $MACHDEP in
1118bsdos*)
1119 case $CC in
1120 gcc) CC="$CC -D_HAVE_BSDI";;
1121 esac;;
1122esac
1123
Guido van Rossum24b1e751997-08-21 02:29:16 +00001124case $ac_sys_system in
1125hp*|HP*)
1126 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001127 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001128 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001129Monterey*)
1130 case $CC in
1131 cc) CC="$CC -Wl,-Bexport";;
1132 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001133esac
1134
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001135# LDLIBRARY is the name of the library to link against (as opposed to the
1136# name of the library into which to insert object files). On systems
1137# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
1138# the Makefiles).
1139
1140
1141LDLIBRARY=''
1142
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001143# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001144# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001145# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001146
1147echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001148echo "configure:1149: checking LINKCC" >&5
Guido van Rossum95012191999-12-16 17:50:52 +00001149if test -z "$LINKCC" -a ! -z "$CXX"
1150then
1151 LINKCC="$CXX"
1152fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001153if test -z "$LINKCC"
1154then
1155 case $ac_sys_system in
1156 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001157 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001158 dgux*)
1159 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001160 Monterey64*)
1161 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001162 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001163 esac
1164fi
1165echo "$ac_t""$LINKCC" 1>&6
1166
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001167echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001168echo "configure:1169: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001169
1170# NeXT framework builds require that the 'ar' library be converted into
1171# a bundle using libtool.
1172if test "$with_next_framework"
1173then
1174 LDLIBRARY='libpython$(VERSION).dylib'
1175fi
1176
1177# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001178case $MACHDEP in
1179dguxR4)
1180 LDLIBRARY='libpython$(VERSION).so'
1181 OPT="$OPT -pic"
1182 ;;
1183beos*)
1184 LDLIBRARY='libpython$(VERSION).so'
1185 ;;
1186esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001187echo "$ac_t""$LDLIBRARY" 1>&6
1188
1189# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1190if test -z "$LDLIBRARY"
1191then
1192 LDLIBRARY='libpython$(VERSION).a'
1193 MAKE_LDLIBRARY="true"
1194else
1195 MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
1196fi
1197
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198# Extract the first word of "ranlib", so it can be a program name with args.
1199set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001200echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001201echo "configure:1202: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001202if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001203 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204else
1205 if test -n "$RANLIB"; then
1206 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1207else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001208 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1209 ac_dummy="$PATH"
1210 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 test -z "$ac_dir" && ac_dir=.
1212 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214 break
1215 fi
1216 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001219fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001220fi
1221RANLIB="$ac_cv_prog_RANLIB"
1222if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001223 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001225 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001226fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001227
1228
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229for ac_prog in ar aal
1230do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001231# Extract the first word of "$ac_prog", so it can be a program name with args.
1232set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001233echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001234echo "configure:1235: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001235if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001236 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001237else
1238 if test -n "$AR"; then
1239 ac_cv_prog_AR="$AR" # Let the user override the test.
1240else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001241 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1242 ac_dummy="$PATH"
1243 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244 test -z "$ac_dir" && ac_dir=.
1245 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001246 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247 break
1248 fi
1249 done
1250 IFS="$ac_save_ifs"
1251fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001252fi
1253AR="$ac_cv_prog_AR"
1254if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001255 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001256else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001257 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001258fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259
1260test -n "$AR" && break
1261done
1262test -n "$AR" || AR="ar"
1263
1264
Guido van Rossumda88dad1995-01-26 00:46:29 +00001265
1266
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001267# Install just never works :-(
1268if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001269then
1270 INSTALL=cp
1271 INSTALL_PROGRAM=cp
1272 INSTALL_DATA=cp
1273else
1274 INSTALL_PROGRAM="$INSTALL"
1275 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001276fi
1277
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001278# Not every filesystem supports hard links
1279
1280if test -z "$LN" ; then
1281 case $ac_sys_system in
1282 BeOS*) LN="ln -s";;
1283 *) LN=ln;;
1284 esac
1285fi
1286
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001287# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001288
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001289if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001290then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001291 case $GCC in
1292 yes)
1293 case $ac_cv_prog_cc_g in
Greg Warda1c4da22000-11-07 15:44:21 +00001294 yes) OPT="-g -O2 -Wall -Wstrict-prototypes -fPIC";;
1295 *) OPT="-O2 -Wall -Wstrict-prototypes -fPIC";;
Guido van Rossumedca74a1997-07-18 23:29:40 +00001296 esac
1297 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001298 *) OPT="-O";;
1299 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001300fi
1301
Trent Mick635f6fb2000-08-23 21:33:05 +00001302# The current (beta) Monterey compiler dies with optimizations
1303case $ac_sys_system in
1304Monterey*) OPT="";;
1305esac
1306
Guido van Rossum563e7081996-09-10 18:20:48 +00001307if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001308then
1309 OPT="$OPT $ac_arch_flags"
1310fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001312echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001313echo "configure:1314: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001314# On Suns, sometimes $CPP names a directory.
1315if test -n "$CPP" && test -d "$CPP"; then
1316 CPP=
1317fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318if test -z "$CPP"; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001319if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001320 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001321else
1322 # This must be in double quotes, not single quotes, because CPP may get
1323 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001325 # On the NeXT, cc -E runs the code through the compiler's parser,
1326 # not just through cpp.
1327 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001328#line 1329 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001329#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001330#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001331Syntax Error
1332EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001333ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001334{ (eval echo configure:1335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001335ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1336if test -z "$ac_err"; then
1337 :
1338else
1339 echo "$ac_err" >&5
1340 echo "configure: failed program was:" >&5
1341 cat conftest.$ac_ext >&5
1342 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001343 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001344 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001345#line 1346 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001346#include "confdefs.h"
1347#include <assert.h>
1348Syntax Error
1349EOF
1350ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001351{ (eval echo configure:1352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001352ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001353if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001354 :
1355else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001356 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001357 echo "configure: failed program was:" >&5
1358 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001359 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001360 CPP="${CC-cc} -nologo -E"
1361 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001362#line 1363 "configure"
Guido van Rossumff555e32000-09-22 15:38:21 +00001363#include "confdefs.h"
1364#include <assert.h>
1365Syntax Error
1366EOF
1367ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001368{ (eval echo configure:1369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumff555e32000-09-22 15:38:21 +00001369ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1370if test -z "$ac_err"; then
1371 :
1372else
1373 echo "$ac_err" >&5
1374 echo "configure: failed program was:" >&5
1375 cat conftest.$ac_ext >&5
1376 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001377 CPP=/lib/cpp
1378fi
1379rm -f conftest*
1380fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001381rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001382fi
1383rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001384 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001385fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001386 CPP="$ac_cv_prog_CPP"
1387else
1388 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001389fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001390echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001391
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001392echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001393echo "configure:1394: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001394cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001395#line 1396 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001396#include "confdefs.h"
1397#ifdef _AIX
1398 yes
1399#endif
1400
1401EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001402if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1403 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001404 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001405 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001406#define _ALL_SOURCE 1
1407EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001408
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001409else
1410 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001411 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001412fi
1413rm -f conftest*
1414
1415
Guido van Rossumf78abae1997-01-21 22:02:36 +00001416ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001417echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001418echo "configure:1419: checking for minix/config.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001419if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001420 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001421else
1422 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001423#line 1424 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001424#include "confdefs.h"
1425#include <minix/config.h>
1426EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001427ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001428{ (eval echo configure:1429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001429ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001430if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001431 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001432 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001433else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001434 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001435 echo "configure: failed program was:" >&5
1436 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001437 rm -rf conftest*
1438 eval "ac_cv_header_$ac_safe=no"
1439fi
1440rm -f conftest*
1441fi
1442if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001443 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001444 MINIX=yes
1445else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001446 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001447MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001448fi
1449
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001450if test "$MINIX" = yes; then
1451 cat >> confdefs.h <<\EOF
1452#define _POSIX_SOURCE 1
1453EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001454
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001455 cat >> confdefs.h <<\EOF
1456#define _POSIX_1_SOURCE 2
1457EOF
1458
1459 cat >> confdefs.h <<\EOF
1460#define _MINIX 1
1461EOF
1462
1463fi
1464
Guido van Rossumda88dad1995-01-26 00:46:29 +00001465
Guido van Rossum91922671997-10-09 20:24:13 +00001466echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001467echo "configure:1468: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001468if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001469 echo $ac_n "(cached) $ac_c" 1>&6
1470else
1471 ac_save_cc="$CC"
1472CC="$CC -OPT:Olimit=0"
1473if test "$cross_compiling" = yes; then
1474 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1475else
1476 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001477#line 1478 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001478#include "confdefs.h"
1479int main() { return 0; }
1480EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001481if { (eval echo configure:1482: \"$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 +00001482then
1483 ac_cv_opt_olimit_ok=yes
1484else
1485 echo "configure: failed program was:" >&5
1486 cat conftest.$ac_ext >&5
1487 rm -fr conftest*
1488 ac_cv_opt_olimit_ok=no
1489fi
1490rm -fr conftest*
1491fi
1492
1493CC="$ac_save_cc"
1494fi
1495
1496echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001497if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001498 case $ac_sys_system in
1499 Darwin*) OPT="$OPT" ;;
1500 *) OPT="$OPT -OPT:Olimit=0";;
1501 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001502else
1503 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001504echo "configure:1505: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001505 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001506 echo $ac_n "(cached) $ac_c" 1>&6
1507else
1508 ac_save_cc="$CC"
1509 CC="$CC -Olimit 1500"
1510 if test "$cross_compiling" = yes; then
1511 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1512else
1513 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001514#line 1515 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001515#include "confdefs.h"
1516int main() { return 0; }
1517EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001518if { (eval echo configure:1519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001519then
1520 ac_cv_olimit_ok=yes
1521else
1522 echo "configure: failed program was:" >&5
1523 cat conftest.$ac_ext >&5
1524 rm -fr conftest*
1525 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001526fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001527rm -fr conftest*
1528fi
1529
1530 CC="$ac_save_cc"
1531fi
1532
1533 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1534 if test $ac_cv_olimit_ok = yes; then
1535 OPT="$OPT -Olimit 1500"
1536 fi
1537fi
1538
Guido van Rossum84e7b241996-08-19 21:59:00 +00001539
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001540# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001541echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001542echo "configure:1543: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001543if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001544 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001545else
1546 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001547#line 1548 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001548#include "confdefs.h"
1549#include <stdlib.h>
1550#include <stdarg.h>
1551#include <string.h>
1552#include <float.h>
1553EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001554ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001555{ (eval echo configure:1556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001556ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001557if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001558 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001559 ac_cv_header_stdc=yes
1560else
1561 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001562 echo "configure: failed program was:" >&5
1563 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001564 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001565 ac_cv_header_stdc=no
1566fi
1567rm -f conftest*
1568
1569if test $ac_cv_header_stdc = yes; then
1570 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1571cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001572#line 1573 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001573#include "confdefs.h"
1574#include <string.h>
1575EOF
1576if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1577 egrep "memchr" >/dev/null 2>&1; then
1578 :
1579else
1580 rm -rf conftest*
1581 ac_cv_header_stdc=no
1582fi
1583rm -f conftest*
1584
1585fi
1586
1587if test $ac_cv_header_stdc = yes; then
1588 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1589cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001590#line 1591 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001591#include "confdefs.h"
1592#include <stdlib.h>
1593EOF
1594if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1595 egrep "free" >/dev/null 2>&1; then
1596 :
1597else
1598 rm -rf conftest*
1599 ac_cv_header_stdc=no
1600fi
1601rm -f conftest*
1602
1603fi
1604
1605if test $ac_cv_header_stdc = yes; then
1606 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1607if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001608 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001609else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001610 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001611#line 1612 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001612#include "confdefs.h"
1613#include <ctype.h>
1614#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1615#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001616#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001617int main () { int i; for (i = 0; i < 256; i++)
1618if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1619exit (0); }
1620
1621EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001622if { (eval echo configure:1623: \"$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 +00001623then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001624 :
1625else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001626 echo "configure: failed program was:" >&5
1627 cat conftest.$ac_ext >&5
1628 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001629 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001630fi
1631rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001632fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001633
1634fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001635fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001636
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001637echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001638if test $ac_cv_header_stdc = yes; then
1639 cat >> confdefs.h <<\EOF
1640#define STDC_HEADERS 1
1641EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001642
1643fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001644
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00001645for 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 +00001646signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Fred Drakea50d6ec2000-08-31 16:13:20 +00001647sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001648sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00001649sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
1650ndbm.h db1/ndbm.h gdbm/ndbm.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001651do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001652ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001653echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001654echo "configure:1655: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001655if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001656 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001657else
1658 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001659#line 1660 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001660#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001661#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001662EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001663ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001664{ (eval echo configure:1665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001665ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001666if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001667 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001668 eval "ac_cv_header_$ac_safe=yes"
1669else
1670 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001671 echo "configure: failed program was:" >&5
1672 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001673 rm -rf conftest*
1674 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001675fi
1676rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001677fi
1678if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001679 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001680 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001681 cat >> confdefs.h <<EOF
1682#define $ac_tr_hdr 1
1683EOF
1684
1685else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001686 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001687fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001688done
1689
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001690ac_header_dirent=no
1691for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1692do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001693ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001694echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001695echo "configure:1696: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001696if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001697 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001698else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001699 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001700#line 1701 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001701#include "confdefs.h"
1702#include <sys/types.h>
1703#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001704int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001705DIR *dirp = 0;
1706; return 0; }
1707EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001708if { (eval echo configure:1709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001709 rm -rf conftest*
1710 eval "ac_cv_header_dirent_$ac_safe=yes"
1711else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001712 echo "configure: failed program was:" >&5
1713 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001714 rm -rf conftest*
1715 eval "ac_cv_header_dirent_$ac_safe=no"
1716fi
1717rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001718fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001719if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001720 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001721 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001722 cat >> confdefs.h <<EOF
1723#define $ac_tr_hdr 1
1724EOF
1725 ac_header_dirent=$ac_hdr; break
1726else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001727 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001728fi
1729done
1730# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1731if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001732echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001733echo "configure:1734: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001734ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001735if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001736 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001737else
1738 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001739LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001740cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001741#line 1742 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001742#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001743/* Override any gcc2 internal prototype to avoid an error. */
1744/* We use char because int might match the return type of a gcc2
1745 builtin and then its argument prototype would still apply. */
1746char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001747
Guido van Rossumf78abae1997-01-21 22:02:36 +00001748int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001749opendir()
1750; return 0; }
1751EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001752if { (eval echo configure:1753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001753 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001754 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001755else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001756 echo "configure: failed program was:" >&5
1757 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001758 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001759 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001760fi
1761rm -f conftest*
1762LIBS="$ac_save_LIBS"
1763
1764fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001765if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001766 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001767 LIBS="$LIBS -ldir"
1768else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001769 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001770fi
1771
1772else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001773echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001774echo "configure:1775: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001775ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001776if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001777 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001778else
1779 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001780LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001781cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001782#line 1783 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001783#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001784/* Override any gcc2 internal prototype to avoid an error. */
1785/* We use char because int might match the return type of a gcc2
1786 builtin and then its argument prototype would still apply. */
1787char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001788
Guido van Rossumf78abae1997-01-21 22:02:36 +00001789int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001790opendir()
1791; return 0; }
1792EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001793if { (eval echo configure:1794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001794 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001795 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001796else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001797 echo "configure: failed program was:" >&5
1798 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001799 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001800 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001801fi
1802rm -f conftest*
1803LIBS="$ac_save_LIBS"
1804
1805fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001806if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001807 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001808 LIBS="$LIBS -lx"
1809else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001810 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811fi
1812
1813fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001814
1815
1816# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001817was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001818echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001819echo "configure:1820: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001820cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001821#line 1822 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001822#include "confdefs.h"
1823#include <time.h>
1824EOF
1825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1826 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001827 rm -rf conftest*
1828 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001829else
1830 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001831 cat >> confdefs.h <<\EOF
1832#define clock_t long
1833EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001834
1835fi
1836rm -f conftest*
1837
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001838echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001839
Guido van Rossum84e7b241996-08-19 21:59:00 +00001840# Add some code to confdefs.h so that the test for off_t works on SCO
1841cat >> confdefs.h <<\EOF
1842#if defined(SCO_DS)
1843#undef _OFF_T
1844#endif
1845EOF
1846
Guido van Rossumef2255b2000-03-10 22:30:29 +00001847# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001848echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001849echo "configure:1850: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001850if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001851 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001852else
1853 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001854#line 1855 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001855#include "confdefs.h"
1856#include <sys/types.h>
1857#if STDC_HEADERS
1858#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001859#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001860#endif
1861EOF
1862if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001863 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 +00001864 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001865 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001866else
1867 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001868 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001869fi
1870rm -f conftest*
1871
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001872fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001873echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1874if test $ac_cv_type_mode_t = no; then
1875 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001876#define mode_t int
1877EOF
1878
1879fi
1880
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001881echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001882echo "configure:1883: checking for off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001883if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001884 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001885else
1886 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001887#line 1888 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001888#include "confdefs.h"
1889#include <sys/types.h>
1890#if STDC_HEADERS
1891#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001892#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001893#endif
1894EOF
1895if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001896 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 +00001897 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001898 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001899else
1900 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001901 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001902fi
1903rm -f conftest*
1904
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001905fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001906echo "$ac_t""$ac_cv_type_off_t" 1>&6
1907if test $ac_cv_type_off_t = no; then
1908 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001909#define off_t long
1910EOF
1911
1912fi
1913
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001914echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001915echo "configure:1916: checking for pid_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001916if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001917 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001918else
1919 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001920#line 1921 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001921#include "confdefs.h"
1922#include <sys/types.h>
1923#if STDC_HEADERS
1924#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001925#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001926#endif
1927EOF
1928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001929 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 +00001930 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001931 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001932else
1933 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001934 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001935fi
1936rm -f conftest*
1937
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001938fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001939echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1940if test $ac_cv_type_pid_t = no; then
1941 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001942#define pid_t int
1943EOF
1944
1945fi
1946
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001947echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001948echo "configure:1949: checking return type of signal handlers" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001949if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001950 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001951else
1952 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001953#line 1954 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001954#include "confdefs.h"
1955#include <sys/types.h>
1956#include <signal.h>
1957#ifdef signal
1958#undef signal
1959#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001960#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001961extern "C" void (*signal (int, void (*)(int)))(int);
1962#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001963void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001964#endif
1965
Guido van Rossumf78abae1997-01-21 22:02:36 +00001966int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001967int i;
1968; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001969EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001970if { (eval echo configure:1971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001971 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001972 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001973else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001974 echo "configure: failed program was:" >&5
1975 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001976 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001977 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001978fi
1979rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001980fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001981
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001982echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001983cat >> confdefs.h <<EOF
1984#define RETSIGTYPE $ac_cv_type_signal
1985EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001986
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001987
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001988echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001989echo "configure:1990: checking for size_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001990if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001991 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001992else
1993 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00001994#line 1995 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001995#include "confdefs.h"
1996#include <sys/types.h>
1997#if STDC_HEADERS
1998#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001999#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002000#endif
2001EOF
2002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002003 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 +00002004 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002005 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002006else
2007 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002008 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002009fi
2010rm -f conftest*
2011
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002012fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002013echo "$ac_t""$ac_cv_type_size_t" 1>&6
2014if test $ac_cv_type_size_t = no; then
2015 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002016#define size_t unsigned
2017EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002018
2019fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002020
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002021echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002022echo "configure:2023: checking for uid_t in sys/types.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002023if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002024 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002025else
2026 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002027#line 2028 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002028#include "confdefs.h"
2029#include <sys/types.h>
2030EOF
2031if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2032 egrep "uid_t" >/dev/null 2>&1; then
2033 rm -rf conftest*
2034 ac_cv_type_uid_t=yes
2035else
2036 rm -rf conftest*
2037 ac_cv_type_uid_t=no
2038fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002039rm -f conftest*
2040
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002041fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002042
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002043echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002044if test $ac_cv_type_uid_t = no; then
2045 cat >> confdefs.h <<\EOF
2046#define uid_t int
2047EOF
2048
2049 cat >> confdefs.h <<\EOF
2050#define gid_t int
2051EOF
2052
2053fi
2054
Guido van Rossum627b2d71993-12-24 10:39:16 +00002055
Guido van Rossumef2255b2000-03-10 22:30:29 +00002056# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002057echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002058echo "configure:2059: checking size of int" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002059if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002060 echo $ac_n "(cached) $ac_c" 1>&6
2061else
2062 if test "$cross_compiling" = yes; then
2063 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2064else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002065 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002066#line 2067 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002067#include "confdefs.h"
2068#include <stdio.h>
2069main()
2070{
2071 FILE *f=fopen("conftestval", "w");
2072 if (!f) exit(1);
2073 fprintf(f, "%d\n", sizeof(int));
2074 exit(0);
2075}
2076EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002077if { (eval echo configure:2078: \"$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 +00002078then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002079 ac_cv_sizeof_int=`cat conftestval`
2080else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002081 echo "configure: failed program was:" >&5
2082 cat conftest.$ac_ext >&5
2083 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002084 ac_cv_sizeof_int=0
2085fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002086rm -fr conftest*
2087fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002088
2089fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002090echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2091cat >> confdefs.h <<EOF
2092#define SIZEOF_INT $ac_cv_sizeof_int
2093EOF
2094
2095
2096echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002097echo "configure:2098: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002098if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002099 echo $ac_n "(cached) $ac_c" 1>&6
2100else
2101 if test "$cross_compiling" = yes; then
2102 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2103else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002104 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002105#line 2106 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002106#include "confdefs.h"
2107#include <stdio.h>
2108main()
2109{
2110 FILE *f=fopen("conftestval", "w");
2111 if (!f) exit(1);
2112 fprintf(f, "%d\n", sizeof(long));
2113 exit(0);
2114}
2115EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002116if { (eval echo configure:2117: \"$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 +00002117then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002118 ac_cv_sizeof_long=`cat conftestval`
2119else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002120 echo "configure: failed program was:" >&5
2121 cat conftest.$ac_ext >&5
2122 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002123 ac_cv_sizeof_long=0
2124fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002125rm -fr conftest*
2126fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002127
2128fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002129echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2130cat >> confdefs.h <<EOF
2131#define SIZEOF_LONG $ac_cv_sizeof_long
2132EOF
2133
2134
Guido van Rossumad678af1998-10-02 14:42:15 +00002135echo $ac_n "checking size of void *""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002136echo "configure:2137: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002137if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002138 echo $ac_n "(cached) $ac_c" 1>&6
2139else
2140 if test "$cross_compiling" = yes; then
2141 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2142else
2143 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002144#line 2145 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002145#include "confdefs.h"
2146#include <stdio.h>
2147main()
2148{
2149 FILE *f=fopen("conftestval", "w");
2150 if (!f) exit(1);
2151 fprintf(f, "%d\n", sizeof(void *));
2152 exit(0);
2153}
2154EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002155if { (eval echo configure:2156: \"$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 +00002156then
2157 ac_cv_sizeof_void_p=`cat conftestval`
2158else
2159 echo "configure: failed program was:" >&5
2160 cat conftest.$ac_ext >&5
2161 rm -fr conftest*
2162 ac_cv_sizeof_void_p=0
2163fi
2164rm -fr conftest*
2165fi
2166
2167fi
2168echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2169cat >> confdefs.h <<EOF
2170#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2171EOF
2172
2173
Guido van Rossumef2255b2000-03-10 22:30:29 +00002174echo $ac_n "checking size of char""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002175echo "configure:2176: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002176if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002177 echo $ac_n "(cached) $ac_c" 1>&6
2178else
2179 if test "$cross_compiling" = yes; then
2180 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2181else
2182 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002183#line 2184 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002184#include "confdefs.h"
2185#include <stdio.h>
2186main()
2187{
2188 FILE *f=fopen("conftestval", "w");
2189 if (!f) exit(1);
2190 fprintf(f, "%d\n", sizeof(char));
2191 exit(0);
2192}
2193EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002194if { (eval echo configure:2195: \"$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 +00002195then
2196 ac_cv_sizeof_char=`cat conftestval`
2197else
2198 echo "configure: failed program was:" >&5
2199 cat conftest.$ac_ext >&5
2200 rm -fr conftest*
2201 ac_cv_sizeof_char=0
2202fi
2203rm -fr conftest*
2204fi
2205
2206fi
2207echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2208cat >> confdefs.h <<EOF
2209#define SIZEOF_CHAR $ac_cv_sizeof_char
2210EOF
2211
2212
2213echo $ac_n "checking size of short""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002214echo "configure:2215: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002215if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002216 echo $ac_n "(cached) $ac_c" 1>&6
2217else
2218 if test "$cross_compiling" = yes; then
2219 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2220else
2221 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002222#line 2223 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002223#include "confdefs.h"
2224#include <stdio.h>
2225main()
2226{
2227 FILE *f=fopen("conftestval", "w");
2228 if (!f) exit(1);
2229 fprintf(f, "%d\n", sizeof(short));
2230 exit(0);
2231}
2232EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002233if { (eval echo configure:2234: \"$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 +00002234then
2235 ac_cv_sizeof_short=`cat conftestval`
2236else
2237 echo "configure: failed program was:" >&5
2238 cat conftest.$ac_ext >&5
2239 rm -fr conftest*
2240 ac_cv_sizeof_short=0
2241fi
2242rm -fr conftest*
2243fi
2244
2245fi
2246echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2247cat >> confdefs.h <<EOF
2248#define SIZEOF_SHORT $ac_cv_sizeof_short
2249EOF
2250
2251
2252echo $ac_n "checking size of float""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002253echo "configure:2254: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002254if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002255 echo $ac_n "(cached) $ac_c" 1>&6
2256else
2257 if test "$cross_compiling" = yes; then
2258 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2259else
2260 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002261#line 2262 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002262#include "confdefs.h"
2263#include <stdio.h>
2264main()
2265{
2266 FILE *f=fopen("conftestval", "w");
2267 if (!f) exit(1);
2268 fprintf(f, "%d\n", sizeof(float));
2269 exit(0);
2270}
2271EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002272if { (eval echo configure:2273: \"$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 +00002273then
2274 ac_cv_sizeof_float=`cat conftestval`
2275else
2276 echo "configure: failed program was:" >&5
2277 cat conftest.$ac_ext >&5
2278 rm -fr conftest*
2279 ac_cv_sizeof_float=0
2280fi
2281rm -fr conftest*
2282fi
2283
2284fi
2285echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2286cat >> confdefs.h <<EOF
2287#define SIZEOF_FLOAT $ac_cv_sizeof_float
2288EOF
2289
2290
2291echo $ac_n "checking size of double""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002292echo "configure:2293: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002293if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002294 echo $ac_n "(cached) $ac_c" 1>&6
2295else
2296 if test "$cross_compiling" = yes; then
2297 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2298else
2299 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002300#line 2301 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002301#include "confdefs.h"
2302#include <stdio.h>
2303main()
2304{
2305 FILE *f=fopen("conftestval", "w");
2306 if (!f) exit(1);
2307 fprintf(f, "%d\n", sizeof(double));
2308 exit(0);
2309}
2310EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002311if { (eval echo configure:2312: \"$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 +00002312then
2313 ac_cv_sizeof_double=`cat conftestval`
2314else
2315 echo "configure: failed program was:" >&5
2316 cat conftest.$ac_ext >&5
2317 rm -fr conftest*
2318 ac_cv_sizeof_double=0
2319fi
2320rm -fr conftest*
2321fi
2322
2323fi
2324echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2325cat >> confdefs.h <<EOF
2326#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2327EOF
2328
2329
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002330echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002331echo "configure:2332: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002332if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002333 echo $ac_n "(cached) $ac_c" 1>&6
2334else
2335 if test "$cross_compiling" = yes; then
2336 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2337else
2338 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002339#line 2340 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002340#include "confdefs.h"
2341#include <stdio.h>
2342main()
2343{
2344 FILE *f=fopen("conftestval", "w");
2345 if (!f) exit(1);
2346 fprintf(f, "%d\n", sizeof(fpos_t));
2347 exit(0);
2348}
2349EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002350if { (eval echo configure:2351: \"$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 +00002351then
2352 ac_cv_sizeof_fpos_t=`cat conftestval`
2353else
2354 echo "configure: failed program was:" >&5
2355 cat conftest.$ac_ext >&5
2356 rm -fr conftest*
2357 ac_cv_sizeof_fpos_t=0
2358fi
2359rm -fr conftest*
2360fi
2361
2362fi
2363echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2364cat >> confdefs.h <<EOF
2365#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2366EOF
2367
2368
Guido van Rossum0a516c91994-09-12 10:58:40 +00002369
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002370echo $ac_n "checking for long long support""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002371echo "configure:2372: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002372have_long_long=no
2373cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002374#line 2375 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002375#include "confdefs.h"
2376
2377int main() {
2378long long x; x = (long long)0;
2379; return 0; }
2380EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002381if { (eval echo configure:2382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002382 rm -rf conftest*
2383 cat >> confdefs.h <<\EOF
2384#define HAVE_LONG_LONG 1
2385EOF
2386 have_long_long=yes
2387else
2388 echo "configure: failed program was:" >&5
2389 cat conftest.$ac_ext >&5
2390fi
2391rm -f conftest*
2392echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002393if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002394echo $ac_n "checking size of long long""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002395echo "configure:2396: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002396if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002397 echo $ac_n "(cached) $ac_c" 1>&6
2398else
2399 if test "$cross_compiling" = yes; then
2400 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2401else
2402 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002403#line 2404 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002404#include "confdefs.h"
2405#include <stdio.h>
2406main()
2407{
2408 FILE *f=fopen("conftestval", "w");
2409 if (!f) exit(1);
2410 fprintf(f, "%d\n", sizeof(long long));
2411 exit(0);
2412}
2413EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002414if { (eval echo configure:2415: \"$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 +00002415then
2416 ac_cv_sizeof_long_long=`cat conftestval`
2417else
2418 echo "configure: failed program was:" >&5
2419 cat conftest.$ac_ext >&5
2420 rm -fr conftest*
2421 ac_cv_sizeof_long_long=0
2422fi
2423rm -fr conftest*
2424fi
2425
2426fi
2427echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2428cat >> confdefs.h <<EOF
2429#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2430EOF
2431
2432
2433fi
2434
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002435echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002436echo "configure:2437: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002437have_uintptr_t=no
2438cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002439#line 2440 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002440#include "confdefs.h"
2441
2442int main() {
2443uintptr_t x; x = (uintptr_t)0;
2444; return 0; }
2445EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002446if { (eval echo configure:2447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002447 rm -rf conftest*
2448 cat >> confdefs.h <<\EOF
2449#define HAVE_UINTPTR_T 1
2450EOF
2451 have_uintptr_t=yes
2452else
2453 echo "configure: failed program was:" >&5
2454 cat conftest.$ac_ext >&5
2455fi
2456rm -f conftest*
2457echo "$ac_t""$have_uintptr_t" 1>&6
2458if test "$have_uintptr_t" = yes ; then
2459echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002460echo "configure:2461: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002461if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002462 echo $ac_n "(cached) $ac_c" 1>&6
2463else
2464 if test "$cross_compiling" = yes; then
2465 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2466else
2467 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002468#line 2469 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002469#include "confdefs.h"
2470#include <stdio.h>
2471main()
2472{
2473 FILE *f=fopen("conftestval", "w");
2474 if (!f) exit(1);
2475 fprintf(f, "%d\n", sizeof(uintptr_t));
2476 exit(0);
2477}
2478EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002479if { (eval echo configure:2480: \"$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 +00002480then
2481 ac_cv_sizeof_uintptr_t=`cat conftestval`
2482else
2483 echo "configure: failed program was:" >&5
2484 cat conftest.$ac_ext >&5
2485 rm -fr conftest*
2486 ac_cv_sizeof_uintptr_t=0
2487fi
2488rm -fr conftest*
2489fi
2490
2491fi
2492echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2493cat >> confdefs.h <<EOF
2494#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2495EOF
2496
2497
2498fi
2499
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002500# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2501echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002502echo "configure:2503: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002503if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002504 echo $ac_n "(cached) $ac_c" 1>&6
2505else
2506 if test "$cross_compiling" = yes; then
2507 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2508else
2509 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002510#line 2511 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002511#include "confdefs.h"
2512#include <stdio.h>
2513#include <sys/types.h>
2514main()
2515{
2516 FILE *f=fopen("conftestval", "w");
2517 if (!f) exit(1);
2518 fprintf(f, "%d\n", sizeof(off_t));
2519 exit(0);
2520}
2521EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002522if { (eval echo configure:2523: \"$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 +00002523then
2524 ac_cv_sizeof_off_t=`cat conftestval`
2525else
2526 echo "configure: failed program was:" >&5
2527 cat conftest.$ac_ext >&5
2528 rm -fr conftest*
2529 ac_cv_sizeof_off_t=0
2530fi
2531rm -fr conftest*
2532fi
2533
2534
2535fi
2536
2537echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2538cat >> confdefs.h <<EOF
2539#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2540EOF
2541
2542
2543echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002544echo "configure:2545: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002545if test "$have_long_long" = yes -a \
2546 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2547 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002548 cat >> confdefs.h <<\EOF
2549#define HAVE_LARGEFILE_SUPPORT 1
2550EOF
2551
2552 echo "$ac_t""yes" 1>&6
2553else
2554 echo "$ac_t""no" 1>&6
2555fi
2556
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002557# AC_CHECK_SIZEOF() doesn't include <time.h>.
2558echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002559echo "configure:2560: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002560if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002561 echo $ac_n "(cached) $ac_c" 1>&6
2562else
2563 if test "$cross_compiling" = yes; then
2564 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2565else
2566 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002567#line 2568 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002568#include "confdefs.h"
2569#include <stdio.h>
2570#include <time.h>
2571main()
2572{
2573 FILE *f=fopen("conftestval", "w");
2574 if (!f) exit(1);
2575 fprintf(f, "%d\n", sizeof(time_t));
2576 exit(0);
2577}
2578EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002579if { (eval echo configure:2580: \"$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 +00002580then
2581 ac_cv_sizeof_time_t=`cat conftestval`
2582else
2583 echo "configure: failed program was:" >&5
2584 cat conftest.$ac_ext >&5
2585 rm -fr conftest*
2586 ac_cv_sizeof_time_t=0
2587fi
2588rm -fr conftest*
2589fi
2590
2591
2592fi
2593
2594echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2595cat >> confdefs.h <<EOF
2596#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2597EOF
2598
2599
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002600
Trent Mick635f6fb2000-08-23 21:33:05 +00002601# if have pthread_t then define SIZEOF_PTHREAD_T
2602echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002603echo "configure:2604: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002604have_pthread_t=no
2605cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002606#line 2607 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002607#include "confdefs.h"
2608#include <pthread.h>
2609int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002610pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002611; return 0; }
2612EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002613if { (eval echo configure:2614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002614 rm -rf conftest*
2615 have_pthread_t=yes
2616else
2617 echo "configure: failed program was:" >&5
2618 cat conftest.$ac_ext >&5
2619fi
2620rm -f conftest*
2621echo "$ac_t""$have_pthread_t" 1>&6
2622if test "$have_pthread_t" = yes ; then
2623 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2624 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002625echo "configure:2626: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002626 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002627 echo $ac_n "(cached) $ac_c" 1>&6
2628else
2629 if test "$cross_compiling" = yes; then
2630 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2631else
2632 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002633#line 2634 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002634#include "confdefs.h"
2635#include <stdio.h>
2636 #include <pthread.h>
2637 main()
2638 {
2639 FILE *f=fopen("conftestval", "w");
2640 if (!f) exit(1);
2641 fprintf(f, "%d\n", sizeof(pthread_t));
2642 exit(0);
2643 }
2644EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002645if { (eval echo configure:2646: \"$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 +00002646then
2647 ac_cv_sizeof_pthread_t=`cat conftestval`
2648else
2649 echo "configure: failed program was:" >&5
2650 cat conftest.$ac_ext >&5
2651 rm -fr conftest*
2652 ac_cv_sizeof_pthread_t=0
2653fi
2654rm -fr conftest*
2655fi
2656
2657
2658fi
2659
2660 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2661 cat >> confdefs.h <<EOF
2662#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2663EOF
2664
2665fi
2666
2667
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002668# Minor variations in building a framework between NextStep versions 4 and 5
2669
2670case $ac_sys_system/$ac_sys_release in
Guido van Rossum5839e582000-10-09 19:52:35 +00002671 Darwin/*)
2672 ns_undef_sym='_environ'
2673 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002674 next/4*)
2675 ns_undef_sym='__environ'
2676 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2677 next/5*)
2678 ns_undef_sym='_environ'
2679 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2680esac
2681
2682echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002683echo "configure:2684: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002684if test "$with_next_framework"
2685then
2686 OPT="$OPT -fno-common"
2687 # -U __environ is needed since bundles don't have access
2688 # to crt0 when built but will always be linked against it
2689 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2690 cat >> confdefs.h <<\EOF
2691#define WITH_NEXT_FRAMEWORK 1
2692EOF
2693
2694 echo "$ac_t""yes" 1>&6
2695else
2696 echo "$ac_t""no" 1>&6
2697fi
2698
2699echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002700echo "configure:2701: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002701if test "$with_next_framework" -o "$with_dyld"
2702then
2703 if test "$with_dyld"
2704 then
2705 echo "$ac_t""yes" 1>&6
2706 else
2707 echo "$ac_t""required for framework build" 1>&6
2708 fi
2709 cat >> confdefs.h <<\EOF
2710#define WITH_DYLD 1
2711EOF
2712
2713 ns_dyld='set'
2714else
2715 echo "$ac_t""no" 1>&6
2716fi
2717
Guido van Rossum0a516c91994-09-12 10:58:40 +00002718# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002719
2720
2721
2722
Guido van Rossum0a516c91994-09-12 10:58:40 +00002723# SO is the extension of shared libraries `(including the dot!)
2724# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002725echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002726echo "configure:2727: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002727if test -z "$SO"
2728then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002729 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002730 hp*|HP*) SO=.sl;;
2731 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002732 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002733fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002734echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002735# LDSHARED is the ld *command* used to create shared library
2736# -- "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 +00002737# (Shared libraries in this instance are shared modules to be loaded into
2738# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002739echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002740echo "configure:2741: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002741if test -z "$LDSHARED"
2742then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002743 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002744 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002745 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002746 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002747 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002748 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00002749 SunOS/5*)
2750 if test "$GCC" = "yes"
Greg Warda1c4da22000-11-07 15:44:21 +00002751 then LDSHARED='$(CC) -shared'
Greg Ward57c9a6632000-05-26 12:22:54 +00002752 else LDSHARED="ld -G";
2753 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002754 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002755 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2756 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002757 Darwin/*|next/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002758 if test "$ns_dyld"
Guido van Rossum5839e582000-10-09 19:52:35 +00002759 then
2760 if test "$ac_sys_system" = Darwin
2761 then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
2762 else LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2763 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002764 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2765 fi
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002766 if test "$with_next_framework" ; then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002767 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2768 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002769 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002770 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002771 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002772 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002773 NetBSD*)
2774 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2775 then
2776 LDSHARED="cc -shared"
2777 else
2778 LDSHARED="ld -Bshareable"
2779 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002780 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00002781 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00002782 then
2783 LDSHARED="cc -shared ${LDFLAGS}"
2784 else
2785 LDSHARED="ld -Bshareable ${LDFLAGS}"
2786 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002787 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002788 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002789 *) LDSHARED="ld";;
2790 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002791fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002792echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002793# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002794# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002795echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002796echo "configure:2797: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002797if test -z "$CCSHARED"
2798then
Guido van Rossum07397971997-04-29 21:49:50 +00002799 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002800 hp*|HP*) if test "$GCC" = yes;
2801 then CCSHARED="-fpic";
2802 else CCSHARED="+z";
2803 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002804 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002805 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002806 OpenBSD*) CCSHARED="-fpic";;
2807 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002808 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002809 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002810 IRIX*/6*) case $CC in
2811 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002812 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002813 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002814 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002815fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002816echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002817# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002818# the python executable -- this is only needed for a few systems
2819echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002820echo "configure:2821: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002821if test -z "$LINKFORSHARED"
2822then
Guido van Rossum07397971997-04-29 21:49:50 +00002823 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002824 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002825 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002826 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002827 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002828 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002829 # -u libsys_s pulls in all symbols in libsys
2830 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2831 # -u __dummy makes the linker aware of the objc runtime
2832 # in System.framework; otherwise, __objcInit (referenced in
2833 # crt1.o) gets erroneously defined as common, which breaks dynamic
2834 # loading of any modules which reference it in System.framework
2835 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00002836 Darwin/*) LINKFORSHARED="-framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002837 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00002838 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002839 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00002840 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2841 then
2842 LINKFORSHARED="-Wl,--export-dynamic"
2843 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002844 SunOS/5*) case $CC in
2845 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002846 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002847 then
2848 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002849 fi;;
2850 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002851 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002852fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002853echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002854
Guido van Rossum627b2d71993-12-24 10:39:16 +00002855# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002856echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002857echo "configure:2858: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002858ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002859if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002860 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002861else
2862 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002863LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002864cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002865#line 2866 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002866#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002867/* Override any gcc2 internal prototype to avoid an error. */
2868/* We use char because int might match the return type of a gcc2
2869 builtin and then its argument prototype would still apply. */
2870char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002871
Guido van Rossumf78abae1997-01-21 22:02:36 +00002872int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002873dlopen()
2874; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002875EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002876if { (eval echo configure:2877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002877 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002878 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002879else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002880 echo "configure: failed program was:" >&5
2881 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002882 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002883 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002884fi
2885rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002886LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002887
Guido van Rossum627b2d71993-12-24 10:39:16 +00002888fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002889if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002890 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002891 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2892 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002893 cat >> confdefs.h <<EOF
2894#define $ac_tr_lib 1
2895EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002896
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002897 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002898
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002899else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002900 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002901fi
2902 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002903echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002904echo "configure:2905: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002905ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002906if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002907 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002908else
2909 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002910LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002911cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002912#line 2913 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002913#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002914/* Override any gcc2 internal prototype to avoid an error. */
2915/* We use char because int might match the return type of a gcc2
2916 builtin and then its argument prototype would still apply. */
2917char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002918
Guido van Rossumf78abae1997-01-21 22:02:36 +00002919int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002920shl_load()
2921; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002922EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002923if { (eval echo configure:2924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002924 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002925 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002926else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002927 echo "configure: failed program was:" >&5
2928 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002929 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002930 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002931fi
2932rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002933LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002934
Guido van Rossum627b2d71993-12-24 10:39:16 +00002935fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002936if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002937 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002938 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2939 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002940 cat >> confdefs.h <<EOF
2941#define $ac_tr_lib 1
2942EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002943
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002944 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002945
2946else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002947 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002948fi
2949 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002950
Skip Montanarocb853262000-08-30 22:29:48 +00002951# Check for --with-pydebug
2952echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002953echo "configure:2954: checking for --with-pydebug" >&5
Skip Montanarocb853262000-08-30 22:29:48 +00002954# Check whether --with-pydebug or --without-pydebug was given.
2955if test "${with_pydebug+set}" = set; then
2956 withval="$with_pydebug"
2957
2958if test "$withval" != no
2959then cat >> confdefs.h <<\EOF
2960#define Py_DEBUG 1
2961EOF
2962 echo "$ac_t""yes" 1>&6
2963else echo "$ac_t""no" 1>&6
2964fi
2965else
2966 echo "$ac_t""no" 1>&6
2967fi
2968
2969
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002970# checks for system dependent C++ extensions support
2971case "$ac_sys_system" in
2972 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002973echo "configure:2974: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002974 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002975#line 2976 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002976#include "confdefs.h"
2977#include "/usr/lpp/xlC/include/load.h"
2978int main() {
2979loadAndInit("", 0, "")
2980; return 0; }
2981EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00002982if { (eval echo configure:2983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002983 rm -rf conftest*
2984 cat >> confdefs.h <<\EOF
2985#define AIX_GENUINE_CPLUSPLUS 1
2986EOF
2987
2988 echo "$ac_t""yes" 1>&6
2989else
2990 echo "configure: failed program was:" >&5
2991 cat conftest.$ac_ext >&5
2992 rm -rf conftest*
2993 echo "$ac_t""no" 1>&6
2994fi
2995rm -f conftest*;;
2996 *) ;;
2997esac
2998
Guido van Rossum70c7f481998-03-26 18:44:10 +00002999# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3000# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003001# BeOS' sockets are stashed in libnet.
3002case "$ac_sys_system" in
3003IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003004*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003005echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003006echo "configure:3007: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003007ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003008if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003009 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003010else
3011 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003012LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003013cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003014#line 3015 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003015#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003016/* Override any gcc2 internal prototype to avoid an error. */
3017/* We use char because int might match the return type of a gcc2
3018 builtin and then its argument prototype would still apply. */
3019char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003020
Guido van Rossumf78abae1997-01-21 22:02:36 +00003021int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003022t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003023; return 0; }
3024EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003025if { (eval echo configure:3026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003026 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003027 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003028else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003029 echo "configure: failed program was:" >&5
3030 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003031 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003032 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003033fi
3034rm -f conftest*
3035LIBS="$ac_save_LIBS"
3036
3037fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003038if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003039 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003040 LIBS="-lnsl $LIBS"
3041else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003042 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003043fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003044 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003045echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003046echo "configure:3047: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003047ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003048if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003049 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003050else
3051 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003052LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003053cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003054#line 3055 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003055#include "confdefs.h"
3056/* Override any gcc2 internal prototype to avoid an error. */
3057/* We use char because int might match the return type of a gcc2
3058 builtin and then its argument prototype would still apply. */
3059char socket();
3060
3061int main() {
3062socket()
3063; return 0; }
3064EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003065if { (eval echo configure:3066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003066 rm -rf conftest*
3067 eval "ac_cv_lib_$ac_lib_var=yes"
3068else
3069 echo "configure: failed program was:" >&5
3070 cat conftest.$ac_ext >&5
3071 rm -rf conftest*
3072 eval "ac_cv_lib_$ac_lib_var=no"
3073fi
3074rm -f conftest*
3075LIBS="$ac_save_LIBS"
3076
3077fi
3078if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3079 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003080 LIBS="-lsocket $LIBS"
3081else
3082 echo "$ac_t""no" 1>&6
3083fi
3084 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003085;;
3086esac
3087case "$ac_sys_system" in
3088BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003089echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003090echo "configure:3091: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003091ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003092if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003093 echo $ac_n "(cached) $ac_c" 1>&6
3094else
3095 ac_save_LIBS="$LIBS"
3096LIBS="-lnet $LIBS $LIBS"
3097cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003098#line 3099 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003099#include "confdefs.h"
3100/* Override any gcc2 internal prototype to avoid an error. */
3101/* We use char because int might match the return type of a gcc2
3102 builtin and then its argument prototype would still apply. */
3103char socket();
3104
3105int main() {
3106socket()
3107; return 0; }
3108EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003109if { (eval echo configure:3110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003110 rm -rf conftest*
3111 eval "ac_cv_lib_$ac_lib_var=yes"
3112else
3113 echo "configure: failed program was:" >&5
3114 cat conftest.$ac_ext >&5
3115 rm -rf conftest*
3116 eval "ac_cv_lib_$ac_lib_var=no"
3117fi
3118rm -f conftest*
3119LIBS="$ac_save_LIBS"
3120
3121fi
3122if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3123 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003124 LIBS="-lnet $LIBS"
3125else
3126 echo "$ac_t""no" 1>&6
3127fi
3128 # BeOS
3129;;
3130esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003131
Guido van Rossuma68acba1996-07-31 17:36:39 +00003132echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003133echo "configure:3134: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003134# Check whether --with-libs or --without-libs was given.
3135if test "${with_libs+set}" = set; then
3136 withval="$with_libs"
3137
3138echo "$ac_t""$withval" 1>&6
3139LIBS="$withval $LIBS"
3140
3141else
3142 echo "$ac_t""no" 1>&6
3143fi
3144
Guido van Rossum7f43da71994-08-01 12:15:30 +00003145
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003146# This is used to generate Setup.config
3147
3148echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003149echo "configure:3150: checking for initscr in -lncurses" >&5
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003150ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
3151if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3152 echo $ac_n "(cached) $ac_c" 1>&6
3153else
3154 ac_save_LIBS="$LIBS"
3155LIBS="-lncurses -ltermcap $LIBS"
3156cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003157#line 3158 "configure"
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003158#include "confdefs.h"
3159/* Override any gcc2 internal prototype to avoid an error. */
3160/* We use char because int might match the return type of a gcc2
3161 builtin and then its argument prototype would still apply. */
3162char initscr();
3163
3164int main() {
3165initscr()
3166; return 0; }
3167EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003168if { (eval echo configure:3169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003169 rm -rf conftest*
3170 eval "ac_cv_lib_$ac_lib_var=yes"
3171else
3172 echo "configure: failed program was:" >&5
3173 cat conftest.$ac_ext >&5
3174 rm -rf conftest*
3175 eval "ac_cv_lib_$ac_lib_var=no"
3176fi
3177rm -f conftest*
3178LIBS="$ac_save_LIBS"
3179
3180fi
3181if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3182 echo "$ac_t""yes" 1>&6
3183 USE_NCURSES_MODULE=""
3184else
3185 echo "$ac_t""no" 1>&6
3186USE_NCURSES_MODULE="#"
3187fi
3188
3189
3190# This is used to generate Setup.config
3191
3192echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003193echo "configure:3194: checking for readline in -lreadline" >&5
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003194ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
3195if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3196 echo $ac_n "(cached) $ac_c" 1>&6
3197else
3198 ac_save_LIBS="$LIBS"
3199LIBS="-lreadline -ltermcap $LIBS"
3200cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003201#line 3202 "configure"
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003202#include "confdefs.h"
3203/* Override any gcc2 internal prototype to avoid an error. */
3204/* We use char because int might match the return type of a gcc2
3205 builtin and then its argument prototype would still apply. */
3206char readline();
3207
3208int main() {
3209readline()
3210; return 0; }
3211EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003212if { (eval echo configure:3213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003213 rm -rf conftest*
3214 eval "ac_cv_lib_$ac_lib_var=yes"
3215else
3216 echo "configure: failed program was:" >&5
3217 cat conftest.$ac_ext >&5
3218 rm -rf conftest*
3219 eval "ac_cv_lib_$ac_lib_var=no"
3220fi
3221rm -f conftest*
3222LIBS="$ac_save_LIBS"
3223
3224fi
3225if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3226 echo "$ac_t""yes" 1>&6
3227 USE_READLINE_MODULE=""
3228else
3229 echo "$ac_t""no" 1>&6
3230USE_READLINE_MODULE="#"
3231fi
3232
3233
3234# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003235
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003236USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003237
Guido van Rossumec2f0731997-01-22 20:54:01 +00003238echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003239echo "configure:3240: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003240
3241# Check whether --with-dec-threads or --without-dec-threads was given.
3242if test "${with_dec_threads+set}" = set; then
3243 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003244
3245echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003246LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003247if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003248 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003249fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003250else
3251 echo "$ac_t""no" 1>&6
3252fi
3253
3254
3255echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003256echo "configure:3257: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003257# Check whether --with-threads or --without-threads was given.
3258if test "${with_threads+set}" = set; then
3259 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003260 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003261fi
3262
3263
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003264# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003265# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003266if test "${with_thread+set}" = set; then
3267 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003268
3269with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003270fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003271
3272
3273if test -z "$with_threads"
3274then with_threads="yes"
3275fi
3276echo "$ac_t""$with_threads" 1>&6
3277
3278if test "$with_threads" = "no"
3279then
3280 USE_THREAD_MODULE="#"
3281else
Guido van Rossum40951012000-10-07 16:21:27 +00003282 if test ! -z "$with_threads" -a -d "$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003283 then LDFLAGS="$LDFLAGS -L$with_threads"
3284 fi
Guido van Rossum40951012000-10-07 16:21:27 +00003285 if test ! -z "$withval" -a -d "$withval"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003286 then LDFLAGS="$LDFLAGS -L$withval"
3287 fi
3288 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003289#define _REENTRANT 1
3290EOF
3291
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003292 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003293echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003294echo "configure:3295: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003295if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003296 echo $ac_n "(cached) $ac_c" 1>&6
3297else
3298 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003299#line 3300 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003300#include "confdefs.h"
3301#include <mach/cthreads.h>
3302EOF
3303ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003304{ (eval echo configure:3305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003305ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003306if test -z "$ac_err"; then
3307 rm -rf conftest*
3308 eval "ac_cv_header_$ac_safe=yes"
3309else
3310 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003311 echo "configure: failed program was:" >&5
3312 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003313 rm -rf conftest*
3314 eval "ac_cv_header_$ac_safe=no"
3315fi
3316rm -f conftest*
3317fi
3318if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3319 echo "$ac_t""yes" 1>&6
3320 cat >> confdefs.h <<\EOF
3321#define WITH_THREAD 1
3322EOF
3323
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003324 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003325#define C_THREADS 1
3326EOF
3327
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003328 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003329else
3330 echo "$ac_t""no" 1>&6
3331
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003332 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003333echo "configure:3334: checking for --with-pth" >&5
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003334 # Check whether --with-pth or --without-pth was given.
3335if test "${with_pth+set}" = set; then
3336 withval="$with_pth"
3337
3338 echo "$ac_t""$withval" 1>&6
3339 cat >> confdefs.h <<\EOF
3340#define WITH_THREAD 1
3341EOF
3342
3343 cat >> confdefs.h <<\EOF
3344#define HAVE_PTH 1
3345EOF
3346
3347 LIBS="-lpth $LIBS"
3348 LIBOBJS="$LIBOBJS thread.o"
3349else
3350
3351 echo "$ac_t""no" 1>&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003352 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003353echo "configure:3354: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003354ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003355if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003356 echo $ac_n "(cached) $ac_c" 1>&6
3357else
3358 ac_save_LIBS="$LIBS"
3359LIBS="-lpthread $LIBS"
3360cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003361#line 3362 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003362#include "confdefs.h"
3363/* Override any gcc2 internal prototype to avoid an error. */
3364/* We use char because int might match the return type of a gcc2
3365 builtin and then its argument prototype would still apply. */
3366char pthread_create();
3367
3368int main() {
3369pthread_create()
3370; return 0; }
3371EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003372if { (eval echo configure:3373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003373 rm -rf conftest*
3374 eval "ac_cv_lib_$ac_lib_var=yes"
3375else
3376 echo "configure: failed program was:" >&5
3377 cat conftest.$ac_ext >&5
3378 rm -rf conftest*
3379 eval "ac_cv_lib_$ac_lib_var=no"
3380fi
3381rm -f conftest*
3382LIBS="$ac_save_LIBS"
3383
3384fi
3385if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3386 echo "$ac_t""yes" 1>&6
3387 cat >> confdefs.h <<\EOF
3388#define WITH_THREAD 1
3389EOF
3390
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003391 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003392#define _POSIX_THREADS 1
3393EOF
3394
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003395 LIBS="-lpthread $LIBS"
3396 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003397else
3398 echo "$ac_t""no" 1>&6
3399
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003400 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003401echo "configure:3402: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003402if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003403 echo $ac_n "(cached) $ac_c" 1>&6
3404else
3405 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003406#line 3407 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003407#include "confdefs.h"
3408/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003409 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003410#include <assert.h>
3411/* Override any gcc2 internal prototype to avoid an error. */
3412/* We use char because int might match the return type of a gcc2
3413 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003414char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003415
3416int main() {
3417
3418/* The GNU C library defines this for functions which it implements
3419 to always fail with ENOSYS. Some functions are actually named
3420 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003421#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003422choke me
3423#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003424pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003425#endif
3426
3427; return 0; }
3428EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003429if { (eval echo configure:3430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003430 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003431 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003432else
3433 echo "configure: failed program was:" >&5
3434 cat conftest.$ac_ext >&5
3435 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003436 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003437fi
3438rm -f conftest*
3439fi
3440
Guido van Rossumea516321998-12-17 18:08:55 +00003441if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003442 echo "$ac_t""yes" 1>&6
3443 cat >> confdefs.h <<\EOF
3444#define WITH_THREAD 1
3445EOF
3446
Guido van Rossum5839e582000-10-09 19:52:35 +00003447 case $ac_sys_system in
3448 Darwin*) ;;
3449 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003450#define _POSIX_THREADS 1
3451EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003452;;
3453 esac
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003454 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003455else
3456 echo "$ac_t""no" 1>&6
3457
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003458 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003459echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003460echo "configure:3461: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003461if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003462 echo $ac_n "(cached) $ac_c" 1>&6
3463else
3464 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003465#line 3466 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003466#include "confdefs.h"
3467#include <kernel/OS.h>
3468EOF
3469ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003470{ (eval echo configure:3471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003471ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003472if test -z "$ac_err"; then
3473 rm -rf conftest*
3474 eval "ac_cv_header_$ac_safe=yes"
3475else
3476 echo "$ac_err" >&5
3477 echo "configure: failed program was:" >&5
3478 cat conftest.$ac_ext >&5
3479 rm -rf conftest*
3480 eval "ac_cv_header_$ac_safe=no"
3481fi
3482rm -f conftest*
3483fi
3484if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3485 echo "$ac_t""yes" 1>&6
3486 cat >> confdefs.h <<\EOF
3487#define WITH_THREAD 1
3488EOF
3489
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003490 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003491#define BEOS_THREADS 1
3492EOF
3493
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003494 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003495else
3496 echo "$ac_t""no" 1>&6
3497
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003498 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003499echo "configure:3500: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003500ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003501if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003502 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003503else
3504 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003505LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003506cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003507#line 3508 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003508#include "confdefs.h"
3509/* Override any gcc2 internal prototype to avoid an error. */
3510/* We use char because int might match the return type of a gcc2
3511 builtin and then its argument prototype would still apply. */
3512char pthread_create();
3513
3514int main() {
3515pthread_create()
3516; return 0; }
3517EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003518if { (eval echo configure:3519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003519 rm -rf conftest*
3520 eval "ac_cv_lib_$ac_lib_var=yes"
3521else
3522 echo "configure: failed program was:" >&5
3523 cat conftest.$ac_ext >&5
3524 rm -rf conftest*
3525 eval "ac_cv_lib_$ac_lib_var=no"
3526fi
3527rm -f conftest*
3528LIBS="$ac_save_LIBS"
3529
3530fi
3531if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3532 echo "$ac_t""yes" 1>&6
3533 cat >> confdefs.h <<\EOF
3534#define WITH_THREAD 1
3535EOF
3536
3537 cat >> confdefs.h <<\EOF
3538#define _POSIX_THREADS 1
3539EOF
3540
3541 LIBS="$LIBS -lpthreads"
3542 LIBOBJS="$LIBOBJS thread.o"
3543else
3544 echo "$ac_t""no" 1>&6
3545
3546 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003547echo "configure:3548: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003548ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003549if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003550 echo $ac_n "(cached) $ac_c" 1>&6
3551else
3552 ac_save_LIBS="$LIBS"
3553LIBS="-lc_r $LIBS"
3554cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003555#line 3556 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003556#include "confdefs.h"
3557/* Override any gcc2 internal prototype to avoid an error. */
3558/* We use char because int might match the return type of a gcc2
3559 builtin and then its argument prototype would still apply. */
3560char pthread_create();
3561
3562int main() {
3563pthread_create()
3564; return 0; }
3565EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003566if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003567 rm -rf conftest*
3568 eval "ac_cv_lib_$ac_lib_var=yes"
3569else
3570 echo "configure: failed program was:" >&5
3571 cat conftest.$ac_ext >&5
3572 rm -rf conftest*
3573 eval "ac_cv_lib_$ac_lib_var=no"
3574fi
3575rm -f conftest*
3576LIBS="$ac_save_LIBS"
3577
3578fi
3579if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3580 echo "$ac_t""yes" 1>&6
3581 cat >> confdefs.h <<\EOF
3582#define WITH_THREAD 1
3583EOF
3584
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003585 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003586#define _POSIX_THREADS 1
3587EOF
3588
Greg Steinadf63d62000-07-05 10:38:09 +00003589 LIBS="$LIBS -lc_r"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003590 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003591else
3592 echo "$ac_t""no" 1>&6
3593
Greg Steinadf63d62000-07-05 10:38:09 +00003594 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003595echo "configure:3596: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003596ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003597if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003598 echo $ac_n "(cached) $ac_c" 1>&6
3599else
3600 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003601LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003602cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003603#line 3604 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003604#include "confdefs.h"
3605/* Override any gcc2 internal prototype to avoid an error. */
3606/* We use char because int might match the return type of a gcc2
3607 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003608char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003609
3610int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003611__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003612; return 0; }
3613EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003614if { (eval echo configure:3615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003615 rm -rf conftest*
3616 eval "ac_cv_lib_$ac_lib_var=yes"
3617else
3618 echo "configure: failed program was:" >&5
3619 cat conftest.$ac_ext >&5
3620 rm -rf conftest*
3621 eval "ac_cv_lib_$ac_lib_var=no"
3622fi
3623rm -f conftest*
3624LIBS="$ac_save_LIBS"
3625
3626fi
3627if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3628 echo "$ac_t""yes" 1>&6
3629 cat >> confdefs.h <<\EOF
3630#define WITH_THREAD 1
3631EOF
3632
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003633 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003634#define _POSIX_THREADS 1
3635EOF
3636
Greg Steinadf63d62000-07-05 10:38:09 +00003637 LIBS="$LIBS -lthread"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003638 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003639else
3640 echo "$ac_t""no" 1>&6
3641
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003642 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003643echo "configure:3644: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003644ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
3645if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3646 echo $ac_n "(cached) $ac_c" 1>&6
3647else
3648 ac_save_LIBS="$LIBS"
3649LIBS="-lpthread $LIBS"
3650cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003651#line 3652 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003652#include "confdefs.h"
3653/* Override any gcc2 internal prototype to avoid an error. */
3654/* We use char because int might match the return type of a gcc2
3655 builtin and then its argument prototype would still apply. */
3656char __pthread_create_system();
3657
3658int main() {
3659__pthread_create_system()
3660; return 0; }
3661EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003662if { (eval echo configure:3663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003663 rm -rf conftest*
3664 eval "ac_cv_lib_$ac_lib_var=yes"
3665else
3666 echo "configure: failed program was:" >&5
3667 cat conftest.$ac_ext >&5
3668 rm -rf conftest*
3669 eval "ac_cv_lib_$ac_lib_var=no"
3670fi
3671rm -f conftest*
3672LIBS="$ac_save_LIBS"
3673
3674fi
3675if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3676 echo "$ac_t""yes" 1>&6
3677 cat >> confdefs.h <<\EOF
3678#define WITH_THREAD 1
3679EOF
3680
3681 cat >> confdefs.h <<\EOF
3682#define _POSIX_THREADS 1
3683EOF
3684
3685 LIBS="$LIBS -lpthread"
3686 LIBOBJS="$LIBOBJS thread.o"
3687else
3688 echo "$ac_t""no" 1>&6
3689
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003690 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003691echo "configure:3692: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003692ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003693if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003694 echo $ac_n "(cached) $ac_c" 1>&6
3695else
3696 ac_save_LIBS="$LIBS"
3697LIBS="-lcma $LIBS"
3698cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003699#line 3700 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003700#include "confdefs.h"
3701/* Override any gcc2 internal prototype to avoid an error. */
3702/* We use char because int might match the return type of a gcc2
3703 builtin and then its argument prototype would still apply. */
3704char pthread_create();
3705
3706int main() {
3707pthread_create()
3708; return 0; }
3709EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003710if { (eval echo configure:3711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003711 rm -rf conftest*
3712 eval "ac_cv_lib_$ac_lib_var=yes"
3713else
3714 echo "configure: failed program was:" >&5
3715 cat conftest.$ac_ext >&5
3716 rm -rf conftest*
3717 eval "ac_cv_lib_$ac_lib_var=no"
3718fi
3719rm -f conftest*
3720LIBS="$ac_save_LIBS"
3721
3722fi
3723if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3724 echo "$ac_t""yes" 1>&6
3725 cat >> confdefs.h <<\EOF
3726#define WITH_THREAD 1
3727EOF
3728
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003729 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003730#define _POSIX_THREADS 1
3731EOF
3732
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003733 LIBS="$LIBS -lcma"
3734 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003735else
3736 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003737
3738 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003739fi
3740
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003741
Guido van Rossum627b2d71993-12-24 10:39:16 +00003742fi
3743
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003744fi
3745
Guido van Rossum0be3e491997-05-22 20:33:33 +00003746fi
3747
Guido van Rossum49545951997-12-02 19:28:29 +00003748fi
3749
Guido van Rossumb93a8621998-05-07 13:27:32 +00003750fi
3751
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003752fi
3753
Guido van Rossumad678af1998-10-02 14:42:15 +00003754fi
3755
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003756fi
3757
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003758fi
3759
Guido van Rossum0be3e491997-05-22 20:33:33 +00003760
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003761 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003762echo "configure:3763: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003763ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003764if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003765 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003766else
3767 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003768LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003769cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003770#line 3771 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003771#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003772/* Override any gcc2 internal prototype to avoid an error. */
3773/* We use char because int might match the return type of a gcc2
3774 builtin and then its argument prototype would still apply. */
3775char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003776
Guido van Rossumf78abae1997-01-21 22:02:36 +00003777int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003778usconfig()
3779; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003780EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003781if { (eval echo configure:3782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003782 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003783 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003784else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003785 echo "configure: failed program was:" >&5
3786 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003787 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003788 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003789fi
3790rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003791LIBS="$ac_save_LIBS"
3792
3793fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003794if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003795 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003796 cat >> confdefs.h <<\EOF
3797#define WITH_THREAD 1
3798EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003799
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003800 LIBS="$LIBS -lmpc"
3801 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003802 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003803else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003804 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003805fi
3806
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003807 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003808echo "configure:3809: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003809ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003810if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003811 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003812else
3813 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003814LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003815cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003816#line 3817 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003817#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003818/* Override any gcc2 internal prototype to avoid an error. */
3819/* We use char because int might match the return type of a gcc2
3820 builtin and then its argument prototype would still apply. */
3821char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003822
Guido van Rossumf78abae1997-01-21 22:02:36 +00003823int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003824thr_create()
3825; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003826EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003827if { (eval echo configure:3828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003828 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003829 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003830else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003831 echo "configure: failed program was:" >&5
3832 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003833 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003834 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003835fi
3836rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003837LIBS="$ac_save_LIBS"
3838
3839fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003840if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003841 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003842 cat >> confdefs.h <<\EOF
3843#define WITH_THREAD 1
3844EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003845
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003846 LIBS="$LIBS -lthread"
3847 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003848 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003849else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003850 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003851fi
3852
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00003853
3854 if test "$USE_THREAD_MODULE" != "#"
3855 then
3856 # If the above checks didn't disable threads, (at least) OSF1
3857 # needs this '-threads' argument during linking.
3858 case $ac_sys_system in
3859 OSF1) LDLAST=-threads;;
3860 esac
3861 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003862fi
3863
Barry Warsawef82cd72000-06-30 16:21:01 +00003864# Check for GC support
3865
3866USE_GC_MODULE=""
3867echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003868echo "configure:3869: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003869# Check whether --with-cycle-gc or --without-cycle-gc was given.
3870if test "${with_cycle_gc+set}" = set; then
3871 withval="$with_cycle_gc"
3872 :
3873fi
3874
3875
3876if test -z "$with_cycle_gc"
3877then with_cycle_gc="yes"
3878fi
3879if test "$with_cycle_gc" = "no"
3880then
3881 USE_GC_MODULE="#"
3882else
3883 cat >> confdefs.h <<\EOF
3884#define WITH_CYCLE_GC 1
3885EOF
3886
3887fi
3888echo "$ac_t""$with_cycle_gc" 1>&6
3889
Fred Drakea50d6ec2000-08-31 16:13:20 +00003890# Check for LIBDB support
3891# either --with-libdb or, in its absence, the presence of db.h
3892
3893USE_BSDDB_MODULE=""
3894echo $ac_n "checking for --with-libdb""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003895echo "configure:3896: checking for --with-libdb" >&5
Fred Drakea50d6ec2000-08-31 16:13:20 +00003896# Check whether --with-libdb or --without-libdb was given.
3897if test "${with_libdb+set}" = set; then
3898 withval="$with_libdb"
3899 :
3900fi
3901
3902
Skip Montanarob89f41e2000-09-04 04:06:05 +00003903# enabled by default, but db.h must be found
3904if test "$ac_cv_header_db_h" = "yes"
3905then
3906 if test "$with_libdb" != "no"
3907 then with_libdb="yes"
3908 fi
3909else
Fred Drake5790be12000-10-09 17:06:13 +00003910 # make sure user knows why bsddb support wasn't enabled even
Skip Montanarob89f41e2000-09-04 04:06:05 +00003911 # though s/he requested it
3912 if test "$with_libdb" = "yes"
3913 then echo $ac_n "(requested, but db.h was not found) $ac_c"
3914 fi
3915 with_libdb="no"
Fred Drakea50d6ec2000-08-31 16:13:20 +00003916fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00003917
Fred Drakea50d6ec2000-08-31 16:13:20 +00003918if test "$with_libdb" = "no"
3919then
3920 USE_BSDDB_MODULE="#"
3921else
3922 cat >> confdefs.h <<\EOF
3923#define WITH_LIBDB 1
3924EOF
3925
3926fi
3927echo "$ac_t""$with_libdb" 1>&6
3928
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003929if test "$with_libdb" = "yes"
3930then
3931 # check for libdb; BSD systems have the DB routines in libc --tg
3932
Martin v. Löwis05a65d62000-09-24 19:40:25 +00003933 # If dbopen is not in libc, then checking whether it is in libdb
3934 # is difficult: db_185.h may #define it as __db185_open
Fred Drake02706f52000-09-25 15:08:46 +00003935 # Instead, we just trust it is in libdb; linking will fail if it
3936 # is not.
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003937 echo $ac_n "checking for dbopen""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003938echo "configure:3939: checking for dbopen" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003939if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003940 echo $ac_n "(cached) $ac_c" 1>&6
3941else
3942 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003943#line 3944 "configure"
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003944#include "confdefs.h"
3945/* System header to define __stub macros and hopefully few prototypes,
3946 which can conflict with char dbopen(); below. */
3947#include <assert.h>
3948/* Override any gcc2 internal prototype to avoid an error. */
3949/* We use char because int might match the return type of a gcc2
3950 builtin and then its argument prototype would still apply. */
3951char dbopen();
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003952
3953int main() {
3954
3955/* The GNU C library defines this for functions which it implements
3956 to always fail with ENOSYS. Some functions are actually named
3957 something starting with __ and the normal name is an alias. */
3958#if defined (__stub_dbopen) || defined (__stub___dbopen)
3959choke me
3960#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003961dbopen();
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003962#endif
3963
3964; return 0; }
3965EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003966if { (eval echo configure:3967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003967 rm -rf conftest*
3968 eval "ac_cv_func_dbopen=yes"
3969else
3970 echo "configure: failed program was:" >&5
3971 cat conftest.$ac_ext >&5
3972 rm -rf conftest*
3973 eval "ac_cv_func_dbopen=no"
3974fi
3975rm -f conftest*
3976fi
3977
3978if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
3979 echo "$ac_t""yes" 1>&6
3980 HAVE_LIBDB=
3981else
3982 echo "$ac_t""no" 1>&6
Martin v. Löwis05a65d62000-09-24 19:40:25 +00003983HAVE_LIBDB=-ldb
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003984fi
3985
3986fi
3987
Barry Warsawef82cd72000-06-30 16:21:01 +00003988# Check for --with-wctype-functions
3989echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00003990echo "configure:3991: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003991# Check whether --with-wctype-functions or --without-wctype-functions was given.
3992if test "${with_wctype_functions+set}" = set; then
3993 withval="$with_wctype_functions"
3994
3995if test "$withval" != no
3996then cat >> confdefs.h <<\EOF
3997#define WANT_WCTYPE_FUNCTIONS 1
3998EOF
3999 echo "$ac_t""yes" 1>&6
4000else echo "$ac_t""no" 1>&6
4001fi
4002else
4003 echo "$ac_t""no" 1>&6
4004fi
4005
4006
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004007# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004008
4009DLINCLDIR=/
4010
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004011echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004012echo "configure:4013: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004013# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004014if test "${with_sgi_dl+set}" = set; then
4015 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004016
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004017echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004018cat >> confdefs.h <<\EOF
4019#define WITH_SGI_DL 1
4020EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004021
Guido van Rossume97ee181999-12-20 21:27:22 +00004022DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004023dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004024if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004025then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004026else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004027fi
4028DLINCLDIR=${dldir}
4029LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004030else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004031 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004032fi
4033
4034
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004035echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004036echo "configure:4037: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004037# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004038if test "${with_dl_dld+set}" = set; then
4039 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004040
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004041echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004042cat >> confdefs.h <<\EOF
4043#define WITH_DL_DLD 1
4044EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004045
Guido van Rossume97ee181999-12-20 21:27:22 +00004046DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004047dldir=`echo "$withval" | sed 's/,.*//'`
4048dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004049if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004050then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004051else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004052fi
4053DLINCLDIR=${dldir}
4054LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004055else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004056 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004057fi
4058
4059
Guido van Rossume97ee181999-12-20 21:27:22 +00004060# the dlopen() function means we might want to use dynload_shlib.o. some
4061# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004062for ac_func in dlopen
4063do
4064echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004065echo "configure:4066: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004066if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004067 echo $ac_n "(cached) $ac_c" 1>&6
4068else
4069 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004070#line 4071 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004071#include "confdefs.h"
4072/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004073 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004074#include <assert.h>
4075/* Override any gcc2 internal prototype to avoid an error. */
4076/* We use char because int might match the return type of a gcc2
4077 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004078char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004079
4080int main() {
4081
4082/* The GNU C library defines this for functions which it implements
4083 to always fail with ENOSYS. Some functions are actually named
4084 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004085#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004086choke me
4087#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004088$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004089#endif
4090
4091; return 0; }
4092EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004093if { (eval echo configure:4094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004094 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004095 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004096else
4097 echo "configure: failed program was:" >&5
4098 cat conftest.$ac_ext >&5
4099 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004100 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004101fi
4102rm -f conftest*
4103fi
4104
Thomas Wouters3a584202000-08-05 23:28:51 +00004105if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004106 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004107 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4108 cat >> confdefs.h <<EOF
4109#define $ac_tr_func 1
4110EOF
4111
Guido van Rossume97ee181999-12-20 21:27:22 +00004112else
4113 echo "$ac_t""no" 1>&6
4114fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004115done
Guido van Rossume97ee181999-12-20 21:27:22 +00004116
4117
4118# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4119# loading of modules.
4120
4121echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004122echo "configure:4123: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004123if test -z "$DYNLOADFILE"
4124then
4125 case $ac_sys_system/$ac_sys_release in
4126 AIX*) DYNLOADFILE="dynload_aix.o";;
4127 BeOS*) DYNLOADFILE="dynload_beos.o";;
4128 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossum5839e582000-10-09 19:52:35 +00004129 Darwin/*|next/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004130 *)
4131 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4132 # out any dynamic loading
4133 if test "$ac_cv_func_dlopen" = yes
4134 then DYNLOADFILE="dynload_shlib.o"
4135 else DYNLOADFILE="dynload_stub.o"
4136 fi
4137 ;;
4138 esac
4139fi
4140echo "$ac_t""$DYNLOADFILE" 1>&6
4141if test "$DYNLOADFILE" != "dynload_stub.o"
4142then
4143 cat >> confdefs.h <<\EOF
4144#define HAVE_DYNAMIC_LOADING 1
4145EOF
4146
4147fi
4148
Guido van Rossum627b2d71993-12-24 10:39:16 +00004149# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00004150for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004151 flock fork fsync fdatasync fpathconf ftime ftruncate \
Andrew M. Kuchlinga9586c72001-01-08 17:58:56 +00004152 getgroups getlogin getpeername getpid getpwent getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00004153 kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004154 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004155 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004156 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00004157 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00004158 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004159 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters70c21a12000-07-14 14:28:33 +00004160 truncate uname waitpid _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004161do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004162echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004163echo "configure:4164: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004164if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004165 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004166else
4167 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004168#line 4169 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004169#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004170/* System header to define __stub macros and hopefully few prototypes,
4171 which can conflict with char $ac_func(); below. */
4172#include <assert.h>
4173/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004174/* We use char because int might match the return type of a gcc2
4175 builtin and then its argument prototype would still apply. */
4176char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004177
Guido van Rossumf78abae1997-01-21 22:02:36 +00004178int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004179
Guido van Rossum627b2d71993-12-24 10:39:16 +00004180/* The GNU C library defines this for functions which it implements
4181 to always fail with ENOSYS. Some functions are actually named
4182 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004183#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004184choke me
4185#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004186$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004187#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004188
Guido van Rossum7f43da71994-08-01 12:15:30 +00004189; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004190EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004191if { (eval echo configure:4192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004192 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004193 eval "ac_cv_func_$ac_func=yes"
4194else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004195 echo "configure: failed program was:" >&5
4196 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004197 rm -rf conftest*
4198 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004199fi
4200rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004201fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004202
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004203if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004204 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004205 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004206 cat >> confdefs.h <<EOF
4207#define $ac_tr_func 1
4208EOF
4209
4210else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004211 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004212fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004213done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004214
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004215
Fred Drake8cef4cf2000-06-28 16:40:38 +00004216# check for openpty and forkpty
4217
4218for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004219do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004220echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004221echo "configure:4222: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004222if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004223 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004224else
4225 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004226#line 4227 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004227#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004228/* System header to define __stub macros and hopefully few prototypes,
4229 which can conflict with char $ac_func(); below. */
4230#include <assert.h>
4231/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004232/* We use char because int might match the return type of a gcc2
4233 builtin and then its argument prototype would still apply. */
4234char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004235
Guido van Rossumf78abae1997-01-21 22:02:36 +00004236int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004237
Guido van Rossum627b2d71993-12-24 10:39:16 +00004238/* The GNU C library defines this for functions which it implements
4239 to always fail with ENOSYS. Some functions are actually named
4240 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004241#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004242choke me
4243#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004244$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004245#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004246
Guido van Rossum7f43da71994-08-01 12:15:30 +00004247; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004248EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004249if { (eval echo configure:4250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004250 rm -rf conftest*
4251 eval "ac_cv_func_$ac_func=yes"
4252else
4253 echo "configure: failed program was:" >&5
4254 cat conftest.$ac_ext >&5
4255 rm -rf conftest*
4256 eval "ac_cv_func_$ac_func=no"
4257fi
4258rm -f conftest*
4259fi
4260
4261if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4262 echo "$ac_t""yes" 1>&6
4263 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4264 cat >> confdefs.h <<EOF
4265#define $ac_tr_func 1
4266EOF
4267
4268else
4269 echo "$ac_t""no" 1>&6
4270echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004271echo "configure:4272: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004272ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004273if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004274 echo $ac_n "(cached) $ac_c" 1>&6
4275else
4276 ac_save_LIBS="$LIBS"
4277LIBS="-lutil $LIBS"
4278cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004279#line 4280 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004280#include "confdefs.h"
4281/* Override any gcc2 internal prototype to avoid an error. */
4282/* We use char because int might match the return type of a gcc2
4283 builtin and then its argument prototype would still apply. */
4284char openpty();
4285
4286int main() {
4287openpty()
4288; return 0; }
4289EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004290if { (eval echo configure:4291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004291 rm -rf conftest*
4292 eval "ac_cv_lib_$ac_lib_var=yes"
4293else
4294 echo "configure: failed program was:" >&5
4295 cat conftest.$ac_ext >&5
4296 rm -rf conftest*
4297 eval "ac_cv_lib_$ac_lib_var=no"
4298fi
4299rm -f conftest*
4300LIBS="$ac_save_LIBS"
4301
4302fi
4303if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4304 echo "$ac_t""yes" 1>&6
4305 cat >> confdefs.h <<\EOF
4306#define HAVE_OPENPTY 1
4307EOF
4308 LIBS="$LIBS -lutil"
4309else
4310 echo "$ac_t""no" 1>&6
4311fi
4312
4313fi
4314done
4315
4316for ac_func in forkpty
4317do
4318echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004319echo "configure:4320: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004320if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004321 echo $ac_n "(cached) $ac_c" 1>&6
4322else
4323 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004324#line 4325 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004325#include "confdefs.h"
4326/* System header to define __stub macros and hopefully few prototypes,
4327 which can conflict with char $ac_func(); below. */
4328#include <assert.h>
4329/* Override any gcc2 internal prototype to avoid an error. */
4330/* We use char because int might match the return type of a gcc2
4331 builtin and then its argument prototype would still apply. */
4332char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004333
4334int main() {
4335
4336/* The GNU C library defines this for functions which it implements
4337 to always fail with ENOSYS. Some functions are actually named
4338 something starting with __ and the normal name is an alias. */
4339#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4340choke me
4341#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004342$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004343#endif
4344
4345; return 0; }
4346EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004347if { (eval echo configure:4348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004348 rm -rf conftest*
4349 eval "ac_cv_func_$ac_func=yes"
4350else
4351 echo "configure: failed program was:" >&5
4352 cat conftest.$ac_ext >&5
4353 rm -rf conftest*
4354 eval "ac_cv_func_$ac_func=no"
4355fi
4356rm -f conftest*
4357fi
4358
4359if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4360 echo "$ac_t""yes" 1>&6
4361 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4362 cat >> confdefs.h <<EOF
4363#define $ac_tr_func 1
4364EOF
4365
4366else
4367 echo "$ac_t""no" 1>&6
4368echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004369echo "configure:4370: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004370ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004371if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004372 echo $ac_n "(cached) $ac_c" 1>&6
4373else
4374 ac_save_LIBS="$LIBS"
4375LIBS="-lutil $LIBS"
4376cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004377#line 4378 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004378#include "confdefs.h"
4379/* Override any gcc2 internal prototype to avoid an error. */
4380/* We use char because int might match the return type of a gcc2
4381 builtin and then its argument prototype would still apply. */
4382char forkpty();
4383
4384int main() {
4385forkpty()
4386; return 0; }
4387EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004388if { (eval echo configure:4389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004389 rm -rf conftest*
4390 eval "ac_cv_lib_$ac_lib_var=yes"
4391else
4392 echo "configure: failed program was:" >&5
4393 cat conftest.$ac_ext >&5
4394 rm -rf conftest*
4395 eval "ac_cv_lib_$ac_lib_var=no"
4396fi
4397rm -f conftest*
4398LIBS="$ac_save_LIBS"
4399
4400fi
4401if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4402 echo "$ac_t""yes" 1>&6
4403 cat >> confdefs.h <<\EOF
4404#define HAVE_FORKPTY 1
4405EOF
4406 LIBS="$LIBS -lutil"
4407else
4408 echo "$ac_t""no" 1>&6
4409fi
4410
4411fi
4412done
4413
4414
4415# check for long file support functions
4416for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4417do
4418echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004419echo "configure:4420: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004420if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004421 echo $ac_n "(cached) $ac_c" 1>&6
4422else
4423 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004424#line 4425 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004425#include "confdefs.h"
4426/* System header to define __stub macros and hopefully few prototypes,
4427 which can conflict with char $ac_func(); below. */
4428#include <assert.h>
4429/* Override any gcc2 internal prototype to avoid an error. */
4430/* We use char because int might match the return type of a gcc2
4431 builtin and then its argument prototype would still apply. */
4432char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004433
4434int main() {
4435
4436/* The GNU C library defines this for functions which it implements
4437 to always fail with ENOSYS. Some functions are actually named
4438 something starting with __ and the normal name is an alias. */
4439#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4440choke me
4441#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004442$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004443#endif
4444
4445; return 0; }
4446EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004447if { (eval echo configure:4448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004448 rm -rf conftest*
4449 eval "ac_cv_func_$ac_func=yes"
4450else
4451 echo "configure: failed program was:" >&5
4452 cat conftest.$ac_ext >&5
4453 rm -rf conftest*
4454 eval "ac_cv_func_$ac_func=no"
4455fi
4456rm -f conftest*
4457fi
4458
4459if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4460 echo "$ac_t""yes" 1>&6
4461 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4462 cat >> confdefs.h <<EOF
4463#define $ac_tr_func 1
4464EOF
4465
4466else
4467 echo "$ac_t""no" 1>&6
4468fi
4469done
4470
4471
4472for ac_func in dup2 getcwd strdup strerror memmove
4473do
4474echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004475echo "configure:4476: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004476if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004477 echo $ac_n "(cached) $ac_c" 1>&6
4478else
4479 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004480#line 4481 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004481#include "confdefs.h"
4482/* System header to define __stub macros and hopefully few prototypes,
4483 which can conflict with char $ac_func(); below. */
4484#include <assert.h>
4485/* Override any gcc2 internal prototype to avoid an error. */
4486/* We use char because int might match the return type of a gcc2
4487 builtin and then its argument prototype would still apply. */
4488char $ac_func();
4489
4490int main() {
4491
4492/* The GNU C library defines this for functions which it implements
4493 to always fail with ENOSYS. Some functions are actually named
4494 something starting with __ and the normal name is an alias. */
4495#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4496choke me
4497#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004498$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004499#endif
4500
4501; return 0; }
4502EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004503if { (eval echo configure:4504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004504 rm -rf conftest*
4505 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004506else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004507 echo "configure: failed program was:" >&5
4508 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004509 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004510 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004511fi
4512rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004513fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004514
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004515if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004516 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004517 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4518 cat >> confdefs.h <<EOF
4519#define $ac_tr_func 1
4520EOF
4521
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004522else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004523 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004524LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004525fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004526done
4527
Guido van Rossumf78abae1997-01-21 22:02:36 +00004528
Thomas Wouters3a584202000-08-05 23:28:51 +00004529for ac_func in getpgrp
4530do
4531echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004532echo "configure:4533: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004533if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004534 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004535else
4536 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004537#line 4538 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004538#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004539/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004540 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004541#include <assert.h>
4542/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004543/* We use char because int might match the return type of a gcc2
4544 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004545char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004546
Guido van Rossumf78abae1997-01-21 22:02:36 +00004547int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004548
Guido van Rossum627b2d71993-12-24 10:39:16 +00004549/* The GNU C library defines this for functions which it implements
4550 to always fail with ENOSYS. Some functions are actually named
4551 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004552#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004553choke me
4554#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004555$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004556#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004557
4558; return 0; }
4559EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004560if { (eval echo configure:4561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004561 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004562 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004563else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004564 echo "configure: failed program was:" >&5
4565 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004566 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004567 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004568fi
4569rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004570fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004571
Thomas Wouters3a584202000-08-05 23:28:51 +00004572if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004573 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004574 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4575 cat >> confdefs.h <<EOF
4576#define $ac_tr_func 1
4577EOF
4578 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004579#line 4580 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004580#include "confdefs.h"
4581#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004582int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004583getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004584; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004585EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004586if { (eval echo configure:4587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004587 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004588 cat >> confdefs.h <<\EOF
4589#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004590EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004591
Guido van Rossumf78abae1997-01-21 22:02:36 +00004592else
4593 echo "configure: failed program was:" >&5
4594 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004595fi
4596rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004597else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004598 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004599fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004600done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004601
Thomas Wouters3a584202000-08-05 23:28:51 +00004602for ac_func in setpgrp
4603do
4604echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004605echo "configure:4606: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004606if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004607 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004608else
4609 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004610#line 4611 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004611#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004612/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004613 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004614#include <assert.h>
4615/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004616/* We use char because int might match the return type of a gcc2
4617 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004618char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004619
Guido van Rossumf78abae1997-01-21 22:02:36 +00004620int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004621
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004622/* The GNU C library defines this for functions which it implements
4623 to always fail with ENOSYS. Some functions are actually named
4624 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004625#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004626choke me
4627#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004628$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004629#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004630
4631; return 0; }
4632EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004633if { (eval echo configure:4634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004634 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004635 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004636else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004637 echo "configure: failed program was:" >&5
4638 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004639 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004640 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004641fi
4642rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004643fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004644
Thomas Wouters3a584202000-08-05 23:28:51 +00004645if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004646 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004647 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4648 cat >> confdefs.h <<EOF
4649#define $ac_tr_func 1
4650EOF
4651 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004652#line 4653 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004653#include "confdefs.h"
4654#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004655int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004656setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004657; return 0; }
4658EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004659if { (eval echo configure:4660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004660 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004661 cat >> confdefs.h <<\EOF
4662#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004663EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004664
Guido van Rossumf78abae1997-01-21 22:02:36 +00004665else
4666 echo "configure: failed program was:" >&5
4667 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004668fi
4669rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004670else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004671 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004672fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004673done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004674
Thomas Wouters3a584202000-08-05 23:28:51 +00004675for ac_func in gettimeofday
4676do
4677echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004678echo "configure:4679: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004679if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004680 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004681else
4682 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004683#line 4684 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004684#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004685/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004686 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004687#include <assert.h>
4688/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004689/* We use char because int might match the return type of a gcc2
4690 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004691char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004692
Guido van Rossumf78abae1997-01-21 22:02:36 +00004693int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004694
4695/* The GNU C library defines this for functions which it implements
4696 to always fail with ENOSYS. Some functions are actually named
4697 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004698#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004699choke me
4700#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004701$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004702#endif
4703
4704; return 0; }
4705EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004706if { (eval echo configure:4707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004707 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004708 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004709else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004710 echo "configure: failed program was:" >&5
4711 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004712 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004713 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004714fi
4715rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004716fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004717
Thomas Wouters3a584202000-08-05 23:28:51 +00004718if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004719 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004720 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4721 cat >> confdefs.h <<EOF
4722#define $ac_tr_func 1
4723EOF
4724 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004725#line 4726 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004726#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004727#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004728int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004729gettimeofday((struct timeval*)0,(struct timezone*)0);
4730; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004731EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004732if { (eval echo configure:4733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004733 :
4734else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004735 echo "configure: failed program was:" >&5
4736 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004737 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004738 cat >> confdefs.h <<\EOF
4739#define GETTIMEOFDAY_NO_TZ 1
4740EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004741
4742fi
4743rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004744else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004745 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004746fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004747done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004748
4749
4750# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004751echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004752echo "configure:4753: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004753if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004754 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004755else
4756 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004757#line 4758 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004758#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004759#include <sys/types.h>
4760#include <sys/time.h>
4761#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004762int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004763struct tm *tp;
4764; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004765EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004766if { (eval echo configure:4767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004767 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004768 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004769else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004770 echo "configure: failed program was:" >&5
4771 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004772 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004773 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004774fi
4775rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004776fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004777
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004778echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004779if test $ac_cv_header_time = yes; then
4780 cat >> confdefs.h <<\EOF
4781#define TIME_WITH_SYS_TIME 1
4782EOF
4783
4784fi
4785
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004786echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004787echo "configure:4788: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004788if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004789 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004790else
4791 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004792#line 4793 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004793#include "confdefs.h"
4794#include <sys/types.h>
4795#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004796int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004797struct tm *tp; tp->tm_sec;
4798; return 0; }
4799EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004800if { (eval echo configure:4801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004801 rm -rf conftest*
4802 ac_cv_struct_tm=time.h
4803else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004804 echo "configure: failed program was:" >&5
4805 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004806 rm -rf conftest*
4807 ac_cv_struct_tm=sys/time.h
4808fi
4809rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004810fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004811
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004812echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004813if test $ac_cv_struct_tm = sys/time.h; then
4814 cat >> confdefs.h <<\EOF
4815#define TM_IN_SYS_TIME 1
4816EOF
4817
4818fi
4819
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004820echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004821echo "configure:4822: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004822if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004823 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004824else
4825 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004826#line 4827 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004827#include "confdefs.h"
4828#include <sys/types.h>
4829#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004830int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004831struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004832; return 0; }
4833EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004834if { (eval echo configure:4835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004835 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004836 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004837else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004838 echo "configure: failed program was:" >&5
4839 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004840 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004841 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004842fi
4843rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004844fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004845
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004846echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4847if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004848 cat >> confdefs.h <<\EOF
4849#define HAVE_TM_ZONE 1
4850EOF
4851
4852else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004853 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004854echo "configure:4855: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004855if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004856 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004857else
4858 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004859#line 4860 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004860#include "confdefs.h"
4861#include <time.h>
4862#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004863extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004864#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004865int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004866atoi(*tzname);
4867; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004868EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004869if { (eval echo configure:4870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004870 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004871 ac_cv_var_tzname=yes
4872else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004873 echo "configure: failed program was:" >&5
4874 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004875 rm -rf conftest*
4876 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004877fi
4878rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004879fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004880
4881echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004882 if test $ac_cv_var_tzname = yes; then
4883 cat >> confdefs.h <<\EOF
4884#define HAVE_TZNAME 1
4885EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004886
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004887 fi
4888fi
4889
4890
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004891echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004892echo "configure:4893: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004893if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004894 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004895else
4896 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004897#line 4898 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004898#include "confdefs.h"
4899#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004900int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004901return altzone;
4902; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004903EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004904if { (eval echo configure:4905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004905 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004906 ac_cv_header_time_altzone=yes
4907else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004908 echo "configure: failed program was:" >&5
4909 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004910 rm -rf conftest*
4911 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004912fi
4913rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004914fi
4915
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004916echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004917if test $ac_cv_header_time_altzone = yes; then
4918 cat >> confdefs.h <<\EOF
4919#define HAVE_ALTZONE 1
4920EOF
4921
4922fi
4923
Guido van Rossumda88dad1995-01-26 00:46:29 +00004924was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004925echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004926echo "configure:4927: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004927cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004928#line 4929 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004929#include "confdefs.h"
4930
4931#include <sys/types.h>
4932#include <sys/select.h>
4933#include <sys/time.h>
4934
Guido van Rossumf78abae1997-01-21 22:02:36 +00004935int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004936;
4937; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004938EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004939if { (eval echo configure:4940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004940 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004941 cat >> confdefs.h <<\EOF
4942#define SYS_SELECT_WITH_SYS_TIME 1
4943EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004944 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004945else
4946 echo "configure: failed program was:" >&5
4947 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004948fi
4949rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004950echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004951
4952# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004953
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004954echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004955echo "configure:4956: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004956if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004957 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004958else
4959 if test "$GCC" = yes; then
4960 # GCC predefines this symbol on systems where it applies.
4961cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004962#line 4963 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004963#include "confdefs.h"
4964#ifdef __CHAR_UNSIGNED__
4965 yes
4966#endif
4967
4968EOF
4969if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4970 egrep "yes" >/dev/null 2>&1; then
4971 rm -rf conftest*
4972 ac_cv_c_char_unsigned=yes
4973else
4974 rm -rf conftest*
4975 ac_cv_c_char_unsigned=no
4976fi
4977rm -f conftest*
4978
4979else
4980if test "$cross_compiling" = yes; then
4981 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4982else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004983 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004984#line 4985 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004985#include "confdefs.h"
4986/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004987#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00004988#define volatile
4989#endif
4990main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00004991 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004992}
4993EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00004994if { (eval echo configure:4995: \"$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 +00004995then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004996 ac_cv_c_char_unsigned=yes
4997else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004998 echo "configure: failed program was:" >&5
4999 cat conftest.$ac_ext >&5
5000 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005001 ac_cv_c_char_unsigned=no
5002fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005003rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005004fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005005
5006fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005007fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005008
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005009echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005010if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5011 cat >> confdefs.h <<\EOF
5012#define __CHAR_UNSIGNED__ 1
5013EOF
5014
5015fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005016
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005017echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005018echo "configure:5019: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005019if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005020 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005021else
5022 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005023#line 5024 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005024#include "confdefs.h"
5025
Guido van Rossumf78abae1997-01-21 22:02:36 +00005026int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005027
5028/* Ultrix mips cc rejects this. */
Greg Warda1c4da22000-11-07 15:44:21 +00005029typedef int charset[2]; const charset x;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005030/* SunOS 4.1.1 cc rejects this. */
5031char const *const *ccp;
5032char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005033/* NEC SVR4.0.2 mips cc rejects this. */
5034struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005035static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005036/* AIX XL C 1.02.0.0 rejects this.
5037 It does not let you subtract one const X* pointer from another in an arm
5038 of an if-expression whose if-part is not a constant expression */
5039const char *g = "string";
5040ccp = &g + (g ? g-g : 0);
5041/* HPUX 7.0 cc rejects these. */
5042++ccp;
5043p = (char**) ccp;
5044ccp = (char const *const *) p;
5045{ /* SCO 3.2v4 cc rejects this. */
5046 char *t;
5047 char const *s = 0 ? (char *) 0 : (char const *) 0;
5048
5049 *t++ = 0;
5050}
5051{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005052 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005053 const int *foo = &x[0];
5054 ++foo;
5055}
5056{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5057 typedef const int *iptr;
5058 iptr p = 0;
5059 ++p;
5060}
5061{ /* AIX XL C 1.02.0.0 rejects this saying
5062 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5063 struct s { int j; const int *ap[3]; };
5064 struct s *b; b->j = 5;
5065}
5066{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5067 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005068}
5069
5070; return 0; }
5071EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005072if { (eval echo configure:5073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005073 rm -rf conftest*
5074 ac_cv_c_const=yes
5075else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005076 echo "configure: failed program was:" >&5
5077 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005078 rm -rf conftest*
5079 ac_cv_c_const=no
5080fi
5081rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005082fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005083
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005084echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005085if test $ac_cv_c_const = no; then
5086 cat >> confdefs.h <<\EOF
5087#define const
5088EOF
5089
5090fi
5091
5092
Guido van Rossumda88dad1995-01-26 00:46:29 +00005093works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005094echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005095echo "configure:5096: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005096cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005097#line 5098 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005098#include "confdefs.h"
5099
Guido van Rossumf78abae1997-01-21 22:02:36 +00005100int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005101volatile int x; x = 0;
5102; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005103EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005104if { (eval echo configure:5105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005105 rm -rf conftest*
5106 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005107else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005108 echo "configure: failed program was:" >&5
5109 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005110 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005111 cat >> confdefs.h <<\EOF
5112#define volatile
5113EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005114
5115fi
5116rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005117echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005118
Guido van Rossumda88dad1995-01-26 00:46:29 +00005119works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005120echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005121echo "configure:5122: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005122cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005123#line 5124 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005124#include "confdefs.h"
5125
Guido van Rossumf78abae1997-01-21 22:02:36 +00005126int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005127signed char c;
5128; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005129EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005130if { (eval echo configure:5131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005131 rm -rf conftest*
5132 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005133else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005134 echo "configure: failed program was:" >&5
5135 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005136 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005137 cat >> confdefs.h <<\EOF
5138#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00005139EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005140
5141fi
5142rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005143echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005144
Guido van Rossumda88dad1995-01-26 00:46:29 +00005145have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005146echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005147echo "configure:5148: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005148cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005149#line 5150 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005150#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005151int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005152int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005153return foo(10);
5154; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005155EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005156if { (eval echo configure:5157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005157 rm -rf conftest*
5158 cat >> confdefs.h <<\EOF
5159#define HAVE_PROTOTYPES 1
5160EOF
5161 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005162else
5163 echo "configure: failed program was:" >&5
5164 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005165fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005166rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005167echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005168
Guido van Rossumda88dad1995-01-26 00:46:29 +00005169works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005170echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005171echo "configure:5172: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005172cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005173#line 5174 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005174#include "confdefs.h"
5175
5176#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00005177int foo(int x, ...) {
5178 va_list va;
5179 va_start(va, x);
5180 va_arg(va, int);
5181 va_arg(va, char *);
5182 va_arg(va, double);
5183 return 0;
5184}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005185
Guido van Rossumf78abae1997-01-21 22:02:36 +00005186int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005187return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005188; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005189EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005190if { (eval echo configure:5191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005191 rm -rf conftest*
5192 cat >> confdefs.h <<\EOF
5193#define HAVE_STDARG_PROTOTYPES 1
5194EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005195 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005196else
5197 echo "configure: failed program was:" >&5
5198 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005199fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005200rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005201echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005202
Guido van Rossumda88dad1995-01-26 00:46:29 +00005203if test "$have_prototypes" = yes; then
5204bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005205echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005206echo "configure:5207: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005207cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005208#line 5209 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005209#include "confdefs.h"
5210#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005211int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005212char **t;execve("@",t,t);
5213; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005214EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005215if { (eval echo configure:5216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005216 :
5217else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005218 echo "configure: failed program was:" >&5
5219 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005220 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005221 cat >> confdefs.h <<\EOF
5222#define BAD_EXEC_PROTOTYPES 1
5223EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005224 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005225fi
5226rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005227echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005228fi
5229
Guido van Rossumda88dad1995-01-26 00:46:29 +00005230bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005231echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005232echo "configure:5233: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005233if test "$cross_compiling" = yes; then
5234 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5235else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005236 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005237#line 5238 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005238#include "confdefs.h"
5239
5240struct s { int a; int b; };
5241static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005242int foobar() {
5243 static int random;
5244 random = (int) &foo;
5245 return random;
5246}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005247static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005248main() {
5249 exit(!((int)&foo == foobar()));
5250}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005251
5252EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005253if { (eval echo configure:5254: \"$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 +00005254then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005255 :
5256else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005257 echo "configure: failed program was:" >&5
5258 cat conftest.$ac_ext >&5
5259 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005260 cat >> confdefs.h <<\EOF
5261#define BAD_STATIC_FORWARD 1
5262EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005263 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005264fi
5265rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005266fi
5267
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005268echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005269
Guido van Rossumda88dad1995-01-26 00:46:29 +00005270va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005271echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005272echo "configure:5273: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005273cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005274#line 5275 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005275#include "confdefs.h"
5276
5277#ifdef HAVE_STDARG_PROTOTYPES
5278#include <stdarg.h>
5279#else
5280#include <varargs.h>
5281#endif
5282
Guido van Rossumf78abae1997-01-21 22:02:36 +00005283int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005284va_list list1, list2; list1 = list2;
5285; return 0; }
5286EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005287if { (eval echo configure:5288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005288 :
5289else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005290 echo "configure: failed program was:" >&5
5291 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005292 rm -rf conftest*
5293 cat >> confdefs.h <<\EOF
5294#define VA_LIST_IS_ARRAY 1
5295EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005296 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005297fi
5298rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005299echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005300
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005301# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5302echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005303echo "configure:5304: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005304if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005305 echo $ac_n "(cached) $ac_c" 1>&6
5306else
5307 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005308#line 5309 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005309#include "confdefs.h"
5310/* System header to define __stub macros and hopefully few prototypes,
5311 which can conflict with char gethostbyname_r(); below. */
5312#include <assert.h>
5313/* Override any gcc2 internal prototype to avoid an error. */
5314/* We use char because int might match the return type of a gcc2
5315 builtin and then its argument prototype would still apply. */
5316char gethostbyname_r();
5317
5318int main() {
5319
5320/* The GNU C library defines this for functions which it implements
5321 to always fail with ENOSYS. Some functions are actually named
5322 something starting with __ and the normal name is an alias. */
5323#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5324choke me
5325#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005326gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005327#endif
5328
5329; return 0; }
5330EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005331if { (eval echo configure:5332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005332 rm -rf conftest*
5333 eval "ac_cv_func_gethostbyname_r=yes"
5334else
5335 echo "configure: failed program was:" >&5
5336 cat conftest.$ac_ext >&5
5337 rm -rf conftest*
5338 eval "ac_cv_func_gethostbyname_r=no"
5339fi
5340rm -f conftest*
5341fi
5342
5343if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5344 echo "$ac_t""yes" 1>&6
5345
5346 cat >> confdefs.h <<\EOF
5347#define HAVE_GETHOSTBYNAME_R 1
5348EOF
5349
5350 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005351echo "configure:5352: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005352 OLD_CFLAGS=$CFLAGS
5353 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
5354 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005355#line 5356 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005356#include "confdefs.h"
5357
5358# include <netdb.h>
5359
5360int main() {
5361
5362 char *name;
5363 struct hostent *he, *res;
5364 char buffer[2048];
5365 int buflen = 2048;
5366 int h_errnop;
5367
5368 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
5369
5370; return 0; }
5371EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005372if { (eval echo configure:5373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005373 rm -rf conftest*
5374
5375 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005376#define HAVE_GETHOSTBYNAME_R 1
5377EOF
5378
5379 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005380#define HAVE_GETHOSTBYNAME_R_6_ARG 1
5381EOF
5382
5383 echo "$ac_t""yes" 1>&6
5384
5385else
5386 echo "configure: failed program was:" >&5
5387 cat conftest.$ac_ext >&5
5388 rm -rf conftest*
5389
5390 echo "$ac_t""no" 1>&6
5391 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005392echo "configure:5393: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005393 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005394#line 5395 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005395#include "confdefs.h"
5396
5397# include <netdb.h>
5398
5399int main() {
5400
5401 char *name;
5402 struct hostent *he;
5403 char buffer[2048];
5404 int buflen = 2048;
5405 int h_errnop;
5406
5407 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
5408
5409; return 0; }
5410EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005411if { (eval echo configure:5412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005412 rm -rf conftest*
5413
5414 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005415#define HAVE_GETHOSTBYNAME_R 1
5416EOF
5417
5418 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005419#define HAVE_GETHOSTBYNAME_R_5_ARG 1
5420EOF
5421
5422 echo "$ac_t""yes" 1>&6
5423
5424else
5425 echo "configure: failed program was:" >&5
5426 cat conftest.$ac_ext >&5
5427 rm -rf conftest*
5428
5429 echo "$ac_t""no" 1>&6
5430 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005431echo "configure:5432: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005432 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005433#line 5434 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005434#include "confdefs.h"
5435
5436# include <netdb.h>
5437
5438int main() {
5439
5440 char *name;
5441 struct hostent *he;
5442 struct hostent_data data;
5443
5444 (void) gethostbyname_r(name, he, &data);
5445
5446; return 0; }
5447EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005448if { (eval echo configure:5449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005449 rm -rf conftest*
5450
5451 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005452#define HAVE_GETHOSTBYNAME_R 1
5453EOF
5454
5455 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005456#define HAVE_GETHOSTBYNAME_R_3_ARG 1
5457EOF
5458
5459 echo "$ac_t""yes" 1>&6
5460
5461else
5462 echo "configure: failed program was:" >&5
5463 cat conftest.$ac_ext >&5
5464 rm -rf conftest*
5465
5466 echo "$ac_t""no" 1>&6
5467
5468fi
5469rm -f conftest*
5470
5471fi
5472rm -f conftest*
5473
5474fi
5475rm -f conftest*
5476 CFLAGS=$OLD_CFLAGS
5477
5478else
5479 echo "$ac_t""no" 1>&6
5480
Thomas Wouters3a584202000-08-05 23:28:51 +00005481 for ac_func in gethostbyname
5482do
5483echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005484echo "configure:5485: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005485if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005486 echo $ac_n "(cached) $ac_c" 1>&6
5487else
5488 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005489#line 5490 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005490#include "confdefs.h"
5491/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005492 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005493#include <assert.h>
5494/* Override any gcc2 internal prototype to avoid an error. */
5495/* We use char because int might match the return type of a gcc2
5496 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005497char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005498
5499int main() {
5500
5501/* The GNU C library defines this for functions which it implements
5502 to always fail with ENOSYS. Some functions are actually named
5503 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005504#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005505choke me
5506#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005507$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005508#endif
5509
5510; return 0; }
5511EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005512if { (eval echo configure:5513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005513 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005514 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005515else
5516 echo "configure: failed program was:" >&5
5517 cat conftest.$ac_ext >&5
5518 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005519 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005520fi
5521rm -f conftest*
5522fi
5523
Thomas Wouters3a584202000-08-05 23:28:51 +00005524if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005525 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005526 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5527 cat >> confdefs.h <<EOF
5528#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005529EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00005530
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005531else
5532 echo "$ac_t""no" 1>&6
5533fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005534done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005535
5536
5537fi
5538
5539
5540
5541
5542
5543
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005544
Guido van Rossum627b2d71993-12-24 10:39:16 +00005545# checks for system services
5546# (none yet)
5547
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005548# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005549echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005550echo "configure:5551: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005551if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005552 echo $ac_n "(cached) $ac_c" 1>&6
5553else
5554 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005555#line 5556 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005556#include "confdefs.h"
5557/* System header to define __stub macros and hopefully few prototypes,
5558 which can conflict with char __fpu_control(); below. */
5559#include <assert.h>
5560/* Override any gcc2 internal prototype to avoid an error. */
5561/* We use char because int might match the return type of a gcc2
5562 builtin and then its argument prototype would still apply. */
5563char __fpu_control();
5564
5565int main() {
5566
5567/* The GNU C library defines this for functions which it implements
5568 to always fail with ENOSYS. Some functions are actually named
5569 something starting with __ and the normal name is an alias. */
5570#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5571choke me
5572#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005573__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005574#endif
5575
5576; return 0; }
5577EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005578if { (eval echo configure:5579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005579 rm -rf conftest*
5580 eval "ac_cv_func___fpu_control=yes"
5581else
5582 echo "configure: failed program was:" >&5
5583 cat conftest.$ac_ext >&5
5584 rm -rf conftest*
5585 eval "ac_cv_func___fpu_control=no"
5586fi
5587rm -f conftest*
5588fi
5589
5590if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5591 echo "$ac_t""yes" 1>&6
5592 :
5593else
5594 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005595echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005596echo "configure:5597: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005597ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005598if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005599 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005600else
5601 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005602LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005603cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005604#line 5605 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005605#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005606/* Override any gcc2 internal prototype to avoid an error. */
5607/* We use char because int might match the return type of a gcc2
5608 builtin and then its argument prototype would still apply. */
5609char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005610
Guido van Rossumf78abae1997-01-21 22:02:36 +00005611int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005612__fpu_control()
5613; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005614EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005615if { (eval echo configure:5616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005616 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005617 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005618else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005619 echo "configure: failed program was:" >&5
5620 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005621 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005622 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005623fi
5624rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005625LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005626
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005627fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005628if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005629 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005630 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5631 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005632 cat >> confdefs.h <<EOF
5633#define $ac_tr_lib 1
5634EOF
5635
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005636 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005637
5638else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005639 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005640fi
5641
5642
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005643fi
5644
5645
Guido van Rossum7f253911997-05-09 02:42:48 +00005646# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005647echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005648echo "configure:5649: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005649# Check whether --with-fpectl or --without-fpectl was given.
5650if test "${with_fpectl+set}" = set; then
5651 withval="$with_fpectl"
5652
5653if test "$withval" != no
5654then cat >> confdefs.h <<\EOF
5655#define WANT_SIGFPE_HANDLER 1
5656EOF
5657 echo "$ac_t""yes" 1>&6
5658else echo "$ac_t""no" 1>&6
5659fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005660else
5661 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005662fi
5663
5664
Guido van Rossum7f43da71994-08-01 12:15:30 +00005665# check for --with-libm=...
5666
Guido van Rossum563e7081996-09-10 18:20:48 +00005667case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00005668Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005669next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005670BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005671*) LIBM=-lm
5672esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005673echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005674echo "configure:5675: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005675# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005676if test "${with_libm+set}" = set; then
5677 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005678
Guido van Rossum7f253911997-05-09 02:42:48 +00005679if test "$withval" = no
5680then LIBM=
5681 echo "$ac_t""force LIBM empty" 1>&6
5682elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005683then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005684 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005685else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005686fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005687else
5688 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005689fi
5690
5691
5692# check for --with-libc=...
5693
Guido van Rossum7f253911997-05-09 02:42:48 +00005694echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005695echo "configure:5696: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005696# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005697if test "${with_libc+set}" = set; then
5698 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005699
Guido van Rossum7f253911997-05-09 02:42:48 +00005700if test "$withval" = no
5701then LIBC=
5702 echo "$ac_t""force LIBC empty" 1>&6
5703elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005704then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005705 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005706else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005707fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005708else
5709 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005710fi
5711
5712
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005713# check for --with-check-import-case
5714# Check whether --with-check-import-case or --without-check-import-case was given.
5715if test "${with_check_import_case+set}" = set; then
5716 withval="$with_check_import_case"
5717 :
5718fi
5719
5720echo $ac_n "checking for --with-check-import-case""... $ac_c" 1>&6
5721echo "configure:5722: checking for --with-check-import-case" >&5
5722if test "$with_check_import_case"
5723then
5724 cat >> confdefs.h <<\EOF
5725#define CHECK_IMPORT_CASE 1
5726EOF
5727
5728 echo "$ac_t""yes" 1>&6
5729else
5730 echo "$ac_t""no" 1>&6
5731fi
5732
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005733# check for hypot() in math library
5734LIBS_SAVE=$LIBS
5735LIBS="$LIBS $LIBM"
5736for ac_func in hypot
5737do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005738echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005739echo "configure:5740: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005740if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005741 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005742else
5743 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005744#line 5745 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005745#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005746/* System header to define __stub macros and hopefully few prototypes,
5747 which can conflict with char $ac_func(); below. */
5748#include <assert.h>
5749/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005750/* We use char because int might match the return type of a gcc2
5751 builtin and then its argument prototype would still apply. */
5752char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005753
Guido van Rossumf78abae1997-01-21 22:02:36 +00005754int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005755
5756/* The GNU C library defines this for functions which it implements
5757 to always fail with ENOSYS. Some functions are actually named
5758 something starting with __ and the normal name is an alias. */
5759#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5760choke me
5761#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005762$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005763#endif
5764
5765; return 0; }
5766EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005767if { (eval echo configure:5768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005768 rm -rf conftest*
5769 eval "ac_cv_func_$ac_func=yes"
5770else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005771 echo "configure: failed program was:" >&5
5772 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005773 rm -rf conftest*
5774 eval "ac_cv_func_$ac_func=no"
5775fi
5776rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005777fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005778
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005779if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5780 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005781 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5782 cat >> confdefs.h <<EOF
5783#define $ac_tr_func 1
5784EOF
5785
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005786else
5787 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005788LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005789fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005790done
5791
Guido van Rossumf78abae1997-01-21 22:02:36 +00005792
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005793LIBS=$LIBS_SAVE
5794
Guido van Rossumad713701997-07-10 22:42:38 +00005795# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005796echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005797echo "configure:5798: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005798if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005799 echo $ac_n "(cached) $ac_c" 1>&6
5800else
5801 if test "$cross_compiling" = yes; then
5802 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5803else
5804 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005805#line 5806 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005806#include "confdefs.h"
5807#include <stdio.h>
5808#ifdef HAVE_STDLIB
5809#include <stdlib.h>
5810#else
5811char *malloc(), *realloc();
5812int *free();
5813#endif
5814main() {
5815 char *p;
5816 p = malloc(0);
5817 if (p == NULL) exit(1);
5818 p = realloc(p, 0);
5819 if (p == NULL) exit(1);
5820 free(p);
5821 exit(0);
5822}
5823EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005824if { (eval echo configure:5825: \"$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 +00005825then
5826 ac_cv_malloc_zero=nonnull
5827else
5828 echo "configure: failed program was:" >&5
5829 cat conftest.$ac_ext >&5
5830 rm -fr conftest*
5831 ac_cv_malloc_zero=null
5832fi
5833rm -fr conftest*
5834fi
5835
5836fi
5837
5838echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5839if test "$ac_cv_malloc_zero" = null
5840then
5841 cat >> confdefs.h <<\EOF
5842#define MALLOC_ZERO_RETURNS_NULL 1
5843EOF
5844
5845fi
5846
Guido van Rossumef2255b2000-03-10 22:30:29 +00005847# check for wchar.h
5848ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5849echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005850echo "configure:5851: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005851if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005852 echo $ac_n "(cached) $ac_c" 1>&6
5853else
5854 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005855#line 5856 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005856#include "confdefs.h"
5857#include <wchar.h>
5858EOF
5859ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005860{ (eval echo configure:5861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005861ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5862if test -z "$ac_err"; then
5863 rm -rf conftest*
5864 eval "ac_cv_header_$ac_safe=yes"
5865else
5866 echo "$ac_err" >&5
5867 echo "configure: failed program was:" >&5
5868 cat conftest.$ac_ext >&5
5869 rm -rf conftest*
5870 eval "ac_cv_header_$ac_safe=no"
5871fi
5872rm -f conftest*
5873fi
5874if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5875 echo "$ac_t""yes" 1>&6
5876 cat >> confdefs.h <<\EOF
5877#define HAVE_WCHAR_H 1
5878EOF
5879 wchar_h="yes"
5880else
5881 echo "$ac_t""no" 1>&6
5882wchar_h="no"
5883
5884fi
5885
5886
5887# check for usable wchar_t
5888usable_wchar_t="unkown"
5889echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005890echo "configure:5891: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005891if test "$cross_compiling" = yes; then
5892 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5893else
5894 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005895#line 5896 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005896#include "confdefs.h"
5897
5898#include "wchar.h"
5899#include "wctype.h"
5900main() {
5901 wchar_t s;
5902 if (sizeof(s) == 2)
5903 exit(0);
5904 else
5905 exit(1);
5906}
5907
5908EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005909if { (eval echo configure:5910: \"$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 +00005910then
5911 cat >> confdefs.h <<\EOF
5912#define HAVE_USABLE_WCHAR_T 1
5913EOF
5914 usable_wchar_t="yes"
5915else
5916 echo "configure: failed program was:" >&5
5917 cat conftest.$ac_ext >&5
5918 rm -fr conftest*
5919 usable_wchar_t="no"
5920fi
5921rm -fr conftest*
5922fi
5923
5924echo "$ac_t""$usable_wchar_t" 1>&6
5925
5926# check for endianness
5927echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005928echo "configure:5929: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005929if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005930 echo $ac_n "(cached) $ac_c" 1>&6
5931else
5932 ac_cv_c_bigendian=unknown
5933# See if sys/param.h defines the BYTE_ORDER macro.
5934cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005935#line 5936 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005936#include "confdefs.h"
5937#include <sys/types.h>
5938#include <sys/param.h>
5939int main() {
5940
5941#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5942 bogus endian macros
5943#endif
5944; return 0; }
5945EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005946if { (eval echo configure:5947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005947 rm -rf conftest*
5948 # It does; now see whether it defined to BIG_ENDIAN or not.
5949cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005950#line 5951 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005951#include "confdefs.h"
5952#include <sys/types.h>
5953#include <sys/param.h>
5954int main() {
5955
5956#if BYTE_ORDER != BIG_ENDIAN
5957 not big endian
5958#endif
5959; return 0; }
5960EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005961if { (eval echo configure:5962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005962 rm -rf conftest*
5963 ac_cv_c_bigendian=yes
5964else
5965 echo "configure: failed program was:" >&5
5966 cat conftest.$ac_ext >&5
5967 rm -rf conftest*
5968 ac_cv_c_bigendian=no
5969fi
5970rm -f conftest*
5971else
5972 echo "configure: failed program was:" >&5
5973 cat conftest.$ac_ext >&5
5974fi
5975rm -f conftest*
5976if test $ac_cv_c_bigendian = unknown; then
5977if test "$cross_compiling" = yes; then
5978 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5979else
5980 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005981#line 5982 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005982#include "confdefs.h"
5983main () {
5984 /* Are we little or big endian? From Harbison&Steele. */
5985 union
5986 {
5987 long l;
5988 char c[sizeof (long)];
5989 } u;
5990 u.l = 1;
5991 exit (u.c[sizeof (long) - 1] == 1);
5992}
5993EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005994if { (eval echo configure:5995: \"$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 +00005995then
5996 ac_cv_c_bigendian=no
5997else
5998 echo "configure: failed program was:" >&5
5999 cat conftest.$ac_ext >&5
6000 rm -fr conftest*
6001 ac_cv_c_bigendian=yes
6002fi
6003rm -fr conftest*
6004fi
6005
6006fi
6007fi
6008
6009echo "$ac_t""$ac_cv_c_bigendian" 1>&6
6010if test $ac_cv_c_bigendian = yes; then
6011 cat >> confdefs.h <<\EOF
6012#define WORDS_BIGENDIAN 1
6013EOF
6014
6015fi
6016
6017
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006018# Check whether right shifting a negative integer extends the sign bit
6019# or fills with zeros (like the Cray J90, according to Tim Peters).
6020echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00006021echo "configure:6022: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006022if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00006023 echo $ac_n "(cached) $ac_c" 1>&6
6024else
6025
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006026if test "$cross_compiling" = yes; then
6027 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6028else
6029 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00006030#line 6031 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006031#include "confdefs.h"
6032
6033int main()
6034{
Vladimir Marangozova6180282000-07-12 05:05:06 +00006035 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006036}
6037
6038EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00006039if { (eval echo configure:6040: \"$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 +00006040then
6041 ac_cv_rshift_extends_sign=yes
6042else
6043 echo "configure: failed program was:" >&5
6044 cat conftest.$ac_ext >&5
6045 rm -fr conftest*
6046 ac_cv_rshift_extends_sign=no
6047fi
6048rm -fr conftest*
6049fi
6050
6051fi
6052
6053echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
6054if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006055then
6056 cat >> confdefs.h <<\EOF
6057#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
6058EOF
6059
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006060fi
6061
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006062# check for getc_unlocked and related locking functions
6063echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00006064echo "configure:6065: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006065if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
6066 echo $ac_n "(cached) $ac_c" 1>&6
6067else
6068
6069cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00006070#line 6071 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006071#include "confdefs.h"
6072#include <stdio.h>
6073int main() {
6074
6075 FILE *f = fopen("/dev/null", "r");
6076 flockfile(f);
6077 getc_unlocked(f);
6078 funlockfile(f);
6079
6080; return 0; }
6081EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00006082if { (eval echo configure:6083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006083 rm -rf conftest*
6084 ac_cv_have_getc_unlocked=yes
6085else
6086 echo "configure: failed program was:" >&5
6087 cat conftest.$ac_ext >&5
6088 rm -rf conftest*
6089 ac_cv_have_getc_unlocked=no
6090fi
6091rm -f conftest*
6092fi
6093
6094echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
6095if test "$ac_cv_have_getc_unlocked" = yes
6096then
6097 cat >> confdefs.h <<\EOF
6098#define HAVE_GETC_UNLOCKED 1
6099EOF
6100
6101fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006102
Guido van Rossum95713eb2000-05-18 20:53:31 +00006103# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
6104# Add sys/socket.h to confdefs.h
6105cat >> confdefs.h <<\EOF
6106#ifdef HAVE_SYS_SOCKET_H
6107#include <sys/socket.h>
6108#endif
6109EOF
6110echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00006111echo "configure:6112: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006112if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00006113 echo $ac_n "(cached) $ac_c" 1>&6
6114else
6115 cat > conftest.$ac_ext <<EOF
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00006116#line 6117 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00006117#include "confdefs.h"
6118#include <sys/types.h>
6119#if STDC_HEADERS
6120#include <stdlib.h>
6121#include <stddef.h>
6122#endif
6123EOF
6124if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6125 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6126 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006127 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00006128else
6129 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006130 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00006131fi
6132rm -f conftest*
6133
6134fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006135echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
6136if test $ac_cv_type_socklen_t = no; then
6137 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00006138#define socklen_t int
6139EOF
6140
6141fi
6142
6143
Fred Drake036144d2000-10-26 17:09:35 +00006144echo $ac_n "checking for Modules/Setup""... $ac_c" 1>&6
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00006145echo "configure:6146: checking for Modules/Setup" >&5
Fred Drake036144d2000-10-26 17:09:35 +00006146if test ! -f Modules/Setup ; then
Guido van Rossum262cf202000-11-02 19:33:53 +00006147 if test ! -d Modules ; then
6148 mkdir Modules
6149 fi
Fred Drake036144d2000-10-26 17:09:35 +00006150 cp "$srcdir/Modules/Setup.dist" Modules/Setup
6151 echo "$ac_t""creating" 1>&6
6152else
6153 echo "$ac_t""already exists" 1>&6
6154fi
6155
Guido van Rossum627b2d71993-12-24 10:39:16 +00006156# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006157trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006158cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006159# This file is a shell script that caches the results of configure
6160# tests run on this system so they can be shared between configure
6161# scripts and configure runs. It is not useful on other systems.
6162# If it contains results you don't want to keep, you may remove or edit it.
6163#
6164# By default, configure uses ./config.cache as the cache file,
6165# creating it if it does not exist already. You can give configure
6166# the --cache-file=FILE option to use a different cache file; that is
6167# what configure does when it calls configure scripts in
6168# subdirectories, so they share the cache.
6169# Giving --cache-file=/dev/null disables caching, for debugging configure.
6170# config.status only pays attention to the cache file if you give it the
6171# --recheck option to rerun configure.
6172#
6173EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006174# The following way of writing the cache mishandles newlines in values,
6175# but we know of no workaround that is simple, portable, and efficient.
6176# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006177# Ultrix sh set writes to stderr and can't be redirected directly,
6178# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006179(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006180 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006181 *ac_space=\ *)
6182 # `set' does not quote correctly, so add quotes (double-quote substitution
6183 # turns \\\\ into \\, and sed turns \\ into \).
6184 sed -n \
6185 -e "s/'/'\\\\''/g" \
6186 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6187 ;;
6188 *)
6189 # `set' quotes correctly as required by POSIX, so do not add quotes.
6190 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6191 ;;
6192 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006193if cmp -s $cache_file confcache; then
6194 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006195else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006196 if test -w $cache_file; then
6197 echo "updating cache $cache_file"
6198 cat confcache > $cache_file
6199 else
6200 echo "not updating unwritable cache $cache_file"
6201 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006202fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006203rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00006204
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006205trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006206
6207test "x$prefix" = xNONE && prefix=$ac_default_prefix
6208# Let make expand exec_prefix.
6209test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00006210
Guido van Rossum7f43da71994-08-01 12:15:30 +00006211# Any assignment to VPATH causes Sun make to only execute
6212# the first set of double-colon rules, so remove it if not needed.
6213# If there is a colon in the path, we need to keep it.
6214if test "x$srcdir" = x.; then
6215 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6216fi
6217
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006218trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00006219
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006220DEFS=-DHAVE_CONFIG_H
6221
6222# Without the "./", some shells look in PATH for config.status.
6223: ${CONFIG_STATUS=./config.status}
6224
6225echo creating $CONFIG_STATUS
6226rm -f $CONFIG_STATUS
6227cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006228#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00006229# Generated automatically by configure.
6230# Run this file to recreate the current configuration.
6231# This directory was configured as follows,
6232# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6233#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006234# $0 $ac_configure_args
6235#
6236# Compiler output produced by configure, useful for debugging
6237# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00006238
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006239ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006240for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00006241do
Guido van Rossum7f43da71994-08-01 12:15:30 +00006242 case "\$ac_option" in
6243 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006244 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6245 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00006246 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006247 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006248 exit 0 ;;
6249 -help | --help | --hel | --he | --h)
6250 echo "\$ac_cs_usage"; exit 0 ;;
6251 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006252 esac
6253done
6254
Guido van Rossum7f43da71994-08-01 12:15:30 +00006255ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00006256
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006257trap 'rm -fr `echo "Makefile \
6258 Objects/Makefile \
6259 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006260 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006261 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006262 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006263 Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006264EOF
6265cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006266
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006267# Protect against being on the right side of a sed subst in config.status.
6268sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6269 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006270$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00006271$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006272s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006273s%@CFLAGS@%$CFLAGS%g
6274s%@CPPFLAGS@%$CPPFLAGS%g
6275s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006276s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006277s%@DEFS@%$DEFS%g
6278s%@LDFLAGS@%$LDFLAGS%g
6279s%@LIBS@%$LIBS%g
6280s%@exec_prefix@%$exec_prefix%g
6281s%@prefix@%$prefix%g
6282s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006283s%@bindir@%$bindir%g
6284s%@sbindir@%$sbindir%g
6285s%@libexecdir@%$libexecdir%g
6286s%@datadir@%$datadir%g
6287s%@sysconfdir@%$sysconfdir%g
6288s%@sharedstatedir@%$sharedstatedir%g
6289s%@localstatedir@%$localstatedir%g
6290s%@libdir@%$libdir%g
6291s%@includedir@%$includedir%g
6292s%@oldincludedir@%$oldincludedir%g
6293s%@infodir@%$infodir%g
6294s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00006295s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006296s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00006297s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00006298s%@SET_CXX@%$SET_CXX%g
6299s%@MAINOBJ@%$MAINOBJ%g
Martin v. Löwis22352952000-12-13 17:37:02 +00006300s%@CXX@%$CXX%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006301s%@CC@%$CC%g
Guido van Rossumff555e32000-09-22 15:38:21 +00006302s%@EXE@%$EXE%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006303s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
6304s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00006305s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006306s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006307s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006308s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006309s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6310s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006311s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006312s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006313s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006314s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006315s%@SO@%$SO%g
6316s%@LDSHARED@%$LDSHARED%g
6317s%@CCSHARED@%$CCSHARED%g
6318s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum3d15bd82001-01-10 18:53:48 +00006319s%@USE_NCURSES_MODULE@%$USE_NCURSES_MODULE%g
6320s%@USE_READLINE_MODULE@%$USE_READLINE_MODULE%g
Guido van Rossum009f7871997-12-04 00:51:42 +00006321s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00006322s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00006323s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Fred Drakea50d6ec2000-08-31 16:13:20 +00006324s%@USE_BSDDB_MODULE@%$USE_BSDDB_MODULE%g
Skip Montanaroed33c9a2000-09-08 02:17:15 +00006325s%@HAVE_LIBDB@%$HAVE_LIBDB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006326s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00006327s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006328s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006329s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
6330s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
6331s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006332s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006333s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006334s%@LIBM@%$LIBM%g
6335s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006336
6337CEOF
6338EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006339
6340cat >> $CONFIG_STATUS <<\EOF
6341
6342# Split the substitutions into bite-sized pieces for seds with
6343# small command number limits, like on Digital OSF/1 and HP-UX.
6344ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6345ac_file=1 # Number of current file.
6346ac_beg=1 # First line for current file.
6347ac_end=$ac_max_sed_cmds # Line after last line for current file.
6348ac_more_lines=:
6349ac_sed_cmds=""
6350while $ac_more_lines; do
6351 if test $ac_beg -gt 1; then
6352 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6353 else
6354 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6355 fi
6356 if test ! -s conftest.s$ac_file; then
6357 ac_more_lines=false
6358 rm -f conftest.s$ac_file
6359 else
6360 if test -z "$ac_sed_cmds"; then
6361 ac_sed_cmds="sed -f conftest.s$ac_file"
6362 else
6363 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6364 fi
6365 ac_file=`expr $ac_file + 1`
6366 ac_beg=$ac_end
6367 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6368 fi
6369done
6370if test -z "$ac_sed_cmds"; then
6371 ac_sed_cmds=cat
6372fi
6373EOF
6374
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006375cat >> $CONFIG_STATUS <<EOF
6376
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006377CONFIG_FILES=\${CONFIG_FILES-"Makefile \
6378 Objects/Makefile \
6379 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006380 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006381 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006382 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006383 Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006384EOF
6385cat >> $CONFIG_STATUS <<\EOF
6386for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006387 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006388 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006389 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006390 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6391 *) ac_file_in="${ac_file}.in" ;;
6392 esac
6393
Guido van Rossumf78abae1997-01-21 22:02:36 +00006394 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006395
6396 # Remove last slash and all that follows it. Not all systems have dirname.
6397 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6398 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6399 # The file is in a subdirectory.
6400 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006401 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006402 # A "../" for each directory in $ac_dir_suffix.
6403 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6404 else
6405 ac_dir_suffix= ac_dots=
6406 fi
6407
6408 case "$ac_given_srcdir" in
6409 .) srcdir=.
6410 if test -z "$ac_dots"; then top_srcdir=.
6411 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6412 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6413 *) # Relative path.
6414 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6415 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6416 esac
6417
Guido van Rossumf78abae1997-01-21 22:02:36 +00006418
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006419 echo creating "$ac_file"
6420 rm -f "$ac_file"
6421 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6422 case "$ac_file" in
6423 *Makefile*) ac_comsub="1i\\
6424# $configure_input" ;;
6425 *) ac_comsub= ;;
6426 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006427
6428 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 +00006429 sed -e "$ac_comsub
6430s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006431s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006432s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00006433" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00006434fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00006435rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006436
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006437# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6438# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00006439#
6440# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006441ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6442ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006443ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006444ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006445# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006446ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6447ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006448ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006449ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006450# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006451ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6452ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006453ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006454ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006455
Guido van Rossumf78abae1997-01-21 22:02:36 +00006456if test "${CONFIG_HEADERS+set}" != set; then
6457EOF
6458cat >> $CONFIG_STATUS <<EOF
6459 CONFIG_HEADERS="config.h"
6460EOF
6461cat >> $CONFIG_STATUS <<\EOF
6462fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006463for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006464 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006465 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006466 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006467 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6468 *) ac_file_in="${ac_file}.in" ;;
6469 esac
6470
Guido van Rossum7f43da71994-08-01 12:15:30 +00006471 echo creating $ac_file
6472
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006473 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006474 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6475 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006476
6477EOF
6478
6479# Transform confdefs.h into a sed script conftest.vals that substitutes
6480# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006481# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006482# Protect against being in an unquoted here document in config.status.
6483rm -f conftest.vals
6484cat > conftest.hdr <<\EOF
6485s/[\\&%]/\\&/g
6486s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006487s%#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 +00006488s%ac_d%ac_u%gp
6489s%ac_u%ac_e%gp
6490EOF
6491sed -n -f conftest.hdr confdefs.h > conftest.vals
6492rm -f conftest.hdr
6493
6494# This sed command replaces #undef with comments. This is necessary, for
6495# example, in the case of _POSIX_SOURCE, which is predefined and required
6496# on some systems where configure will not decide to define it.
6497cat >> conftest.vals <<\EOF
6498s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6499EOF
6500
6501# Break up conftest.vals because some shells have a limit on
6502# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006503
6504rm -f conftest.tail
6505while :
6506do
6507 ac_lines=`grep -c . conftest.vals`
6508 # grep -c gives empty output for an empty file on some AIX systems.
6509 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6510 # Write a limited-size here document to conftest.frag.
6511 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6512 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6513 echo 'CEOF
6514 sed -f conftest.frag conftest.in > conftest.out
6515 rm -f conftest.in
6516 mv conftest.out conftest.in
6517' >> $CONFIG_STATUS
6518 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6519 rm -f conftest.vals
6520 mv conftest.tail conftest.vals
6521done
6522rm -f conftest.vals
6523
6524cat >> $CONFIG_STATUS <<\EOF
6525 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006526 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006527 cat conftest.in >> conftest.h
6528 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006529 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006530 echo "$ac_file is unchanged"
6531 rm -f conftest.h
6532 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006533 # Remove last slash and all that follows it. Not all systems have dirname.
6534 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6535 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6536 # The file is in a subdirectory.
6537 test ! -d "$ac_dir" && mkdir "$ac_dir"
6538 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006539 rm -f $ac_file
6540 mv conftest.h $ac_file
6541 fi
6542fi; done
6543
Guido van Rossumf78abae1997-01-21 22:02:36 +00006544EOF
6545cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006546
Guido van Rossumf78abae1997-01-21 22:02:36 +00006547EOF
6548cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006549
6550exit 0
6551EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006552chmod +x $CONFIG_STATUS
6553rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006554test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006555