blob: 969cd25edbf1698b87d6dc612f1a808706247f65 [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
Guido van Rossumaef734b2001-01-10 21:09:12 +00001138# the Makefiles). On Cygwin LDLIBRARY is the import library, DLLLIBRARY is the
1139# shared (i.e., DLL) library.
1140
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001141
1142
1143LDLIBRARY=''
Guido van Rossumaef734b2001-01-10 21:09:12 +00001144SET_DLLLIBRARY=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001145
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001146# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001147# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001148# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001149
1150echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001151echo "configure:1152: checking LINKCC" >&5
Guido van Rossum95012191999-12-16 17:50:52 +00001152if test -z "$LINKCC" -a ! -z "$CXX"
1153then
1154 LINKCC="$CXX"
1155fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001156if test -z "$LINKCC"
1157then
1158 case $ac_sys_system in
1159 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001160 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001161 dgux*)
1162 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001163 Monterey64*)
1164 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001165 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001166 esac
1167fi
1168echo "$ac_t""$LINKCC" 1>&6
1169
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001170echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001171echo "configure:1172: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001172
1173# NeXT framework builds require that the 'ar' library be converted into
1174# a bundle using libtool.
1175if test "$with_next_framework"
1176then
1177 LDLIBRARY='libpython$(VERSION).dylib'
1178fi
1179
1180# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001181case $MACHDEP in
1182dguxR4)
1183 LDLIBRARY='libpython$(VERSION).so'
1184 OPT="$OPT -pic"
1185 ;;
1186beos*)
1187 LDLIBRARY='libpython$(VERSION).so'
1188 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001189cygwin*)
1190 LDLIBRARY='libpython$(VERSION).dll.a'
1191 SET_DLLLIBRARY='DLLLIBRARY= $(basename $(LDLIBRARY))'
1192 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001193esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001194echo "$ac_t""$LDLIBRARY" 1>&6
1195
1196# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1197if test -z "$LDLIBRARY"
1198then
1199 LDLIBRARY='libpython$(VERSION).a'
1200 MAKE_LDLIBRARY="true"
1201else
Guido van Rossumaef734b2001-01-10 21:09:12 +00001202 case $MACHDEP in
1203 cygwin*) MAKE_LDLIBRARY='$(MAKE) -C Modules ../$(DLLLIBRARY)';;
1204 *) MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)';;
1205 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001206fi
1207
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001208# Extract the first word of "ranlib", so it can be a program name with args.
1209set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001210echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001211echo "configure:1212: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001212if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001213 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214else
1215 if test -n "$RANLIB"; then
1216 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1217else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001218 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1219 ac_dummy="$PATH"
1220 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221 test -z "$ac_dir" && ac_dir=.
1222 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001224 break
1225 fi
1226 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001228 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001229fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001230fi
1231RANLIB="$ac_cv_prog_RANLIB"
1232if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001233 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001234else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001235 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001236fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001237
1238
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239for ac_prog in ar aal
1240do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001241# Extract the first word of "$ac_prog", so it can be a program name with args.
1242set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001243echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001244echo "configure:1245: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001245if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001246 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001247else
1248 if test -n "$AR"; then
1249 ac_cv_prog_AR="$AR" # Let the user override the test.
1250else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001251 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1252 ac_dummy="$PATH"
1253 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001254 test -z "$ac_dir" && ac_dir=.
1255 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001256 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001257 break
1258 fi
1259 done
1260 IFS="$ac_save_ifs"
1261fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001262fi
1263AR="$ac_cv_prog_AR"
1264if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001265 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001266else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001267 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001268fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269
1270test -n "$AR" && break
1271done
1272test -n "$AR" || AR="ar"
1273
1274
Guido van Rossumda88dad1995-01-26 00:46:29 +00001275
1276
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001277# Install just never works :-(
1278if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001279then
1280 INSTALL=cp
1281 INSTALL_PROGRAM=cp
1282 INSTALL_DATA=cp
1283else
1284 INSTALL_PROGRAM="$INSTALL"
1285 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001286fi
1287
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001288# Not every filesystem supports hard links
1289
1290if test -z "$LN" ; then
1291 case $ac_sys_system in
1292 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001293 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001294 *) LN=ln;;
1295 esac
1296fi
1297
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001298# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001299
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001300if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001301then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001302 case $GCC in
1303 yes)
1304 case $ac_cv_prog_cc_g in
Greg Warda1c4da22000-11-07 15:44:21 +00001305 yes) OPT="-g -O2 -Wall -Wstrict-prototypes -fPIC";;
1306 *) OPT="-O2 -Wall -Wstrict-prototypes -fPIC";;
Guido van Rossumedca74a1997-07-18 23:29:40 +00001307 esac
1308 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001309 *) OPT="-O";;
1310 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001311fi
1312
Trent Mick635f6fb2000-08-23 21:33:05 +00001313# The current (beta) Monterey compiler dies with optimizations
1314case $ac_sys_system in
1315Monterey*) OPT="";;
1316esac
1317
Guido van Rossumaef734b2001-01-10 21:09:12 +00001318# Cygwin does not need PIC compiler option so remove it to prevent warnings
1319case $ac_sys_system in
1320CYGWIN*) OPT="`echo $OPT | sed 's/ *-fPIC//'`";;
1321esac
1322
Guido van Rossum563e7081996-09-10 18:20:48 +00001323if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001324then
1325 OPT="$OPT $ac_arch_flags"
1326fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001327# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001328echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001329echo "configure:1330: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001330# On Suns, sometimes $CPP names a directory.
1331if test -n "$CPP" && test -d "$CPP"; then
1332 CPP=
1333fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334if test -z "$CPP"; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001335if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001336 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001337else
1338 # This must be in double quotes, not single quotes, because CPP may get
1339 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001340 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001341 # On the NeXT, cc -E runs the code through the compiler's parser,
1342 # not just through cpp.
1343 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001344#line 1345 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001345#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001346#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001347Syntax Error
1348EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001349ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumaef734b2001-01-10 21:09:12 +00001350{ (eval echo configure:1351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001351ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1352if test -z "$ac_err"; then
1353 :
1354else
1355 echo "$ac_err" >&5
1356 echo "configure: failed program was:" >&5
1357 cat conftest.$ac_ext >&5
1358 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001359 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001360 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001361#line 1362 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001362#include "confdefs.h"
1363#include <assert.h>
1364Syntax Error
1365EOF
1366ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumaef734b2001-01-10 21:09:12 +00001367{ (eval echo configure:1368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001368ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001369if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001370 :
1371else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001372 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001373 echo "configure: failed program was:" >&5
1374 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001375 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001376 CPP="${CC-cc} -nologo -E"
1377 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001378#line 1379 "configure"
Guido van Rossumff555e32000-09-22 15:38:21 +00001379#include "confdefs.h"
1380#include <assert.h>
1381Syntax Error
1382EOF
1383ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumaef734b2001-01-10 21:09:12 +00001384{ (eval echo configure:1385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumff555e32000-09-22 15:38:21 +00001385ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1386if test -z "$ac_err"; then
1387 :
1388else
1389 echo "$ac_err" >&5
1390 echo "configure: failed program was:" >&5
1391 cat conftest.$ac_ext >&5
1392 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001393 CPP=/lib/cpp
1394fi
1395rm -f conftest*
1396fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001397rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001398fi
1399rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001400 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001401fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001402 CPP="$ac_cv_prog_CPP"
1403else
1404 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001405fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001406echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001407
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001408echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001409echo "configure:1410: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001410cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001411#line 1412 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001412#include "confdefs.h"
1413#ifdef _AIX
1414 yes
1415#endif
1416
1417EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001418if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1419 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001420 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001421 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001422#define _ALL_SOURCE 1
1423EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001424
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001425else
1426 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001427 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001428fi
1429rm -f conftest*
1430
1431
Guido van Rossumf78abae1997-01-21 22:02:36 +00001432ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001433echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001434echo "configure:1435: checking for minix/config.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001435if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001436 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001437else
1438 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001439#line 1440 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001440#include "confdefs.h"
1441#include <minix/config.h>
1442EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001443ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumaef734b2001-01-10 21:09:12 +00001444{ (eval echo configure:1445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001445ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001446if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001447 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001448 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001449else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001450 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001451 echo "configure: failed program was:" >&5
1452 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001453 rm -rf conftest*
1454 eval "ac_cv_header_$ac_safe=no"
1455fi
1456rm -f conftest*
1457fi
1458if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001459 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001460 MINIX=yes
1461else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001462 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001463MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001464fi
1465
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001466if test "$MINIX" = yes; then
1467 cat >> confdefs.h <<\EOF
1468#define _POSIX_SOURCE 1
1469EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001470
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001471 cat >> confdefs.h <<\EOF
1472#define _POSIX_1_SOURCE 2
1473EOF
1474
1475 cat >> confdefs.h <<\EOF
1476#define _MINIX 1
1477EOF
1478
1479fi
1480
Guido van Rossumda88dad1995-01-26 00:46:29 +00001481
Guido van Rossum91922671997-10-09 20:24:13 +00001482echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001483echo "configure:1484: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001484if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001485 echo $ac_n "(cached) $ac_c" 1>&6
1486else
1487 ac_save_cc="$CC"
1488CC="$CC -OPT:Olimit=0"
1489if test "$cross_compiling" = yes; then
1490 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1491else
1492 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001493#line 1494 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001494#include "confdefs.h"
1495int main() { return 0; }
1496EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001497if { (eval echo configure:1498: \"$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 +00001498then
1499 ac_cv_opt_olimit_ok=yes
1500else
1501 echo "configure: failed program was:" >&5
1502 cat conftest.$ac_ext >&5
1503 rm -fr conftest*
1504 ac_cv_opt_olimit_ok=no
1505fi
1506rm -fr conftest*
1507fi
1508
1509CC="$ac_save_cc"
1510fi
1511
1512echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001513if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001514 case $ac_sys_system in
1515 Darwin*) OPT="$OPT" ;;
1516 *) OPT="$OPT -OPT:Olimit=0";;
1517 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001518else
1519 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001520echo "configure:1521: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001521 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001522 echo $ac_n "(cached) $ac_c" 1>&6
1523else
1524 ac_save_cc="$CC"
1525 CC="$CC -Olimit 1500"
1526 if test "$cross_compiling" = yes; then
1527 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1528else
1529 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001530#line 1531 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001531#include "confdefs.h"
1532int main() { return 0; }
1533EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001534if { (eval echo configure:1535: \"$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 +00001535then
1536 ac_cv_olimit_ok=yes
1537else
1538 echo "configure: failed program was:" >&5
1539 cat conftest.$ac_ext >&5
1540 rm -fr conftest*
1541 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001542fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001543rm -fr conftest*
1544fi
1545
1546 CC="$ac_save_cc"
1547fi
1548
1549 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1550 if test $ac_cv_olimit_ok = yes; then
1551 OPT="$OPT -Olimit 1500"
1552 fi
1553fi
1554
Guido van Rossum84e7b241996-08-19 21:59:00 +00001555
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001556# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001557echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001558echo "configure:1559: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001559if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001560 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001561else
1562 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001563#line 1564 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001564#include "confdefs.h"
1565#include <stdlib.h>
1566#include <stdarg.h>
1567#include <string.h>
1568#include <float.h>
1569EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001570ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumaef734b2001-01-10 21:09:12 +00001571{ (eval echo configure:1572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001572ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001573if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001574 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001575 ac_cv_header_stdc=yes
1576else
1577 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001578 echo "configure: failed program was:" >&5
1579 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001580 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001581 ac_cv_header_stdc=no
1582fi
1583rm -f conftest*
1584
1585if test $ac_cv_header_stdc = yes; then
1586 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1587cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001588#line 1589 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001589#include "confdefs.h"
1590#include <string.h>
1591EOF
1592if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1593 egrep "memchr" >/dev/null 2>&1; then
1594 :
1595else
1596 rm -rf conftest*
1597 ac_cv_header_stdc=no
1598fi
1599rm -f conftest*
1600
1601fi
1602
1603if test $ac_cv_header_stdc = yes; then
1604 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1605cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001606#line 1607 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001607#include "confdefs.h"
1608#include <stdlib.h>
1609EOF
1610if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1611 egrep "free" >/dev/null 2>&1; then
1612 :
1613else
1614 rm -rf conftest*
1615 ac_cv_header_stdc=no
1616fi
1617rm -f conftest*
1618
1619fi
1620
1621if test $ac_cv_header_stdc = yes; then
1622 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1623if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001624 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001625else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001626 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001627#line 1628 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001628#include "confdefs.h"
1629#include <ctype.h>
1630#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1631#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001632#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001633int main () { int i; for (i = 0; i < 256; i++)
1634if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1635exit (0); }
1636
1637EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001638if { (eval echo configure:1639: \"$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 +00001639then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001640 :
1641else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001642 echo "configure: failed program was:" >&5
1643 cat conftest.$ac_ext >&5
1644 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001645 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001646fi
1647rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001648fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001649
1650fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001651fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001652
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001653echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001654if test $ac_cv_header_stdc = yes; then
1655 cat >> confdefs.h <<\EOF
1656#define STDC_HEADERS 1
1657EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001658
1659fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001660
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00001661for 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 +00001662signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Fred Drakea50d6ec2000-08-31 16:13:20 +00001663sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001664sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00001665sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
1666ndbm.h db1/ndbm.h gdbm/ndbm.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001667do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001668ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001669echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001670echo "configure:1671: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001671if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001672 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001673else
1674 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001675#line 1676 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001676#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001677#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001678EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001679ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumaef734b2001-01-10 21:09:12 +00001680{ (eval echo configure:1681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001681ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001682if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001683 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001684 eval "ac_cv_header_$ac_safe=yes"
1685else
1686 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001687 echo "configure: failed program was:" >&5
1688 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689 rm -rf conftest*
1690 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001691fi
1692rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001693fi
1694if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001695 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001696 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001697 cat >> confdefs.h <<EOF
1698#define $ac_tr_hdr 1
1699EOF
1700
1701else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001702 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001704done
1705
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706ac_header_dirent=no
1707for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1708do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001709ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001710echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001711echo "configure:1712: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001712if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001713 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001714else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001715 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001716#line 1717 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001717#include "confdefs.h"
1718#include <sys/types.h>
1719#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001720int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001721DIR *dirp = 0;
1722; return 0; }
1723EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001724if { (eval echo configure:1725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001725 rm -rf conftest*
1726 eval "ac_cv_header_dirent_$ac_safe=yes"
1727else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001728 echo "configure: failed program was:" >&5
1729 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001730 rm -rf conftest*
1731 eval "ac_cv_header_dirent_$ac_safe=no"
1732fi
1733rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001734fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001735if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001736 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001737 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001738 cat >> confdefs.h <<EOF
1739#define $ac_tr_hdr 1
1740EOF
1741 ac_header_dirent=$ac_hdr; break
1742else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001743 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001744fi
1745done
1746# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1747if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001748echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001749echo "configure:1750: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001750ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001751if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001752 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001753else
1754 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001755LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001756cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001757#line 1758 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001758#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001759/* Override any gcc2 internal prototype to avoid an error. */
1760/* We use char because int might match the return type of a gcc2
1761 builtin and then its argument prototype would still apply. */
1762char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001763
Guido van Rossumf78abae1997-01-21 22:02:36 +00001764int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001765opendir()
1766; return 0; }
1767EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001768if { (eval echo configure:1769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001769 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001770 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001771else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001772 echo "configure: failed program was:" >&5
1773 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001774 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001775 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001776fi
1777rm -f conftest*
1778LIBS="$ac_save_LIBS"
1779
1780fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001781if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001782 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001783 LIBS="$LIBS -ldir"
1784else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001785 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001786fi
1787
1788else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001789echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001790echo "configure:1791: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001791ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001792if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001793 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001794else
1795 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001796LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001797cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001798#line 1799 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001799#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001800/* Override any gcc2 internal prototype to avoid an error. */
1801/* We use char because int might match the return type of a gcc2
1802 builtin and then its argument prototype would still apply. */
1803char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001804
Guido van Rossumf78abae1997-01-21 22:02:36 +00001805int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001806opendir()
1807; return 0; }
1808EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001809if { (eval echo configure:1810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001810 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001811 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001812else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001813 echo "configure: failed program was:" >&5
1814 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001815 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001816 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001817fi
1818rm -f conftest*
1819LIBS="$ac_save_LIBS"
1820
1821fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001822if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001823 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001824 LIBS="$LIBS -lx"
1825else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001826 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001827fi
1828
1829fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001830
1831
1832# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001833was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001834echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001835echo "configure:1836: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001836cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001837#line 1838 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001838#include "confdefs.h"
1839#include <time.h>
1840EOF
1841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1842 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001843 rm -rf conftest*
1844 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001845else
1846 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001847 cat >> confdefs.h <<\EOF
1848#define clock_t long
1849EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001850
1851fi
1852rm -f conftest*
1853
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001854echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001855
Guido van Rossum84e7b241996-08-19 21:59:00 +00001856# Add some code to confdefs.h so that the test for off_t works on SCO
1857cat >> confdefs.h <<\EOF
1858#if defined(SCO_DS)
1859#undef _OFF_T
1860#endif
1861EOF
1862
Guido van Rossumef2255b2000-03-10 22:30:29 +00001863# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001864echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001865echo "configure:1866: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001866if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001867 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001868else
1869 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001870#line 1871 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001871#include "confdefs.h"
1872#include <sys/types.h>
1873#if STDC_HEADERS
1874#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001875#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001876#endif
1877EOF
1878if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001879 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 +00001880 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001881 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001882else
1883 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001884 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001885fi
1886rm -f conftest*
1887
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001888fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001889echo "$ac_t""$ac_cv_type_mode_t" 1>&6
1890if test $ac_cv_type_mode_t = no; then
1891 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001892#define mode_t int
1893EOF
1894
1895fi
1896
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001897echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001898echo "configure:1899: checking for off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001899if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001900 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001901else
1902 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001903#line 1904 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001904#include "confdefs.h"
1905#include <sys/types.h>
1906#if STDC_HEADERS
1907#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001908#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001909#endif
1910EOF
1911if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001912 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 +00001913 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001914 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001915else
1916 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001917 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001918fi
1919rm -f conftest*
1920
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001921fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001922echo "$ac_t""$ac_cv_type_off_t" 1>&6
1923if test $ac_cv_type_off_t = no; then
1924 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001925#define off_t long
1926EOF
1927
1928fi
1929
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001930echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001931echo "configure:1932: checking for pid_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001932if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001933 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001934else
1935 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001936#line 1937 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001937#include "confdefs.h"
1938#include <sys/types.h>
1939#if STDC_HEADERS
1940#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001941#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001942#endif
1943EOF
1944if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001945 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 +00001946 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001947 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001948else
1949 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001950 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001951fi
1952rm -f conftest*
1953
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001954fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001955echo "$ac_t""$ac_cv_type_pid_t" 1>&6
1956if test $ac_cv_type_pid_t = no; then
1957 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001958#define pid_t int
1959EOF
1960
1961fi
1962
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001963echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00001964echo "configure:1965: checking return type of signal handlers" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001965if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001966 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001967else
1968 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001969#line 1970 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001970#include "confdefs.h"
1971#include <sys/types.h>
1972#include <signal.h>
1973#ifdef signal
1974#undef signal
1975#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001976#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001977extern "C" void (*signal (int, void (*)(int)))(int);
1978#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001979void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001980#endif
1981
Guido van Rossumf78abae1997-01-21 22:02:36 +00001982int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001983int i;
1984; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001985EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00001986if { (eval echo configure:1987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001987 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001988 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001989else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001990 echo "configure: failed program was:" >&5
1991 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001992 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001993 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001994fi
1995rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001996fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001997
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001998echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001999cat >> confdefs.h <<EOF
2000#define RETSIGTYPE $ac_cv_type_signal
2001EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002002
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002003
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002004echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002005echo "configure:2006: checking for size_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002006if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002007 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002008else
2009 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002010#line 2011 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002011#include "confdefs.h"
2012#include <sys/types.h>
2013#if STDC_HEADERS
2014#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002015#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002016#endif
2017EOF
2018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002019 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 +00002020 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002021 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002022else
2023 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002024 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002025fi
2026rm -f conftest*
2027
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002028fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002029echo "$ac_t""$ac_cv_type_size_t" 1>&6
2030if test $ac_cv_type_size_t = no; then
2031 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002032#define size_t unsigned
2033EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002034
2035fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002036
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002037echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002038echo "configure:2039: checking for uid_t in sys/types.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002039if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002040 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002041else
2042 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002043#line 2044 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002044#include "confdefs.h"
2045#include <sys/types.h>
2046EOF
2047if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2048 egrep "uid_t" >/dev/null 2>&1; then
2049 rm -rf conftest*
2050 ac_cv_type_uid_t=yes
2051else
2052 rm -rf conftest*
2053 ac_cv_type_uid_t=no
2054fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002055rm -f conftest*
2056
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002057fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002058
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002059echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002060if test $ac_cv_type_uid_t = no; then
2061 cat >> confdefs.h <<\EOF
2062#define uid_t int
2063EOF
2064
2065 cat >> confdefs.h <<\EOF
2066#define gid_t int
2067EOF
2068
2069fi
2070
Guido van Rossum627b2d71993-12-24 10:39:16 +00002071
Guido van Rossumef2255b2000-03-10 22:30:29 +00002072# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002073echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002074echo "configure:2075: checking size of int" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002075if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002076 echo $ac_n "(cached) $ac_c" 1>&6
2077else
2078 if test "$cross_compiling" = yes; then
2079 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2080else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002081 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002082#line 2083 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002083#include "confdefs.h"
2084#include <stdio.h>
2085main()
2086{
2087 FILE *f=fopen("conftestval", "w");
2088 if (!f) exit(1);
2089 fprintf(f, "%d\n", sizeof(int));
2090 exit(0);
2091}
2092EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002093if { (eval echo configure:2094: \"$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 +00002094then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002095 ac_cv_sizeof_int=`cat conftestval`
2096else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002097 echo "configure: failed program was:" >&5
2098 cat conftest.$ac_ext >&5
2099 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002100 ac_cv_sizeof_int=0
2101fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002102rm -fr conftest*
2103fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002104
2105fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002106echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2107cat >> confdefs.h <<EOF
2108#define SIZEOF_INT $ac_cv_sizeof_int
2109EOF
2110
2111
2112echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002113echo "configure:2114: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002114if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002115 echo $ac_n "(cached) $ac_c" 1>&6
2116else
2117 if test "$cross_compiling" = yes; then
2118 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2119else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002120 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002121#line 2122 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002122#include "confdefs.h"
2123#include <stdio.h>
2124main()
2125{
2126 FILE *f=fopen("conftestval", "w");
2127 if (!f) exit(1);
2128 fprintf(f, "%d\n", sizeof(long));
2129 exit(0);
2130}
2131EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002132if { (eval echo configure:2133: \"$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 +00002133then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002134 ac_cv_sizeof_long=`cat conftestval`
2135else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002136 echo "configure: failed program was:" >&5
2137 cat conftest.$ac_ext >&5
2138 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002139 ac_cv_sizeof_long=0
2140fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002141rm -fr conftest*
2142fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002143
2144fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002145echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2146cat >> confdefs.h <<EOF
2147#define SIZEOF_LONG $ac_cv_sizeof_long
2148EOF
2149
2150
Guido van Rossumad678af1998-10-02 14:42:15 +00002151echo $ac_n "checking size of void *""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002152echo "configure:2153: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002153if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002154 echo $ac_n "(cached) $ac_c" 1>&6
2155else
2156 if test "$cross_compiling" = yes; then
2157 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2158else
2159 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002160#line 2161 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002161#include "confdefs.h"
2162#include <stdio.h>
2163main()
2164{
2165 FILE *f=fopen("conftestval", "w");
2166 if (!f) exit(1);
2167 fprintf(f, "%d\n", sizeof(void *));
2168 exit(0);
2169}
2170EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002171if { (eval echo configure:2172: \"$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 +00002172then
2173 ac_cv_sizeof_void_p=`cat conftestval`
2174else
2175 echo "configure: failed program was:" >&5
2176 cat conftest.$ac_ext >&5
2177 rm -fr conftest*
2178 ac_cv_sizeof_void_p=0
2179fi
2180rm -fr conftest*
2181fi
2182
2183fi
2184echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2185cat >> confdefs.h <<EOF
2186#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2187EOF
2188
2189
Guido van Rossumef2255b2000-03-10 22:30:29 +00002190echo $ac_n "checking size of char""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002191echo "configure:2192: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002192if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002193 echo $ac_n "(cached) $ac_c" 1>&6
2194else
2195 if test "$cross_compiling" = yes; then
2196 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2197else
2198 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002199#line 2200 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002200#include "confdefs.h"
2201#include <stdio.h>
2202main()
2203{
2204 FILE *f=fopen("conftestval", "w");
2205 if (!f) exit(1);
2206 fprintf(f, "%d\n", sizeof(char));
2207 exit(0);
2208}
2209EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002210if { (eval echo configure:2211: \"$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 +00002211then
2212 ac_cv_sizeof_char=`cat conftestval`
2213else
2214 echo "configure: failed program was:" >&5
2215 cat conftest.$ac_ext >&5
2216 rm -fr conftest*
2217 ac_cv_sizeof_char=0
2218fi
2219rm -fr conftest*
2220fi
2221
2222fi
2223echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2224cat >> confdefs.h <<EOF
2225#define SIZEOF_CHAR $ac_cv_sizeof_char
2226EOF
2227
2228
2229echo $ac_n "checking size of short""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002230echo "configure:2231: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002231if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002232 echo $ac_n "(cached) $ac_c" 1>&6
2233else
2234 if test "$cross_compiling" = yes; then
2235 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2236else
2237 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002238#line 2239 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002239#include "confdefs.h"
2240#include <stdio.h>
2241main()
2242{
2243 FILE *f=fopen("conftestval", "w");
2244 if (!f) exit(1);
2245 fprintf(f, "%d\n", sizeof(short));
2246 exit(0);
2247}
2248EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002249if { (eval echo configure:2250: \"$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 +00002250then
2251 ac_cv_sizeof_short=`cat conftestval`
2252else
2253 echo "configure: failed program was:" >&5
2254 cat conftest.$ac_ext >&5
2255 rm -fr conftest*
2256 ac_cv_sizeof_short=0
2257fi
2258rm -fr conftest*
2259fi
2260
2261fi
2262echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2263cat >> confdefs.h <<EOF
2264#define SIZEOF_SHORT $ac_cv_sizeof_short
2265EOF
2266
2267
2268echo $ac_n "checking size of float""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002269echo "configure:2270: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002270if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002271 echo $ac_n "(cached) $ac_c" 1>&6
2272else
2273 if test "$cross_compiling" = yes; then
2274 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2275else
2276 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002277#line 2278 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002278#include "confdefs.h"
2279#include <stdio.h>
2280main()
2281{
2282 FILE *f=fopen("conftestval", "w");
2283 if (!f) exit(1);
2284 fprintf(f, "%d\n", sizeof(float));
2285 exit(0);
2286}
2287EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002288if { (eval echo configure:2289: \"$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 +00002289then
2290 ac_cv_sizeof_float=`cat conftestval`
2291else
2292 echo "configure: failed program was:" >&5
2293 cat conftest.$ac_ext >&5
2294 rm -fr conftest*
2295 ac_cv_sizeof_float=0
2296fi
2297rm -fr conftest*
2298fi
2299
2300fi
2301echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2302cat >> confdefs.h <<EOF
2303#define SIZEOF_FLOAT $ac_cv_sizeof_float
2304EOF
2305
2306
2307echo $ac_n "checking size of double""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002308echo "configure:2309: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002309if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002310 echo $ac_n "(cached) $ac_c" 1>&6
2311else
2312 if test "$cross_compiling" = yes; then
2313 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2314else
2315 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002316#line 2317 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002317#include "confdefs.h"
2318#include <stdio.h>
2319main()
2320{
2321 FILE *f=fopen("conftestval", "w");
2322 if (!f) exit(1);
2323 fprintf(f, "%d\n", sizeof(double));
2324 exit(0);
2325}
2326EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002327if { (eval echo configure:2328: \"$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 +00002328then
2329 ac_cv_sizeof_double=`cat conftestval`
2330else
2331 echo "configure: failed program was:" >&5
2332 cat conftest.$ac_ext >&5
2333 rm -fr conftest*
2334 ac_cv_sizeof_double=0
2335fi
2336rm -fr conftest*
2337fi
2338
2339fi
2340echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2341cat >> confdefs.h <<EOF
2342#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2343EOF
2344
2345
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002346echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002347echo "configure:2348: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002348if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002349 echo $ac_n "(cached) $ac_c" 1>&6
2350else
2351 if test "$cross_compiling" = yes; then
2352 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2353else
2354 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002355#line 2356 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002356#include "confdefs.h"
2357#include <stdio.h>
2358main()
2359{
2360 FILE *f=fopen("conftestval", "w");
2361 if (!f) exit(1);
2362 fprintf(f, "%d\n", sizeof(fpos_t));
2363 exit(0);
2364}
2365EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002366if { (eval echo configure:2367: \"$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 +00002367then
2368 ac_cv_sizeof_fpos_t=`cat conftestval`
2369else
2370 echo "configure: failed program was:" >&5
2371 cat conftest.$ac_ext >&5
2372 rm -fr conftest*
2373 ac_cv_sizeof_fpos_t=0
2374fi
2375rm -fr conftest*
2376fi
2377
2378fi
2379echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2380cat >> confdefs.h <<EOF
2381#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2382EOF
2383
2384
Guido van Rossum0a516c91994-09-12 10:58:40 +00002385
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002386echo $ac_n "checking for long long support""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002387echo "configure:2388: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002388have_long_long=no
2389cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002390#line 2391 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002391#include "confdefs.h"
2392
2393int main() {
2394long long x; x = (long long)0;
2395; return 0; }
2396EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002397if { (eval echo configure:2398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002398 rm -rf conftest*
2399 cat >> confdefs.h <<\EOF
2400#define HAVE_LONG_LONG 1
2401EOF
2402 have_long_long=yes
2403else
2404 echo "configure: failed program was:" >&5
2405 cat conftest.$ac_ext >&5
2406fi
2407rm -f conftest*
2408echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002409if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002410echo $ac_n "checking size of long long""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002411echo "configure:2412: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002412if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002413 echo $ac_n "(cached) $ac_c" 1>&6
2414else
2415 if test "$cross_compiling" = yes; then
2416 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2417else
2418 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002419#line 2420 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002420#include "confdefs.h"
2421#include <stdio.h>
2422main()
2423{
2424 FILE *f=fopen("conftestval", "w");
2425 if (!f) exit(1);
2426 fprintf(f, "%d\n", sizeof(long long));
2427 exit(0);
2428}
2429EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002430if { (eval echo configure:2431: \"$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 +00002431then
2432 ac_cv_sizeof_long_long=`cat conftestval`
2433else
2434 echo "configure: failed program was:" >&5
2435 cat conftest.$ac_ext >&5
2436 rm -fr conftest*
2437 ac_cv_sizeof_long_long=0
2438fi
2439rm -fr conftest*
2440fi
2441
2442fi
2443echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2444cat >> confdefs.h <<EOF
2445#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2446EOF
2447
2448
2449fi
2450
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002451echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002452echo "configure:2453: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002453have_uintptr_t=no
2454cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002455#line 2456 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002456#include "confdefs.h"
2457
2458int main() {
2459uintptr_t x; x = (uintptr_t)0;
2460; return 0; }
2461EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002462if { (eval echo configure:2463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002463 rm -rf conftest*
2464 cat >> confdefs.h <<\EOF
2465#define HAVE_UINTPTR_T 1
2466EOF
2467 have_uintptr_t=yes
2468else
2469 echo "configure: failed program was:" >&5
2470 cat conftest.$ac_ext >&5
2471fi
2472rm -f conftest*
2473echo "$ac_t""$have_uintptr_t" 1>&6
2474if test "$have_uintptr_t" = yes ; then
2475echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002476echo "configure:2477: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002477if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002478 echo $ac_n "(cached) $ac_c" 1>&6
2479else
2480 if test "$cross_compiling" = yes; then
2481 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2482else
2483 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002484#line 2485 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002485#include "confdefs.h"
2486#include <stdio.h>
2487main()
2488{
2489 FILE *f=fopen("conftestval", "w");
2490 if (!f) exit(1);
2491 fprintf(f, "%d\n", sizeof(uintptr_t));
2492 exit(0);
2493}
2494EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002495if { (eval echo configure:2496: \"$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 +00002496then
2497 ac_cv_sizeof_uintptr_t=`cat conftestval`
2498else
2499 echo "configure: failed program was:" >&5
2500 cat conftest.$ac_ext >&5
2501 rm -fr conftest*
2502 ac_cv_sizeof_uintptr_t=0
2503fi
2504rm -fr conftest*
2505fi
2506
2507fi
2508echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2509cat >> confdefs.h <<EOF
2510#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2511EOF
2512
2513
2514fi
2515
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002516# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2517echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002518echo "configure:2519: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002519if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002520 echo $ac_n "(cached) $ac_c" 1>&6
2521else
2522 if test "$cross_compiling" = yes; then
2523 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2524else
2525 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002526#line 2527 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002527#include "confdefs.h"
2528#include <stdio.h>
2529#include <sys/types.h>
2530main()
2531{
2532 FILE *f=fopen("conftestval", "w");
2533 if (!f) exit(1);
2534 fprintf(f, "%d\n", sizeof(off_t));
2535 exit(0);
2536}
2537EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002538if { (eval echo configure:2539: \"$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 +00002539then
2540 ac_cv_sizeof_off_t=`cat conftestval`
2541else
2542 echo "configure: failed program was:" >&5
2543 cat conftest.$ac_ext >&5
2544 rm -fr conftest*
2545 ac_cv_sizeof_off_t=0
2546fi
2547rm -fr conftest*
2548fi
2549
2550
2551fi
2552
2553echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2554cat >> confdefs.h <<EOF
2555#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2556EOF
2557
2558
2559echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002560echo "configure:2561: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002561if test "$have_long_long" = yes -a \
2562 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2563 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002564 cat >> confdefs.h <<\EOF
2565#define HAVE_LARGEFILE_SUPPORT 1
2566EOF
2567
2568 echo "$ac_t""yes" 1>&6
2569else
2570 echo "$ac_t""no" 1>&6
2571fi
2572
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002573# AC_CHECK_SIZEOF() doesn't include <time.h>.
2574echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002575echo "configure:2576: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002576if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002577 echo $ac_n "(cached) $ac_c" 1>&6
2578else
2579 if test "$cross_compiling" = yes; then
2580 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2581else
2582 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002583#line 2584 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002584#include "confdefs.h"
2585#include <stdio.h>
2586#include <time.h>
2587main()
2588{
2589 FILE *f=fopen("conftestval", "w");
2590 if (!f) exit(1);
2591 fprintf(f, "%d\n", sizeof(time_t));
2592 exit(0);
2593}
2594EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002595if { (eval echo configure:2596: \"$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 +00002596then
2597 ac_cv_sizeof_time_t=`cat conftestval`
2598else
2599 echo "configure: failed program was:" >&5
2600 cat conftest.$ac_ext >&5
2601 rm -fr conftest*
2602 ac_cv_sizeof_time_t=0
2603fi
2604rm -fr conftest*
2605fi
2606
2607
2608fi
2609
2610echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2611cat >> confdefs.h <<EOF
2612#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2613EOF
2614
2615
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002616
Trent Mick635f6fb2000-08-23 21:33:05 +00002617# if have pthread_t then define SIZEOF_PTHREAD_T
2618echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002619echo "configure:2620: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002620have_pthread_t=no
2621cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002622#line 2623 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002623#include "confdefs.h"
2624#include <pthread.h>
2625int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002626pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002627; return 0; }
2628EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002629if { (eval echo configure:2630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002630 rm -rf conftest*
2631 have_pthread_t=yes
2632else
2633 echo "configure: failed program was:" >&5
2634 cat conftest.$ac_ext >&5
2635fi
2636rm -f conftest*
2637echo "$ac_t""$have_pthread_t" 1>&6
2638if test "$have_pthread_t" = yes ; then
2639 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2640 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002641echo "configure:2642: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002642 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002643 echo $ac_n "(cached) $ac_c" 1>&6
2644else
2645 if test "$cross_compiling" = yes; then
2646 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2647else
2648 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002649#line 2650 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002650#include "confdefs.h"
2651#include <stdio.h>
2652 #include <pthread.h>
2653 main()
2654 {
2655 FILE *f=fopen("conftestval", "w");
2656 if (!f) exit(1);
2657 fprintf(f, "%d\n", sizeof(pthread_t));
2658 exit(0);
2659 }
2660EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002661if { (eval echo configure:2662: \"$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 +00002662then
2663 ac_cv_sizeof_pthread_t=`cat conftestval`
2664else
2665 echo "configure: failed program was:" >&5
2666 cat conftest.$ac_ext >&5
2667 rm -fr conftest*
2668 ac_cv_sizeof_pthread_t=0
2669fi
2670rm -fr conftest*
2671fi
2672
2673
2674fi
2675
2676 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2677 cat >> confdefs.h <<EOF
2678#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2679EOF
2680
2681fi
2682
2683
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002684# Minor variations in building a framework between NextStep versions 4 and 5
2685
2686case $ac_sys_system/$ac_sys_release in
Guido van Rossum5839e582000-10-09 19:52:35 +00002687 Darwin/*)
2688 ns_undef_sym='_environ'
2689 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002690 next/4*)
2691 ns_undef_sym='__environ'
2692 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2693 next/5*)
2694 ns_undef_sym='_environ'
2695 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2696esac
2697
2698echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002699echo "configure:2700: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002700if test "$with_next_framework"
2701then
2702 OPT="$OPT -fno-common"
2703 # -U __environ is needed since bundles don't have access
2704 # to crt0 when built but will always be linked against it
2705 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2706 cat >> confdefs.h <<\EOF
2707#define WITH_NEXT_FRAMEWORK 1
2708EOF
2709
2710 echo "$ac_t""yes" 1>&6
2711else
2712 echo "$ac_t""no" 1>&6
2713fi
2714
2715echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002716echo "configure:2717: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002717if test "$with_next_framework" -o "$with_dyld"
2718then
2719 if test "$with_dyld"
2720 then
2721 echo "$ac_t""yes" 1>&6
2722 else
2723 echo "$ac_t""required for framework build" 1>&6
2724 fi
2725 cat >> confdefs.h <<\EOF
2726#define WITH_DYLD 1
2727EOF
2728
2729 ns_dyld='set'
2730else
2731 echo "$ac_t""no" 1>&6
2732fi
2733
Guido van Rossum0a516c91994-09-12 10:58:40 +00002734# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002735
2736
2737
2738
Guido van Rossum0a516c91994-09-12 10:58:40 +00002739# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00002740# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002741echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002742echo "configure:2743: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002743if test -z "$SO"
2744then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002745 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002746 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00002747 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00002748 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002749 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002750fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002751echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002752# LDSHARED is the ld *command* used to create shared library
2753# -- "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 +00002754# (Shared libraries in this instance are shared modules to be loaded into
2755# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002756echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002757echo "configure:2758: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002758if test -z "$LDSHARED"
2759then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002760 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002761 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002762 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002763 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002764 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002765 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00002766 SunOS/5*)
2767 if test "$GCC" = "yes"
Greg Warda1c4da22000-11-07 15:44:21 +00002768 then LDSHARED='$(CC) -shared'
Greg Ward57c9a6632000-05-26 12:22:54 +00002769 else LDSHARED="ld -G";
2770 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002771 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002772 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2773 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002774 Darwin/*|next/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002775 if test "$ns_dyld"
Guido van Rossum5839e582000-10-09 19:52:35 +00002776 then
2777 if test "$ac_sys_system" = Darwin
2778 then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
2779 else LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2780 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002781 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2782 fi
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002783 if test "$with_next_framework" ; then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002784 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2785 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002786 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002787 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002788 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002789 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002790 NetBSD*)
2791 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2792 then
2793 LDSHARED="cc -shared"
2794 else
2795 LDSHARED="ld -Bshareable"
2796 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002797 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00002798 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00002799 then
2800 LDSHARED="cc -shared ${LDFLAGS}"
2801 else
2802 LDSHARED="ld -Bshareable ${LDFLAGS}"
2803 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002804 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002805 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00002806 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002807 *) LDSHARED="ld";;
2808 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002809fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002810echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002811# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002812# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002813echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002814echo "configure:2815: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002815if test -z "$CCSHARED"
2816then
Guido van Rossum07397971997-04-29 21:49:50 +00002817 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002818 hp*|HP*) if test "$GCC" = yes;
2819 then CCSHARED="-fpic";
2820 else CCSHARED="+z";
2821 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002822 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002823 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002824 OpenBSD*) CCSHARED="-fpic";;
2825 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002826 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002827 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002828 IRIX*/6*) case $CC in
2829 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002830 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002831 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00002832 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002833 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002834fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002835echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002836# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002837# the python executable -- this is only needed for a few systems
2838echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002839echo "configure:2840: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002840if test -z "$LINKFORSHARED"
2841then
Guido van Rossum07397971997-04-29 21:49:50 +00002842 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002843 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002844 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002845 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002846 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002847 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002848 # -u libsys_s pulls in all symbols in libsys
2849 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2850 # -u __dummy makes the linker aware of the objc runtime
2851 # in System.framework; otherwise, __objcInit (referenced in
2852 # crt1.o) gets erroneously defined as common, which breaks dynamic
2853 # loading of any modules which reference it in System.framework
2854 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00002855 Darwin/*) LINKFORSHARED="-framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002856 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00002857 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002858 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00002859 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2860 then
2861 LINKFORSHARED="-Wl,--export-dynamic"
2862 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002863 SunOS/5*) case $CC in
2864 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002865 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002866 then
2867 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002868 fi;;
2869 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002870 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002871fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002872echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002873
Guido van Rossum627b2d71993-12-24 10:39:16 +00002874# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002875echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002876echo "configure:2877: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002877ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002878if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002879 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002880else
2881 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002882LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002883cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002884#line 2885 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002885#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002886/* Override any gcc2 internal prototype to avoid an error. */
2887/* We use char because int might match the return type of a gcc2
2888 builtin and then its argument prototype would still apply. */
2889char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002890
Guido van Rossumf78abae1997-01-21 22:02:36 +00002891int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002892dlopen()
2893; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002894EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002895if { (eval echo configure:2896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002896 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002897 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002898else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002899 echo "configure: failed program was:" >&5
2900 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002901 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002902 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002903fi
2904rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002905LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002906
Guido van Rossum627b2d71993-12-24 10:39:16 +00002907fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002908if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002909 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002910 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2911 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002912 cat >> confdefs.h <<EOF
2913#define $ac_tr_lib 1
2914EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002915
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002916 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002917
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002918else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002919 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002920fi
2921 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002922echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002923echo "configure:2924: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002924ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002925if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002926 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002927else
2928 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002929LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002930cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002931#line 2932 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002932#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002933/* Override any gcc2 internal prototype to avoid an error. */
2934/* We use char because int might match the return type of a gcc2
2935 builtin and then its argument prototype would still apply. */
2936char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002937
Guido van Rossumf78abae1997-01-21 22:02:36 +00002938int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002939shl_load()
2940; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002941EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002942if { (eval echo configure:2943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002943 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002944 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002945else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002946 echo "configure: failed program was:" >&5
2947 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002948 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002949 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002950fi
2951rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002952LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002953
Guido van Rossum627b2d71993-12-24 10:39:16 +00002954fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002955if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002956 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002957 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2958 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002959 cat >> confdefs.h <<EOF
2960#define $ac_tr_lib 1
2961EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002962
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002963 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002964
2965else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002966 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002967fi
2968 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002969
Skip Montanarocb853262000-08-30 22:29:48 +00002970# Check for --with-pydebug
2971echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002972echo "configure:2973: checking for --with-pydebug" >&5
Skip Montanarocb853262000-08-30 22:29:48 +00002973# Check whether --with-pydebug or --without-pydebug was given.
2974if test "${with_pydebug+set}" = set; then
2975 withval="$with_pydebug"
2976
2977if test "$withval" != no
2978then cat >> confdefs.h <<\EOF
2979#define Py_DEBUG 1
2980EOF
2981 echo "$ac_t""yes" 1>&6
2982else echo "$ac_t""no" 1>&6
2983fi
2984else
2985 echo "$ac_t""no" 1>&6
2986fi
2987
2988
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002989# checks for system dependent C++ extensions support
2990case "$ac_sys_system" in
2991 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00002992echo "configure:2993: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002993 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00002994#line 2995 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002995#include "confdefs.h"
2996#include "/usr/lpp/xlC/include/load.h"
2997int main() {
2998loadAndInit("", 0, "")
2999; return 0; }
3000EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003001if { (eval echo configure:3002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003002 rm -rf conftest*
3003 cat >> confdefs.h <<\EOF
3004#define AIX_GENUINE_CPLUSPLUS 1
3005EOF
3006
3007 echo "$ac_t""yes" 1>&6
3008else
3009 echo "configure: failed program was:" >&5
3010 cat conftest.$ac_ext >&5
3011 rm -rf conftest*
3012 echo "$ac_t""no" 1>&6
3013fi
3014rm -f conftest*;;
3015 *) ;;
3016esac
3017
Guido van Rossum70c7f481998-03-26 18:44:10 +00003018# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3019# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003020# BeOS' sockets are stashed in libnet.
3021case "$ac_sys_system" in
3022IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003023*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003024echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003025echo "configure:3026: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003026ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003027if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003028 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003029else
3030 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003031LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003032cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003033#line 3034 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003034#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003035/* Override any gcc2 internal prototype to avoid an error. */
3036/* We use char because int might match the return type of a gcc2
3037 builtin and then its argument prototype would still apply. */
3038char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003039
Guido van Rossumf78abae1997-01-21 22:02:36 +00003040int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003041t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003042; return 0; }
3043EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003044if { (eval echo configure:3045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003045 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003046 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003047else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003048 echo "configure: failed program was:" >&5
3049 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003050 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003051 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003052fi
3053rm -f conftest*
3054LIBS="$ac_save_LIBS"
3055
3056fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003057if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003058 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003059 LIBS="-lnsl $LIBS"
3060else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003061 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003062fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003063 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003064echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003065echo "configure:3066: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003066ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003067if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003068 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003069else
3070 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003071LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003072cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003073#line 3074 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003074#include "confdefs.h"
3075/* Override any gcc2 internal prototype to avoid an error. */
3076/* We use char because int might match the return type of a gcc2
3077 builtin and then its argument prototype would still apply. */
3078char socket();
3079
3080int main() {
3081socket()
3082; return 0; }
3083EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003084if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003085 rm -rf conftest*
3086 eval "ac_cv_lib_$ac_lib_var=yes"
3087else
3088 echo "configure: failed program was:" >&5
3089 cat conftest.$ac_ext >&5
3090 rm -rf conftest*
3091 eval "ac_cv_lib_$ac_lib_var=no"
3092fi
3093rm -f conftest*
3094LIBS="$ac_save_LIBS"
3095
3096fi
3097if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3098 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003099 LIBS="-lsocket $LIBS"
3100else
3101 echo "$ac_t""no" 1>&6
3102fi
3103 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003104;;
3105esac
3106case "$ac_sys_system" in
3107BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003108echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003109echo "configure:3110: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003110ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003111if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003112 echo $ac_n "(cached) $ac_c" 1>&6
3113else
3114 ac_save_LIBS="$LIBS"
3115LIBS="-lnet $LIBS $LIBS"
3116cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003117#line 3118 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003118#include "confdefs.h"
3119/* Override any gcc2 internal prototype to avoid an error. */
3120/* We use char because int might match the return type of a gcc2
3121 builtin and then its argument prototype would still apply. */
3122char socket();
3123
3124int main() {
3125socket()
3126; return 0; }
3127EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003128if { (eval echo configure:3129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003129 rm -rf conftest*
3130 eval "ac_cv_lib_$ac_lib_var=yes"
3131else
3132 echo "configure: failed program was:" >&5
3133 cat conftest.$ac_ext >&5
3134 rm -rf conftest*
3135 eval "ac_cv_lib_$ac_lib_var=no"
3136fi
3137rm -f conftest*
3138LIBS="$ac_save_LIBS"
3139
3140fi
3141if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3142 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003143 LIBS="-lnet $LIBS"
3144else
3145 echo "$ac_t""no" 1>&6
3146fi
3147 # BeOS
3148;;
3149esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003150
Guido van Rossuma68acba1996-07-31 17:36:39 +00003151echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003152echo "configure:3153: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003153# Check whether --with-libs or --without-libs was given.
3154if test "${with_libs+set}" = set; then
3155 withval="$with_libs"
3156
3157echo "$ac_t""$withval" 1>&6
3158LIBS="$withval $LIBS"
3159
3160else
3161 echo "$ac_t""no" 1>&6
3162fi
3163
Guido van Rossum7f43da71994-08-01 12:15:30 +00003164
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003165# This is used to generate Setup.config
3166
3167echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003168echo "configure:3169: checking for initscr in -lncurses" >&5
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003169ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
3170if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3171 echo $ac_n "(cached) $ac_c" 1>&6
3172else
3173 ac_save_LIBS="$LIBS"
3174LIBS="-lncurses -ltermcap $LIBS"
3175cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003176#line 3177 "configure"
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003177#include "confdefs.h"
3178/* Override any gcc2 internal prototype to avoid an error. */
3179/* We use char because int might match the return type of a gcc2
3180 builtin and then its argument prototype would still apply. */
3181char initscr();
3182
3183int main() {
3184initscr()
3185; return 0; }
3186EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003187if { (eval echo configure:3188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003188 rm -rf conftest*
3189 eval "ac_cv_lib_$ac_lib_var=yes"
3190else
3191 echo "configure: failed program was:" >&5
3192 cat conftest.$ac_ext >&5
3193 rm -rf conftest*
3194 eval "ac_cv_lib_$ac_lib_var=no"
3195fi
3196rm -f conftest*
3197LIBS="$ac_save_LIBS"
3198
3199fi
3200if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3201 echo "$ac_t""yes" 1>&6
3202 USE_NCURSES_MODULE=""
3203else
3204 echo "$ac_t""no" 1>&6
3205USE_NCURSES_MODULE="#"
3206fi
3207
3208
3209# This is used to generate Setup.config
3210
3211echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003212echo "configure:3213: checking for readline in -lreadline" >&5
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003213ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
3214if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3215 echo $ac_n "(cached) $ac_c" 1>&6
3216else
3217 ac_save_LIBS="$LIBS"
3218LIBS="-lreadline -ltermcap $LIBS"
3219cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003220#line 3221 "configure"
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003221#include "confdefs.h"
3222/* Override any gcc2 internal prototype to avoid an error. */
3223/* We use char because int might match the return type of a gcc2
3224 builtin and then its argument prototype would still apply. */
3225char readline();
3226
3227int main() {
3228readline()
3229; return 0; }
3230EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003231if { (eval echo configure:3232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003232 rm -rf conftest*
3233 eval "ac_cv_lib_$ac_lib_var=yes"
3234else
3235 echo "configure: failed program was:" >&5
3236 cat conftest.$ac_ext >&5
3237 rm -rf conftest*
3238 eval "ac_cv_lib_$ac_lib_var=no"
3239fi
3240rm -f conftest*
3241LIBS="$ac_save_LIBS"
3242
3243fi
3244if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3245 echo "$ac_t""yes" 1>&6
3246 USE_READLINE_MODULE=""
3247else
3248 echo "$ac_t""no" 1>&6
3249USE_READLINE_MODULE="#"
3250fi
3251
3252
3253# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003254
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003255USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003256
Guido van Rossumec2f0731997-01-22 20:54:01 +00003257echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003258echo "configure:3259: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003259
3260# Check whether --with-dec-threads or --without-dec-threads was given.
3261if test "${with_dec_threads+set}" = set; then
3262 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003263
3264echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003265LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003266if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003267 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003268fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003269else
3270 echo "$ac_t""no" 1>&6
3271fi
3272
3273
3274echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003275echo "configure:3276: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003276# Check whether --with-threads or --without-threads was given.
3277if test "${with_threads+set}" = set; then
3278 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003279 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003280fi
3281
3282
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003283# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003284# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003285if test "${with_thread+set}" = set; then
3286 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003287
3288with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003289fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003290
3291
3292if test -z "$with_threads"
3293then with_threads="yes"
3294fi
3295echo "$ac_t""$with_threads" 1>&6
3296
3297if test "$with_threads" = "no"
3298then
3299 USE_THREAD_MODULE="#"
3300else
Guido van Rossum40951012000-10-07 16:21:27 +00003301 if test ! -z "$with_threads" -a -d "$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003302 then LDFLAGS="$LDFLAGS -L$with_threads"
3303 fi
Guido van Rossum40951012000-10-07 16:21:27 +00003304 if test ! -z "$withval" -a -d "$withval"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003305 then LDFLAGS="$LDFLAGS -L$withval"
3306 fi
3307 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003308#define _REENTRANT 1
3309EOF
3310
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003311 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003312echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003313echo "configure:3314: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003314if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003315 echo $ac_n "(cached) $ac_c" 1>&6
3316else
3317 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003318#line 3319 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003319#include "confdefs.h"
3320#include <mach/cthreads.h>
3321EOF
3322ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumaef734b2001-01-10 21:09:12 +00003323{ (eval echo configure:3324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003324ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003325if test -z "$ac_err"; then
3326 rm -rf conftest*
3327 eval "ac_cv_header_$ac_safe=yes"
3328else
3329 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003330 echo "configure: failed program was:" >&5
3331 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003332 rm -rf conftest*
3333 eval "ac_cv_header_$ac_safe=no"
3334fi
3335rm -f conftest*
3336fi
3337if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3338 echo "$ac_t""yes" 1>&6
3339 cat >> confdefs.h <<\EOF
3340#define WITH_THREAD 1
3341EOF
3342
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003343 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003344#define C_THREADS 1
3345EOF
3346
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003347 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003348else
3349 echo "$ac_t""no" 1>&6
3350
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003351 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003352echo "configure:3353: checking for --with-pth" >&5
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003353 # Check whether --with-pth or --without-pth was given.
3354if test "${with_pth+set}" = set; then
3355 withval="$with_pth"
3356
3357 echo "$ac_t""$withval" 1>&6
3358 cat >> confdefs.h <<\EOF
3359#define WITH_THREAD 1
3360EOF
3361
3362 cat >> confdefs.h <<\EOF
3363#define HAVE_PTH 1
3364EOF
3365
3366 LIBS="-lpth $LIBS"
3367 LIBOBJS="$LIBOBJS thread.o"
3368else
3369
3370 echo "$ac_t""no" 1>&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003371 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003372echo "configure:3373: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003373ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003374if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003375 echo $ac_n "(cached) $ac_c" 1>&6
3376else
3377 ac_save_LIBS="$LIBS"
3378LIBS="-lpthread $LIBS"
3379cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003380#line 3381 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003381#include "confdefs.h"
3382/* Override any gcc2 internal prototype to avoid an error. */
3383/* We use char because int might match the return type of a gcc2
3384 builtin and then its argument prototype would still apply. */
3385char pthread_create();
3386
3387int main() {
3388pthread_create()
3389; return 0; }
3390EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003391if { (eval echo configure:3392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003392 rm -rf conftest*
3393 eval "ac_cv_lib_$ac_lib_var=yes"
3394else
3395 echo "configure: failed program was:" >&5
3396 cat conftest.$ac_ext >&5
3397 rm -rf conftest*
3398 eval "ac_cv_lib_$ac_lib_var=no"
3399fi
3400rm -f conftest*
3401LIBS="$ac_save_LIBS"
3402
3403fi
3404if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3405 echo "$ac_t""yes" 1>&6
3406 cat >> confdefs.h <<\EOF
3407#define WITH_THREAD 1
3408EOF
3409
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003410 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003411#define _POSIX_THREADS 1
3412EOF
3413
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003414 LIBS="-lpthread $LIBS"
3415 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003416else
3417 echo "$ac_t""no" 1>&6
3418
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003419 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003420echo "configure:3421: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003421if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003422 echo $ac_n "(cached) $ac_c" 1>&6
3423else
3424 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003425#line 3426 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003426#include "confdefs.h"
3427/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003428 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003429#include <assert.h>
3430/* Override any gcc2 internal prototype to avoid an error. */
3431/* We use char because int might match the return type of a gcc2
3432 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003433char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003434
3435int main() {
3436
3437/* The GNU C library defines this for functions which it implements
3438 to always fail with ENOSYS. Some functions are actually named
3439 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003440#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003441choke me
3442#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003443pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003444#endif
3445
3446; return 0; }
3447EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003448if { (eval echo configure:3449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003449 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003450 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003451else
3452 echo "configure: failed program was:" >&5
3453 cat conftest.$ac_ext >&5
3454 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003455 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003456fi
3457rm -f conftest*
3458fi
3459
Guido van Rossumea516321998-12-17 18:08:55 +00003460if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003461 echo "$ac_t""yes" 1>&6
3462 cat >> confdefs.h <<\EOF
3463#define WITH_THREAD 1
3464EOF
3465
Guido van Rossum5839e582000-10-09 19:52:35 +00003466 case $ac_sys_system in
3467 Darwin*) ;;
3468 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003469#define _POSIX_THREADS 1
3470EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003471;;
3472 esac
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003473 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003474else
3475 echo "$ac_t""no" 1>&6
3476
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003477 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003478echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003479echo "configure:3480: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003480if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003481 echo $ac_n "(cached) $ac_c" 1>&6
3482else
3483 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003484#line 3485 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003485#include "confdefs.h"
3486#include <kernel/OS.h>
3487EOF
3488ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumaef734b2001-01-10 21:09:12 +00003489{ (eval echo configure:3490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003490ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003491if test -z "$ac_err"; then
3492 rm -rf conftest*
3493 eval "ac_cv_header_$ac_safe=yes"
3494else
3495 echo "$ac_err" >&5
3496 echo "configure: failed program was:" >&5
3497 cat conftest.$ac_ext >&5
3498 rm -rf conftest*
3499 eval "ac_cv_header_$ac_safe=no"
3500fi
3501rm -f conftest*
3502fi
3503if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3504 echo "$ac_t""yes" 1>&6
3505 cat >> confdefs.h <<\EOF
3506#define WITH_THREAD 1
3507EOF
3508
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003509 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003510#define BEOS_THREADS 1
3511EOF
3512
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003513 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003514else
3515 echo "$ac_t""no" 1>&6
3516
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003517 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003518echo "configure:3519: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003519ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003520if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003521 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003522else
3523 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003524LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003525cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003526#line 3527 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003527#include "confdefs.h"
3528/* Override any gcc2 internal prototype to avoid an error. */
3529/* We use char because int might match the return type of a gcc2
3530 builtin and then its argument prototype would still apply. */
3531char pthread_create();
3532
3533int main() {
3534pthread_create()
3535; return 0; }
3536EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003537if { (eval echo configure:3538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003538 rm -rf conftest*
3539 eval "ac_cv_lib_$ac_lib_var=yes"
3540else
3541 echo "configure: failed program was:" >&5
3542 cat conftest.$ac_ext >&5
3543 rm -rf conftest*
3544 eval "ac_cv_lib_$ac_lib_var=no"
3545fi
3546rm -f conftest*
3547LIBS="$ac_save_LIBS"
3548
3549fi
3550if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3551 echo "$ac_t""yes" 1>&6
3552 cat >> confdefs.h <<\EOF
3553#define WITH_THREAD 1
3554EOF
3555
3556 cat >> confdefs.h <<\EOF
3557#define _POSIX_THREADS 1
3558EOF
3559
3560 LIBS="$LIBS -lpthreads"
3561 LIBOBJS="$LIBOBJS thread.o"
3562else
3563 echo "$ac_t""no" 1>&6
3564
3565 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003566echo "configure:3567: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003567ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003568if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003569 echo $ac_n "(cached) $ac_c" 1>&6
3570else
3571 ac_save_LIBS="$LIBS"
3572LIBS="-lc_r $LIBS"
3573cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003574#line 3575 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003575#include "confdefs.h"
3576/* Override any gcc2 internal prototype to avoid an error. */
3577/* We use char because int might match the return type of a gcc2
3578 builtin and then its argument prototype would still apply. */
3579char pthread_create();
3580
3581int main() {
3582pthread_create()
3583; return 0; }
3584EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003585if { (eval echo configure:3586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003586 rm -rf conftest*
3587 eval "ac_cv_lib_$ac_lib_var=yes"
3588else
3589 echo "configure: failed program was:" >&5
3590 cat conftest.$ac_ext >&5
3591 rm -rf conftest*
3592 eval "ac_cv_lib_$ac_lib_var=no"
3593fi
3594rm -f conftest*
3595LIBS="$ac_save_LIBS"
3596
3597fi
3598if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3599 echo "$ac_t""yes" 1>&6
3600 cat >> confdefs.h <<\EOF
3601#define WITH_THREAD 1
3602EOF
3603
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003604 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003605#define _POSIX_THREADS 1
3606EOF
3607
Greg Steinadf63d62000-07-05 10:38:09 +00003608 LIBS="$LIBS -lc_r"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003609 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003610else
3611 echo "$ac_t""no" 1>&6
3612
Greg Steinadf63d62000-07-05 10:38:09 +00003613 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003614echo "configure:3615: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003615ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003616if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003617 echo $ac_n "(cached) $ac_c" 1>&6
3618else
3619 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003620LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003621cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003622#line 3623 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003623#include "confdefs.h"
3624/* Override any gcc2 internal prototype to avoid an error. */
3625/* We use char because int might match the return type of a gcc2
3626 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003627char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003628
3629int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003630__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003631; return 0; }
3632EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003633if { (eval echo configure:3634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003634 rm -rf conftest*
3635 eval "ac_cv_lib_$ac_lib_var=yes"
3636else
3637 echo "configure: failed program was:" >&5
3638 cat conftest.$ac_ext >&5
3639 rm -rf conftest*
3640 eval "ac_cv_lib_$ac_lib_var=no"
3641fi
3642rm -f conftest*
3643LIBS="$ac_save_LIBS"
3644
3645fi
3646if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3647 echo "$ac_t""yes" 1>&6
3648 cat >> confdefs.h <<\EOF
3649#define WITH_THREAD 1
3650EOF
3651
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003652 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003653#define _POSIX_THREADS 1
3654EOF
3655
Greg Steinadf63d62000-07-05 10:38:09 +00003656 LIBS="$LIBS -lthread"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003657 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003658else
3659 echo "$ac_t""no" 1>&6
3660
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003661 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003662echo "configure:3663: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003663ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
3664if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3665 echo $ac_n "(cached) $ac_c" 1>&6
3666else
3667 ac_save_LIBS="$LIBS"
3668LIBS="-lpthread $LIBS"
3669cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003670#line 3671 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003671#include "confdefs.h"
3672/* Override any gcc2 internal prototype to avoid an error. */
3673/* We use char because int might match the return type of a gcc2
3674 builtin and then its argument prototype would still apply. */
3675char __pthread_create_system();
3676
3677int main() {
3678__pthread_create_system()
3679; return 0; }
3680EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003681if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003682 rm -rf conftest*
3683 eval "ac_cv_lib_$ac_lib_var=yes"
3684else
3685 echo "configure: failed program was:" >&5
3686 cat conftest.$ac_ext >&5
3687 rm -rf conftest*
3688 eval "ac_cv_lib_$ac_lib_var=no"
3689fi
3690rm -f conftest*
3691LIBS="$ac_save_LIBS"
3692
3693fi
3694if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3695 echo "$ac_t""yes" 1>&6
3696 cat >> confdefs.h <<\EOF
3697#define WITH_THREAD 1
3698EOF
3699
3700 cat >> confdefs.h <<\EOF
3701#define _POSIX_THREADS 1
3702EOF
3703
3704 LIBS="$LIBS -lpthread"
3705 LIBOBJS="$LIBOBJS thread.o"
3706else
3707 echo "$ac_t""no" 1>&6
3708
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003709 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003710echo "configure:3711: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003711ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003712if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003713 echo $ac_n "(cached) $ac_c" 1>&6
3714else
3715 ac_save_LIBS="$LIBS"
3716LIBS="-lcma $LIBS"
3717cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003718#line 3719 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003719#include "confdefs.h"
3720/* Override any gcc2 internal prototype to avoid an error. */
3721/* We use char because int might match the return type of a gcc2
3722 builtin and then its argument prototype would still apply. */
3723char pthread_create();
3724
3725int main() {
3726pthread_create()
3727; return 0; }
3728EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003729if { (eval echo configure:3730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003730 rm -rf conftest*
3731 eval "ac_cv_lib_$ac_lib_var=yes"
3732else
3733 echo "configure: failed program was:" >&5
3734 cat conftest.$ac_ext >&5
3735 rm -rf conftest*
3736 eval "ac_cv_lib_$ac_lib_var=no"
3737fi
3738rm -f conftest*
3739LIBS="$ac_save_LIBS"
3740
3741fi
3742if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3743 echo "$ac_t""yes" 1>&6
3744 cat >> confdefs.h <<\EOF
3745#define WITH_THREAD 1
3746EOF
3747
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003748 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003749#define _POSIX_THREADS 1
3750EOF
3751
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003752 LIBS="$LIBS -lcma"
3753 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003754else
3755 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003756
3757 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003758fi
3759
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003760
Guido van Rossum627b2d71993-12-24 10:39:16 +00003761fi
3762
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003763fi
3764
Guido van Rossum0be3e491997-05-22 20:33:33 +00003765fi
3766
Guido van Rossum49545951997-12-02 19:28:29 +00003767fi
3768
Guido van Rossumb93a8621998-05-07 13:27:32 +00003769fi
3770
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003771fi
3772
Guido van Rossumad678af1998-10-02 14:42:15 +00003773fi
3774
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003775fi
3776
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003777fi
3778
Guido van Rossum0be3e491997-05-22 20:33:33 +00003779
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003780 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003781echo "configure:3782: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003782ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003783if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003784 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003785else
3786 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003787LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003788cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003789#line 3790 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003790#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003791/* Override any gcc2 internal prototype to avoid an error. */
3792/* We use char because int might match the return type of a gcc2
3793 builtin and then its argument prototype would still apply. */
3794char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003795
Guido van Rossumf78abae1997-01-21 22:02:36 +00003796int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003797usconfig()
3798; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003799EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003800if { (eval echo configure:3801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003801 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003802 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003803else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003804 echo "configure: failed program was:" >&5
3805 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003806 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003807 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003808fi
3809rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003810LIBS="$ac_save_LIBS"
3811
3812fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003813if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003814 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003815 cat >> confdefs.h <<\EOF
3816#define WITH_THREAD 1
3817EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003818
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003819 LIBS="$LIBS -lmpc"
3820 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003821 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003822else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003823 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003824fi
3825
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003826 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003827echo "configure:3828: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003828ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003829if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003830 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003831else
3832 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003833LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003834cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003835#line 3836 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003836#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003837/* Override any gcc2 internal prototype to avoid an error. */
3838/* We use char because int might match the return type of a gcc2
3839 builtin and then its argument prototype would still apply. */
3840char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003841
Guido van Rossumf78abae1997-01-21 22:02:36 +00003842int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003843thr_create()
3844; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003845EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003846if { (eval echo configure:3847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003847 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003848 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003849else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003850 echo "configure: failed program was:" >&5
3851 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003852 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003853 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003854fi
3855rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003856LIBS="$ac_save_LIBS"
3857
3858fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003859if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003860 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003861 cat >> confdefs.h <<\EOF
3862#define WITH_THREAD 1
3863EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003864
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003865 LIBS="$LIBS -lthread"
3866 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003867 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003868else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003869 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003870fi
3871
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00003872
3873 if test "$USE_THREAD_MODULE" != "#"
3874 then
3875 # If the above checks didn't disable threads, (at least) OSF1
3876 # needs this '-threads' argument during linking.
3877 case $ac_sys_system in
3878 OSF1) LDLAST=-threads;;
3879 esac
3880 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003881fi
3882
Barry Warsawef82cd72000-06-30 16:21:01 +00003883# Check for GC support
3884
3885USE_GC_MODULE=""
3886echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003887echo "configure:3888: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003888# Check whether --with-cycle-gc or --without-cycle-gc was given.
3889if test "${with_cycle_gc+set}" = set; then
3890 withval="$with_cycle_gc"
3891 :
3892fi
3893
3894
3895if test -z "$with_cycle_gc"
3896then with_cycle_gc="yes"
3897fi
3898if test "$with_cycle_gc" = "no"
3899then
3900 USE_GC_MODULE="#"
3901else
3902 cat >> confdefs.h <<\EOF
3903#define WITH_CYCLE_GC 1
3904EOF
3905
3906fi
3907echo "$ac_t""$with_cycle_gc" 1>&6
3908
Fred Drakea50d6ec2000-08-31 16:13:20 +00003909# Check for LIBDB support
3910# either --with-libdb or, in its absence, the presence of db.h
3911
3912USE_BSDDB_MODULE=""
3913echo $ac_n "checking for --with-libdb""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003914echo "configure:3915: checking for --with-libdb" >&5
Fred Drakea50d6ec2000-08-31 16:13:20 +00003915# Check whether --with-libdb or --without-libdb was given.
3916if test "${with_libdb+set}" = set; then
3917 withval="$with_libdb"
3918 :
3919fi
3920
3921
Skip Montanarob89f41e2000-09-04 04:06:05 +00003922# enabled by default, but db.h must be found
3923if test "$ac_cv_header_db_h" = "yes"
3924then
3925 if test "$with_libdb" != "no"
3926 then with_libdb="yes"
3927 fi
3928else
Fred Drake5790be12000-10-09 17:06:13 +00003929 # make sure user knows why bsddb support wasn't enabled even
Skip Montanarob89f41e2000-09-04 04:06:05 +00003930 # though s/he requested it
3931 if test "$with_libdb" = "yes"
3932 then echo $ac_n "(requested, but db.h was not found) $ac_c"
3933 fi
3934 with_libdb="no"
Fred Drakea50d6ec2000-08-31 16:13:20 +00003935fi
Skip Montanarob89f41e2000-09-04 04:06:05 +00003936
Fred Drakea50d6ec2000-08-31 16:13:20 +00003937if test "$with_libdb" = "no"
3938then
3939 USE_BSDDB_MODULE="#"
3940else
3941 cat >> confdefs.h <<\EOF
3942#define WITH_LIBDB 1
3943EOF
3944
3945fi
3946echo "$ac_t""$with_libdb" 1>&6
3947
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003948if test "$with_libdb" = "yes"
3949then
3950 # check for libdb; BSD systems have the DB routines in libc --tg
3951
Martin v. Löwis05a65d62000-09-24 19:40:25 +00003952 # If dbopen is not in libc, then checking whether it is in libdb
3953 # is difficult: db_185.h may #define it as __db185_open
Fred Drake02706f52000-09-25 15:08:46 +00003954 # Instead, we just trust it is in libdb; linking will fail if it
3955 # is not.
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003956 echo $ac_n "checking for dbopen""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00003957echo "configure:3958: checking for dbopen" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003958if eval "test \"`echo '$''{'ac_cv_func_dbopen'+set}'`\" = set"; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003959 echo $ac_n "(cached) $ac_c" 1>&6
3960else
3961 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003962#line 3963 "configure"
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003963#include "confdefs.h"
3964/* System header to define __stub macros and hopefully few prototypes,
3965 which can conflict with char dbopen(); below. */
3966#include <assert.h>
3967/* Override any gcc2 internal prototype to avoid an error. */
3968/* We use char because int might match the return type of a gcc2
3969 builtin and then its argument prototype would still apply. */
3970char dbopen();
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003971
3972int main() {
3973
3974/* The GNU C library defines this for functions which it implements
3975 to always fail with ENOSYS. Some functions are actually named
3976 something starting with __ and the normal name is an alias. */
3977#if defined (__stub_dbopen) || defined (__stub___dbopen)
3978choke me
3979#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003980dbopen();
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003981#endif
3982
3983; return 0; }
3984EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00003985if { (eval echo configure:3986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Skip Montanaroed33c9a2000-09-08 02:17:15 +00003986 rm -rf conftest*
3987 eval "ac_cv_func_dbopen=yes"
3988else
3989 echo "configure: failed program was:" >&5
3990 cat conftest.$ac_ext >&5
3991 rm -rf conftest*
3992 eval "ac_cv_func_dbopen=no"
3993fi
3994rm -f conftest*
3995fi
3996
3997if eval "test \"`echo '$ac_cv_func_'dbopen`\" = yes"; then
3998 echo "$ac_t""yes" 1>&6
3999 HAVE_LIBDB=
4000else
4001 echo "$ac_t""no" 1>&6
Martin v. Löwis05a65d62000-09-24 19:40:25 +00004002HAVE_LIBDB=-ldb
Skip Montanaroed33c9a2000-09-08 02:17:15 +00004003fi
4004
4005fi
4006
Barry Warsawef82cd72000-06-30 16:21:01 +00004007# Check for --with-wctype-functions
4008echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004009echo "configure:4010: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004010# Check whether --with-wctype-functions or --without-wctype-functions was given.
4011if test "${with_wctype_functions+set}" = set; then
4012 withval="$with_wctype_functions"
4013
4014if test "$withval" != no
4015then cat >> confdefs.h <<\EOF
4016#define WANT_WCTYPE_FUNCTIONS 1
4017EOF
4018 echo "$ac_t""yes" 1>&6
4019else echo "$ac_t""no" 1>&6
4020fi
4021else
4022 echo "$ac_t""no" 1>&6
4023fi
4024
4025
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004026# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004027
4028DLINCLDIR=/
4029
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004030echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004031echo "configure:4032: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004032# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004033if test "${with_sgi_dl+set}" = set; then
4034 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004035
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004036echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004037cat >> confdefs.h <<\EOF
4038#define WITH_SGI_DL 1
4039EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004040
Guido van Rossume97ee181999-12-20 21:27:22 +00004041DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004042dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004043if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004044then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004045else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004046fi
4047DLINCLDIR=${dldir}
4048LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004049else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004050 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004051fi
4052
4053
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004054echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004055echo "configure:4056: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004056# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004057if test "${with_dl_dld+set}" = set; then
4058 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004059
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004060echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004061cat >> confdefs.h <<\EOF
4062#define WITH_DL_DLD 1
4063EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004064
Guido van Rossume97ee181999-12-20 21:27:22 +00004065DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004066dldir=`echo "$withval" | sed 's/,.*//'`
4067dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004068if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004069then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004070else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004071fi
4072DLINCLDIR=${dldir}
4073LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004074else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004075 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004076fi
4077
4078
Guido van Rossume97ee181999-12-20 21:27:22 +00004079# the dlopen() function means we might want to use dynload_shlib.o. some
4080# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004081for ac_func in dlopen
4082do
4083echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004084echo "configure:4085: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004085if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004086 echo $ac_n "(cached) $ac_c" 1>&6
4087else
4088 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004089#line 4090 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004090#include "confdefs.h"
4091/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004092 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004093#include <assert.h>
4094/* Override any gcc2 internal prototype to avoid an error. */
4095/* We use char because int might match the return type of a gcc2
4096 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004097char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004098
4099int main() {
4100
4101/* The GNU C library defines this for functions which it implements
4102 to always fail with ENOSYS. Some functions are actually named
4103 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004104#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004105choke me
4106#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004107$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004108#endif
4109
4110; return 0; }
4111EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004112if { (eval echo configure:4113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004113 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004114 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004115else
4116 echo "configure: failed program was:" >&5
4117 cat conftest.$ac_ext >&5
4118 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004119 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004120fi
4121rm -f conftest*
4122fi
4123
Thomas Wouters3a584202000-08-05 23:28:51 +00004124if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004125 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004126 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4127 cat >> confdefs.h <<EOF
4128#define $ac_tr_func 1
4129EOF
4130
Guido van Rossume97ee181999-12-20 21:27:22 +00004131else
4132 echo "$ac_t""no" 1>&6
4133fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004134done
Guido van Rossume97ee181999-12-20 21:27:22 +00004135
4136
4137# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4138# loading of modules.
4139
4140echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004141echo "configure:4142: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004142if test -z "$DYNLOADFILE"
4143then
4144 case $ac_sys_system/$ac_sys_release in
4145 AIX*) DYNLOADFILE="dynload_aix.o";;
4146 BeOS*) DYNLOADFILE="dynload_beos.o";;
4147 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossum5839e582000-10-09 19:52:35 +00004148 Darwin/*|next/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004149 *)
4150 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4151 # out any dynamic loading
4152 if test "$ac_cv_func_dlopen" = yes
4153 then DYNLOADFILE="dynload_shlib.o"
4154 else DYNLOADFILE="dynload_stub.o"
4155 fi
4156 ;;
4157 esac
4158fi
4159echo "$ac_t""$DYNLOADFILE" 1>&6
4160if test "$DYNLOADFILE" != "dynload_stub.o"
4161then
4162 cat >> confdefs.h <<\EOF
4163#define HAVE_DYNAMIC_LOADING 1
4164EOF
4165
4166fi
4167
Guido van Rossum627b2d71993-12-24 10:39:16 +00004168# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00004169for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004170 flock fork fsync fdatasync fpathconf ftime ftruncate \
Andrew M. Kuchlinga9586c72001-01-08 17:58:56 +00004171 getgroups getlogin getpeername getpid getpwent getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00004172 kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004173 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004174 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004175 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00004176 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00004177 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004178 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters70c21a12000-07-14 14:28:33 +00004179 truncate uname waitpid _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004180do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004181echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004182echo "configure:4183: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004183if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004184 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004185else
4186 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004187#line 4188 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004188#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004189/* System header to define __stub macros and hopefully few prototypes,
4190 which can conflict with char $ac_func(); below. */
4191#include <assert.h>
4192/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004193/* We use char because int might match the return type of a gcc2
4194 builtin and then its argument prototype would still apply. */
4195char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004196
Guido van Rossumf78abae1997-01-21 22:02:36 +00004197int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004198
Guido van Rossum627b2d71993-12-24 10:39:16 +00004199/* The GNU C library defines this for functions which it implements
4200 to always fail with ENOSYS. Some functions are actually named
4201 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004202#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004203choke me
4204#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004205$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004206#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004207
Guido van Rossum7f43da71994-08-01 12:15:30 +00004208; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004209EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004210if { (eval echo configure:4211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004211 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004212 eval "ac_cv_func_$ac_func=yes"
4213else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004214 echo "configure: failed program was:" >&5
4215 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004216 rm -rf conftest*
4217 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004218fi
4219rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004220fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004221
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004222if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004223 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004224 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004225 cat >> confdefs.h <<EOF
4226#define $ac_tr_func 1
4227EOF
4228
4229else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004230 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004231fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004232done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004233
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004234
Fred Drake8cef4cf2000-06-28 16:40:38 +00004235# check for openpty and forkpty
4236
4237for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004238do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004239echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004240echo "configure:4241: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004241if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004242 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004243else
4244 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004245#line 4246 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004246#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004247/* System header to define __stub macros and hopefully few prototypes,
4248 which can conflict with char $ac_func(); below. */
4249#include <assert.h>
4250/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004251/* We use char because int might match the return type of a gcc2
4252 builtin and then its argument prototype would still apply. */
4253char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004254
Guido van Rossumf78abae1997-01-21 22:02:36 +00004255int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256
Guido van Rossum627b2d71993-12-24 10:39:16 +00004257/* The GNU C library defines this for functions which it implements
4258 to always fail with ENOSYS. Some functions are actually named
4259 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004260#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004261choke me
4262#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004263$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004264#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265
Guido van Rossum7f43da71994-08-01 12:15:30 +00004266; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004267EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004268if { (eval echo configure:4269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004269 rm -rf conftest*
4270 eval "ac_cv_func_$ac_func=yes"
4271else
4272 echo "configure: failed program was:" >&5
4273 cat conftest.$ac_ext >&5
4274 rm -rf conftest*
4275 eval "ac_cv_func_$ac_func=no"
4276fi
4277rm -f conftest*
4278fi
4279
4280if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4281 echo "$ac_t""yes" 1>&6
4282 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4283 cat >> confdefs.h <<EOF
4284#define $ac_tr_func 1
4285EOF
4286
4287else
4288 echo "$ac_t""no" 1>&6
4289echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004290echo "configure:4291: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004291ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004292if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004293 echo $ac_n "(cached) $ac_c" 1>&6
4294else
4295 ac_save_LIBS="$LIBS"
4296LIBS="-lutil $LIBS"
4297cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004298#line 4299 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004299#include "confdefs.h"
4300/* Override any gcc2 internal prototype to avoid an error. */
4301/* We use char because int might match the return type of a gcc2
4302 builtin and then its argument prototype would still apply. */
4303char openpty();
4304
4305int main() {
4306openpty()
4307; return 0; }
4308EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004309if { (eval echo configure:4310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004310 rm -rf conftest*
4311 eval "ac_cv_lib_$ac_lib_var=yes"
4312else
4313 echo "configure: failed program was:" >&5
4314 cat conftest.$ac_ext >&5
4315 rm -rf conftest*
4316 eval "ac_cv_lib_$ac_lib_var=no"
4317fi
4318rm -f conftest*
4319LIBS="$ac_save_LIBS"
4320
4321fi
4322if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4323 echo "$ac_t""yes" 1>&6
4324 cat >> confdefs.h <<\EOF
4325#define HAVE_OPENPTY 1
4326EOF
4327 LIBS="$LIBS -lutil"
4328else
4329 echo "$ac_t""no" 1>&6
4330fi
4331
4332fi
4333done
4334
4335for ac_func in forkpty
4336do
4337echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004338echo "configure:4339: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004339if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004340 echo $ac_n "(cached) $ac_c" 1>&6
4341else
4342 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004343#line 4344 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004344#include "confdefs.h"
4345/* System header to define __stub macros and hopefully few prototypes,
4346 which can conflict with char $ac_func(); below. */
4347#include <assert.h>
4348/* Override any gcc2 internal prototype to avoid an error. */
4349/* We use char because int might match the return type of a gcc2
4350 builtin and then its argument prototype would still apply. */
4351char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004352
4353int main() {
4354
4355/* The GNU C library defines this for functions which it implements
4356 to always fail with ENOSYS. Some functions are actually named
4357 something starting with __ and the normal name is an alias. */
4358#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4359choke me
4360#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004361$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004362#endif
4363
4364; return 0; }
4365EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004366if { (eval echo configure:4367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004367 rm -rf conftest*
4368 eval "ac_cv_func_$ac_func=yes"
4369else
4370 echo "configure: failed program was:" >&5
4371 cat conftest.$ac_ext >&5
4372 rm -rf conftest*
4373 eval "ac_cv_func_$ac_func=no"
4374fi
4375rm -f conftest*
4376fi
4377
4378if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4379 echo "$ac_t""yes" 1>&6
4380 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4381 cat >> confdefs.h <<EOF
4382#define $ac_tr_func 1
4383EOF
4384
4385else
4386 echo "$ac_t""no" 1>&6
4387echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004388echo "configure:4389: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004389ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004390if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004391 echo $ac_n "(cached) $ac_c" 1>&6
4392else
4393 ac_save_LIBS="$LIBS"
4394LIBS="-lutil $LIBS"
4395cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004396#line 4397 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004397#include "confdefs.h"
4398/* Override any gcc2 internal prototype to avoid an error. */
4399/* We use char because int might match the return type of a gcc2
4400 builtin and then its argument prototype would still apply. */
4401char forkpty();
4402
4403int main() {
4404forkpty()
4405; return 0; }
4406EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004407if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004408 rm -rf conftest*
4409 eval "ac_cv_lib_$ac_lib_var=yes"
4410else
4411 echo "configure: failed program was:" >&5
4412 cat conftest.$ac_ext >&5
4413 rm -rf conftest*
4414 eval "ac_cv_lib_$ac_lib_var=no"
4415fi
4416rm -f conftest*
4417LIBS="$ac_save_LIBS"
4418
4419fi
4420if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4421 echo "$ac_t""yes" 1>&6
4422 cat >> confdefs.h <<\EOF
4423#define HAVE_FORKPTY 1
4424EOF
4425 LIBS="$LIBS -lutil"
4426else
4427 echo "$ac_t""no" 1>&6
4428fi
4429
4430fi
4431done
4432
4433
4434# check for long file support functions
4435for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4436do
4437echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004438echo "configure:4439: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004439if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004440 echo $ac_n "(cached) $ac_c" 1>&6
4441else
4442 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004443#line 4444 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004444#include "confdefs.h"
4445/* System header to define __stub macros and hopefully few prototypes,
4446 which can conflict with char $ac_func(); below. */
4447#include <assert.h>
4448/* Override any gcc2 internal prototype to avoid an error. */
4449/* We use char because int might match the return type of a gcc2
4450 builtin and then its argument prototype would still apply. */
4451char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004452
4453int main() {
4454
4455/* The GNU C library defines this for functions which it implements
4456 to always fail with ENOSYS. Some functions are actually named
4457 something starting with __ and the normal name is an alias. */
4458#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4459choke me
4460#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004461$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004462#endif
4463
4464; return 0; }
4465EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004466if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004467 rm -rf conftest*
4468 eval "ac_cv_func_$ac_func=yes"
4469else
4470 echo "configure: failed program was:" >&5
4471 cat conftest.$ac_ext >&5
4472 rm -rf conftest*
4473 eval "ac_cv_func_$ac_func=no"
4474fi
4475rm -f conftest*
4476fi
4477
4478if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4479 echo "$ac_t""yes" 1>&6
4480 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4481 cat >> confdefs.h <<EOF
4482#define $ac_tr_func 1
4483EOF
4484
4485else
4486 echo "$ac_t""no" 1>&6
4487fi
4488done
4489
4490
4491for ac_func in dup2 getcwd strdup strerror memmove
4492do
4493echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004494echo "configure:4495: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004495if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004496 echo $ac_n "(cached) $ac_c" 1>&6
4497else
4498 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004499#line 4500 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004500#include "confdefs.h"
4501/* System header to define __stub macros and hopefully few prototypes,
4502 which can conflict with char $ac_func(); below. */
4503#include <assert.h>
4504/* Override any gcc2 internal prototype to avoid an error. */
4505/* We use char because int might match the return type of a gcc2
4506 builtin and then its argument prototype would still apply. */
4507char $ac_func();
4508
4509int main() {
4510
4511/* The GNU C library defines this for functions which it implements
4512 to always fail with ENOSYS. Some functions are actually named
4513 something starting with __ and the normal name is an alias. */
4514#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4515choke me
4516#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004517$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004518#endif
4519
4520; return 0; }
4521EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004522if { (eval echo configure:4523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004523 rm -rf conftest*
4524 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004525else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004526 echo "configure: failed program was:" >&5
4527 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004528 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004529 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004530fi
4531rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004532fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004533
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004534if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004535 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004536 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4537 cat >> confdefs.h <<EOF
4538#define $ac_tr_func 1
4539EOF
4540
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004541else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004542 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004543LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004544fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004545done
4546
Guido van Rossumf78abae1997-01-21 22:02:36 +00004547
Thomas Wouters3a584202000-08-05 23:28:51 +00004548for ac_func in getpgrp
4549do
4550echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004551echo "configure:4552: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004552if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004553 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004554else
4555 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004556#line 4557 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004557#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004558/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004559 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004560#include <assert.h>
4561/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004562/* We use char because int might match the return type of a gcc2
4563 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004564char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004565
Guido van Rossumf78abae1997-01-21 22:02:36 +00004566int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004567
Guido van Rossum627b2d71993-12-24 10:39:16 +00004568/* The GNU C library defines this for functions which it implements
4569 to always fail with ENOSYS. Some functions are actually named
4570 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004571#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004572choke me
4573#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004574$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004575#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004576
4577; return 0; }
4578EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004579if { (eval echo configure:4580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004580 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004581 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004582else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004583 echo "configure: failed program was:" >&5
4584 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004585 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004586 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004587fi
4588rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004589fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004590
Thomas Wouters3a584202000-08-05 23:28:51 +00004591if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004592 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004593 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4594 cat >> confdefs.h <<EOF
4595#define $ac_tr_func 1
4596EOF
4597 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004598#line 4599 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004599#include "confdefs.h"
4600#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004601int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004602getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004603; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004604EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004605if { (eval echo configure:4606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004606 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004607 cat >> confdefs.h <<\EOF
4608#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004609EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004610
Guido van Rossumf78abae1997-01-21 22:02:36 +00004611else
4612 echo "configure: failed program was:" >&5
4613 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004614fi
4615rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004616else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004617 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004618fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004619done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004620
Thomas Wouters3a584202000-08-05 23:28:51 +00004621for ac_func in setpgrp
4622do
4623echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004624echo "configure:4625: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004625if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004626 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004627else
4628 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004629#line 4630 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004630#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004631/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004632 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004633#include <assert.h>
4634/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004635/* We use char because int might match the return type of a gcc2
4636 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004637char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004638
Guido van Rossumf78abae1997-01-21 22:02:36 +00004639int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004640
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004641/* The GNU C library defines this for functions which it implements
4642 to always fail with ENOSYS. Some functions are actually named
4643 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004644#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004645choke me
4646#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004647$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004648#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004649
4650; return 0; }
4651EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004652if { (eval echo configure:4653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004653 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004654 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004655else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004656 echo "configure: failed program was:" >&5
4657 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004658 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004659 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004660fi
4661rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004662fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004663
Thomas Wouters3a584202000-08-05 23:28:51 +00004664if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004665 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004666 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4667 cat >> confdefs.h <<EOF
4668#define $ac_tr_func 1
4669EOF
4670 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004671#line 4672 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004672#include "confdefs.h"
4673#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004674int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004675setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004676; return 0; }
4677EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004678if { (eval echo configure:4679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004679 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004680 cat >> confdefs.h <<\EOF
4681#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004682EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004683
Guido van Rossumf78abae1997-01-21 22:02:36 +00004684else
4685 echo "configure: failed program was:" >&5
4686 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004687fi
4688rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004689else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004690 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004691fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004692done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004693
Thomas Wouters3a584202000-08-05 23:28:51 +00004694for ac_func in gettimeofday
4695do
4696echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004697echo "configure:4698: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004698if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004699 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004700else
4701 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004702#line 4703 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004703#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004704/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004705 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004706#include <assert.h>
4707/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004708/* We use char because int might match the return type of a gcc2
4709 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004710char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004711
Guido van Rossumf78abae1997-01-21 22:02:36 +00004712int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004713
4714/* The GNU C library defines this for functions which it implements
4715 to always fail with ENOSYS. Some functions are actually named
4716 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004717#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004718choke me
4719#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004720$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004721#endif
4722
4723; return 0; }
4724EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004725if { (eval echo configure:4726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004726 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004727 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004728else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004729 echo "configure: failed program was:" >&5
4730 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004731 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004732 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004733fi
4734rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004735fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004736
Thomas Wouters3a584202000-08-05 23:28:51 +00004737if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004738 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004739 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4740 cat >> confdefs.h <<EOF
4741#define $ac_tr_func 1
4742EOF
4743 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004744#line 4745 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004745#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004746#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004747int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004748gettimeofday((struct timeval*)0,(struct timezone*)0);
4749; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004750EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004751if { (eval echo configure:4752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004752 :
4753else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004754 echo "configure: failed program was:" >&5
4755 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004756 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004757 cat >> confdefs.h <<\EOF
4758#define GETTIMEOFDAY_NO_TZ 1
4759EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004760
4761fi
4762rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004763else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004764 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004765fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004766done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004767
4768
4769# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004770echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004771echo "configure:4772: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004772if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004773 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004774else
4775 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004776#line 4777 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004777#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004778#include <sys/types.h>
4779#include <sys/time.h>
4780#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004781int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004782struct tm *tp;
4783; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004784EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004785if { (eval echo configure:4786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004786 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004787 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004788else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004789 echo "configure: failed program was:" >&5
4790 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004791 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004792 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004793fi
4794rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004795fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004796
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004797echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004798if test $ac_cv_header_time = yes; then
4799 cat >> confdefs.h <<\EOF
4800#define TIME_WITH_SYS_TIME 1
4801EOF
4802
4803fi
4804
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004805echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004806echo "configure:4807: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004807if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004808 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004809else
4810 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004811#line 4812 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004812#include "confdefs.h"
4813#include <sys/types.h>
4814#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004815int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004816struct tm *tp; tp->tm_sec;
4817; return 0; }
4818EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004819if { (eval echo configure:4820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004820 rm -rf conftest*
4821 ac_cv_struct_tm=time.h
4822else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004823 echo "configure: failed program was:" >&5
4824 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004825 rm -rf conftest*
4826 ac_cv_struct_tm=sys/time.h
4827fi
4828rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004829fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004830
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004831echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004832if test $ac_cv_struct_tm = sys/time.h; then
4833 cat >> confdefs.h <<\EOF
4834#define TM_IN_SYS_TIME 1
4835EOF
4836
4837fi
4838
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004839echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004840echo "configure:4841: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004841if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004842 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004843else
4844 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004845#line 4846 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004846#include "confdefs.h"
4847#include <sys/types.h>
4848#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004849int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004850struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004851; return 0; }
4852EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004853if { (eval echo configure:4854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004854 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004855 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004856else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004857 echo "configure: failed program was:" >&5
4858 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004859 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004860 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004861fi
4862rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004863fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004864
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004865echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4866if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004867 cat >> confdefs.h <<\EOF
4868#define HAVE_TM_ZONE 1
4869EOF
4870
4871else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004872 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004873echo "configure:4874: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004874if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004875 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004876else
4877 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004878#line 4879 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004879#include "confdefs.h"
4880#include <time.h>
4881#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004882extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004883#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004884int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004885atoi(*tzname);
4886; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004887EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004888if { (eval echo configure:4889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004889 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004890 ac_cv_var_tzname=yes
4891else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004892 echo "configure: failed program was:" >&5
4893 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004894 rm -rf conftest*
4895 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004896fi
4897rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004898fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004899
4900echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004901 if test $ac_cv_var_tzname = yes; then
4902 cat >> confdefs.h <<\EOF
4903#define HAVE_TZNAME 1
4904EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004905
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004906 fi
4907fi
4908
4909
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004910echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004911echo "configure:4912: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004912if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004913 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004914else
4915 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004916#line 4917 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004917#include "confdefs.h"
4918#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004919int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004920return altzone;
4921; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004922EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004923if { (eval echo configure:4924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004924 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004925 ac_cv_header_time_altzone=yes
4926else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004927 echo "configure: failed program was:" >&5
4928 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004929 rm -rf conftest*
4930 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004931fi
4932rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004933fi
4934
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004935echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004936if test $ac_cv_header_time_altzone = yes; then
4937 cat >> confdefs.h <<\EOF
4938#define HAVE_ALTZONE 1
4939EOF
4940
4941fi
4942
Guido van Rossumda88dad1995-01-26 00:46:29 +00004943was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004944echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004945echo "configure:4946: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004946cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004947#line 4948 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004948#include "confdefs.h"
4949
4950#include <sys/types.h>
4951#include <sys/select.h>
4952#include <sys/time.h>
4953
Guido van Rossumf78abae1997-01-21 22:02:36 +00004954int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004955;
4956; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004957EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004958if { (eval echo configure:4959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004959 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004960 cat >> confdefs.h <<\EOF
4961#define SYS_SELECT_WITH_SYS_TIME 1
4962EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004963 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004964else
4965 echo "configure: failed program was:" >&5
4966 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004967fi
4968rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004969echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004970
4971# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004972
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004973echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00004974echo "configure:4975: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004975if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004976 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004977else
4978 if test "$GCC" = yes; then
4979 # GCC predefines this symbol on systems where it applies.
4980cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00004981#line 4982 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004982#include "confdefs.h"
4983#ifdef __CHAR_UNSIGNED__
4984 yes
4985#endif
4986
4987EOF
4988if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4989 egrep "yes" >/dev/null 2>&1; then
4990 rm -rf conftest*
4991 ac_cv_c_char_unsigned=yes
4992else
4993 rm -rf conftest*
4994 ac_cv_c_char_unsigned=no
4995fi
4996rm -f conftest*
4997
4998else
4999if test "$cross_compiling" = yes; then
5000 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5001else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005002 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005003#line 5004 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005004#include "confdefs.h"
5005/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005006#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00005007#define volatile
5008#endif
5009main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00005010 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005011}
5012EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005013if { (eval echo configure:5014: \"$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 +00005014then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005015 ac_cv_c_char_unsigned=yes
5016else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005017 echo "configure: failed program was:" >&5
5018 cat conftest.$ac_ext >&5
5019 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005020 ac_cv_c_char_unsigned=no
5021fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005022rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005023fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005024
5025fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005026fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005027
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005028echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005029if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5030 cat >> confdefs.h <<\EOF
5031#define __CHAR_UNSIGNED__ 1
5032EOF
5033
5034fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005035
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005036echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005037echo "configure:5038: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005038if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005039 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005040else
5041 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005042#line 5043 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005043#include "confdefs.h"
5044
Guido van Rossumf78abae1997-01-21 22:02:36 +00005045int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005046
5047/* Ultrix mips cc rejects this. */
Greg Warda1c4da22000-11-07 15:44:21 +00005048typedef int charset[2]; const charset x;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005049/* SunOS 4.1.1 cc rejects this. */
5050char const *const *ccp;
5051char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005052/* NEC SVR4.0.2 mips cc rejects this. */
5053struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005054static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005055/* AIX XL C 1.02.0.0 rejects this.
5056 It does not let you subtract one const X* pointer from another in an arm
5057 of an if-expression whose if-part is not a constant expression */
5058const char *g = "string";
5059ccp = &g + (g ? g-g : 0);
5060/* HPUX 7.0 cc rejects these. */
5061++ccp;
5062p = (char**) ccp;
5063ccp = (char const *const *) p;
5064{ /* SCO 3.2v4 cc rejects this. */
5065 char *t;
5066 char const *s = 0 ? (char *) 0 : (char const *) 0;
5067
5068 *t++ = 0;
5069}
5070{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005071 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005072 const int *foo = &x[0];
5073 ++foo;
5074}
5075{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5076 typedef const int *iptr;
5077 iptr p = 0;
5078 ++p;
5079}
5080{ /* AIX XL C 1.02.0.0 rejects this saying
5081 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5082 struct s { int j; const int *ap[3]; };
5083 struct s *b; b->j = 5;
5084}
5085{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5086 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005087}
5088
5089; return 0; }
5090EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005091if { (eval echo configure:5092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005092 rm -rf conftest*
5093 ac_cv_c_const=yes
5094else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005095 echo "configure: failed program was:" >&5
5096 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005097 rm -rf conftest*
5098 ac_cv_c_const=no
5099fi
5100rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005101fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005102
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005103echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005104if test $ac_cv_c_const = no; then
5105 cat >> confdefs.h <<\EOF
5106#define const
5107EOF
5108
5109fi
5110
5111
Guido van Rossumda88dad1995-01-26 00:46:29 +00005112works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005113echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005114echo "configure:5115: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005115cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005116#line 5117 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005117#include "confdefs.h"
5118
Guido van Rossumf78abae1997-01-21 22:02:36 +00005119int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005120volatile int x; x = 0;
5121; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005122EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005123if { (eval echo configure:5124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005124 rm -rf conftest*
5125 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005126else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005127 echo "configure: failed program was:" >&5
5128 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005129 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005130 cat >> confdefs.h <<\EOF
5131#define volatile
5132EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005133
5134fi
5135rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005136echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005137
Guido van Rossumda88dad1995-01-26 00:46:29 +00005138works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005139echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005140echo "configure:5141: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005141cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005142#line 5143 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005143#include "confdefs.h"
5144
Guido van Rossumf78abae1997-01-21 22:02:36 +00005145int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005146signed char c;
5147; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005148EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005149if { (eval echo configure:5150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005150 rm -rf conftest*
5151 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005152else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005153 echo "configure: failed program was:" >&5
5154 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005155 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005156 cat >> confdefs.h <<\EOF
5157#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00005158EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005159
5160fi
5161rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005162echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005163
Guido van Rossumda88dad1995-01-26 00:46:29 +00005164have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005165echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005166echo "configure:5167: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005167cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005168#line 5169 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005169#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005170int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005171int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005172return foo(10);
5173; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005174EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005175if { (eval echo configure:5176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005176 rm -rf conftest*
5177 cat >> confdefs.h <<\EOF
5178#define HAVE_PROTOTYPES 1
5179EOF
5180 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005181else
5182 echo "configure: failed program was:" >&5
5183 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005184fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005185rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005186echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005187
Guido van Rossumda88dad1995-01-26 00:46:29 +00005188works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005189echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005190echo "configure:5191: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005191cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005192#line 5193 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005193#include "confdefs.h"
5194
5195#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00005196int foo(int x, ...) {
5197 va_list va;
5198 va_start(va, x);
5199 va_arg(va, int);
5200 va_arg(va, char *);
5201 va_arg(va, double);
5202 return 0;
5203}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005204
Guido van Rossumf78abae1997-01-21 22:02:36 +00005205int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005206return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005207; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005208EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005209if { (eval echo configure:5210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005210 rm -rf conftest*
5211 cat >> confdefs.h <<\EOF
5212#define HAVE_STDARG_PROTOTYPES 1
5213EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005214 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005215else
5216 echo "configure: failed program was:" >&5
5217 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005218fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005219rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005220echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005221
Guido van Rossumda88dad1995-01-26 00:46:29 +00005222if test "$have_prototypes" = yes; then
5223bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005224echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005225echo "configure:5226: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005226cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005227#line 5228 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005228#include "confdefs.h"
5229#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005230int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005231char **t;execve("@",t,t);
5232; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005233EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005234if { (eval echo configure:5235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005235 :
5236else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005237 echo "configure: failed program was:" >&5
5238 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005239 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005240 cat >> confdefs.h <<\EOF
5241#define BAD_EXEC_PROTOTYPES 1
5242EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005243 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005244fi
5245rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005246echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005247fi
5248
Guido van Rossumda88dad1995-01-26 00:46:29 +00005249bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005250echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005251echo "configure:5252: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005252if test "$cross_compiling" = yes; then
5253 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5254else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005255 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005256#line 5257 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005257#include "confdefs.h"
5258
5259struct s { int a; int b; };
5260static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005261int foobar() {
5262 static int random;
5263 random = (int) &foo;
5264 return random;
5265}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005266static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005267main() {
5268 exit(!((int)&foo == foobar()));
5269}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005270
5271EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005272if { (eval echo configure:5273: \"$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 +00005273then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005274 :
5275else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005276 echo "configure: failed program was:" >&5
5277 cat conftest.$ac_ext >&5
5278 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005279 cat >> confdefs.h <<\EOF
5280#define BAD_STATIC_FORWARD 1
5281EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005282 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005283fi
5284rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005285fi
5286
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005287echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005288
Guido van Rossumda88dad1995-01-26 00:46:29 +00005289va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005290echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005291echo "configure:5292: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005292cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005293#line 5294 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005294#include "confdefs.h"
5295
5296#ifdef HAVE_STDARG_PROTOTYPES
5297#include <stdarg.h>
5298#else
5299#include <varargs.h>
5300#endif
5301
Guido van Rossumf78abae1997-01-21 22:02:36 +00005302int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005303va_list list1, list2; list1 = list2;
5304; return 0; }
5305EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005306if { (eval echo configure:5307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005307 :
5308else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005309 echo "configure: failed program was:" >&5
5310 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005311 rm -rf conftest*
5312 cat >> confdefs.h <<\EOF
5313#define VA_LIST_IS_ARRAY 1
5314EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005315 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005316fi
5317rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005318echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005319
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005320# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5321echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005322echo "configure:5323: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005323if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005324 echo $ac_n "(cached) $ac_c" 1>&6
5325else
5326 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005327#line 5328 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005328#include "confdefs.h"
5329/* System header to define __stub macros and hopefully few prototypes,
5330 which can conflict with char gethostbyname_r(); below. */
5331#include <assert.h>
5332/* Override any gcc2 internal prototype to avoid an error. */
5333/* We use char because int might match the return type of a gcc2
5334 builtin and then its argument prototype would still apply. */
5335char gethostbyname_r();
5336
5337int main() {
5338
5339/* The GNU C library defines this for functions which it implements
5340 to always fail with ENOSYS. Some functions are actually named
5341 something starting with __ and the normal name is an alias. */
5342#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5343choke me
5344#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005345gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005346#endif
5347
5348; return 0; }
5349EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005350if { (eval echo configure:5351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005351 rm -rf conftest*
5352 eval "ac_cv_func_gethostbyname_r=yes"
5353else
5354 echo "configure: failed program was:" >&5
5355 cat conftest.$ac_ext >&5
5356 rm -rf conftest*
5357 eval "ac_cv_func_gethostbyname_r=no"
5358fi
5359rm -f conftest*
5360fi
5361
5362if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5363 echo "$ac_t""yes" 1>&6
5364
5365 cat >> confdefs.h <<\EOF
5366#define HAVE_GETHOSTBYNAME_R 1
5367EOF
5368
5369 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005370echo "configure:5371: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005371 OLD_CFLAGS=$CFLAGS
5372 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
5373 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005374#line 5375 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005375#include "confdefs.h"
5376
5377# include <netdb.h>
5378
5379int main() {
5380
5381 char *name;
5382 struct hostent *he, *res;
5383 char buffer[2048];
5384 int buflen = 2048;
5385 int h_errnop;
5386
5387 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
5388
5389; return 0; }
5390EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005391if { (eval echo configure:5392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005392 rm -rf conftest*
5393
5394 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005395#define HAVE_GETHOSTBYNAME_R 1
5396EOF
5397
5398 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005399#define HAVE_GETHOSTBYNAME_R_6_ARG 1
5400EOF
5401
5402 echo "$ac_t""yes" 1>&6
5403
5404else
5405 echo "configure: failed program was:" >&5
5406 cat conftest.$ac_ext >&5
5407 rm -rf conftest*
5408
5409 echo "$ac_t""no" 1>&6
5410 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005411echo "configure:5412: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005412 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005413#line 5414 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005414#include "confdefs.h"
5415
5416# include <netdb.h>
5417
5418int main() {
5419
5420 char *name;
5421 struct hostent *he;
5422 char buffer[2048];
5423 int buflen = 2048;
5424 int h_errnop;
5425
5426 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
5427
5428; return 0; }
5429EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005430if { (eval echo configure:5431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005431 rm -rf conftest*
5432
5433 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005434#define HAVE_GETHOSTBYNAME_R 1
5435EOF
5436
5437 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005438#define HAVE_GETHOSTBYNAME_R_5_ARG 1
5439EOF
5440
5441 echo "$ac_t""yes" 1>&6
5442
5443else
5444 echo "configure: failed program was:" >&5
5445 cat conftest.$ac_ext >&5
5446 rm -rf conftest*
5447
5448 echo "$ac_t""no" 1>&6
5449 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005450echo "configure:5451: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005451 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005452#line 5453 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005453#include "confdefs.h"
5454
5455# include <netdb.h>
5456
5457int main() {
5458
5459 char *name;
5460 struct hostent *he;
5461 struct hostent_data data;
5462
5463 (void) gethostbyname_r(name, he, &data);
5464
5465; return 0; }
5466EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005467if { (eval echo configure:5468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005468 rm -rf conftest*
5469
5470 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005471#define HAVE_GETHOSTBYNAME_R 1
5472EOF
5473
5474 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005475#define HAVE_GETHOSTBYNAME_R_3_ARG 1
5476EOF
5477
5478 echo "$ac_t""yes" 1>&6
5479
5480else
5481 echo "configure: failed program was:" >&5
5482 cat conftest.$ac_ext >&5
5483 rm -rf conftest*
5484
5485 echo "$ac_t""no" 1>&6
5486
5487fi
5488rm -f conftest*
5489
5490fi
5491rm -f conftest*
5492
5493fi
5494rm -f conftest*
5495 CFLAGS=$OLD_CFLAGS
5496
5497else
5498 echo "$ac_t""no" 1>&6
5499
Thomas Wouters3a584202000-08-05 23:28:51 +00005500 for ac_func in gethostbyname
5501do
5502echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005503echo "configure:5504: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005504if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005505 echo $ac_n "(cached) $ac_c" 1>&6
5506else
5507 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005508#line 5509 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005509#include "confdefs.h"
5510/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005511 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005512#include <assert.h>
5513/* Override any gcc2 internal prototype to avoid an error. */
5514/* We use char because int might match the return type of a gcc2
5515 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005516char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005517
5518int main() {
5519
5520/* The GNU C library defines this for functions which it implements
5521 to always fail with ENOSYS. Some functions are actually named
5522 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005523#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005524choke me
5525#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005526$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005527#endif
5528
5529; return 0; }
5530EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005531if { (eval echo configure:5532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005532 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005533 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005534else
5535 echo "configure: failed program was:" >&5
5536 cat conftest.$ac_ext >&5
5537 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005538 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005539fi
5540rm -f conftest*
5541fi
5542
Thomas Wouters3a584202000-08-05 23:28:51 +00005543if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005544 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005545 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5546 cat >> confdefs.h <<EOF
5547#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005548EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00005549
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005550else
5551 echo "$ac_t""no" 1>&6
5552fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005553done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005554
5555
5556fi
5557
5558
5559
5560
5561
5562
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005563
Guido van Rossum627b2d71993-12-24 10:39:16 +00005564# checks for system services
5565# (none yet)
5566
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005567# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005568echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005569echo "configure:5570: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005570if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005571 echo $ac_n "(cached) $ac_c" 1>&6
5572else
5573 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005574#line 5575 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005575#include "confdefs.h"
5576/* System header to define __stub macros and hopefully few prototypes,
5577 which can conflict with char __fpu_control(); below. */
5578#include <assert.h>
5579/* Override any gcc2 internal prototype to avoid an error. */
5580/* We use char because int might match the return type of a gcc2
5581 builtin and then its argument prototype would still apply. */
5582char __fpu_control();
5583
5584int main() {
5585
5586/* The GNU C library defines this for functions which it implements
5587 to always fail with ENOSYS. Some functions are actually named
5588 something starting with __ and the normal name is an alias. */
5589#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5590choke me
5591#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005592__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005593#endif
5594
5595; return 0; }
5596EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005597if { (eval echo configure:5598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005598 rm -rf conftest*
5599 eval "ac_cv_func___fpu_control=yes"
5600else
5601 echo "configure: failed program was:" >&5
5602 cat conftest.$ac_ext >&5
5603 rm -rf conftest*
5604 eval "ac_cv_func___fpu_control=no"
5605fi
5606rm -f conftest*
5607fi
5608
5609if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5610 echo "$ac_t""yes" 1>&6
5611 :
5612else
5613 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005614echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005615echo "configure:5616: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005616ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005617if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005618 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005619else
5620 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005621LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005622cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005623#line 5624 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005624#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005625/* Override any gcc2 internal prototype to avoid an error. */
5626/* We use char because int might match the return type of a gcc2
5627 builtin and then its argument prototype would still apply. */
5628char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005629
Guido van Rossumf78abae1997-01-21 22:02:36 +00005630int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005631__fpu_control()
5632; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005633EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005634if { (eval echo configure:5635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005635 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005636 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005637else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005638 echo "configure: failed program was:" >&5
5639 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005640 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005641 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005642fi
5643rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005644LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005645
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005646fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005647if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005648 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005649 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5650 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005651 cat >> confdefs.h <<EOF
5652#define $ac_tr_lib 1
5653EOF
5654
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005655 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005656
5657else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005658 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005659fi
5660
5661
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005662fi
5663
5664
Guido van Rossum7f253911997-05-09 02:42:48 +00005665# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005666echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005667echo "configure:5668: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005668# Check whether --with-fpectl or --without-fpectl was given.
5669if test "${with_fpectl+set}" = set; then
5670 withval="$with_fpectl"
5671
5672if test "$withval" != no
5673then cat >> confdefs.h <<\EOF
5674#define WANT_SIGFPE_HANDLER 1
5675EOF
5676 echo "$ac_t""yes" 1>&6
5677else echo "$ac_t""no" 1>&6
5678fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005679else
5680 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005681fi
5682
5683
Guido van Rossum7f43da71994-08-01 12:15:30 +00005684# check for --with-libm=...
5685
Guido van Rossum563e7081996-09-10 18:20:48 +00005686case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00005687Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005688next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005689BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005690*) LIBM=-lm
5691esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005692echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005693echo "configure:5694: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005694# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005695if test "${with_libm+set}" = set; then
5696 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005697
Guido van Rossum7f253911997-05-09 02:42:48 +00005698if test "$withval" = no
5699then LIBM=
5700 echo "$ac_t""force LIBM empty" 1>&6
5701elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005702then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005703 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005704else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005705fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005706else
5707 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005708fi
5709
5710
5711# check for --with-libc=...
5712
Guido van Rossum7f253911997-05-09 02:42:48 +00005713echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005714echo "configure:5715: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005715# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005716if test "${with_libc+set}" = set; then
5717 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005718
Guido van Rossum7f253911997-05-09 02:42:48 +00005719if test "$withval" = no
5720then LIBC=
5721 echo "$ac_t""force LIBC empty" 1>&6
5722elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005723then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005724 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005725else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005726fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005727else
5728 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005729fi
5730
5731
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005732# check for --with-check-import-case
5733# Check whether --with-check-import-case or --without-check-import-case was given.
5734if test "${with_check_import_case+set}" = set; then
5735 withval="$with_check_import_case"
5736 :
5737fi
5738
5739echo $ac_n "checking for --with-check-import-case""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005740echo "configure:5741: checking for --with-check-import-case" >&5
Guido van Rossum4c3f57c2001-01-10 20:40:46 +00005741if test "$with_check_import_case"
5742then
5743 cat >> confdefs.h <<\EOF
5744#define CHECK_IMPORT_CASE 1
5745EOF
5746
5747 echo "$ac_t""yes" 1>&6
5748else
5749 echo "$ac_t""no" 1>&6
5750fi
5751
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005752# check for hypot() in math library
5753LIBS_SAVE=$LIBS
5754LIBS="$LIBS $LIBM"
5755for ac_func in hypot
5756do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005757echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005758echo "configure:5759: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005759if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005760 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005761else
5762 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005763#line 5764 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005764#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005765/* System header to define __stub macros and hopefully few prototypes,
5766 which can conflict with char $ac_func(); below. */
5767#include <assert.h>
5768/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005769/* We use char because int might match the return type of a gcc2
5770 builtin and then its argument prototype would still apply. */
5771char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005772
Guido van Rossumf78abae1997-01-21 22:02:36 +00005773int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005774
5775/* The GNU C library defines this for functions which it implements
5776 to always fail with ENOSYS. Some functions are actually named
5777 something starting with __ and the normal name is an alias. */
5778#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5779choke me
5780#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005781$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005782#endif
5783
5784; return 0; }
5785EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005786if { (eval echo configure:5787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005787 rm -rf conftest*
5788 eval "ac_cv_func_$ac_func=yes"
5789else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005790 echo "configure: failed program was:" >&5
5791 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005792 rm -rf conftest*
5793 eval "ac_cv_func_$ac_func=no"
5794fi
5795rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005796fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005797
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005798if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5799 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005800 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5801 cat >> confdefs.h <<EOF
5802#define $ac_tr_func 1
5803EOF
5804
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005805else
5806 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005807LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005808fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005809done
5810
Guido van Rossumf78abae1997-01-21 22:02:36 +00005811
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005812LIBS=$LIBS_SAVE
5813
Guido van Rossumad713701997-07-10 22:42:38 +00005814# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005815echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005816echo "configure:5817: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005817if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005818 echo $ac_n "(cached) $ac_c" 1>&6
5819else
5820 if test "$cross_compiling" = yes; then
5821 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5822else
5823 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005824#line 5825 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005825#include "confdefs.h"
5826#include <stdio.h>
5827#ifdef HAVE_STDLIB
5828#include <stdlib.h>
5829#else
5830char *malloc(), *realloc();
5831int *free();
5832#endif
5833main() {
5834 char *p;
5835 p = malloc(0);
5836 if (p == NULL) exit(1);
5837 p = realloc(p, 0);
5838 if (p == NULL) exit(1);
5839 free(p);
5840 exit(0);
5841}
5842EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005843if { (eval echo configure:5844: \"$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 +00005844then
5845 ac_cv_malloc_zero=nonnull
5846else
5847 echo "configure: failed program was:" >&5
5848 cat conftest.$ac_ext >&5
5849 rm -fr conftest*
5850 ac_cv_malloc_zero=null
5851fi
5852rm -fr conftest*
5853fi
5854
5855fi
5856
5857echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5858if test "$ac_cv_malloc_zero" = null
5859then
5860 cat >> confdefs.h <<\EOF
5861#define MALLOC_ZERO_RETURNS_NULL 1
5862EOF
5863
5864fi
5865
Guido van Rossumef2255b2000-03-10 22:30:29 +00005866# check for wchar.h
5867ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5868echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005869echo "configure:5870: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005870if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005871 echo $ac_n "(cached) $ac_c" 1>&6
5872else
5873 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005874#line 5875 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005875#include "confdefs.h"
5876#include <wchar.h>
5877EOF
5878ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossumaef734b2001-01-10 21:09:12 +00005879{ (eval echo configure:5880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005880ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5881if test -z "$ac_err"; then
5882 rm -rf conftest*
5883 eval "ac_cv_header_$ac_safe=yes"
5884else
5885 echo "$ac_err" >&5
5886 echo "configure: failed program was:" >&5
5887 cat conftest.$ac_ext >&5
5888 rm -rf conftest*
5889 eval "ac_cv_header_$ac_safe=no"
5890fi
5891rm -f conftest*
5892fi
5893if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5894 echo "$ac_t""yes" 1>&6
5895 cat >> confdefs.h <<\EOF
5896#define HAVE_WCHAR_H 1
5897EOF
5898 wchar_h="yes"
5899else
5900 echo "$ac_t""no" 1>&6
5901wchar_h="no"
5902
5903fi
5904
5905
5906# check for usable wchar_t
5907usable_wchar_t="unkown"
5908echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005909echo "configure:5910: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005910if test "$cross_compiling" = yes; then
5911 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5912else
5913 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005914#line 5915 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005915#include "confdefs.h"
5916
5917#include "wchar.h"
5918#include "wctype.h"
5919main() {
5920 wchar_t s;
5921 if (sizeof(s) == 2)
5922 exit(0);
5923 else
5924 exit(1);
5925}
5926
5927EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005928if { (eval echo configure:5929: \"$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 +00005929then
5930 cat >> confdefs.h <<\EOF
5931#define HAVE_USABLE_WCHAR_T 1
5932EOF
5933 usable_wchar_t="yes"
5934else
5935 echo "configure: failed program was:" >&5
5936 cat conftest.$ac_ext >&5
5937 rm -fr conftest*
5938 usable_wchar_t="no"
5939fi
5940rm -fr conftest*
5941fi
5942
5943echo "$ac_t""$usable_wchar_t" 1>&6
5944
5945# check for endianness
5946echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00005947echo "configure:5948: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005948if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005949 echo $ac_n "(cached) $ac_c" 1>&6
5950else
5951 ac_cv_c_bigendian=unknown
5952# See if sys/param.h defines the BYTE_ORDER macro.
5953cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005954#line 5955 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005955#include "confdefs.h"
5956#include <sys/types.h>
5957#include <sys/param.h>
5958int main() {
5959
5960#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5961 bogus endian macros
5962#endif
5963; return 0; }
5964EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005965if { (eval echo configure:5966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005966 rm -rf conftest*
5967 # It does; now see whether it defined to BIG_ENDIAN or not.
5968cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005969#line 5970 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005970#include "confdefs.h"
5971#include <sys/types.h>
5972#include <sys/param.h>
5973int main() {
5974
5975#if BYTE_ORDER != BIG_ENDIAN
5976 not big endian
5977#endif
5978; return 0; }
5979EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00005980if { (eval echo configure:5981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005981 rm -rf conftest*
5982 ac_cv_c_bigendian=yes
5983else
5984 echo "configure: failed program was:" >&5
5985 cat conftest.$ac_ext >&5
5986 rm -rf conftest*
5987 ac_cv_c_bigendian=no
5988fi
5989rm -f conftest*
5990else
5991 echo "configure: failed program was:" >&5
5992 cat conftest.$ac_ext >&5
5993fi
5994rm -f conftest*
5995if test $ac_cv_c_bigendian = unknown; then
5996if test "$cross_compiling" = yes; then
5997 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5998else
5999 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00006000#line 6001 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006001#include "confdefs.h"
6002main () {
6003 /* Are we little or big endian? From Harbison&Steele. */
6004 union
6005 {
6006 long l;
6007 char c[sizeof (long)];
6008 } u;
6009 u.l = 1;
6010 exit (u.c[sizeof (long) - 1] == 1);
6011}
6012EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00006013if { (eval echo configure:6014: \"$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 +00006014then
6015 ac_cv_c_bigendian=no
6016else
6017 echo "configure: failed program was:" >&5
6018 cat conftest.$ac_ext >&5
6019 rm -fr conftest*
6020 ac_cv_c_bigendian=yes
6021fi
6022rm -fr conftest*
6023fi
6024
6025fi
6026fi
6027
6028echo "$ac_t""$ac_cv_c_bigendian" 1>&6
6029if test $ac_cv_c_bigendian = yes; then
6030 cat >> confdefs.h <<\EOF
6031#define WORDS_BIGENDIAN 1
6032EOF
6033
6034fi
6035
6036
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006037# Check whether right shifting a negative integer extends the sign bit
6038# or fills with zeros (like the Cray J90, according to Tim Peters).
6039echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00006040echo "configure:6041: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006041if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00006042 echo $ac_n "(cached) $ac_c" 1>&6
6043else
6044
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006045if test "$cross_compiling" = yes; then
6046 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6047else
6048 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00006049#line 6050 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006050#include "confdefs.h"
6051
6052int main()
6053{
Vladimir Marangozova6180282000-07-12 05:05:06 +00006054 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006055}
6056
6057EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00006058if { (eval echo configure:6059: \"$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 +00006059then
6060 ac_cv_rshift_extends_sign=yes
6061else
6062 echo "configure: failed program was:" >&5
6063 cat conftest.$ac_ext >&5
6064 rm -fr conftest*
6065 ac_cv_rshift_extends_sign=no
6066fi
6067rm -fr conftest*
6068fi
6069
6070fi
6071
6072echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
6073if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006074then
6075 cat >> confdefs.h <<\EOF
6076#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
6077EOF
6078
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006079fi
6080
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006081# check for getc_unlocked and related locking functions
6082echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00006083echo "configure:6084: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006084if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
6085 echo $ac_n "(cached) $ac_c" 1>&6
6086else
6087
6088cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00006089#line 6090 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006090#include "confdefs.h"
6091#include <stdio.h>
6092int main() {
6093
6094 FILE *f = fopen("/dev/null", "r");
6095 flockfile(f);
6096 getc_unlocked(f);
6097 funlockfile(f);
6098
6099; return 0; }
6100EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00006101if { (eval echo configure:6102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006102 rm -rf conftest*
6103 ac_cv_have_getc_unlocked=yes
6104else
6105 echo "configure: failed program was:" >&5
6106 cat conftest.$ac_ext >&5
6107 rm -rf conftest*
6108 ac_cv_have_getc_unlocked=no
6109fi
6110rm -f conftest*
6111fi
6112
6113echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
6114if test "$ac_cv_have_getc_unlocked" = yes
6115then
6116 cat >> confdefs.h <<\EOF
6117#define HAVE_GETC_UNLOCKED 1
6118EOF
6119
6120fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006121
Guido van Rossum95713eb2000-05-18 20:53:31 +00006122# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
6123# Add sys/socket.h to confdefs.h
6124cat >> confdefs.h <<\EOF
6125#ifdef HAVE_SYS_SOCKET_H
6126#include <sys/socket.h>
6127#endif
6128EOF
6129echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00006130echo "configure:6131: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006131if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00006132 echo $ac_n "(cached) $ac_c" 1>&6
6133else
6134 cat > conftest.$ac_ext <<EOF
Guido van Rossumaef734b2001-01-10 21:09:12 +00006135#line 6136 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00006136#include "confdefs.h"
6137#include <sys/types.h>
6138#if STDC_HEADERS
6139#include <stdlib.h>
6140#include <stddef.h>
6141#endif
6142EOF
6143if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6144 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6145 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006146 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00006147else
6148 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006149 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00006150fi
6151rm -f conftest*
6152
6153fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006154echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
6155if test $ac_cv_type_socklen_t = no; then
6156 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00006157#define socklen_t int
6158EOF
6159
6160fi
6161
6162
Fred Drake036144d2000-10-26 17:09:35 +00006163echo $ac_n "checking for Modules/Setup""... $ac_c" 1>&6
Guido van Rossumaef734b2001-01-10 21:09:12 +00006164echo "configure:6165: checking for Modules/Setup" >&5
Fred Drake036144d2000-10-26 17:09:35 +00006165if test ! -f Modules/Setup ; then
Guido van Rossum262cf202000-11-02 19:33:53 +00006166 if test ! -d Modules ; then
6167 mkdir Modules
6168 fi
Fred Drake036144d2000-10-26 17:09:35 +00006169 cp "$srcdir/Modules/Setup.dist" Modules/Setup
6170 echo "$ac_t""creating" 1>&6
6171else
6172 echo "$ac_t""already exists" 1>&6
6173fi
6174
Guido van Rossum627b2d71993-12-24 10:39:16 +00006175# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006176trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006177cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006178# This file is a shell script that caches the results of configure
6179# tests run on this system so they can be shared between configure
6180# scripts and configure runs. It is not useful on other systems.
6181# If it contains results you don't want to keep, you may remove or edit it.
6182#
6183# By default, configure uses ./config.cache as the cache file,
6184# creating it if it does not exist already. You can give configure
6185# the --cache-file=FILE option to use a different cache file; that is
6186# what configure does when it calls configure scripts in
6187# subdirectories, so they share the cache.
6188# Giving --cache-file=/dev/null disables caching, for debugging configure.
6189# config.status only pays attention to the cache file if you give it the
6190# --recheck option to rerun configure.
6191#
6192EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006193# The following way of writing the cache mishandles newlines in values,
6194# but we know of no workaround that is simple, portable, and efficient.
6195# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006196# Ultrix sh set writes to stderr and can't be redirected directly,
6197# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006198(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006199 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006200 *ac_space=\ *)
6201 # `set' does not quote correctly, so add quotes (double-quote substitution
6202 # turns \\\\ into \\, and sed turns \\ into \).
6203 sed -n \
6204 -e "s/'/'\\\\''/g" \
6205 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6206 ;;
6207 *)
6208 # `set' quotes correctly as required by POSIX, so do not add quotes.
6209 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6210 ;;
6211 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006212if cmp -s $cache_file confcache; then
6213 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006214else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006215 if test -w $cache_file; then
6216 echo "updating cache $cache_file"
6217 cat confcache > $cache_file
6218 else
6219 echo "not updating unwritable cache $cache_file"
6220 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006221fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006222rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00006223
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006224trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006225
6226test "x$prefix" = xNONE && prefix=$ac_default_prefix
6227# Let make expand exec_prefix.
6228test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00006229
Guido van Rossum7f43da71994-08-01 12:15:30 +00006230# Any assignment to VPATH causes Sun make to only execute
6231# the first set of double-colon rules, so remove it if not needed.
6232# If there is a colon in the path, we need to keep it.
6233if test "x$srcdir" = x.; then
6234 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6235fi
6236
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006237trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00006238
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006239DEFS=-DHAVE_CONFIG_H
6240
6241# Without the "./", some shells look in PATH for config.status.
6242: ${CONFIG_STATUS=./config.status}
6243
6244echo creating $CONFIG_STATUS
6245rm -f $CONFIG_STATUS
6246cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006247#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00006248# Generated automatically by configure.
6249# Run this file to recreate the current configuration.
6250# This directory was configured as follows,
6251# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6252#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006253# $0 $ac_configure_args
6254#
6255# Compiler output produced by configure, useful for debugging
6256# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00006257
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006258ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006259for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00006260do
Guido van Rossum7f43da71994-08-01 12:15:30 +00006261 case "\$ac_option" in
6262 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006263 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6264 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00006265 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006266 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006267 exit 0 ;;
6268 -help | --help | --hel | --he | --h)
6269 echo "\$ac_cs_usage"; exit 0 ;;
6270 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006271 esac
6272done
6273
Guido van Rossum7f43da71994-08-01 12:15:30 +00006274ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00006275
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006276trap 'rm -fr `echo "Makefile \
6277 Objects/Makefile \
6278 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006279 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006280 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006281 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006282 Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006283EOF
6284cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006285
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006286# Protect against being on the right side of a sed subst in config.status.
6287sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6288 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006289$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00006290$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006291s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006292s%@CFLAGS@%$CFLAGS%g
6293s%@CPPFLAGS@%$CPPFLAGS%g
6294s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006295s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006296s%@DEFS@%$DEFS%g
6297s%@LDFLAGS@%$LDFLAGS%g
6298s%@LIBS@%$LIBS%g
6299s%@exec_prefix@%$exec_prefix%g
6300s%@prefix@%$prefix%g
6301s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006302s%@bindir@%$bindir%g
6303s%@sbindir@%$sbindir%g
6304s%@libexecdir@%$libexecdir%g
6305s%@datadir@%$datadir%g
6306s%@sysconfdir@%$sysconfdir%g
6307s%@sharedstatedir@%$sharedstatedir%g
6308s%@localstatedir@%$localstatedir%g
6309s%@libdir@%$libdir%g
6310s%@includedir@%$includedir%g
6311s%@oldincludedir@%$oldincludedir%g
6312s%@infodir@%$infodir%g
6313s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00006314s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006315s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00006316s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00006317s%@SET_CXX@%$SET_CXX%g
6318s%@MAINOBJ@%$MAINOBJ%g
Martin v. Löwis22352952000-12-13 17:37:02 +00006319s%@CXX@%$CXX%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006320s%@CC@%$CC%g
Guido van Rossumff555e32000-09-22 15:38:21 +00006321s%@EXE@%$EXE%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006322s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
6323s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumaef734b2001-01-10 21:09:12 +00006324s%@SET_DLLLIBRARY@%$SET_DLLLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00006325s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006326s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006327s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006328s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006329s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6330s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006331s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006332s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006333s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006334s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006335s%@SO@%$SO%g
6336s%@LDSHARED@%$LDSHARED%g
6337s%@CCSHARED@%$CCSHARED%g
6338s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum3d15bd82001-01-10 18:53:48 +00006339s%@USE_NCURSES_MODULE@%$USE_NCURSES_MODULE%g
6340s%@USE_READLINE_MODULE@%$USE_READLINE_MODULE%g
Guido van Rossum009f7871997-12-04 00:51:42 +00006341s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00006342s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00006343s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Fred Drakea50d6ec2000-08-31 16:13:20 +00006344s%@USE_BSDDB_MODULE@%$USE_BSDDB_MODULE%g
Skip Montanaroed33c9a2000-09-08 02:17:15 +00006345s%@HAVE_LIBDB@%$HAVE_LIBDB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006346s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00006347s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006348s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006349s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
6350s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
6351s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006352s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006353s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006354s%@LIBM@%$LIBM%g
6355s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006356
6357CEOF
6358EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006359
6360cat >> $CONFIG_STATUS <<\EOF
6361
6362# Split the substitutions into bite-sized pieces for seds with
6363# small command number limits, like on Digital OSF/1 and HP-UX.
6364ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6365ac_file=1 # Number of current file.
6366ac_beg=1 # First line for current file.
6367ac_end=$ac_max_sed_cmds # Line after last line for current file.
6368ac_more_lines=:
6369ac_sed_cmds=""
6370while $ac_more_lines; do
6371 if test $ac_beg -gt 1; then
6372 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6373 else
6374 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6375 fi
6376 if test ! -s conftest.s$ac_file; then
6377 ac_more_lines=false
6378 rm -f conftest.s$ac_file
6379 else
6380 if test -z "$ac_sed_cmds"; then
6381 ac_sed_cmds="sed -f conftest.s$ac_file"
6382 else
6383 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6384 fi
6385 ac_file=`expr $ac_file + 1`
6386 ac_beg=$ac_end
6387 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6388 fi
6389done
6390if test -z "$ac_sed_cmds"; then
6391 ac_sed_cmds=cat
6392fi
6393EOF
6394
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006395cat >> $CONFIG_STATUS <<EOF
6396
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006397CONFIG_FILES=\${CONFIG_FILES-"Makefile \
6398 Objects/Makefile \
6399 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006400 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006401 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006402 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006403 Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006404EOF
6405cat >> $CONFIG_STATUS <<\EOF
6406for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006407 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006408 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006409 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006410 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6411 *) ac_file_in="${ac_file}.in" ;;
6412 esac
6413
Guido van Rossumf78abae1997-01-21 22:02:36 +00006414 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006415
6416 # Remove last slash and all that follows it. Not all systems have dirname.
6417 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6418 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6419 # The file is in a subdirectory.
6420 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006421 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006422 # A "../" for each directory in $ac_dir_suffix.
6423 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6424 else
6425 ac_dir_suffix= ac_dots=
6426 fi
6427
6428 case "$ac_given_srcdir" in
6429 .) srcdir=.
6430 if test -z "$ac_dots"; then top_srcdir=.
6431 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6432 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6433 *) # Relative path.
6434 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6435 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6436 esac
6437
Guido van Rossumf78abae1997-01-21 22:02:36 +00006438
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006439 echo creating "$ac_file"
6440 rm -f "$ac_file"
6441 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6442 case "$ac_file" in
6443 *Makefile*) ac_comsub="1i\\
6444# $configure_input" ;;
6445 *) ac_comsub= ;;
6446 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006447
6448 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 +00006449 sed -e "$ac_comsub
6450s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006451s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006452s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00006453" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00006454fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00006455rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006456
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006457# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6458# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00006459#
6460# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006461ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6462ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006463ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006464ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006465# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006466ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6467ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006468ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006469ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006470# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006471ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6472ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006473ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006474ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006475
Guido van Rossumf78abae1997-01-21 22:02:36 +00006476if test "${CONFIG_HEADERS+set}" != set; then
6477EOF
6478cat >> $CONFIG_STATUS <<EOF
6479 CONFIG_HEADERS="config.h"
6480EOF
6481cat >> $CONFIG_STATUS <<\EOF
6482fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006483for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006484 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006485 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006486 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006487 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6488 *) ac_file_in="${ac_file}.in" ;;
6489 esac
6490
Guido van Rossum7f43da71994-08-01 12:15:30 +00006491 echo creating $ac_file
6492
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006493 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006494 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6495 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006496
6497EOF
6498
6499# Transform confdefs.h into a sed script conftest.vals that substitutes
6500# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006501# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006502# Protect against being in an unquoted here document in config.status.
6503rm -f conftest.vals
6504cat > conftest.hdr <<\EOF
6505s/[\\&%]/\\&/g
6506s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006507s%#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 +00006508s%ac_d%ac_u%gp
6509s%ac_u%ac_e%gp
6510EOF
6511sed -n -f conftest.hdr confdefs.h > conftest.vals
6512rm -f conftest.hdr
6513
6514# This sed command replaces #undef with comments. This is necessary, for
6515# example, in the case of _POSIX_SOURCE, which is predefined and required
6516# on some systems where configure will not decide to define it.
6517cat >> conftest.vals <<\EOF
6518s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6519EOF
6520
6521# Break up conftest.vals because some shells have a limit on
6522# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006523
6524rm -f conftest.tail
6525while :
6526do
6527 ac_lines=`grep -c . conftest.vals`
6528 # grep -c gives empty output for an empty file on some AIX systems.
6529 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6530 # Write a limited-size here document to conftest.frag.
6531 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6532 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6533 echo 'CEOF
6534 sed -f conftest.frag conftest.in > conftest.out
6535 rm -f conftest.in
6536 mv conftest.out conftest.in
6537' >> $CONFIG_STATUS
6538 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6539 rm -f conftest.vals
6540 mv conftest.tail conftest.vals
6541done
6542rm -f conftest.vals
6543
6544cat >> $CONFIG_STATUS <<\EOF
6545 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006546 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006547 cat conftest.in >> conftest.h
6548 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006549 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006550 echo "$ac_file is unchanged"
6551 rm -f conftest.h
6552 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006553 # Remove last slash and all that follows it. Not all systems have dirname.
6554 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6555 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6556 # The file is in a subdirectory.
6557 test ! -d "$ac_dir" && mkdir "$ac_dir"
6558 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006559 rm -f $ac_file
6560 mv conftest.h $ac_file
6561 fi
6562fi; done
6563
Guido van Rossumf78abae1997-01-21 22:02:36 +00006564EOF
6565cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006566
Guido van Rossumf78abae1997-01-21 22:02:36 +00006567EOF
6568cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006569
6570exit 0
6571EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006572chmod +x $CONFIG_STATUS
6573rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006574test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006575