blob: 5c867dac924fbb91d869f49bb669c2d49a3eed75 [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 Rossum6abce912001-03-20 13:09:14 +00003# From configure.in Revision: 1.211
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
Neil Schemenauerdfb38e42001-01-27 06:57:08 +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
Neil Schemenauerd32c2492001-01-24 17:25:28 +000033 --with-signal-module disable/enable signal module"
34ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000035 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000036ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000037 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000038ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000039 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000040ac_help="$ac_help
Guido van Rossum9e8181b2000-09-19 00:46:46 +000041 --with-pth use GNU pth threading libraries"
42ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000043 --with(out)-cycle-gc disable/enable garbage collection"
44ac_help="$ac_help
Neil Schemenauera35c6882001-02-27 04:45:05 +000045 --with(out)-pymalloc disable/enable specialized mallocs"
46ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000047 --with-wctype-functions use wctype.h functions"
48ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000049 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000050ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000051 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000052ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000053 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000054ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000055 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000056ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000057 --with-libc=STRING C library"
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
Neil Schemenauer7d645772001-01-17 21:59:33 +0000572VERSION=2.1
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 Rossum6abce912001-03-20 13:09:14 +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 Rossum6abce912001-03-20 13:09:14 +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 Rossum627b2d71993-12-24 10:39:16 +0000664# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000665echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +0000666echo "configure:667: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000667# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000668if test "${with_gcc+set}" = set; then
669 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000670
671 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000672 no) CC=cc
673 without_gcc=yes;;
674 yes) CC=gcc
675 without_gcc=no;;
676 *) CC=$withval
677 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000678 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000679else
Guido van Rossume77438c1995-09-13 18:59:59 +0000680
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000681 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000682 OSF1) CC=cc
683 without_gcc=;;
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000684 AIX*) CC=cc_r
685 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000686 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000687 case $BE_HOST_CPU in
688 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000689 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000690 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000691 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000692 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000693 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000694 ;;
695 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000696 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000697 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000698 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000699 ;;
700 *)
Fred Drake5790be12000-10-09 17:06:13 +0000701 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000702 ;;
703 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000704 AR="\$(srcdir)/Modules/ar_beos"
705 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000706 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000707 Monterey*)
708 RANLIB=:
709 without_gcc=;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000710 *) without_gcc=no;;
711 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000712fi
713
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000714echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000715
Guido van Rossum95012191999-12-16 17:50:52 +0000716
717
Fred Drakea1a84e72001-03-06 05:52:16 +0000718MAINOBJ=python.o
Guido van Rossum95012191999-12-16 17:50:52 +0000719echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +0000720echo "configure:721: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000721# Check whether --with-cxx or --without-cxx was given.
722if test "${with_cxx+set}" = set; then
723 withval="$with_cxx"
724
Martin v. Löwis22352952000-12-13 17:37:02 +0000725 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000726 case $withval in
727 no) CXX=
728 with_cxx=no;;
729 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +0000730 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +0000731 with_cxx=$withval;;
732 esac
733else
734
735 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000736 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000737
738fi
739
740echo "$ac_t""$with_cxx" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000741
742
743if test "$check_cxx" = "yes"
744then
745 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
746do
747# Extract the first word of "$ac_prog", so it can be a program name with args.
748set dummy $ac_prog; ac_word=$2
749echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +0000750echo "configure:751: checking for $ac_word" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000751if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
752 echo $ac_n "(cached) $ac_c" 1>&6
753else
754 if test -n "$CXX"; then
755 ac_cv_prog_CXX="$CXX" # Let the user override the test.
756else
757 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
758 ac_dummy="$PATH"
759 for ac_dir in $ac_dummy; do
760 test -z "$ac_dir" && ac_dir=.
761 if test -f $ac_dir/$ac_word; then
762 ac_cv_prog_CXX="$ac_prog"
763 break
764 fi
765 done
766 IFS="$ac_save_ifs"
767fi
768fi
769CXX="$ac_cv_prog_CXX"
770if test -n "$CXX"; then
771 echo "$ac_t""$CXX" 1>&6
772else
773 echo "$ac_t""no" 1>&6
774fi
775
776test -n "$CXX" && break
777done
778test -n "$CXX" || CXX="notfound"
779
780 if test "$CXX" = "notfound"
781 then
782 CXX=
783 else
784 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +0000785echo "configure:786: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000786
787ac_ext=C
788# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
789ac_cpp='$CXXCPP $CPPFLAGS'
790ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
791ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
792cross_compiling=$ac_cv_prog_cxx_cross
793
794cat > conftest.$ac_ext << EOF
795
Guido van Rossum6abce912001-03-20 13:09:14 +0000796#line 797 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000797#include "confdefs.h"
798
799int main(){return(0);}
800EOF
Guido van Rossum6abce912001-03-20 13:09:14 +0000801if { (eval echo configure:802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis22352952000-12-13 17:37:02 +0000802 ac_cv_prog_cxx_works=yes
803 # If we can't run a trivial program, we are probably using a cross compiler.
804 if (./conftest; exit) 2>/dev/null; then
805 ac_cv_prog_cxx_cross=no
806 else
807 ac_cv_prog_cxx_cross=yes
808 fi
809else
810 echo "configure: failed program was:" >&5
811 cat conftest.$ac_ext >&5
812 ac_cv_prog_cxx_works=no
813fi
814rm -fr conftest*
815ac_ext=c
816# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
817ac_cpp='$CPP $CPPFLAGS'
818ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
819ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
820cross_compiling=$ac_cv_prog_cc_cross
821
822echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
823if test $ac_cv_prog_cxx_works = no; then
824 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
825fi
826echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +0000827echo "configure:828: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000828echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
829cross_compiling=$ac_cv_prog_cxx_cross
830
831 fi
832fi
833
Guido van Rossum8b131c51995-03-09 14:10:13 +0000834# If the user switches compilers, we can't believe the cache
835if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
836then
837 { echo "configure: error: cached CC is different -- throw away $cache_file
838(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
839fi
840
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000841# Extract the first word of "gcc", so it can be a program name with args.
842set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000843echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +0000844echo "configure:845: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000845if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000846 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000847else
848 if test -n "$CC"; then
849 ac_cv_prog_CC="$CC" # Let the user override the test.
850else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000851 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
852 ac_dummy="$PATH"
853 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854 test -z "$ac_dir" && ac_dir=.
855 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000857 break
858 fi
859 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000861fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862fi
863CC="$ac_cv_prog_CC"
864if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000865 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000867 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000869
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870if test -z "$CC"; then
871 # Extract the first word of "cc", so it can be a program name with args.
872set dummy cc; ac_word=$2
873echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +0000874echo "configure:875: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000875if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876 echo $ac_n "(cached) $ac_c" 1>&6
877else
878 if test -n "$CC"; then
879 ac_cv_prog_CC="$CC" # Let the user override the test.
880else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000881 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000882 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000883 ac_dummy="$PATH"
884 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885 test -z "$ac_dir" && ac_dir=.
886 if test -f $ac_dir/$ac_word; then
887 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
888 ac_prog_rejected=yes
889 continue
890 fi
891 ac_cv_prog_CC="cc"
892 break
893 fi
894 done
895 IFS="$ac_save_ifs"
896if test $ac_prog_rejected = yes; then
897 # We found a bogon in the path, so make sure we never use it.
898 set dummy $ac_cv_prog_CC
899 shift
900 if test $# -gt 0; then
901 # We chose a different compiler from the bogus one.
902 # However, it has the same basename, so the bogon will be chosen
903 # first if we set CC to just the basename; use the full file name.
904 shift
905 set dummy "$ac_dir/$ac_word" "$@"
906 shift
907 ac_cv_prog_CC="$@"
908 fi
909fi
910fi
911fi
912CC="$ac_cv_prog_CC"
913if test -n "$CC"; then
914 echo "$ac_t""$CC" 1>&6
915else
916 echo "$ac_t""no" 1>&6
917fi
918
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000919 if test -z "$CC"; then
920 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000921 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000922 # Extract the first word of "cl", so it can be a program name with args.
923set dummy cl; ac_word=$2
924echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +0000925echo "configure:926: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000926if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000927 echo $ac_n "(cached) $ac_c" 1>&6
928else
929 if test -n "$CC"; then
930 ac_cv_prog_CC="$CC" # Let the user override the test.
931else
932 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
933 ac_dummy="$PATH"
934 for ac_dir in $ac_dummy; do
935 test -z "$ac_dir" && ac_dir=.
936 if test -f $ac_dir/$ac_word; then
937 ac_cv_prog_CC="cl"
938 break
939 fi
940 done
941 IFS="$ac_save_ifs"
942fi
943fi
944CC="$ac_cv_prog_CC"
945if test -n "$CC"; then
946 echo "$ac_t""$CC" 1>&6
947else
948 echo "$ac_t""no" 1>&6
949fi
950 ;;
951 esac
952 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
954fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000956echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +0000957echo "configure:958: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000958
959ac_ext=c
960# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
961ac_cpp='$CPP $CPPFLAGS'
962ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000963ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000964cross_compiling=$ac_cv_prog_cc_cross
965
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000966cat > conftest.$ac_ext << EOF
967
Guido van Rossum6abce912001-03-20 13:09:14 +0000968#line 969 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000969#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000970
Guido van Rossumf78abae1997-01-21 22:02:36 +0000971main(){return(0);}
972EOF
Guido van Rossum6abce912001-03-20 13:09:14 +0000973if { (eval echo configure:974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000974 ac_cv_prog_cc_works=yes
975 # If we can't run a trivial program, we are probably using a cross compiler.
976 if (./conftest; exit) 2>/dev/null; then
977 ac_cv_prog_cc_cross=no
978 else
979 ac_cv_prog_cc_cross=yes
980 fi
981else
982 echo "configure: failed program was:" >&5
983 cat conftest.$ac_ext >&5
984 ac_cv_prog_cc_works=no
985fi
986rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000987ac_ext=c
988# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
989ac_cpp='$CPP $CPPFLAGS'
990ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
991ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
992cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000993
994echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
995if test $ac_cv_prog_cc_works = no; then
996 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
997fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000998echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +0000999echo "configure:1000: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001000echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1001cross_compiling=$ac_cv_prog_cc_cross
1002
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001003echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001004echo "configure:1005: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001005if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001006 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001007else
1008 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001009#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001010 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001011#endif
1012EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001013if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001014 ac_cv_prog_gcc=yes
1015else
1016 ac_cv_prog_gcc=no
1017fi
1018fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001020echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001021
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001022if test $ac_cv_prog_gcc = yes; then
1023 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001024else
1025 GCC=
1026fi
1027
1028ac_test_CFLAGS="${CFLAGS+set}"
1029ac_save_CFLAGS="$CFLAGS"
1030CFLAGS=
1031echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001032echo "configure:1033: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001033if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001034 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001035else
1036 echo 'void f(){}' > conftest.c
1037if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001038 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001039else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001040 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001041fi
1042rm -f conftest*
1043
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
Guido van Rossumf78abae1997-01-21 22:02:36 +00001046echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001047if test "$ac_test_CFLAGS" = set; then
1048 CFLAGS="$ac_save_CFLAGS"
1049elif test $ac_cv_prog_cc_g = yes; then
1050 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001051 CFLAGS="-g -O2"
1052 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001053 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001054 fi
1055else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001056 if test "$GCC" = yes; then
1057 CFLAGS="-O2"
1058 else
1059 CFLAGS=
1060 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001061fi
1062
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001063echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001064echo "configure:1065: checking for Cygwin environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001065if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1066 echo $ac_n "(cached) $ac_c" 1>&6
1067else
1068 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001069#line 1070 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001070#include "confdefs.h"
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001071
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001072int main() {
1073
1074#ifndef __CYGWIN__
1075#define __CYGWIN__ __CYGWIN32__
1076#endif
1077return __CYGWIN__;
1078; return 0; }
1079EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001080if { (eval echo configure:1081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001081 rm -rf conftest*
1082 ac_cv_cygwin=yes
1083else
1084 echo "configure: failed program was:" >&5
1085 cat conftest.$ac_ext >&5
1086 rm -rf conftest*
1087 ac_cv_cygwin=no
1088fi
1089rm -f conftest*
1090rm -f conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001091fi
1092
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001093echo "$ac_t""$ac_cv_cygwin" 1>&6
1094CYGWIN=
1095test "$ac_cv_cygwin" = yes && CYGWIN=yes
1096echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001097echo "configure:1098: checking for mingw32 environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001098if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1099 echo $ac_n "(cached) $ac_c" 1>&6
1100else
1101 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001102#line 1103 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001103#include "confdefs.h"
1104
1105int main() {
1106return __MINGW32__;
1107; return 0; }
1108EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001109if { (eval echo configure:1110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001110 rm -rf conftest*
1111 ac_cv_mingw32=yes
1112else
1113 echo "configure: failed program was:" >&5
1114 cat conftest.$ac_ext >&5
1115 rm -rf conftest*
1116 ac_cv_mingw32=no
1117fi
1118rm -f conftest*
1119rm -f conftest*
1120fi
1121
1122echo "$ac_t""$ac_cv_mingw32" 1>&6
1123MINGW32=
1124test "$ac_cv_mingw32" = yes && MINGW32=yes
1125
1126
1127echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001128echo "configure:1129: checking for executable suffix" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001129if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1130 echo $ac_n "(cached) $ac_c" 1>&6
1131else
1132 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1133 ac_cv_exeext=.exe
1134else
1135 rm -f conftest*
1136 echo 'int main () { return 0; }' > conftest.$ac_ext
1137 ac_cv_exeext=
Guido van Rossum6abce912001-03-20 13:09:14 +00001138 if { (eval echo configure:1139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001139 for file in conftest.*; do
1140 case $file in
1141 *.c | *.o | *.obj) ;;
1142 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1143 esac
1144 done
1145 else
1146 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1147 fi
1148 rm -f conftest*
1149 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1150fi
1151fi
1152
1153EXEEXT=""
1154test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1155echo "$ac_t""${ac_cv_exeext}" 1>&6
1156ac_exeext=$EXEEXT
1157
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001158echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001159echo "configure:1160: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001160# Check whether --with-suffix or --without-suffix was given.
1161if test "${with_suffix+set}" = set; then
1162 withval="$with_suffix"
1163
1164 case $withval in
1165 no) EXEEXT=;;
1166 yes) EXEEXT=.exe;;
1167 *) EXEEXT=$withval;;
1168 esac
1169fi
1170
1171echo "$ac_t""$EXEEXT" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001172
Guido van Rossumdd997f71998-10-07 19:58:26 +00001173case $MACHDEP in
1174bsdos*)
1175 case $CC in
1176 gcc) CC="$CC -D_HAVE_BSDI";;
1177 esac;;
1178esac
1179
Guido van Rossum24b1e751997-08-21 02:29:16 +00001180case $ac_sys_system in
1181hp*|HP*)
1182 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001183 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001184 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001185Monterey*)
1186 case $CC in
1187 cc) CC="$CC -Wl,-Bexport";;
1188 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001189SunOS*)
1190 # Some functions have a prototype only with that define, e.g. confstr
1191 cat >> confdefs.h <<\EOF
1192#define __EXTENSIONS__ 1
1193EOF
1194
1195 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001196esac
1197
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001198
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001199
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001200echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001201echo "configure:1202: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001202if test -z "$LIBRARY"
1203then
1204 LIBRARY='libpython$(VERSION).a'
1205fi
1206echo "$ac_t""$LIBRARY" 1>&6
1207
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001208# LDLIBRARY is the name of the library to link against (as opposed to the
1209# name of the library into which to insert object files). On systems
1210# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
Guido van Rossumaef734b2001-01-10 21:09:12 +00001211# the Makefiles). On Cygwin LDLIBRARY is the import library, DLLLIBRARY is the
1212# shared (i.e., DLL) library.
1213
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001214
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001215LDLIBRARY="$LIBRARY"
Guido van Rossumca563f22001-01-23 01:52:44 +00001216DLLLIBRARY=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001217
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001218# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001219# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001220# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001221
1222echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001223echo "configure:1224: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001224if test -z "$LINKCC"
1225then
1226 case $ac_sys_system in
1227 AIX*)
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001228 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001229 dgux*)
1230 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001231 Monterey64*)
1232 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001233 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001234 esac
1235fi
1236echo "$ac_t""$LINKCC" 1>&6
1237
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001238echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001239echo "configure:1240: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001240
1241# NeXT framework builds require that the 'ar' library be converted into
1242# a bundle using libtool.
1243if test "$with_next_framework"
1244then
1245 LDLIBRARY='libpython$(VERSION).dylib'
1246fi
1247
1248# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001249case $MACHDEP in
1250dguxR4)
1251 LDLIBRARY='libpython$(VERSION).so'
1252 OPT="$OPT -pic"
1253 ;;
1254beos*)
1255 LDLIBRARY='libpython$(VERSION).so'
1256 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001257cygwin*)
1258 LDLIBRARY='libpython$(VERSION).dll.a'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001259 DLLLIBRARY='libpython$(VERSION).dll'
Guido van Rossumaef734b2001-01-10 21:09:12 +00001260 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001261esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001262echo "$ac_t""$LDLIBRARY" 1>&6
1263
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001264# Extract the first word of "ranlib", so it can be a program name with args.
1265set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001266echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001267echo "configure:1268: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001268if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001269 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001270else
1271 if test -n "$RANLIB"; then
1272 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1273else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001274 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1275 ac_dummy="$PATH"
1276 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277 test -z "$ac_dir" && ac_dir=.
1278 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001279 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001280 break
1281 fi
1282 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001283 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001284 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001285fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001286fi
1287RANLIB="$ac_cv_prog_RANLIB"
1288if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001289 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001290else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001291 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001292fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001293
1294
Guido van Rossum7f43da71994-08-01 12:15:30 +00001295for ac_prog in ar aal
1296do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001297# Extract the first word of "$ac_prog", so it can be a program name with args.
1298set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001299echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001300echo "configure:1301: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001301if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001302 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001303else
1304 if test -n "$AR"; then
1305 ac_cv_prog_AR="$AR" # Let the user override the test.
1306else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001307 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1308 ac_dummy="$PATH"
1309 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001310 test -z "$ac_dir" && ac_dir=.
1311 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001313 break
1314 fi
1315 done
1316 IFS="$ac_save_ifs"
1317fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001318fi
1319AR="$ac_cv_prog_AR"
1320if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001321 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001322else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001323 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001324fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001325
1326test -n "$AR" && break
1327done
1328test -n "$AR" || AR="ar"
1329
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001330ac_aux_dir=
1331for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1332 if test -f $ac_dir/install-sh; then
1333 ac_aux_dir=$ac_dir
1334 ac_install_sh="$ac_aux_dir/install-sh -c"
1335 break
1336 elif test -f $ac_dir/install.sh; then
1337 ac_aux_dir=$ac_dir
1338 ac_install_sh="$ac_aux_dir/install.sh -c"
1339 break
1340 fi
1341done
1342if test -z "$ac_aux_dir"; then
1343 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001344fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001345ac_config_guess=$ac_aux_dir/config.guess
1346ac_config_sub=$ac_aux_dir/config.sub
1347ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1348
1349# Find a good install program. We prefer a C program (faster),
1350# so one script is as good as another. But avoid the broken or
1351# incompatible versions:
1352# SysV /etc/install, /usr/sbin/install
1353# SunOS /usr/etc/install
1354# IRIX /sbin/install
1355# AIX /bin/install
1356# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1357# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1358# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1359# ./install, which can be erroneously created by make from ./install.sh.
1360echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001361echo "configure:1362: checking for a BSD compatible install" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001362if test -z "$INSTALL"; then
1363if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1364 echo $ac_n "(cached) $ac_c" 1>&6
1365else
1366 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1367 for ac_dir in $PATH; do
1368 # Account for people who put trailing slashes in PATH elements.
1369 case "$ac_dir/" in
1370 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1371 *)
1372 # OSF1 and SCO ODT 3.0 have their own names for install.
1373 # Don't use installbsd from OSF since it installs stuff as root
1374 # by default.
1375 for ac_prog in ginstall scoinst install; do
1376 if test -f $ac_dir/$ac_prog; then
1377 if test $ac_prog = install &&
1378 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1379 # AIX install. It has an incompatible calling convention.
1380 :
1381 else
1382 ac_cv_path_install="$ac_dir/$ac_prog -c"
1383 break 2
1384 fi
1385 fi
1386 done
1387 ;;
1388 esac
1389 done
1390 IFS="$ac_save_IFS"
1391
1392fi
1393 if test "${ac_cv_path_install+set}" = set; then
1394 INSTALL="$ac_cv_path_install"
1395 else
1396 # As a last resort, use the slow shell script. We don't cache a
1397 # path for INSTALL within a source directory, because that will
1398 # break other packages using the cache if that directory is
1399 # removed, or if the path is relative.
1400 INSTALL="$ac_install_sh"
1401 fi
1402fi
1403echo "$ac_t""$INSTALL" 1>&6
1404
1405# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1406# It thinks the first close brace ends the variable substitution.
1407test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1408
1409test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1410
1411test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1412
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001413
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001414# Not every filesystem supports hard links
1415
1416if test -z "$LN" ; then
1417 case $ac_sys_system in
1418 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001419 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001420 *) LN=ln;;
1421 esac
1422fi
1423
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001424# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001425
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001426if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001427then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001428 case $GCC in
1429 yes)
1430 case $ac_cv_prog_cc_g in
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001431 yes) OPT="-g -O2 -Wall -Wstrict-prototypes";;
1432 *) OPT="-O2 -Wall -Wstrict-prototypes";;
Guido van Rossumedca74a1997-07-18 23:29:40 +00001433 esac
1434 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001435 *) OPT="-O";;
1436 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001437fi
1438
Trent Mick635f6fb2000-08-23 21:33:05 +00001439# The current (beta) Monterey compiler dies with optimizations
1440case $ac_sys_system in
1441Monterey*) OPT="";;
1442esac
1443
Guido van Rossum563e7081996-09-10 18:20:48 +00001444if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001445then
1446 OPT="$OPT $ac_arch_flags"
1447fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001448# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001449echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001450echo "configure:1451: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001451# On Suns, sometimes $CPP names a directory.
1452if test -n "$CPP" && test -d "$CPP"; then
1453 CPP=
1454fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001455if test -z "$CPP"; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001456if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001457 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001458else
1459 # This must be in double quotes, not single quotes, because CPP may get
1460 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001461 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001462 # On the NeXT, cc -E runs the code through the compiler's parser,
1463 # not just through cpp.
1464 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001465#line 1466 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001466#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001467#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001468Syntax Error
1469EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001470ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum6abce912001-03-20 13:09:14 +00001471{ (eval echo configure:1472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001472ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1473if test -z "$ac_err"; then
1474 :
1475else
1476 echo "$ac_err" >&5
1477 echo "configure: failed program was:" >&5
1478 cat conftest.$ac_ext >&5
1479 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001480 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001481 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001482#line 1483 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001483#include "confdefs.h"
1484#include <assert.h>
1485Syntax Error
1486EOF
1487ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum6abce912001-03-20 13:09:14 +00001488{ (eval echo configure:1489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001489ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001490if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001491 :
1492else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001493 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001494 echo "configure: failed program was:" >&5
1495 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001496 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001497 CPP="${CC-cc} -nologo -E"
1498 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001499#line 1500 "configure"
Guido van Rossumff555e32000-09-22 15:38:21 +00001500#include "confdefs.h"
1501#include <assert.h>
1502Syntax Error
1503EOF
1504ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum6abce912001-03-20 13:09:14 +00001505{ (eval echo configure:1506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumff555e32000-09-22 15:38:21 +00001506ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1507if test -z "$ac_err"; then
1508 :
1509else
1510 echo "$ac_err" >&5
1511 echo "configure: failed program was:" >&5
1512 cat conftest.$ac_ext >&5
1513 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001514 CPP=/lib/cpp
1515fi
1516rm -f conftest*
1517fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001518rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001519fi
1520rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001521 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001522fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001523 CPP="$ac_cv_prog_CPP"
1524else
1525 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001526fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001527echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001528
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001529echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001530echo "configure:1531: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001531cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001532#line 1533 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001533#include "confdefs.h"
1534#ifdef _AIX
1535 yes
1536#endif
1537
1538EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1540 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001541 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001542 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001543#define _ALL_SOURCE 1
1544EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001545
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001546else
1547 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001548 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001549fi
1550rm -f conftest*
1551
1552
Guido van Rossumf78abae1997-01-21 22:02:36 +00001553ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001554echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001555echo "configure:1556: checking for minix/config.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001556if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001557 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001558else
1559 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001560#line 1561 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001561#include "confdefs.h"
1562#include <minix/config.h>
1563EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001564ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum6abce912001-03-20 13:09:14 +00001565{ (eval echo configure:1566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001566ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001567if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001568 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001569 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001570else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001571 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001572 echo "configure: failed program was:" >&5
1573 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001574 rm -rf conftest*
1575 eval "ac_cv_header_$ac_safe=no"
1576fi
1577rm -f conftest*
1578fi
1579if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001580 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001581 MINIX=yes
1582else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001583 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001584MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001585fi
1586
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001587if test "$MINIX" = yes; then
1588 cat >> confdefs.h <<\EOF
1589#define _POSIX_SOURCE 1
1590EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001591
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001592 cat >> confdefs.h <<\EOF
1593#define _POSIX_1_SOURCE 2
1594EOF
1595
1596 cat >> confdefs.h <<\EOF
1597#define _MINIX 1
1598EOF
1599
1600fi
1601
Guido van Rossumda88dad1995-01-26 00:46:29 +00001602
Guido van Rossum91922671997-10-09 20:24:13 +00001603echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001604echo "configure:1605: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001605if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001606 echo $ac_n "(cached) $ac_c" 1>&6
1607else
1608 ac_save_cc="$CC"
1609CC="$CC -OPT:Olimit=0"
1610if test "$cross_compiling" = yes; then
1611 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1612else
1613 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001614#line 1615 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001615#include "confdefs.h"
1616int main() { return 0; }
1617EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001618if { (eval echo configure:1619: \"$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 +00001619then
1620 ac_cv_opt_olimit_ok=yes
1621else
1622 echo "configure: failed program was:" >&5
1623 cat conftest.$ac_ext >&5
1624 rm -fr conftest*
1625 ac_cv_opt_olimit_ok=no
1626fi
1627rm -fr conftest*
1628fi
1629
1630CC="$ac_save_cc"
1631fi
1632
1633echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001634if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001635 case $ac_sys_system in
1636 Darwin*) OPT="$OPT" ;;
1637 *) OPT="$OPT -OPT:Olimit=0";;
1638 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001639else
1640 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001641echo "configure:1642: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001642 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001643 echo $ac_n "(cached) $ac_c" 1>&6
1644else
1645 ac_save_cc="$CC"
1646 CC="$CC -Olimit 1500"
1647 if test "$cross_compiling" = yes; then
1648 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1649else
1650 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001651#line 1652 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001652#include "confdefs.h"
1653int main() { return 0; }
1654EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001655if { (eval echo configure:1656: \"$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 +00001656then
1657 ac_cv_olimit_ok=yes
1658else
1659 echo "configure: failed program was:" >&5
1660 cat conftest.$ac_ext >&5
1661 rm -fr conftest*
1662 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001663fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001664rm -fr conftest*
1665fi
1666
1667 CC="$ac_save_cc"
1668fi
1669
1670 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1671 if test $ac_cv_olimit_ok = yes; then
1672 OPT="$OPT -Olimit 1500"
1673 fi
1674fi
1675
Guido van Rossum84e7b241996-08-19 21:59:00 +00001676
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001677# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001678echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001679echo "configure:1680: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001680if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001681 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001682else
1683 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001684#line 1685 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001685#include "confdefs.h"
1686#include <stdlib.h>
1687#include <stdarg.h>
1688#include <string.h>
1689#include <float.h>
1690EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001691ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum6abce912001-03-20 13:09:14 +00001692{ (eval echo configure:1693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001693ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001694if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001695 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001696 ac_cv_header_stdc=yes
1697else
1698 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001699 echo "configure: failed program was:" >&5
1700 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001701 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702 ac_cv_header_stdc=no
1703fi
1704rm -f conftest*
1705
1706if test $ac_cv_header_stdc = yes; then
1707 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1708cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001709#line 1710 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001710#include "confdefs.h"
1711#include <string.h>
1712EOF
1713if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1714 egrep "memchr" >/dev/null 2>&1; then
1715 :
1716else
1717 rm -rf conftest*
1718 ac_cv_header_stdc=no
1719fi
1720rm -f conftest*
1721
1722fi
1723
1724if test $ac_cv_header_stdc = yes; then
1725 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1726cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001727#line 1728 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001728#include "confdefs.h"
1729#include <stdlib.h>
1730EOF
1731if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1732 egrep "free" >/dev/null 2>&1; then
1733 :
1734else
1735 rm -rf conftest*
1736 ac_cv_header_stdc=no
1737fi
1738rm -f conftest*
1739
1740fi
1741
1742if test $ac_cv_header_stdc = yes; then
1743 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1744if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001745 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001746else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001747 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001748#line 1749 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001749#include "confdefs.h"
1750#include <ctype.h>
1751#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1752#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001753#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001754int main () { int i; for (i = 0; i < 256; i++)
1755if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1756exit (0); }
1757
1758EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001759if { (eval echo configure:1760: \"$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 +00001760then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001761 :
1762else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001763 echo "configure: failed program was:" >&5
1764 cat conftest.$ac_ext >&5
1765 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001766 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001767fi
1768rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001769fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001770
1771fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001772fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001773
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001774echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001775if test $ac_cv_header_stdc = yes; then
1776 cat >> confdefs.h <<\EOF
1777#define STDC_HEADERS 1
1778EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001779
1780fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001781
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00001782for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00001783signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakea50d6ec2000-08-31 16:13:20 +00001784sys/audioio.h sys/file.h sys/lock.h db_185.h db.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001785sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00001786sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
1787ndbm.h db1/ndbm.h gdbm/ndbm.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001788do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001789ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001790echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001791echo "configure:1792: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001792if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+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 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001796#line 1797 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001797#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001798#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001799EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001800ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum6abce912001-03-20 13:09:14 +00001801{ (eval echo configure:1802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001802ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001803if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001804 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805 eval "ac_cv_header_$ac_safe=yes"
1806else
1807 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001808 echo "configure: failed program was:" >&5
1809 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001810 rm -rf conftest*
1811 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001812fi
1813rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001814fi
1815if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001816 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001817 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001818 cat >> confdefs.h <<EOF
1819#define $ac_tr_hdr 1
1820EOF
1821
1822else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001823 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001824fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001825done
1826
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001827ac_header_dirent=no
1828for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1829do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001830ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001831echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001832echo "configure:1833: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001833if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001834 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001835else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001836 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001837#line 1838 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001838#include "confdefs.h"
1839#include <sys/types.h>
1840#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001841int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001842DIR *dirp = 0;
1843; return 0; }
1844EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001845if { (eval echo configure:1846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001846 rm -rf conftest*
1847 eval "ac_cv_header_dirent_$ac_safe=yes"
1848else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001849 echo "configure: failed program was:" >&5
1850 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001851 rm -rf conftest*
1852 eval "ac_cv_header_dirent_$ac_safe=no"
1853fi
1854rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001855fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001856if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001857 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001858 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001859 cat >> confdefs.h <<EOF
1860#define $ac_tr_hdr 1
1861EOF
1862 ac_header_dirent=$ac_hdr; break
1863else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001864 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001865fi
1866done
1867# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1868if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001869echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001870echo "configure:1871: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001871ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001872if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001873 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001874else
1875 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001876LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001877cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001878#line 1879 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001879#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001880/* Override any gcc2 internal prototype to avoid an error. */
1881/* We use char because int might match the return type of a gcc2
1882 builtin and then its argument prototype would still apply. */
1883char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001884
Guido van Rossumf78abae1997-01-21 22:02:36 +00001885int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001886opendir()
1887; return 0; }
1888EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001889if { (eval echo configure:1890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001890 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001891 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001892else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001893 echo "configure: failed program was:" >&5
1894 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001895 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001896 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001897fi
1898rm -f conftest*
1899LIBS="$ac_save_LIBS"
1900
1901fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001902if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001903 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001904 LIBS="$LIBS -ldir"
1905else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001906 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001907fi
1908
1909else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001910echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001911echo "configure:1912: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001912ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001913if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001914 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001915else
1916 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001917LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001918cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001919#line 1920 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001920#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001921/* Override any gcc2 internal prototype to avoid an error. */
1922/* We use char because int might match the return type of a gcc2
1923 builtin and then its argument prototype would still apply. */
1924char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001925
Guido van Rossumf78abae1997-01-21 22:02:36 +00001926int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001927opendir()
1928; return 0; }
1929EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001930if { (eval echo configure:1931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001931 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001932 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001933else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001934 echo "configure: failed program was:" >&5
1935 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001936 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001937 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001938fi
1939rm -f conftest*
1940LIBS="$ac_save_LIBS"
1941
1942fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001943if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001944 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001945 LIBS="$LIBS -lx"
1946else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001947 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001948fi
1949
1950fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001951
1952
1953# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001954was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001955echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001956echo "configure:1957: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001957cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001958#line 1959 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001959#include "confdefs.h"
1960#include <time.h>
1961EOF
1962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1963 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001964 rm -rf conftest*
1965 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001966else
1967 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001968 cat >> confdefs.h <<\EOF
1969#define clock_t long
1970EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001971
1972fi
1973rm -f conftest*
1974
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001975echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001976
Guido van Rossum84e7b241996-08-19 21:59:00 +00001977# Add some code to confdefs.h so that the test for off_t works on SCO
1978cat >> confdefs.h <<\EOF
1979#if defined(SCO_DS)
1980#undef _OFF_T
1981#endif
1982EOF
1983
Guido van Rossumef2255b2000-03-10 22:30:29 +00001984# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001985echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00001986echo "configure:1987: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001987if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001988 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001989else
1990 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00001991#line 1992 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001992#include "confdefs.h"
1993#include <sys/types.h>
1994#if STDC_HEADERS
1995#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001996#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001997#endif
1998EOF
1999if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002000 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 +00002001 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002002 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002003else
2004 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002005 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002006fi
2007rm -f conftest*
2008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002009fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002010echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2011if test $ac_cv_type_mode_t = no; then
2012 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002013#define mode_t int
2014EOF
2015
2016fi
2017
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002018echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002019echo "configure:2020: checking for off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002020if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002021 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002022else
2023 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002024#line 2025 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002025#include "confdefs.h"
2026#include <sys/types.h>
2027#if STDC_HEADERS
2028#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002029#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002030#endif
2031EOF
2032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002033 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 +00002034 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002035 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002036else
2037 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002038 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002039fi
2040rm -f conftest*
2041
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002042fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002043echo "$ac_t""$ac_cv_type_off_t" 1>&6
2044if test $ac_cv_type_off_t = no; then
2045 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002046#define off_t long
2047EOF
2048
2049fi
2050
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002051echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002052echo "configure:2053: checking for pid_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002053if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002054 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002055else
2056 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002057#line 2058 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002058#include "confdefs.h"
2059#include <sys/types.h>
2060#if STDC_HEADERS
2061#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002062#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002063#endif
2064EOF
2065if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002066 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 +00002067 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002068 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002069else
2070 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002071 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002072fi
2073rm -f conftest*
2074
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002075fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002076echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2077if test $ac_cv_type_pid_t = no; then
2078 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002079#define pid_t int
2080EOF
2081
2082fi
2083
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002084echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002085echo "configure:2086: checking return type of signal handlers" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002086if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002087 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002088else
2089 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002090#line 2091 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002091#include "confdefs.h"
2092#include <sys/types.h>
2093#include <signal.h>
2094#ifdef signal
2095#undef signal
2096#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002097#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002098extern "C" void (*signal (int, void (*)(int)))(int);
2099#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002100void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002101#endif
2102
Guido van Rossumf78abae1997-01-21 22:02:36 +00002103int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002104int i;
2105; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002106EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002107if { (eval echo configure:2108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002108 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002109 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002110else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002111 echo "configure: failed program was:" >&5
2112 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002113 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002114 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002115fi
2116rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002117fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002118
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002119echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002120cat >> confdefs.h <<EOF
2121#define RETSIGTYPE $ac_cv_type_signal
2122EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002123
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002124
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002125echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002126echo "configure:2127: checking for size_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002127if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002128 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002129else
2130 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002131#line 2132 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002132#include "confdefs.h"
2133#include <sys/types.h>
2134#if STDC_HEADERS
2135#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002136#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002137#endif
2138EOF
2139if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002140 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 +00002141 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002142 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002143else
2144 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002145 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002146fi
2147rm -f conftest*
2148
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002149fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002150echo "$ac_t""$ac_cv_type_size_t" 1>&6
2151if test $ac_cv_type_size_t = no; then
2152 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002153#define size_t unsigned
2154EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002155
2156fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002157
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002158echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002159echo "configure:2160: checking for uid_t in sys/types.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002160if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002161 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002162else
2163 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002164#line 2165 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002165#include "confdefs.h"
2166#include <sys/types.h>
2167EOF
2168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2169 egrep "uid_t" >/dev/null 2>&1; then
2170 rm -rf conftest*
2171 ac_cv_type_uid_t=yes
2172else
2173 rm -rf conftest*
2174 ac_cv_type_uid_t=no
2175fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002176rm -f conftest*
2177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002178fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002179
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002180echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002181if test $ac_cv_type_uid_t = no; then
2182 cat >> confdefs.h <<\EOF
2183#define uid_t int
2184EOF
2185
2186 cat >> confdefs.h <<\EOF
2187#define gid_t int
2188EOF
2189
2190fi
2191
Guido van Rossum627b2d71993-12-24 10:39:16 +00002192
Guido van Rossumef2255b2000-03-10 22:30:29 +00002193# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002194echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002195echo "configure:2196: checking size of int" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002196if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002197 echo $ac_n "(cached) $ac_c" 1>&6
2198else
2199 if test "$cross_compiling" = yes; then
2200 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2201else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002202 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002203#line 2204 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002204#include "confdefs.h"
2205#include <stdio.h>
2206main()
2207{
2208 FILE *f=fopen("conftestval", "w");
2209 if (!f) exit(1);
2210 fprintf(f, "%d\n", sizeof(int));
2211 exit(0);
2212}
2213EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002214if { (eval echo configure:2215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00002215then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002216 ac_cv_sizeof_int=`cat conftestval`
2217else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002218 echo "configure: failed program was:" >&5
2219 cat conftest.$ac_ext >&5
2220 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002221 ac_cv_sizeof_int=0
2222fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002223rm -fr conftest*
2224fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002225
2226fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002227echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2228cat >> confdefs.h <<EOF
2229#define SIZEOF_INT $ac_cv_sizeof_int
2230EOF
2231
2232
2233echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002234echo "configure:2235: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002235if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002236 echo $ac_n "(cached) $ac_c" 1>&6
2237else
2238 if test "$cross_compiling" = yes; then
2239 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2240else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002241 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002242#line 2243 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002243#include "confdefs.h"
2244#include <stdio.h>
2245main()
2246{
2247 FILE *f=fopen("conftestval", "w");
2248 if (!f) exit(1);
2249 fprintf(f, "%d\n", sizeof(long));
2250 exit(0);
2251}
2252EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002253if { (eval echo configure:2254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00002254then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002255 ac_cv_sizeof_long=`cat conftestval`
2256else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002257 echo "configure: failed program was:" >&5
2258 cat conftest.$ac_ext >&5
2259 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002260 ac_cv_sizeof_long=0
2261fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002262rm -fr conftest*
2263fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002264
2265fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002266echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2267cat >> confdefs.h <<EOF
2268#define SIZEOF_LONG $ac_cv_sizeof_long
2269EOF
2270
2271
Guido van Rossumad678af1998-10-02 14:42:15 +00002272echo $ac_n "checking size of void *""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002273echo "configure:2274: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002274if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002275 echo $ac_n "(cached) $ac_c" 1>&6
2276else
2277 if test "$cross_compiling" = yes; then
2278 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2279else
2280 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002281#line 2282 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002282#include "confdefs.h"
2283#include <stdio.h>
2284main()
2285{
2286 FILE *f=fopen("conftestval", "w");
2287 if (!f) exit(1);
2288 fprintf(f, "%d\n", sizeof(void *));
2289 exit(0);
2290}
2291EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002292if { (eval echo configure:2293: \"$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 +00002293then
2294 ac_cv_sizeof_void_p=`cat conftestval`
2295else
2296 echo "configure: failed program was:" >&5
2297 cat conftest.$ac_ext >&5
2298 rm -fr conftest*
2299 ac_cv_sizeof_void_p=0
2300fi
2301rm -fr conftest*
2302fi
2303
2304fi
2305echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2306cat >> confdefs.h <<EOF
2307#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2308EOF
2309
2310
Guido van Rossumef2255b2000-03-10 22:30:29 +00002311echo $ac_n "checking size of char""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002312echo "configure:2313: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002313if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002314 echo $ac_n "(cached) $ac_c" 1>&6
2315else
2316 if test "$cross_compiling" = yes; then
2317 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2318else
2319 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002320#line 2321 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002321#include "confdefs.h"
2322#include <stdio.h>
2323main()
2324{
2325 FILE *f=fopen("conftestval", "w");
2326 if (!f) exit(1);
2327 fprintf(f, "%d\n", sizeof(char));
2328 exit(0);
2329}
2330EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002331if { (eval echo configure:2332: \"$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 +00002332then
2333 ac_cv_sizeof_char=`cat conftestval`
2334else
2335 echo "configure: failed program was:" >&5
2336 cat conftest.$ac_ext >&5
2337 rm -fr conftest*
2338 ac_cv_sizeof_char=0
2339fi
2340rm -fr conftest*
2341fi
2342
2343fi
2344echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2345cat >> confdefs.h <<EOF
2346#define SIZEOF_CHAR $ac_cv_sizeof_char
2347EOF
2348
2349
2350echo $ac_n "checking size of short""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002351echo "configure:2352: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002352if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002353 echo $ac_n "(cached) $ac_c" 1>&6
2354else
2355 if test "$cross_compiling" = yes; then
2356 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2357else
2358 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002359#line 2360 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002360#include "confdefs.h"
2361#include <stdio.h>
2362main()
2363{
2364 FILE *f=fopen("conftestval", "w");
2365 if (!f) exit(1);
2366 fprintf(f, "%d\n", sizeof(short));
2367 exit(0);
2368}
2369EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002370if { (eval echo configure:2371: \"$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 +00002371then
2372 ac_cv_sizeof_short=`cat conftestval`
2373else
2374 echo "configure: failed program was:" >&5
2375 cat conftest.$ac_ext >&5
2376 rm -fr conftest*
2377 ac_cv_sizeof_short=0
2378fi
2379rm -fr conftest*
2380fi
2381
2382fi
2383echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2384cat >> confdefs.h <<EOF
2385#define SIZEOF_SHORT $ac_cv_sizeof_short
2386EOF
2387
2388
2389echo $ac_n "checking size of float""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002390echo "configure:2391: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002391if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002392 echo $ac_n "(cached) $ac_c" 1>&6
2393else
2394 if test "$cross_compiling" = yes; then
2395 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2396else
2397 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002398#line 2399 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002399#include "confdefs.h"
2400#include <stdio.h>
2401main()
2402{
2403 FILE *f=fopen("conftestval", "w");
2404 if (!f) exit(1);
2405 fprintf(f, "%d\n", sizeof(float));
2406 exit(0);
2407}
2408EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002409if { (eval echo configure:2410: \"$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 +00002410then
2411 ac_cv_sizeof_float=`cat conftestval`
2412else
2413 echo "configure: failed program was:" >&5
2414 cat conftest.$ac_ext >&5
2415 rm -fr conftest*
2416 ac_cv_sizeof_float=0
2417fi
2418rm -fr conftest*
2419fi
2420
2421fi
2422echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2423cat >> confdefs.h <<EOF
2424#define SIZEOF_FLOAT $ac_cv_sizeof_float
2425EOF
2426
2427
2428echo $ac_n "checking size of double""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002429echo "configure:2430: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002430if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002431 echo $ac_n "(cached) $ac_c" 1>&6
2432else
2433 if test "$cross_compiling" = yes; then
2434 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2435else
2436 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002437#line 2438 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002438#include "confdefs.h"
2439#include <stdio.h>
2440main()
2441{
2442 FILE *f=fopen("conftestval", "w");
2443 if (!f) exit(1);
2444 fprintf(f, "%d\n", sizeof(double));
2445 exit(0);
2446}
2447EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002448if { (eval echo configure:2449: \"$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 +00002449then
2450 ac_cv_sizeof_double=`cat conftestval`
2451else
2452 echo "configure: failed program was:" >&5
2453 cat conftest.$ac_ext >&5
2454 rm -fr conftest*
2455 ac_cv_sizeof_double=0
2456fi
2457rm -fr conftest*
2458fi
2459
2460fi
2461echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2462cat >> confdefs.h <<EOF
2463#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2464EOF
2465
2466
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002467echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002468echo "configure:2469: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002469if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002470 echo $ac_n "(cached) $ac_c" 1>&6
2471else
2472 if test "$cross_compiling" = yes; then
2473 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2474else
2475 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002476#line 2477 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002477#include "confdefs.h"
2478#include <stdio.h>
2479main()
2480{
2481 FILE *f=fopen("conftestval", "w");
2482 if (!f) exit(1);
2483 fprintf(f, "%d\n", sizeof(fpos_t));
2484 exit(0);
2485}
2486EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002487if { (eval echo configure:2488: \"$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 +00002488then
2489 ac_cv_sizeof_fpos_t=`cat conftestval`
2490else
2491 echo "configure: failed program was:" >&5
2492 cat conftest.$ac_ext >&5
2493 rm -fr conftest*
2494 ac_cv_sizeof_fpos_t=0
2495fi
2496rm -fr conftest*
2497fi
2498
2499fi
2500echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2501cat >> confdefs.h <<EOF
2502#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2503EOF
2504
2505
Guido van Rossum0a516c91994-09-12 10:58:40 +00002506
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002507echo $ac_n "checking for long long support""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002508echo "configure:2509: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002509have_long_long=no
2510cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002511#line 2512 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002512#include "confdefs.h"
2513
2514int main() {
2515long long x; x = (long long)0;
2516; return 0; }
2517EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002518if { (eval echo configure:2519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002519 rm -rf conftest*
2520 cat >> confdefs.h <<\EOF
2521#define HAVE_LONG_LONG 1
2522EOF
2523 have_long_long=yes
2524else
2525 echo "configure: failed program was:" >&5
2526 cat conftest.$ac_ext >&5
2527fi
2528rm -f conftest*
2529echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002530if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002531echo $ac_n "checking size of long long""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002532echo "configure:2533: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002533if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002534 echo $ac_n "(cached) $ac_c" 1>&6
2535else
2536 if test "$cross_compiling" = yes; then
2537 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2538else
2539 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002540#line 2541 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002541#include "confdefs.h"
2542#include <stdio.h>
2543main()
2544{
2545 FILE *f=fopen("conftestval", "w");
2546 if (!f) exit(1);
2547 fprintf(f, "%d\n", sizeof(long long));
2548 exit(0);
2549}
2550EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002551if { (eval echo configure:2552: \"$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 +00002552then
2553 ac_cv_sizeof_long_long=`cat conftestval`
2554else
2555 echo "configure: failed program was:" >&5
2556 cat conftest.$ac_ext >&5
2557 rm -fr conftest*
2558 ac_cv_sizeof_long_long=0
2559fi
2560rm -fr conftest*
2561fi
2562
2563fi
2564echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2565cat >> confdefs.h <<EOF
2566#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2567EOF
2568
2569
2570fi
2571
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002572echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002573echo "configure:2574: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002574have_uintptr_t=no
2575cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002576#line 2577 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002577#include "confdefs.h"
2578
2579int main() {
2580uintptr_t x; x = (uintptr_t)0;
2581; return 0; }
2582EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002583if { (eval echo configure:2584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002584 rm -rf conftest*
2585 cat >> confdefs.h <<\EOF
2586#define HAVE_UINTPTR_T 1
2587EOF
2588 have_uintptr_t=yes
2589else
2590 echo "configure: failed program was:" >&5
2591 cat conftest.$ac_ext >&5
2592fi
2593rm -f conftest*
2594echo "$ac_t""$have_uintptr_t" 1>&6
2595if test "$have_uintptr_t" = yes ; then
2596echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002597echo "configure:2598: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002598if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002599 echo $ac_n "(cached) $ac_c" 1>&6
2600else
2601 if test "$cross_compiling" = yes; then
2602 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2603else
2604 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002605#line 2606 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002606#include "confdefs.h"
2607#include <stdio.h>
2608main()
2609{
2610 FILE *f=fopen("conftestval", "w");
2611 if (!f) exit(1);
2612 fprintf(f, "%d\n", sizeof(uintptr_t));
2613 exit(0);
2614}
2615EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002616if { (eval echo configure:2617: \"$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 +00002617then
2618 ac_cv_sizeof_uintptr_t=`cat conftestval`
2619else
2620 echo "configure: failed program was:" >&5
2621 cat conftest.$ac_ext >&5
2622 rm -fr conftest*
2623 ac_cv_sizeof_uintptr_t=0
2624fi
2625rm -fr conftest*
2626fi
2627
2628fi
2629echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2630cat >> confdefs.h <<EOF
2631#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2632EOF
2633
2634
2635fi
2636
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002637# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2638echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002639echo "configure:2640: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002640if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002641 echo $ac_n "(cached) $ac_c" 1>&6
2642else
2643 if test "$cross_compiling" = yes; then
2644 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2645else
2646 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002647#line 2648 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002648#include "confdefs.h"
2649#include <stdio.h>
2650#include <sys/types.h>
2651main()
2652{
2653 FILE *f=fopen("conftestval", "w");
2654 if (!f) exit(1);
2655 fprintf(f, "%d\n", sizeof(off_t));
2656 exit(0);
2657}
2658EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002659if { (eval echo configure:2660: \"$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 +00002660then
2661 ac_cv_sizeof_off_t=`cat conftestval`
2662else
2663 echo "configure: failed program was:" >&5
2664 cat conftest.$ac_ext >&5
2665 rm -fr conftest*
2666 ac_cv_sizeof_off_t=0
2667fi
2668rm -fr conftest*
2669fi
2670
2671
2672fi
2673
2674echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2675cat >> confdefs.h <<EOF
2676#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2677EOF
2678
2679
2680echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002681echo "configure:2682: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002682if test "$have_long_long" = yes -a \
2683 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2684 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002685 cat >> confdefs.h <<\EOF
2686#define HAVE_LARGEFILE_SUPPORT 1
2687EOF
2688
2689 echo "$ac_t""yes" 1>&6
2690else
2691 echo "$ac_t""no" 1>&6
2692fi
2693
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002694# AC_CHECK_SIZEOF() doesn't include <time.h>.
2695echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002696echo "configure:2697: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002697if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002698 echo $ac_n "(cached) $ac_c" 1>&6
2699else
2700 if test "$cross_compiling" = yes; then
2701 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2702else
2703 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002704#line 2705 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002705#include "confdefs.h"
2706#include <stdio.h>
2707#include <time.h>
2708main()
2709{
2710 FILE *f=fopen("conftestval", "w");
2711 if (!f) exit(1);
2712 fprintf(f, "%d\n", sizeof(time_t));
2713 exit(0);
2714}
2715EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002716if { (eval echo configure:2717: \"$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 +00002717then
2718 ac_cv_sizeof_time_t=`cat conftestval`
2719else
2720 echo "configure: failed program was:" >&5
2721 cat conftest.$ac_ext >&5
2722 rm -fr conftest*
2723 ac_cv_sizeof_time_t=0
2724fi
2725rm -fr conftest*
2726fi
2727
2728
2729fi
2730
2731echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2732cat >> confdefs.h <<EOF
2733#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2734EOF
2735
2736
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002737
Trent Mick635f6fb2000-08-23 21:33:05 +00002738# if have pthread_t then define SIZEOF_PTHREAD_T
2739echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002740echo "configure:2741: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002741have_pthread_t=no
2742cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002743#line 2744 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002744#include "confdefs.h"
2745#include <pthread.h>
2746int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002747pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002748; return 0; }
2749EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002750if { (eval echo configure:2751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002751 rm -rf conftest*
2752 have_pthread_t=yes
2753else
2754 echo "configure: failed program was:" >&5
2755 cat conftest.$ac_ext >&5
2756fi
2757rm -f conftest*
2758echo "$ac_t""$have_pthread_t" 1>&6
2759if test "$have_pthread_t" = yes ; then
2760 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2761 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002762echo "configure:2763: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002763 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002764 echo $ac_n "(cached) $ac_c" 1>&6
2765else
2766 if test "$cross_compiling" = yes; then
2767 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2768else
2769 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002770#line 2771 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002771#include "confdefs.h"
2772#include <stdio.h>
2773 #include <pthread.h>
2774 main()
2775 {
2776 FILE *f=fopen("conftestval", "w");
2777 if (!f) exit(1);
2778 fprintf(f, "%d\n", sizeof(pthread_t));
2779 exit(0);
2780 }
2781EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00002782if { (eval echo configure:2783: \"$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 +00002783then
2784 ac_cv_sizeof_pthread_t=`cat conftestval`
2785else
2786 echo "configure: failed program was:" >&5
2787 cat conftest.$ac_ext >&5
2788 rm -fr conftest*
2789 ac_cv_sizeof_pthread_t=0
2790fi
2791rm -fr conftest*
2792fi
2793
2794
2795fi
2796
2797 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2798 cat >> confdefs.h <<EOF
2799#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2800EOF
2801
2802fi
2803
2804
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002805# Minor variations in building a framework between NextStep versions 4 and 5
2806
2807case $ac_sys_system/$ac_sys_release in
Guido van Rossum5839e582000-10-09 19:52:35 +00002808 Darwin/*)
2809 ns_undef_sym='_environ'
2810 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002811 next/4*)
2812 ns_undef_sym='__environ'
2813 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2814 next/5*)
2815 ns_undef_sym='_environ'
2816 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2817esac
2818
2819echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002820echo "configure:2821: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002821if test "$with_next_framework"
2822then
2823 OPT="$OPT -fno-common"
2824 # -U __environ is needed since bundles don't have access
2825 # to crt0 when built but will always be linked against it
2826 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2827 cat >> confdefs.h <<\EOF
2828#define WITH_NEXT_FRAMEWORK 1
2829EOF
2830
2831 echo "$ac_t""yes" 1>&6
2832else
2833 echo "$ac_t""no" 1>&6
2834fi
2835
2836echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002837echo "configure:2838: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002838if test "$with_next_framework" -o "$with_dyld"
2839then
2840 if test "$with_dyld"
2841 then
2842 echo "$ac_t""yes" 1>&6
2843 else
2844 echo "$ac_t""required for framework build" 1>&6
2845 fi
2846 cat >> confdefs.h <<\EOF
2847#define WITH_DYLD 1
2848EOF
2849
2850 ns_dyld='set'
2851else
2852 echo "$ac_t""no" 1>&6
2853fi
2854
Guido van Rossum0a516c91994-09-12 10:58:40 +00002855# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002856
2857
2858
2859
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002860
Guido van Rossum0a516c91994-09-12 10:58:40 +00002861# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00002862# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002863echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002864echo "configure:2865: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002865if test -z "$SO"
2866then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002867 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002868 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00002869 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00002870 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002871 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002872fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002873echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002874# LDSHARED is the ld *command* used to create shared library
2875# -- "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 +00002876# (Shared libraries in this instance are shared modules to be loaded into
2877# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002878echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002879echo "configure:2880: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002880if test -z "$LDSHARED"
2881then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002882 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002883 AIX*)
2884 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
2885 LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp"
2886 ;;
2887 BeOS*)
2888 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
2889 LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
2890 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00002891 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002892 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002893 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00002894 SunOS/5*)
2895 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00002896 then LDSHARED='$(CC) -shared'
Greg Ward57c9a6632000-05-26 12:22:54 +00002897 else LDSHARED="ld -G";
2898 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002899 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002900 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2901 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002902 Darwin/*|next/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002903 if test "$ns_dyld"
Guido van Rossumacb14c72001-01-10 21:41:16 +00002904 then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002905 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2906 fi
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002907 if test "$with_next_framework" ; then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002908 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2909 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002910 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002911 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002912 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002913 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002914 NetBSD*)
2915 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2916 then
2917 LDSHARED="cc -shared"
2918 else
2919 LDSHARED="ld -Bshareable"
2920 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002921 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00002922 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00002923 then
2924 LDSHARED="cc -shared ${LDFLAGS}"
2925 else
2926 LDSHARED="ld -Bshareable ${LDFLAGS}"
2927 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002928 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002929 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00002930 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002931 *) LDSHARED="ld";;
2932 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002933fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002934echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002935BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00002936# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002937# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002938echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002939echo "configure:2940: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002940if test -z "$CCSHARED"
2941then
Guido van Rossum07397971997-04-29 21:49:50 +00002942 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00002943 SunOS*) if test "$GCC" = yes;
2944 then CCSHARED="-fPIC";
2945 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00002946 hp*|HP*) if test "$GCC" = yes;
2947 then CCSHARED="-fpic";
2948 else CCSHARED="+z";
2949 fi;;
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002950 Linux*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002951 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002952 OpenBSD*) CCSHARED="-fpic";;
2953 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002954 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002955 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002956 IRIX*/6*) case $CC in
2957 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002958 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002959 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00002960 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002961 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002962fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002963echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002964# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002965# the python executable -- this is only needed for a few systems
2966echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00002967echo "configure:2968: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002968if test -z "$LINKFORSHARED"
2969then
Guido van Rossum07397971997-04-29 21:49:50 +00002970 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002971 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002972 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002973 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002974 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002975 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002976 # -u libsys_s pulls in all symbols in libsys
2977 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2978 # -u __dummy makes the linker aware of the objc runtime
2979 # in System.framework; otherwise, __objcInit (referenced in
2980 # crt1.o) gets erroneously defined as common, which breaks dynamic
2981 # loading of any modules which reference it in System.framework
2982 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossumacb14c72001-01-10 21:41:16 +00002983 Darwin/*) LINKFORSHARED="-u __dummy -framework System -framework Foundation" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002984 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00002985 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002986 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00002987 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2988 then
2989 LINKFORSHARED="-Wl,--export-dynamic"
2990 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002991 SunOS/5*) case $CC in
2992 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002993 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002994 then
2995 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002996 fi;;
2997 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002998 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002999fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003000echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003001
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003002
3003echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003004echo "configure:3005: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003005if test ! "$LIBRARY" = "$LDLIBRARY"
3006then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003007 case $ac_sys_system in
3008 CYGWIN*)
3009 # Cygwin needs CCSHARED when building extension DLLs
3010 # but not when building the interpreter DLL.
3011 CFLAGSFORSHARED='';;
3012 *)
3013 CFLAGSFORSHARED='$(CCSHARED)'
3014 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003015fi
3016echo "$ac_t""$CFLAGSFORSHARED" 1>&6
3017
Guido van Rossum627b2d71993-12-24 10:39:16 +00003018# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00003019echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003020echo "configure:3021: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003021ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003022if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003023 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003024else
3025 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003026LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003027cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003028#line 3029 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003029#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003030/* Override any gcc2 internal prototype to avoid an error. */
3031/* We use char because int might match the return type of a gcc2
3032 builtin and then its argument prototype would still apply. */
3033char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003034
Guido van Rossumf78abae1997-01-21 22:02:36 +00003035int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003036dlopen()
3037; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003038EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003039if { (eval echo configure:3040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003040 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003041 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003042else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003043 echo "configure: failed program was:" >&5
3044 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003045 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003046 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003047fi
3048rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003049LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003050
Guido van Rossum627b2d71993-12-24 10:39:16 +00003051fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003052if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003053 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003054 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3055 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003056 cat >> confdefs.h <<EOF
3057#define $ac_tr_lib 1
3058EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003059
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003060 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003061
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003062else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003063 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003064fi
3065 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00003066echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003067echo "configure:3068: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003068ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003069if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003070 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003071else
3072 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003073LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003074cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003075#line 3076 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003076#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003077/* Override any gcc2 internal prototype to avoid an error. */
3078/* We use char because int might match the return type of a gcc2
3079 builtin and then its argument prototype would still apply. */
3080char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003081
Guido van Rossumf78abae1997-01-21 22:02:36 +00003082int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003083shl_load()
3084; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003085EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003086if { (eval echo configure:3087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003087 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003088 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003089else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003090 echo "configure: failed program was:" >&5
3091 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003092 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003093 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003094fi
3095rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003096LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003097
Guido van Rossum627b2d71993-12-24 10:39:16 +00003098fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003099if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003100 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003101 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3102 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003103 cat >> confdefs.h <<EOF
3104#define $ac_tr_lib 1
3105EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003106
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003107 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003108
3109else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003110 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003111fi
3112 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003113
Skip Montanarocb853262000-08-30 22:29:48 +00003114# Check for --with-pydebug
3115echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003116echo "configure:3117: checking for --with-pydebug" >&5
Skip Montanarocb853262000-08-30 22:29:48 +00003117# Check whether --with-pydebug or --without-pydebug was given.
3118if test "${with_pydebug+set}" = set; then
3119 withval="$with_pydebug"
3120
3121if test "$withval" != no
3122then cat >> confdefs.h <<\EOF
3123#define Py_DEBUG 1
3124EOF
3125 echo "$ac_t""yes" 1>&6
3126else echo "$ac_t""no" 1>&6
3127fi
3128else
3129 echo "$ac_t""no" 1>&6
3130fi
3131
3132
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003133# checks for system dependent C++ extensions support
3134case "$ac_sys_system" in
3135 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003136echo "configure:3137: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003137 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003138#line 3139 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003139#include "confdefs.h"
3140#include "/usr/lpp/xlC/include/load.h"
3141int main() {
3142loadAndInit("", 0, "")
3143; return 0; }
3144EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003145if { (eval echo configure:3146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003146 rm -rf conftest*
3147 cat >> confdefs.h <<\EOF
3148#define AIX_GENUINE_CPLUSPLUS 1
3149EOF
3150
3151 echo "$ac_t""yes" 1>&6
3152else
3153 echo "configure: failed program was:" >&5
3154 cat conftest.$ac_ext >&5
3155 rm -rf conftest*
3156 echo "$ac_t""no" 1>&6
3157fi
3158rm -f conftest*;;
3159 *) ;;
3160esac
3161
Guido van Rossum70c7f481998-03-26 18:44:10 +00003162# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3163# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003164# BeOS' sockets are stashed in libnet.
3165case "$ac_sys_system" in
3166IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003167*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003168echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003169echo "configure:3170: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003170ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003171if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003172 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003173else
3174 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003175LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003176cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003177#line 3178 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003178#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003179/* Override any gcc2 internal prototype to avoid an error. */
3180/* We use char because int might match the return type of a gcc2
3181 builtin and then its argument prototype would still apply. */
3182char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003183
Guido van Rossumf78abae1997-01-21 22:02:36 +00003184int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003185t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003186; return 0; }
3187EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003188if { (eval echo configure:3189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003189 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003190 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003191else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003192 echo "configure: failed program was:" >&5
3193 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003194 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003195 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003196fi
3197rm -f conftest*
3198LIBS="$ac_save_LIBS"
3199
3200fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003201if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003202 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003203 LIBS="-lnsl $LIBS"
3204else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003205 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003206fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003207 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003208echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003209echo "configure:3210: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003210ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003211if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003212 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003213else
3214 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003215LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003216cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003217#line 3218 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003218#include "confdefs.h"
3219/* Override any gcc2 internal prototype to avoid an error. */
3220/* We use char because int might match the return type of a gcc2
3221 builtin and then its argument prototype would still apply. */
3222char socket();
3223
3224int main() {
3225socket()
3226; return 0; }
3227EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003228if { (eval echo configure:3229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003229 rm -rf conftest*
3230 eval "ac_cv_lib_$ac_lib_var=yes"
3231else
3232 echo "configure: failed program was:" >&5
3233 cat conftest.$ac_ext >&5
3234 rm -rf conftest*
3235 eval "ac_cv_lib_$ac_lib_var=no"
3236fi
3237rm -f conftest*
3238LIBS="$ac_save_LIBS"
3239
3240fi
3241if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3242 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003243 LIBS="-lsocket $LIBS"
3244else
3245 echo "$ac_t""no" 1>&6
3246fi
3247 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003248;;
3249esac
3250case "$ac_sys_system" in
3251BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003252echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003253echo "configure:3254: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003254ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003255if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003256 echo $ac_n "(cached) $ac_c" 1>&6
3257else
3258 ac_save_LIBS="$LIBS"
3259LIBS="-lnet $LIBS $LIBS"
3260cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003261#line 3262 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003262#include "confdefs.h"
3263/* Override any gcc2 internal prototype to avoid an error. */
3264/* We use char because int might match the return type of a gcc2
3265 builtin and then its argument prototype would still apply. */
3266char socket();
3267
3268int main() {
3269socket()
3270; return 0; }
3271EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003272if { (eval echo configure:3273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003273 rm -rf conftest*
3274 eval "ac_cv_lib_$ac_lib_var=yes"
3275else
3276 echo "configure: failed program was:" >&5
3277 cat conftest.$ac_ext >&5
3278 rm -rf conftest*
3279 eval "ac_cv_lib_$ac_lib_var=no"
3280fi
3281rm -f conftest*
3282LIBS="$ac_save_LIBS"
3283
3284fi
3285if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3286 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003287 LIBS="-lnet $LIBS"
3288else
3289 echo "$ac_t""no" 1>&6
3290fi
3291 # BeOS
3292;;
3293esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003294
Guido van Rossuma68acba1996-07-31 17:36:39 +00003295echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003296echo "configure:3297: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003297# Check whether --with-libs or --without-libs was given.
3298if test "${with_libs+set}" = set; then
3299 withval="$with_libs"
3300
3301echo "$ac_t""$withval" 1>&6
3302LIBS="$withval $LIBS"
3303
3304else
3305 echo "$ac_t""no" 1>&6
3306fi
3307
Guido van Rossum7f43da71994-08-01 12:15:30 +00003308
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003309# Determine if signalmodule should be used.
3310
3311
3312echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003313echo "configure:3314: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003314# Check whether --with-signal-module or --without-signal-module was given.
3315if test "${with_signal_module+set}" = set; then
3316 withval="$with_signal_module"
3317 :
3318fi
3319
3320
3321if test -z "$with_signal_module"
3322then with_signal_module="yes"
3323fi
3324echo "$ac_t""$with_signal_module" 1>&6
3325
3326if test "${with_signal_module}" = "yes"; then
3327 USE_SIGNAL_MODULE=""
3328 SIGNAL_OBJS=""
3329else
3330 USE_SIGNAL_MODULE="#"
3331 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3332fi
3333
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003334# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003335
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003336USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003337
Guido van Rossumec2f0731997-01-22 20:54:01 +00003338echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003339echo "configure:3340: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003340
3341# Check whether --with-dec-threads or --without-dec-threads was given.
3342if test "${with_dec_threads+set}" = set; then
3343 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003344
3345echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003346LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003347if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003348 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003349fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003350else
3351 echo "$ac_t""no" 1>&6
3352fi
3353
3354
3355echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003356echo "configure:3357: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003357# Check whether --with-threads or --without-threads was given.
3358if test "${with_threads+set}" = set; then
3359 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003360 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003361fi
3362
3363
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003364# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003365# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003366if test "${with_thread+set}" = set; then
3367 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003368
3369with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003370fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003371
3372
3373if test -z "$with_threads"
3374then with_threads="yes"
3375fi
3376echo "$ac_t""$with_threads" 1>&6
3377
3378if test "$with_threads" = "no"
3379then
3380 USE_THREAD_MODULE="#"
3381else
Guido van Rossum40951012000-10-07 16:21:27 +00003382 if test ! -z "$with_threads" -a -d "$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003383 then LDFLAGS="$LDFLAGS -L$with_threads"
3384 fi
Guido van Rossum40951012000-10-07 16:21:27 +00003385 if test ! -z "$withval" -a -d "$withval"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003386 then LDFLAGS="$LDFLAGS -L$withval"
3387 fi
3388 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003389#define _REENTRANT 1
3390EOF
3391
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003392 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003393echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003394echo "configure:3395: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003395if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003396 echo $ac_n "(cached) $ac_c" 1>&6
3397else
3398 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003399#line 3400 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003400#include "confdefs.h"
3401#include <mach/cthreads.h>
3402EOF
3403ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum6abce912001-03-20 13:09:14 +00003404{ (eval echo configure:3405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003405ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003406if test -z "$ac_err"; then
3407 rm -rf conftest*
3408 eval "ac_cv_header_$ac_safe=yes"
3409else
3410 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003411 echo "configure: failed program was:" >&5
3412 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003413 rm -rf conftest*
3414 eval "ac_cv_header_$ac_safe=no"
3415fi
3416rm -f conftest*
3417fi
3418if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3419 echo "$ac_t""yes" 1>&6
3420 cat >> confdefs.h <<\EOF
3421#define WITH_THREAD 1
3422EOF
3423
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003424 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003425#define C_THREADS 1
3426EOF
3427
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003428 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003429else
3430 echo "$ac_t""no" 1>&6
3431
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003432 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003433echo "configure:3434: checking for --with-pth" >&5
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003434 # Check whether --with-pth or --without-pth was given.
3435if test "${with_pth+set}" = set; then
3436 withval="$with_pth"
3437
3438 echo "$ac_t""$withval" 1>&6
3439 cat >> confdefs.h <<\EOF
3440#define WITH_THREAD 1
3441EOF
3442
3443 cat >> confdefs.h <<\EOF
3444#define HAVE_PTH 1
3445EOF
3446
3447 LIBS="-lpth $LIBS"
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003448 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003449else
3450
3451 echo "$ac_t""no" 1>&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003452 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003453echo "configure:3454: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003454ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003455if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003456 echo $ac_n "(cached) $ac_c" 1>&6
3457else
3458 ac_save_LIBS="$LIBS"
3459LIBS="-lpthread $LIBS"
3460cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003461#line 3462 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003462#include "confdefs.h"
3463/* Override any gcc2 internal prototype to avoid an error. */
3464/* We use char because int might match the return type of a gcc2
3465 builtin and then its argument prototype would still apply. */
3466char pthread_create();
3467
3468int main() {
3469pthread_create()
3470; return 0; }
3471EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003472if { (eval echo configure:3473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003473 rm -rf conftest*
3474 eval "ac_cv_lib_$ac_lib_var=yes"
3475else
3476 echo "configure: failed program was:" >&5
3477 cat conftest.$ac_ext >&5
3478 rm -rf conftest*
3479 eval "ac_cv_lib_$ac_lib_var=no"
3480fi
3481rm -f conftest*
3482LIBS="$ac_save_LIBS"
3483
3484fi
3485if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3486 echo "$ac_t""yes" 1>&6
3487 cat >> confdefs.h <<\EOF
3488#define WITH_THREAD 1
3489EOF
3490
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003491 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003492#define _POSIX_THREADS 1
3493EOF
3494
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003495 LIBS="-lpthread $LIBS"
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003496 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003497else
3498 echo "$ac_t""no" 1>&6
3499
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003500 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003501echo "configure:3502: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003502if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003503 echo $ac_n "(cached) $ac_c" 1>&6
3504else
3505 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003506#line 3507 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003507#include "confdefs.h"
3508/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003509 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003510#include <assert.h>
3511/* Override any gcc2 internal prototype to avoid an error. */
3512/* We use char because int might match the return type of a gcc2
3513 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003514char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003515
3516int main() {
3517
3518/* The GNU C library defines this for functions which it implements
3519 to always fail with ENOSYS. Some functions are actually named
3520 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003521#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003522choke me
3523#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003524pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003525#endif
3526
3527; return 0; }
3528EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003529if { (eval echo configure:3530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003530 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003531 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003532else
3533 echo "configure: failed program was:" >&5
3534 cat conftest.$ac_ext >&5
3535 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003536 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003537fi
3538rm -f conftest*
3539fi
3540
Guido van Rossumea516321998-12-17 18:08:55 +00003541if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003542 echo "$ac_t""yes" 1>&6
3543 cat >> confdefs.h <<\EOF
3544#define WITH_THREAD 1
3545EOF
3546
Guido van Rossum5839e582000-10-09 19:52:35 +00003547 case $ac_sys_system in
3548 Darwin*) ;;
3549 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003550#define _POSIX_THREADS 1
3551EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003552;;
3553 esac
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003554 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003555else
3556 echo "$ac_t""no" 1>&6
3557
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003558 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003559echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003560echo "configure:3561: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003561if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003562 echo $ac_n "(cached) $ac_c" 1>&6
3563else
3564 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003565#line 3566 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003566#include "confdefs.h"
3567#include <kernel/OS.h>
3568EOF
3569ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum6abce912001-03-20 13:09:14 +00003570{ (eval echo configure:3571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003571ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003572if test -z "$ac_err"; then
3573 rm -rf conftest*
3574 eval "ac_cv_header_$ac_safe=yes"
3575else
3576 echo "$ac_err" >&5
3577 echo "configure: failed program was:" >&5
3578 cat conftest.$ac_ext >&5
3579 rm -rf conftest*
3580 eval "ac_cv_header_$ac_safe=no"
3581fi
3582rm -f conftest*
3583fi
3584if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3585 echo "$ac_t""yes" 1>&6
3586 cat >> confdefs.h <<\EOF
3587#define WITH_THREAD 1
3588EOF
3589
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003590 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003591#define BEOS_THREADS 1
3592EOF
3593
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003594 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003595else
3596 echo "$ac_t""no" 1>&6
3597
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003598 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003599echo "configure:3600: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003600ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003601if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003602 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003603else
3604 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003605LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003606cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003607#line 3608 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003608#include "confdefs.h"
3609/* Override any gcc2 internal prototype to avoid an error. */
3610/* We use char because int might match the return type of a gcc2
3611 builtin and then its argument prototype would still apply. */
3612char pthread_create();
3613
3614int main() {
3615pthread_create()
3616; return 0; }
3617EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003618if { (eval echo configure:3619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003619 rm -rf conftest*
3620 eval "ac_cv_lib_$ac_lib_var=yes"
3621else
3622 echo "configure: failed program was:" >&5
3623 cat conftest.$ac_ext >&5
3624 rm -rf conftest*
3625 eval "ac_cv_lib_$ac_lib_var=no"
3626fi
3627rm -f conftest*
3628LIBS="$ac_save_LIBS"
3629
3630fi
3631if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3632 echo "$ac_t""yes" 1>&6
3633 cat >> confdefs.h <<\EOF
3634#define WITH_THREAD 1
3635EOF
3636
3637 cat >> confdefs.h <<\EOF
3638#define _POSIX_THREADS 1
3639EOF
3640
3641 LIBS="$LIBS -lpthreads"
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003642 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003643else
3644 echo "$ac_t""no" 1>&6
3645
3646 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003647echo "configure:3648: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003648ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003649if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003650 echo $ac_n "(cached) $ac_c" 1>&6
3651else
3652 ac_save_LIBS="$LIBS"
3653LIBS="-lc_r $LIBS"
3654cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003655#line 3656 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003656#include "confdefs.h"
3657/* Override any gcc2 internal prototype to avoid an error. */
3658/* We use char because int might match the return type of a gcc2
3659 builtin and then its argument prototype would still apply. */
3660char pthread_create();
3661
3662int main() {
3663pthread_create()
3664; return 0; }
3665EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003666if { (eval echo configure:3667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003667 rm -rf conftest*
3668 eval "ac_cv_lib_$ac_lib_var=yes"
3669else
3670 echo "configure: failed program was:" >&5
3671 cat conftest.$ac_ext >&5
3672 rm -rf conftest*
3673 eval "ac_cv_lib_$ac_lib_var=no"
3674fi
3675rm -f conftest*
3676LIBS="$ac_save_LIBS"
3677
3678fi
3679if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3680 echo "$ac_t""yes" 1>&6
3681 cat >> confdefs.h <<\EOF
3682#define WITH_THREAD 1
3683EOF
3684
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003685 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003686#define _POSIX_THREADS 1
3687EOF
3688
Greg Steinadf63d62000-07-05 10:38:09 +00003689 LIBS="$LIBS -lc_r"
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003690 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003691else
3692 echo "$ac_t""no" 1>&6
3693
Greg Steinadf63d62000-07-05 10:38:09 +00003694 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003695echo "configure:3696: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003696ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003697if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003698 echo $ac_n "(cached) $ac_c" 1>&6
3699else
3700 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003701LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003702cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003703#line 3704 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003704#include "confdefs.h"
3705/* Override any gcc2 internal prototype to avoid an error. */
3706/* We use char because int might match the return type of a gcc2
3707 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003708char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003709
3710int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003711__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003712; return 0; }
3713EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003714if { (eval echo configure:3715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003715 rm -rf conftest*
3716 eval "ac_cv_lib_$ac_lib_var=yes"
3717else
3718 echo "configure: failed program was:" >&5
3719 cat conftest.$ac_ext >&5
3720 rm -rf conftest*
3721 eval "ac_cv_lib_$ac_lib_var=no"
3722fi
3723rm -f conftest*
3724LIBS="$ac_save_LIBS"
3725
3726fi
3727if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3728 echo "$ac_t""yes" 1>&6
3729 cat >> confdefs.h <<\EOF
3730#define WITH_THREAD 1
3731EOF
3732
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003733 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003734#define _POSIX_THREADS 1
3735EOF
3736
Greg Steinadf63d62000-07-05 10:38:09 +00003737 LIBS="$LIBS -lthread"
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003738 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003739else
3740 echo "$ac_t""no" 1>&6
3741
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003742 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003743echo "configure:3744: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003744ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
3745if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3746 echo $ac_n "(cached) $ac_c" 1>&6
3747else
3748 ac_save_LIBS="$LIBS"
3749LIBS="-lpthread $LIBS"
3750cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003751#line 3752 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003752#include "confdefs.h"
3753/* Override any gcc2 internal prototype to avoid an error. */
3754/* We use char because int might match the return type of a gcc2
3755 builtin and then its argument prototype would still apply. */
3756char __pthread_create_system();
3757
3758int main() {
3759__pthread_create_system()
3760; return 0; }
3761EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003762if { (eval echo configure:3763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003763 rm -rf conftest*
3764 eval "ac_cv_lib_$ac_lib_var=yes"
3765else
3766 echo "configure: failed program was:" >&5
3767 cat conftest.$ac_ext >&5
3768 rm -rf conftest*
3769 eval "ac_cv_lib_$ac_lib_var=no"
3770fi
3771rm -f conftest*
3772LIBS="$ac_save_LIBS"
3773
3774fi
3775if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3776 echo "$ac_t""yes" 1>&6
3777 cat >> confdefs.h <<\EOF
3778#define WITH_THREAD 1
3779EOF
3780
3781 cat >> confdefs.h <<\EOF
3782#define _POSIX_THREADS 1
3783EOF
3784
3785 LIBS="$LIBS -lpthread"
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003786 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003787else
3788 echo "$ac_t""no" 1>&6
3789
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003790 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003791echo "configure:3792: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003792ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003793if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003794 echo $ac_n "(cached) $ac_c" 1>&6
3795else
3796 ac_save_LIBS="$LIBS"
3797LIBS="-lcma $LIBS"
3798cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003799#line 3800 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003800#include "confdefs.h"
3801/* Override any gcc2 internal prototype to avoid an error. */
3802/* We use char because int might match the return type of a gcc2
3803 builtin and then its argument prototype would still apply. */
3804char pthread_create();
3805
3806int main() {
3807pthread_create()
3808; return 0; }
3809EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003810if { (eval echo configure:3811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003811 rm -rf conftest*
3812 eval "ac_cv_lib_$ac_lib_var=yes"
3813else
3814 echo "configure: failed program was:" >&5
3815 cat conftest.$ac_ext >&5
3816 rm -rf conftest*
3817 eval "ac_cv_lib_$ac_lib_var=no"
3818fi
3819rm -f conftest*
3820LIBS="$ac_save_LIBS"
3821
3822fi
3823if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3824 echo "$ac_t""yes" 1>&6
3825 cat >> confdefs.h <<\EOF
3826#define WITH_THREAD 1
3827EOF
3828
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003829 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003830#define _POSIX_THREADS 1
3831EOF
3832
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003833 LIBS="$LIBS -lcma"
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003834 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003835else
3836 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003837
3838 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003839fi
3840
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003841
Guido van Rossum627b2d71993-12-24 10:39:16 +00003842fi
3843
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003844fi
3845
Guido van Rossum0be3e491997-05-22 20:33:33 +00003846fi
3847
Guido van Rossum49545951997-12-02 19:28:29 +00003848fi
3849
Guido van Rossumb93a8621998-05-07 13:27:32 +00003850fi
3851
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003852fi
3853
Guido van Rossumad678af1998-10-02 14:42:15 +00003854fi
3855
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003856fi
3857
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003858fi
3859
Guido van Rossum0be3e491997-05-22 20:33:33 +00003860
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003861 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003862echo "configure:3863: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003863ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003864if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003865 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003866else
3867 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003868LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003869cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003870#line 3871 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003871#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003872/* Override any gcc2 internal prototype to avoid an error. */
3873/* We use char because int might match the return type of a gcc2
3874 builtin and then its argument prototype would still apply. */
3875char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003876
Guido van Rossumf78abae1997-01-21 22:02:36 +00003877int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003878usconfig()
3879; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003880EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003881if { (eval echo configure:3882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003882 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003883 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003884else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003885 echo "configure: failed program was:" >&5
3886 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003887 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003888 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003889fi
3890rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003891LIBS="$ac_save_LIBS"
3892
3893fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003894if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003895 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003896 cat >> confdefs.h <<\EOF
3897#define WITH_THREAD 1
3898EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003899
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003900 LIBS="$LIBS -lmpc"
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003901 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003902 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003903else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003904 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003905fi
3906
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003907 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003908echo "configure:3909: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003909ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003910if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003911 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003912else
3913 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003914LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003915cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003916#line 3917 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003917#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003918/* Override any gcc2 internal prototype to avoid an error. */
3919/* We use char because int might match the return type of a gcc2
3920 builtin and then its argument prototype would still apply. */
3921char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003922
Guido van Rossumf78abae1997-01-21 22:02:36 +00003923int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003924thr_create()
3925; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003926EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00003927if { (eval echo configure:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003928 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003929 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003930else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003931 echo "configure: failed program was:" >&5
3932 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003933 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003934 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003935fi
3936rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003937LIBS="$ac_save_LIBS"
3938
3939fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003940if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003941 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003942 cat >> confdefs.h <<\EOF
3943#define WITH_THREAD 1
3944EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003945
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003946 LIBS="$LIBS -lthread"
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00003947 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003948 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003949else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003950 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003951fi
3952
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00003953
3954 if test "$USE_THREAD_MODULE" != "#"
3955 then
3956 # If the above checks didn't disable threads, (at least) OSF1
3957 # needs this '-threads' argument during linking.
3958 case $ac_sys_system in
3959 OSF1) LDLAST=-threads;;
3960 esac
3961 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003962fi
3963
Barry Warsawef82cd72000-06-30 16:21:01 +00003964# Check for GC support
3965
3966USE_GC_MODULE=""
3967echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003968echo "configure:3969: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003969# Check whether --with-cycle-gc or --without-cycle-gc was given.
3970if test "${with_cycle_gc+set}" = set; then
3971 withval="$with_cycle_gc"
3972 :
3973fi
3974
3975
3976if test -z "$with_cycle_gc"
3977then with_cycle_gc="yes"
3978fi
3979if test "$with_cycle_gc" = "no"
3980then
3981 USE_GC_MODULE="#"
3982else
3983 cat >> confdefs.h <<\EOF
3984#define WITH_CYCLE_GC 1
3985EOF
3986
3987fi
3988echo "$ac_t""$with_cycle_gc" 1>&6
3989
Neil Schemenauera35c6882001-02-27 04:45:05 +00003990# Check for Python-specific malloc support
3991echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00003992echo "configure:3993: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00003993# Check whether --with-pymalloc or --without-pymalloc was given.
3994if test "${with_pymalloc+set}" = set; then
3995 withval="$with_pymalloc"
3996
3997if test "$withval" != no
3998then cat >> confdefs.h <<\EOF
3999#define WITH_PYMALLOC 1
4000EOF
4001 echo "$ac_t""yes" 1>&6
4002else echo "$ac_t""no" 1>&6
4003fi
4004else
4005 echo "$ac_t""no" 1>&6
4006fi
4007
4008
Barry Warsawef82cd72000-06-30 16:21:01 +00004009# Check for --with-wctype-functions
4010echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004011echo "configure:4012: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004012# Check whether --with-wctype-functions or --without-wctype-functions was given.
4013if test "${with_wctype_functions+set}" = set; then
4014 withval="$with_wctype_functions"
4015
4016if test "$withval" != no
4017then cat >> confdefs.h <<\EOF
4018#define WANT_WCTYPE_FUNCTIONS 1
4019EOF
4020 echo "$ac_t""yes" 1>&6
4021else echo "$ac_t""no" 1>&6
4022fi
4023else
4024 echo "$ac_t""no" 1>&6
4025fi
4026
4027
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004028# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004029
4030DLINCLDIR=/
4031
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004032echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004033echo "configure:4034: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004034# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004035if test "${with_sgi_dl+set}" = set; then
4036 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004037
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004038echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004039cat >> confdefs.h <<\EOF
4040#define WITH_SGI_DL 1
4041EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004042
Guido van Rossume97ee181999-12-20 21:27:22 +00004043DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004044dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004045if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004046then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004047else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004048fi
4049DLINCLDIR=${dldir}
4050LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004051else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004052 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004053fi
4054
4055
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004056echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004057echo "configure:4058: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004059if test "${with_dl_dld+set}" = set; then
4060 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004061
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004062echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004063cat >> confdefs.h <<\EOF
4064#define WITH_DL_DLD 1
4065EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004066
Guido van Rossume97ee181999-12-20 21:27:22 +00004067DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004068dldir=`echo "$withval" | sed 's/,.*//'`
4069dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004070if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004071then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004072else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004073fi
4074DLINCLDIR=${dldir}
4075LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004076else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004077 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004078fi
4079
4080
Guido van Rossume97ee181999-12-20 21:27:22 +00004081# the dlopen() function means we might want to use dynload_shlib.o. some
4082# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004083for ac_func in dlopen
4084do
4085echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004086echo "configure:4087: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004087if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004088 echo $ac_n "(cached) $ac_c" 1>&6
4089else
4090 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004091#line 4092 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004092#include "confdefs.h"
4093/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004094 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004095#include <assert.h>
4096/* Override any gcc2 internal prototype to avoid an error. */
4097/* We use char because int might match the return type of a gcc2
4098 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004099char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004100
4101int main() {
4102
4103/* The GNU C library defines this for functions which it implements
4104 to always fail with ENOSYS. Some functions are actually named
4105 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004106#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004107choke me
4108#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004109$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004110#endif
4111
4112; return 0; }
4113EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004114if { (eval echo configure:4115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004115 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004116 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004117else
4118 echo "configure: failed program was:" >&5
4119 cat conftest.$ac_ext >&5
4120 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004121 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004122fi
4123rm -f conftest*
4124fi
4125
Thomas Wouters3a584202000-08-05 23:28:51 +00004126if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004127 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004128 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4129 cat >> confdefs.h <<EOF
4130#define $ac_tr_func 1
4131EOF
4132
Guido van Rossume97ee181999-12-20 21:27:22 +00004133else
4134 echo "$ac_t""no" 1>&6
4135fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004136done
Guido van Rossume97ee181999-12-20 21:27:22 +00004137
4138
4139# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4140# loading of modules.
4141
4142echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004143echo "configure:4144: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004144if test -z "$DYNLOADFILE"
4145then
4146 case $ac_sys_system/$ac_sys_release in
4147 AIX*) DYNLOADFILE="dynload_aix.o";;
4148 BeOS*) DYNLOADFILE="dynload_beos.o";;
4149 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossum5839e582000-10-09 19:52:35 +00004150 Darwin/*|next/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004151 *)
4152 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4153 # out any dynamic loading
4154 if test "$ac_cv_func_dlopen" = yes
4155 then DYNLOADFILE="dynload_shlib.o"
4156 else DYNLOADFILE="dynload_stub.o"
4157 fi
4158 ;;
4159 esac
4160fi
4161echo "$ac_t""$DYNLOADFILE" 1>&6
4162if test "$DYNLOADFILE" != "dynload_stub.o"
4163then
4164 cat >> confdefs.h <<\EOF
4165#define HAVE_DYNAMIC_LOADING 1
4166EOF
4167
4168fi
4169
Guido van Rossum627b2d71993-12-24 10:39:16 +00004170# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00004171for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004172 flock fork fsync fdatasync fpathconf ftime ftruncate \
Andrew M. Kuchlinga9586c72001-01-08 17:58:56 +00004173 getgroups getlogin getpeername getpid getpwent getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00004174 kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004175 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004176 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004177 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00004178 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00004179 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004180 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters70c21a12000-07-14 14:28:33 +00004181 truncate uname waitpid _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004182do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004183echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004184echo "configure:4185: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004185if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004186 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004187else
4188 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004189#line 4190 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004190#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004191/* System header to define __stub macros and hopefully few prototypes,
4192 which can conflict with char $ac_func(); below. */
4193#include <assert.h>
4194/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004195/* We use char because int might match the return type of a gcc2
4196 builtin and then its argument prototype would still apply. */
4197char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004198
Guido van Rossumf78abae1997-01-21 22:02:36 +00004199int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004200
Guido van Rossum627b2d71993-12-24 10:39:16 +00004201/* The GNU C library defines this for functions which it implements
4202 to always fail with ENOSYS. Some functions are actually named
4203 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004204#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004205choke me
4206#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004207$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004208#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004209
Guido van Rossum7f43da71994-08-01 12:15:30 +00004210; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004211EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004212if { (eval echo configure:4213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004213 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004214 eval "ac_cv_func_$ac_func=yes"
4215else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004216 echo "configure: failed program was:" >&5
4217 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004218 rm -rf conftest*
4219 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004220fi
4221rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004222fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004223
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004224if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004225 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004226 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004227 cat >> confdefs.h <<EOF
4228#define $ac_tr_func 1
4229EOF
4230
4231else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004232 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004233fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004234done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004235
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004236
Fred Drake8cef4cf2000-06-28 16:40:38 +00004237# check for openpty and forkpty
4238
4239for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004240do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004241echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004242echo "configure:4243: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004243if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004244 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004245else
4246 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004247#line 4248 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004248#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004249/* System header to define __stub macros and hopefully few prototypes,
4250 which can conflict with char $ac_func(); below. */
4251#include <assert.h>
4252/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004253/* We use char because int might match the return type of a gcc2
4254 builtin and then its argument prototype would still apply. */
4255char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004256
Guido van Rossumf78abae1997-01-21 22:02:36 +00004257int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004258
Guido van Rossum627b2d71993-12-24 10:39:16 +00004259/* The GNU C library defines this for functions which it implements
4260 to always fail with ENOSYS. Some functions are actually named
4261 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004262#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004263choke me
4264#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004265$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004266#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004267
Guido van Rossum7f43da71994-08-01 12:15:30 +00004268; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004269EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004270if { (eval echo configure:4271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004271 rm -rf conftest*
4272 eval "ac_cv_func_$ac_func=yes"
4273else
4274 echo "configure: failed program was:" >&5
4275 cat conftest.$ac_ext >&5
4276 rm -rf conftest*
4277 eval "ac_cv_func_$ac_func=no"
4278fi
4279rm -f conftest*
4280fi
4281
4282if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4283 echo "$ac_t""yes" 1>&6
4284 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4285 cat >> confdefs.h <<EOF
4286#define $ac_tr_func 1
4287EOF
4288
4289else
4290 echo "$ac_t""no" 1>&6
4291echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004292echo "configure:4293: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004293ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004294if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004295 echo $ac_n "(cached) $ac_c" 1>&6
4296else
4297 ac_save_LIBS="$LIBS"
4298LIBS="-lutil $LIBS"
4299cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004300#line 4301 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004301#include "confdefs.h"
4302/* Override any gcc2 internal prototype to avoid an error. */
4303/* We use char because int might match the return type of a gcc2
4304 builtin and then its argument prototype would still apply. */
4305char openpty();
4306
4307int main() {
4308openpty()
4309; return 0; }
4310EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004311if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004312 rm -rf conftest*
4313 eval "ac_cv_lib_$ac_lib_var=yes"
4314else
4315 echo "configure: failed program was:" >&5
4316 cat conftest.$ac_ext >&5
4317 rm -rf conftest*
4318 eval "ac_cv_lib_$ac_lib_var=no"
4319fi
4320rm -f conftest*
4321LIBS="$ac_save_LIBS"
4322
4323fi
4324if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4325 echo "$ac_t""yes" 1>&6
4326 cat >> confdefs.h <<\EOF
4327#define HAVE_OPENPTY 1
4328EOF
4329 LIBS="$LIBS -lutil"
4330else
4331 echo "$ac_t""no" 1>&6
4332fi
4333
4334fi
4335done
4336
4337for ac_func in forkpty
4338do
4339echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004340echo "configure:4341: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004341if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004342 echo $ac_n "(cached) $ac_c" 1>&6
4343else
4344 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004345#line 4346 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004346#include "confdefs.h"
4347/* System header to define __stub macros and hopefully few prototypes,
4348 which can conflict with char $ac_func(); below. */
4349#include <assert.h>
4350/* Override any gcc2 internal prototype to avoid an error. */
4351/* We use char because int might match the return type of a gcc2
4352 builtin and then its argument prototype would still apply. */
4353char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004354
4355int main() {
4356
4357/* The GNU C library defines this for functions which it implements
4358 to always fail with ENOSYS. Some functions are actually named
4359 something starting with __ and the normal name is an alias. */
4360#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4361choke me
4362#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004363$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004364#endif
4365
4366; return 0; }
4367EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004368if { (eval echo configure:4369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004369 rm -rf conftest*
4370 eval "ac_cv_func_$ac_func=yes"
4371else
4372 echo "configure: failed program was:" >&5
4373 cat conftest.$ac_ext >&5
4374 rm -rf conftest*
4375 eval "ac_cv_func_$ac_func=no"
4376fi
4377rm -f conftest*
4378fi
4379
4380if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4381 echo "$ac_t""yes" 1>&6
4382 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4383 cat >> confdefs.h <<EOF
4384#define $ac_tr_func 1
4385EOF
4386
4387else
4388 echo "$ac_t""no" 1>&6
4389echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004390echo "configure:4391: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004391ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004392if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004393 echo $ac_n "(cached) $ac_c" 1>&6
4394else
4395 ac_save_LIBS="$LIBS"
4396LIBS="-lutil $LIBS"
4397cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004398#line 4399 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004399#include "confdefs.h"
4400/* Override any gcc2 internal prototype to avoid an error. */
4401/* We use char because int might match the return type of a gcc2
4402 builtin and then its argument prototype would still apply. */
4403char forkpty();
4404
4405int main() {
4406forkpty()
4407; return 0; }
4408EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004409if { (eval echo configure:4410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004410 rm -rf conftest*
4411 eval "ac_cv_lib_$ac_lib_var=yes"
4412else
4413 echo "configure: failed program was:" >&5
4414 cat conftest.$ac_ext >&5
4415 rm -rf conftest*
4416 eval "ac_cv_lib_$ac_lib_var=no"
4417fi
4418rm -f conftest*
4419LIBS="$ac_save_LIBS"
4420
4421fi
4422if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4423 echo "$ac_t""yes" 1>&6
4424 cat >> confdefs.h <<\EOF
4425#define HAVE_FORKPTY 1
4426EOF
4427 LIBS="$LIBS -lutil"
4428else
4429 echo "$ac_t""no" 1>&6
4430fi
4431
4432fi
4433done
4434
4435
4436# check for long file support functions
4437for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4438do
4439echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004440echo "configure:4441: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004441if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004442 echo $ac_n "(cached) $ac_c" 1>&6
4443else
4444 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004445#line 4446 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004446#include "confdefs.h"
4447/* System header to define __stub macros and hopefully few prototypes,
4448 which can conflict with char $ac_func(); below. */
4449#include <assert.h>
4450/* Override any gcc2 internal prototype to avoid an error. */
4451/* We use char because int might match the return type of a gcc2
4452 builtin and then its argument prototype would still apply. */
4453char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004454
4455int main() {
4456
4457/* The GNU C library defines this for functions which it implements
4458 to always fail with ENOSYS. Some functions are actually named
4459 something starting with __ and the normal name is an alias. */
4460#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4461choke me
4462#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004463$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004464#endif
4465
4466; return 0; }
4467EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004468if { (eval echo configure:4469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004469 rm -rf conftest*
4470 eval "ac_cv_func_$ac_func=yes"
4471else
4472 echo "configure: failed program was:" >&5
4473 cat conftest.$ac_ext >&5
4474 rm -rf conftest*
4475 eval "ac_cv_func_$ac_func=no"
4476fi
4477rm -f conftest*
4478fi
4479
4480if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4481 echo "$ac_t""yes" 1>&6
4482 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4483 cat >> confdefs.h <<EOF
4484#define $ac_tr_func 1
4485EOF
4486
4487else
4488 echo "$ac_t""no" 1>&6
4489fi
4490done
4491
4492
4493for ac_func in dup2 getcwd strdup strerror memmove
4494do
4495echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004496echo "configure:4497: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004497if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004498 echo $ac_n "(cached) $ac_c" 1>&6
4499else
4500 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004501#line 4502 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004502#include "confdefs.h"
4503/* System header to define __stub macros and hopefully few prototypes,
4504 which can conflict with char $ac_func(); below. */
4505#include <assert.h>
4506/* Override any gcc2 internal prototype to avoid an error. */
4507/* We use char because int might match the return type of a gcc2
4508 builtin and then its argument prototype would still apply. */
4509char $ac_func();
4510
4511int main() {
4512
4513/* The GNU C library defines this for functions which it implements
4514 to always fail with ENOSYS. Some functions are actually named
4515 something starting with __ and the normal name is an alias. */
4516#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4517choke me
4518#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004519$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004520#endif
4521
4522; return 0; }
4523EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004524if { (eval echo configure:4525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004525 rm -rf conftest*
4526 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004527else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004528 echo "configure: failed program was:" >&5
4529 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004530 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004531 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004532fi
4533rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004534fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004535
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004536if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004537 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004538 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4539 cat >> confdefs.h <<EOF
4540#define $ac_tr_func 1
4541EOF
4542
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004543else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004544 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004545LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004546fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004547done
4548
Guido van Rossumf78abae1997-01-21 22:02:36 +00004549
Thomas Wouters3a584202000-08-05 23:28:51 +00004550for ac_func in getpgrp
4551do
4552echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004553echo "configure:4554: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004554if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004555 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004556else
4557 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004558#line 4559 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004559#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004560/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004561 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004562#include <assert.h>
4563/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004564/* We use char because int might match the return type of a gcc2
4565 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004566char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004567
Guido van Rossumf78abae1997-01-21 22:02:36 +00004568int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004569
Guido van Rossum627b2d71993-12-24 10:39:16 +00004570/* The GNU C library defines this for functions which it implements
4571 to always fail with ENOSYS. Some functions are actually named
4572 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004573#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004574choke me
4575#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004576$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004577#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004578
4579; return 0; }
4580EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004581if { (eval echo configure:4582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004582 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004583 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004584else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004585 echo "configure: failed program was:" >&5
4586 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004587 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004588 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004589fi
4590rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004591fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004592
Thomas Wouters3a584202000-08-05 23:28:51 +00004593if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004594 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004595 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4596 cat >> confdefs.h <<EOF
4597#define $ac_tr_func 1
4598EOF
4599 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004600#line 4601 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004601#include "confdefs.h"
4602#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004603int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004604getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004605; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004606EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004607if { (eval echo configure:4608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004608 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004609 cat >> confdefs.h <<\EOF
4610#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004611EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004612
Guido van Rossumf78abae1997-01-21 22:02:36 +00004613else
4614 echo "configure: failed program was:" >&5
4615 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004616fi
4617rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004618else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004619 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004620fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004621done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004622
Thomas Wouters3a584202000-08-05 23:28:51 +00004623for ac_func in setpgrp
4624do
4625echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004626echo "configure:4627: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004627if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004628 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004629else
4630 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004631#line 4632 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004632#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004633/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004634 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004635#include <assert.h>
4636/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004637/* We use char because int might match the return type of a gcc2
4638 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004639char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004640
Guido van Rossumf78abae1997-01-21 22:02:36 +00004641int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004642
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004643/* The GNU C library defines this for functions which it implements
4644 to always fail with ENOSYS. Some functions are actually named
4645 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004646#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004647choke me
4648#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004649$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004650#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004651
4652; return 0; }
4653EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004654if { (eval echo configure:4655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004655 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004656 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004657else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004658 echo "configure: failed program was:" >&5
4659 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004660 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004661 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004662fi
4663rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004664fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004665
Thomas Wouters3a584202000-08-05 23:28:51 +00004666if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004667 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004668 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4669 cat >> confdefs.h <<EOF
4670#define $ac_tr_func 1
4671EOF
4672 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004673#line 4674 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004674#include "confdefs.h"
4675#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004676int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004677setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004678; return 0; }
4679EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004680if { (eval echo configure:4681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004681 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004682 cat >> confdefs.h <<\EOF
4683#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004684EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004685
Guido van Rossumf78abae1997-01-21 22:02:36 +00004686else
4687 echo "configure: failed program was:" >&5
4688 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004689fi
4690rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004691else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004692 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004693fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004694done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004695
Thomas Wouters3a584202000-08-05 23:28:51 +00004696for ac_func in gettimeofday
4697do
4698echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004699echo "configure:4700: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004700if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004701 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004702else
4703 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004704#line 4705 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004705#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004706/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004707 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004708#include <assert.h>
4709/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004710/* We use char because int might match the return type of a gcc2
4711 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004712char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004713
Guido van Rossumf78abae1997-01-21 22:02:36 +00004714int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004715
4716/* The GNU C library defines this for functions which it implements
4717 to always fail with ENOSYS. Some functions are actually named
4718 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004719#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004720choke me
4721#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004722$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004723#endif
4724
4725; return 0; }
4726EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004727if { (eval echo configure:4728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004728 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004729 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004730else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004731 echo "configure: failed program was:" >&5
4732 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004733 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004734 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004735fi
4736rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004737fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004738
Thomas Wouters3a584202000-08-05 23:28:51 +00004739if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004740 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004741 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4742 cat >> confdefs.h <<EOF
4743#define $ac_tr_func 1
4744EOF
4745 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004746#line 4747 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004747#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004748#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004749int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004750gettimeofday((struct timeval*)0,(struct timezone*)0);
4751; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004752EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004753if { (eval echo configure:4754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004754 :
4755else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004756 echo "configure: failed program was:" >&5
4757 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004758 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004759 cat >> confdefs.h <<\EOF
4760#define GETTIMEOFDAY_NO_TZ 1
4761EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004762
4763fi
4764rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004765else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004766 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004767fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004768done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004769
4770
4771# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004772echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004773echo "configure:4774: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004774if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004775 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004776else
4777 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004778#line 4779 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004779#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004780#include <sys/types.h>
4781#include <sys/time.h>
4782#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004783int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004784struct tm *tp;
4785; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004786EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004787if { (eval echo configure:4788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004788 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004789 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004790else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004791 echo "configure: failed program was:" >&5
4792 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004793 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004794 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004795fi
4796rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004797fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004798
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004799echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004800if test $ac_cv_header_time = yes; then
4801 cat >> confdefs.h <<\EOF
4802#define TIME_WITH_SYS_TIME 1
4803EOF
4804
4805fi
4806
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004807echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004808echo "configure:4809: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004809if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004810 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004811else
4812 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004813#line 4814 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004814#include "confdefs.h"
4815#include <sys/types.h>
4816#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004817int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004818struct tm *tp; tp->tm_sec;
4819; return 0; }
4820EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004821if { (eval echo configure:4822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004822 rm -rf conftest*
4823 ac_cv_struct_tm=time.h
4824else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004825 echo "configure: failed program was:" >&5
4826 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004827 rm -rf conftest*
4828 ac_cv_struct_tm=sys/time.h
4829fi
4830rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004831fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004832
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004833echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004834if test $ac_cv_struct_tm = sys/time.h; then
4835 cat >> confdefs.h <<\EOF
4836#define TM_IN_SYS_TIME 1
4837EOF
4838
4839fi
4840
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004841echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004842echo "configure:4843: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004843if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004844 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004845else
4846 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004847#line 4848 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004848#include "confdefs.h"
4849#include <sys/types.h>
4850#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004851int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004852struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004853; return 0; }
4854EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004855if { (eval echo configure:4856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004856 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004857 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004858else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004859 echo "configure: failed program was:" >&5
4860 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004861 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004862 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004863fi
4864rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004865fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004866
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004867echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4868if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004869 cat >> confdefs.h <<\EOF
4870#define HAVE_TM_ZONE 1
4871EOF
4872
4873else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004874 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004875echo "configure:4876: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004876if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004877 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004878else
4879 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004880#line 4881 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004881#include "confdefs.h"
4882#include <time.h>
4883#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004884extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004885#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004886int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004887atoi(*tzname);
4888; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004889EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004890if { (eval echo configure:4891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004891 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004892 ac_cv_var_tzname=yes
4893else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004894 echo "configure: failed program was:" >&5
4895 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004896 rm -rf conftest*
4897 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004898fi
4899rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004900fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004901
4902echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004903 if test $ac_cv_var_tzname = yes; then
4904 cat >> confdefs.h <<\EOF
4905#define HAVE_TZNAME 1
4906EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004907
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004908 fi
4909fi
4910
4911
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004912echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004913echo "configure:4914: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004914if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004915 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004916else
4917 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004918#line 4919 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004919#include "confdefs.h"
4920#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004921int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004922return altzone;
4923; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004924EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004925if { (eval echo configure:4926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004926 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004927 ac_cv_header_time_altzone=yes
4928else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004929 echo "configure: failed program was:" >&5
4930 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004931 rm -rf conftest*
4932 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004933fi
4934rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004935fi
4936
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004937echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004938if test $ac_cv_header_time_altzone = yes; then
4939 cat >> confdefs.h <<\EOF
4940#define HAVE_ALTZONE 1
4941EOF
4942
4943fi
4944
Guido van Rossumda88dad1995-01-26 00:46:29 +00004945was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004946echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004947echo "configure:4948: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004948cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004949#line 4950 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004950#include "confdefs.h"
4951
4952#include <sys/types.h>
4953#include <sys/select.h>
4954#include <sys/time.h>
4955
Guido van Rossumf78abae1997-01-21 22:02:36 +00004956int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004957;
4958; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004959EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004960if { (eval echo configure:4961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004961 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004962 cat >> confdefs.h <<\EOF
4963#define SYS_SELECT_WITH_SYS_TIME 1
4964EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004965 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004966else
4967 echo "configure: failed program was:" >&5
4968 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004969fi
4970rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004971echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004972
4973# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004974
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004975echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00004976echo "configure:4977: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004977if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004978 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004979else
4980 if test "$GCC" = yes; then
4981 # GCC predefines this symbol on systems where it applies.
4982cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00004983#line 4984 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004984#include "confdefs.h"
4985#ifdef __CHAR_UNSIGNED__
4986 yes
4987#endif
4988
4989EOF
4990if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4991 egrep "yes" >/dev/null 2>&1; then
4992 rm -rf conftest*
4993 ac_cv_c_char_unsigned=yes
4994else
4995 rm -rf conftest*
4996 ac_cv_c_char_unsigned=no
4997fi
4998rm -f conftest*
4999
5000else
5001if test "$cross_compiling" = yes; then
5002 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5003else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005004 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005005#line 5006 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005006#include "confdefs.h"
5007/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005008#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00005009#define volatile
5010#endif
5011main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00005012 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005013}
5014EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005015if { (eval echo configure:5016: \"$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 +00005016then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005017 ac_cv_c_char_unsigned=yes
5018else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005019 echo "configure: failed program was:" >&5
5020 cat conftest.$ac_ext >&5
5021 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005022 ac_cv_c_char_unsigned=no
5023fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005024rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005025fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005026
5027fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005028fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005029
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005030echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005031if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5032 cat >> confdefs.h <<\EOF
5033#define __CHAR_UNSIGNED__ 1
5034EOF
5035
5036fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005037
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005038echo $ac_n "checking for working const""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005039echo "configure:5040: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005040if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005041 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005042else
5043 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005044#line 5045 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005045#include "confdefs.h"
5046
Guido van Rossumf78abae1997-01-21 22:02:36 +00005047int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005048
5049/* Ultrix mips cc rejects this. */
Fred Drakea1a84e72001-03-06 05:52:16 +00005050typedef int charset[2]; const charset x;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005051/* SunOS 4.1.1 cc rejects this. */
5052char const *const *ccp;
5053char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005054/* NEC SVR4.0.2 mips cc rejects this. */
5055struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005056static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005057/* AIX XL C 1.02.0.0 rejects this.
5058 It does not let you subtract one const X* pointer from another in an arm
5059 of an if-expression whose if-part is not a constant expression */
5060const char *g = "string";
5061ccp = &g + (g ? g-g : 0);
5062/* HPUX 7.0 cc rejects these. */
5063++ccp;
5064p = (char**) ccp;
5065ccp = (char const *const *) p;
5066{ /* SCO 3.2v4 cc rejects this. */
5067 char *t;
5068 char const *s = 0 ? (char *) 0 : (char const *) 0;
5069
5070 *t++ = 0;
5071}
5072{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005073 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005074 const int *foo = &x[0];
5075 ++foo;
5076}
5077{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5078 typedef const int *iptr;
5079 iptr p = 0;
5080 ++p;
5081}
5082{ /* AIX XL C 1.02.0.0 rejects this saying
5083 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5084 struct s { int j; const int *ap[3]; };
5085 struct s *b; b->j = 5;
5086}
5087{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5088 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005089}
5090
5091; return 0; }
5092EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005093if { (eval echo configure:5094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005094 rm -rf conftest*
5095 ac_cv_c_const=yes
5096else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005097 echo "configure: failed program was:" >&5
5098 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005099 rm -rf conftest*
5100 ac_cv_c_const=no
5101fi
5102rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005103fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005104
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005105echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005106if test $ac_cv_c_const = no; then
5107 cat >> confdefs.h <<\EOF
5108#define const
5109EOF
5110
5111fi
5112
5113
Guido van Rossumda88dad1995-01-26 00:46:29 +00005114works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005115echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005116echo "configure:5117: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005117cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005118#line 5119 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005119#include "confdefs.h"
5120
Guido van Rossumf78abae1997-01-21 22:02:36 +00005121int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005122volatile int x; x = 0;
5123; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005124EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005125if { (eval echo configure:5126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005126 rm -rf conftest*
5127 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005128else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005129 echo "configure: failed program was:" >&5
5130 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005131 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005132 cat >> confdefs.h <<\EOF
5133#define volatile
5134EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005135
5136fi
5137rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005138echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005139
Guido van Rossumda88dad1995-01-26 00:46:29 +00005140works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005141echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005142echo "configure:5143: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005143cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005144#line 5145 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005145#include "confdefs.h"
5146
Guido van Rossumf78abae1997-01-21 22:02:36 +00005147int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005148signed char c;
5149; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005150EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005151if { (eval echo configure:5152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005152 rm -rf conftest*
5153 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005154else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005155 echo "configure: failed program was:" >&5
5156 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005157 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005158 cat >> confdefs.h <<\EOF
5159#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00005160EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005161
5162fi
5163rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005164echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005165
Guido van Rossumda88dad1995-01-26 00:46:29 +00005166have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005167echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005168echo "configure:5169: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005169cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005170#line 5171 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005171#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005172int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005173int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005174return foo(10);
5175; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005176EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005177if { (eval echo configure:5178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005178 rm -rf conftest*
5179 cat >> confdefs.h <<\EOF
5180#define HAVE_PROTOTYPES 1
5181EOF
5182 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005183else
5184 echo "configure: failed program was:" >&5
5185 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005186fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005187rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005188echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005189
Guido van Rossumda88dad1995-01-26 00:46:29 +00005190works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005191echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005192echo "configure:5193: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005193cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005194#line 5195 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005195#include "confdefs.h"
5196
5197#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00005198int foo(int x, ...) {
5199 va_list va;
5200 va_start(va, x);
5201 va_arg(va, int);
5202 va_arg(va, char *);
5203 va_arg(va, double);
5204 return 0;
5205}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005206
Guido van Rossumf78abae1997-01-21 22:02:36 +00005207int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005208return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005209; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005210EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005211if { (eval echo configure:5212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005212 rm -rf conftest*
5213 cat >> confdefs.h <<\EOF
5214#define HAVE_STDARG_PROTOTYPES 1
5215EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005216 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005217else
5218 echo "configure: failed program was:" >&5
5219 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005220fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005221rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005222echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005223
Guido van Rossumda88dad1995-01-26 00:46:29 +00005224if test "$have_prototypes" = yes; then
5225bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005226echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005227echo "configure:5228: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005228cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005229#line 5230 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005230#include "confdefs.h"
5231#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005232int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005233char **t;execve("@",t,t);
5234; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005235EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005236if { (eval echo configure:5237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005237 :
5238else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005239 echo "configure: failed program was:" >&5
5240 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005241 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005242 cat >> confdefs.h <<\EOF
5243#define BAD_EXEC_PROTOTYPES 1
5244EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005245 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005246fi
5247rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005248echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005249fi
5250
Guido van Rossumda88dad1995-01-26 00:46:29 +00005251bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005252echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005253echo "configure:5254: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005254if test "$cross_compiling" = yes; then
5255 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5256else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005257 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005258#line 5259 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005259#include "confdefs.h"
5260
5261struct s { int a; int b; };
5262static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005263int foobar() {
5264 static int random;
5265 random = (int) &foo;
5266 return random;
5267}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005268static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005269main() {
5270 exit(!((int)&foo == foobar()));
5271}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005272
5273EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005274if { (eval echo configure:5275: \"$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 +00005275then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005276 :
5277else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005278 echo "configure: failed program was:" >&5
5279 cat conftest.$ac_ext >&5
5280 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005281 cat >> confdefs.h <<\EOF
5282#define BAD_STATIC_FORWARD 1
5283EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005284 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005285fi
5286rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005287fi
5288
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005289echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005290
Guido van Rossumda88dad1995-01-26 00:46:29 +00005291va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005292echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005293echo "configure:5294: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005294cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005295#line 5296 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005296#include "confdefs.h"
5297
5298#ifdef HAVE_STDARG_PROTOTYPES
5299#include <stdarg.h>
5300#else
5301#include <varargs.h>
5302#endif
5303
Guido van Rossumf78abae1997-01-21 22:02:36 +00005304int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005305va_list list1, list2; list1 = list2;
5306; return 0; }
5307EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005308if { (eval echo configure:5309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005309 :
5310else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005311 echo "configure: failed program was:" >&5
5312 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005313 rm -rf conftest*
5314 cat >> confdefs.h <<\EOF
5315#define VA_LIST_IS_ARRAY 1
5316EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005317 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005318fi
5319rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005320echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005321
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005322# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5323echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005324echo "configure:5325: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005325if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005326 echo $ac_n "(cached) $ac_c" 1>&6
5327else
5328 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005329#line 5330 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005330#include "confdefs.h"
5331/* System header to define __stub macros and hopefully few prototypes,
5332 which can conflict with char gethostbyname_r(); below. */
5333#include <assert.h>
5334/* Override any gcc2 internal prototype to avoid an error. */
5335/* We use char because int might match the return type of a gcc2
5336 builtin and then its argument prototype would still apply. */
5337char gethostbyname_r();
5338
5339int main() {
5340
5341/* The GNU C library defines this for functions which it implements
5342 to always fail with ENOSYS. Some functions are actually named
5343 something starting with __ and the normal name is an alias. */
5344#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5345choke me
5346#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005347gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005348#endif
5349
5350; return 0; }
5351EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005352if { (eval echo configure:5353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005353 rm -rf conftest*
5354 eval "ac_cv_func_gethostbyname_r=yes"
5355else
5356 echo "configure: failed program was:" >&5
5357 cat conftest.$ac_ext >&5
5358 rm -rf conftest*
5359 eval "ac_cv_func_gethostbyname_r=no"
5360fi
5361rm -f conftest*
5362fi
5363
5364if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5365 echo "$ac_t""yes" 1>&6
5366
5367 cat >> confdefs.h <<\EOF
5368#define HAVE_GETHOSTBYNAME_R 1
5369EOF
5370
5371 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005372echo "configure:5373: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005373 OLD_CFLAGS=$CFLAGS
5374 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
5375 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005376#line 5377 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005377#include "confdefs.h"
5378
5379# include <netdb.h>
5380
5381int main() {
5382
5383 char *name;
5384 struct hostent *he, *res;
5385 char buffer[2048];
5386 int buflen = 2048;
5387 int h_errnop;
5388
5389 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
5390
5391; return 0; }
5392EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005393if { (eval echo configure:5394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005394 rm -rf conftest*
5395
5396 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005397#define HAVE_GETHOSTBYNAME_R 1
5398EOF
5399
5400 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005401#define HAVE_GETHOSTBYNAME_R_6_ARG 1
5402EOF
5403
5404 echo "$ac_t""yes" 1>&6
5405
5406else
5407 echo "configure: failed program was:" >&5
5408 cat conftest.$ac_ext >&5
5409 rm -rf conftest*
5410
5411 echo "$ac_t""no" 1>&6
5412 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005413echo "configure:5414: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005414 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005415#line 5416 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005416#include "confdefs.h"
5417
5418# include <netdb.h>
5419
5420int main() {
5421
5422 char *name;
5423 struct hostent *he;
5424 char buffer[2048];
5425 int buflen = 2048;
5426 int h_errnop;
5427
5428 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
5429
5430; return 0; }
5431EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005432if { (eval echo configure:5433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005433 rm -rf conftest*
5434
5435 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005436#define HAVE_GETHOSTBYNAME_R 1
5437EOF
5438
5439 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005440#define HAVE_GETHOSTBYNAME_R_5_ARG 1
5441EOF
5442
5443 echo "$ac_t""yes" 1>&6
5444
5445else
5446 echo "configure: failed program was:" >&5
5447 cat conftest.$ac_ext >&5
5448 rm -rf conftest*
5449
5450 echo "$ac_t""no" 1>&6
5451 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005452echo "configure:5453: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005453 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005454#line 5455 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005455#include "confdefs.h"
5456
5457# include <netdb.h>
5458
5459int main() {
5460
5461 char *name;
5462 struct hostent *he;
5463 struct hostent_data data;
5464
5465 (void) gethostbyname_r(name, he, &data);
5466
5467; return 0; }
5468EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005469if { (eval echo configure:5470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005470 rm -rf conftest*
5471
5472 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005473#define HAVE_GETHOSTBYNAME_R 1
5474EOF
5475
5476 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005477#define HAVE_GETHOSTBYNAME_R_3_ARG 1
5478EOF
5479
5480 echo "$ac_t""yes" 1>&6
5481
5482else
5483 echo "configure: failed program was:" >&5
5484 cat conftest.$ac_ext >&5
5485 rm -rf conftest*
5486
5487 echo "$ac_t""no" 1>&6
5488
5489fi
5490rm -f conftest*
5491
5492fi
5493rm -f conftest*
5494
5495fi
5496rm -f conftest*
5497 CFLAGS=$OLD_CFLAGS
5498
5499else
5500 echo "$ac_t""no" 1>&6
5501
Thomas Wouters3a584202000-08-05 23:28:51 +00005502 for ac_func in gethostbyname
5503do
5504echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005505echo "configure:5506: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005506if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005507 echo $ac_n "(cached) $ac_c" 1>&6
5508else
5509 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005510#line 5511 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005511#include "confdefs.h"
5512/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005513 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005514#include <assert.h>
5515/* Override any gcc2 internal prototype to avoid an error. */
5516/* We use char because int might match the return type of a gcc2
5517 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005518char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005519
5520int main() {
5521
5522/* The GNU C library defines this for functions which it implements
5523 to always fail with ENOSYS. Some functions are actually named
5524 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005525#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005526choke me
5527#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005528$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005529#endif
5530
5531; return 0; }
5532EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005533if { (eval echo configure:5534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005534 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005535 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005536else
5537 echo "configure: failed program was:" >&5
5538 cat conftest.$ac_ext >&5
5539 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005540 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005541fi
5542rm -f conftest*
5543fi
5544
Thomas Wouters3a584202000-08-05 23:28:51 +00005545if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005546 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005547 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5548 cat >> confdefs.h <<EOF
5549#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005550EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00005551
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005552else
5553 echo "$ac_t""no" 1>&6
5554fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005555done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005556
5557
5558fi
5559
5560
5561
5562
5563
5564
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005565
Guido van Rossum627b2d71993-12-24 10:39:16 +00005566# checks for system services
5567# (none yet)
5568
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005569# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005570echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005571echo "configure:5572: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005572if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005573 echo $ac_n "(cached) $ac_c" 1>&6
5574else
5575 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005576#line 5577 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005577#include "confdefs.h"
5578/* System header to define __stub macros and hopefully few prototypes,
5579 which can conflict with char __fpu_control(); below. */
5580#include <assert.h>
5581/* Override any gcc2 internal prototype to avoid an error. */
5582/* We use char because int might match the return type of a gcc2
5583 builtin and then its argument prototype would still apply. */
5584char __fpu_control();
5585
5586int main() {
5587
5588/* The GNU C library defines this for functions which it implements
5589 to always fail with ENOSYS. Some functions are actually named
5590 something starting with __ and the normal name is an alias. */
5591#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5592choke me
5593#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005594__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005595#endif
5596
5597; return 0; }
5598EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005599if { (eval echo configure:5600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005600 rm -rf conftest*
5601 eval "ac_cv_func___fpu_control=yes"
5602else
5603 echo "configure: failed program was:" >&5
5604 cat conftest.$ac_ext >&5
5605 rm -rf conftest*
5606 eval "ac_cv_func___fpu_control=no"
5607fi
5608rm -f conftest*
5609fi
5610
5611if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5612 echo "$ac_t""yes" 1>&6
5613 :
5614else
5615 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005616echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005617echo "configure:5618: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005618ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005619if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005620 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005621else
5622 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005623LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005624cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005625#line 5626 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005626#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005627/* Override any gcc2 internal prototype to avoid an error. */
5628/* We use char because int might match the return type of a gcc2
5629 builtin and then its argument prototype would still apply. */
5630char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005631
Guido van Rossumf78abae1997-01-21 22:02:36 +00005632int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005633__fpu_control()
5634; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005635EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005636if { (eval echo configure:5637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005637 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005638 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005639else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005640 echo "configure: failed program was:" >&5
5641 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005642 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005643 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005644fi
5645rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005646LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005647
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005648fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005649if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005650 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005651 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5652 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005653 cat >> confdefs.h <<EOF
5654#define $ac_tr_lib 1
5655EOF
5656
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005657 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005658
5659else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005660 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005661fi
5662
5663
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005664fi
5665
5666
Guido van Rossum7f253911997-05-09 02:42:48 +00005667# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005668echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005669echo "configure:5670: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005670# Check whether --with-fpectl or --without-fpectl was given.
5671if test "${with_fpectl+set}" = set; then
5672 withval="$with_fpectl"
5673
5674if test "$withval" != no
5675then cat >> confdefs.h <<\EOF
5676#define WANT_SIGFPE_HANDLER 1
5677EOF
5678 echo "$ac_t""yes" 1>&6
5679else echo "$ac_t""no" 1>&6
5680fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005681else
5682 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005683fi
5684
5685
Guido van Rossum7f43da71994-08-01 12:15:30 +00005686# check for --with-libm=...
5687
Guido van Rossum563e7081996-09-10 18:20:48 +00005688case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00005689Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005690next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005691BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005692*) LIBM=-lm
5693esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005694echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005695echo "configure:5696: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005696# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005697if test "${with_libm+set}" = set; then
5698 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005699
Guido van Rossum7f253911997-05-09 02:42:48 +00005700if test "$withval" = no
5701then LIBM=
5702 echo "$ac_t""force LIBM empty" 1>&6
5703elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005704then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005705 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005706else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005707fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005708else
5709 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005710fi
5711
5712
5713# check for --with-libc=...
5714
Guido van Rossum7f253911997-05-09 02:42:48 +00005715echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005716echo "configure:5717: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005717# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005718if test "${with_libc+set}" = set; then
5719 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005720
Guido van Rossum7f253911997-05-09 02:42:48 +00005721if test "$withval" = no
5722then LIBC=
5723 echo "$ac_t""force LIBC empty" 1>&6
5724elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005725then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005726 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005727else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005728fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005729else
5730 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005731fi
5732
5733
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005734# check for hypot() in math library
5735LIBS_SAVE=$LIBS
5736LIBS="$LIBS $LIBM"
5737for ac_func in hypot
5738do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005739echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005740echo "configure:5741: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005741if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005742 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005743else
5744 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005745#line 5746 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005746#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005747/* System header to define __stub macros and hopefully few prototypes,
5748 which can conflict with char $ac_func(); below. */
5749#include <assert.h>
5750/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005751/* We use char because int might match the return type of a gcc2
5752 builtin and then its argument prototype would still apply. */
5753char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005754
Guido van Rossumf78abae1997-01-21 22:02:36 +00005755int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005756
5757/* The GNU C library defines this for functions which it implements
5758 to always fail with ENOSYS. Some functions are actually named
5759 something starting with __ and the normal name is an alias. */
5760#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5761choke me
5762#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005763$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005764#endif
5765
5766; return 0; }
5767EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005768if { (eval echo configure:5769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005769 rm -rf conftest*
5770 eval "ac_cv_func_$ac_func=yes"
5771else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005772 echo "configure: failed program was:" >&5
5773 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005774 rm -rf conftest*
5775 eval "ac_cv_func_$ac_func=no"
5776fi
5777rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005778fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005779
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005780if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5781 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005782 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5783 cat >> confdefs.h <<EOF
5784#define $ac_tr_func 1
5785EOF
5786
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005787else
5788 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005789LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005790fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005791done
5792
Guido van Rossumf78abae1997-01-21 22:02:36 +00005793
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005794LIBS=$LIBS_SAVE
5795
Guido van Rossumad713701997-07-10 22:42:38 +00005796# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005797echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005798echo "configure:5799: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005799if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005800 echo $ac_n "(cached) $ac_c" 1>&6
5801else
5802 if test "$cross_compiling" = yes; then
5803 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5804else
5805 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005806#line 5807 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005807#include "confdefs.h"
5808#include <stdio.h>
5809#ifdef HAVE_STDLIB
5810#include <stdlib.h>
5811#else
5812char *malloc(), *realloc();
5813int *free();
5814#endif
5815main() {
5816 char *p;
5817 p = malloc(0);
5818 if (p == NULL) exit(1);
5819 p = realloc(p, 0);
5820 if (p == NULL) exit(1);
5821 free(p);
5822 exit(0);
5823}
5824EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005825if { (eval echo configure:5826: \"$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 +00005826then
5827 ac_cv_malloc_zero=nonnull
5828else
5829 echo "configure: failed program was:" >&5
5830 cat conftest.$ac_ext >&5
5831 rm -fr conftest*
5832 ac_cv_malloc_zero=null
5833fi
5834rm -fr conftest*
5835fi
5836
5837fi
5838
5839echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5840if test "$ac_cv_malloc_zero" = null
5841then
5842 cat >> confdefs.h <<\EOF
5843#define MALLOC_ZERO_RETURNS_NULL 1
5844EOF
5845
5846fi
5847
Guido van Rossumef2255b2000-03-10 22:30:29 +00005848# check for wchar.h
5849ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5850echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005851echo "configure:5852: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005852if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005853 echo $ac_n "(cached) $ac_c" 1>&6
5854else
5855 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005856#line 5857 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005857#include "confdefs.h"
5858#include <wchar.h>
5859EOF
5860ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum6abce912001-03-20 13:09:14 +00005861{ (eval echo configure:5862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005862ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5863if test -z "$ac_err"; then
5864 rm -rf conftest*
5865 eval "ac_cv_header_$ac_safe=yes"
5866else
5867 echo "$ac_err" >&5
5868 echo "configure: failed program was:" >&5
5869 cat conftest.$ac_ext >&5
5870 rm -rf conftest*
5871 eval "ac_cv_header_$ac_safe=no"
5872fi
5873rm -f conftest*
5874fi
5875if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5876 echo "$ac_t""yes" 1>&6
5877 cat >> confdefs.h <<\EOF
5878#define HAVE_WCHAR_H 1
5879EOF
5880 wchar_h="yes"
5881else
5882 echo "$ac_t""no" 1>&6
5883wchar_h="no"
5884
5885fi
5886
5887
5888# check for usable wchar_t
5889usable_wchar_t="unkown"
5890echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005891echo "configure:5892: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005892if test "$cross_compiling" = yes; then
5893 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5894else
5895 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005896#line 5897 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005897#include "confdefs.h"
5898
5899#include "wchar.h"
5900#include "wctype.h"
5901main() {
5902 wchar_t s;
5903 if (sizeof(s) == 2)
5904 exit(0);
5905 else
5906 exit(1);
5907}
5908
5909EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005910if { (eval echo configure:5911: \"$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 +00005911then
5912 cat >> confdefs.h <<\EOF
5913#define HAVE_USABLE_WCHAR_T 1
5914EOF
5915 usable_wchar_t="yes"
5916else
5917 echo "configure: failed program was:" >&5
5918 cat conftest.$ac_ext >&5
5919 rm -fr conftest*
5920 usable_wchar_t="no"
5921fi
5922rm -fr conftest*
5923fi
5924
5925echo "$ac_t""$usable_wchar_t" 1>&6
5926
5927# check for endianness
5928echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00005929echo "configure:5930: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005930if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005931 echo $ac_n "(cached) $ac_c" 1>&6
5932else
5933 ac_cv_c_bigendian=unknown
5934# See if sys/param.h defines the BYTE_ORDER macro.
5935cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005936#line 5937 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005937#include "confdefs.h"
5938#include <sys/types.h>
5939#include <sys/param.h>
5940int main() {
5941
5942#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5943 bogus endian macros
5944#endif
5945; return 0; }
5946EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005947if { (eval echo configure:5948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005948 rm -rf conftest*
5949 # It does; now see whether it defined to BIG_ENDIAN or not.
5950cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005951#line 5952 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005952#include "confdefs.h"
5953#include <sys/types.h>
5954#include <sys/param.h>
5955int main() {
5956
5957#if BYTE_ORDER != BIG_ENDIAN
5958 not big endian
5959#endif
5960; return 0; }
5961EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005962if { (eval echo configure:5963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005963 rm -rf conftest*
5964 ac_cv_c_bigendian=yes
5965else
5966 echo "configure: failed program was:" >&5
5967 cat conftest.$ac_ext >&5
5968 rm -rf conftest*
5969 ac_cv_c_bigendian=no
5970fi
5971rm -f conftest*
5972else
5973 echo "configure: failed program was:" >&5
5974 cat conftest.$ac_ext >&5
5975fi
5976rm -f conftest*
5977if test $ac_cv_c_bigendian = unknown; then
5978if test "$cross_compiling" = yes; then
5979 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5980else
5981 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005982#line 5983 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005983#include "confdefs.h"
5984main () {
5985 /* Are we little or big endian? From Harbison&Steele. */
5986 union
5987 {
5988 long l;
5989 char c[sizeof (long)];
5990 } u;
5991 u.l = 1;
5992 exit (u.c[sizeof (long) - 1] == 1);
5993}
5994EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00005995if { (eval echo configure:5996: \"$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 +00005996then
5997 ac_cv_c_bigendian=no
5998else
5999 echo "configure: failed program was:" >&5
6000 cat conftest.$ac_ext >&5
6001 rm -fr conftest*
6002 ac_cv_c_bigendian=yes
6003fi
6004rm -fr conftest*
6005fi
6006
6007fi
6008fi
6009
6010echo "$ac_t""$ac_cv_c_bigendian" 1>&6
6011if test $ac_cv_c_bigendian = yes; then
6012 cat >> confdefs.h <<\EOF
6013#define WORDS_BIGENDIAN 1
6014EOF
6015
6016fi
6017
6018
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006019# Check whether right shifting a negative integer extends the sign bit
6020# or fills with zeros (like the Cray J90, according to Tim Peters).
6021echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00006022echo "configure:6023: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006023if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00006024 echo $ac_n "(cached) $ac_c" 1>&6
6025else
6026
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006027if test "$cross_compiling" = yes; then
6028 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6029else
6030 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00006031#line 6032 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006032#include "confdefs.h"
6033
6034int main()
6035{
Vladimir Marangozova6180282000-07-12 05:05:06 +00006036 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006037}
6038
6039EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00006040if { (eval echo configure:6041: \"$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 +00006041then
6042 ac_cv_rshift_extends_sign=yes
6043else
6044 echo "configure: failed program was:" >&5
6045 cat conftest.$ac_ext >&5
6046 rm -fr conftest*
6047 ac_cv_rshift_extends_sign=no
6048fi
6049rm -fr conftest*
6050fi
6051
6052fi
6053
6054echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
6055if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006056then
6057 cat >> confdefs.h <<\EOF
6058#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
6059EOF
6060
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006061fi
6062
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006063# check for getc_unlocked and related locking functions
6064echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00006065echo "configure:6066: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006066if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
6067 echo $ac_n "(cached) $ac_c" 1>&6
6068else
6069
6070cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00006071#line 6072 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006072#include "confdefs.h"
6073#include <stdio.h>
6074int main() {
6075
6076 FILE *f = fopen("/dev/null", "r");
6077 flockfile(f);
6078 getc_unlocked(f);
6079 funlockfile(f);
6080
6081; return 0; }
6082EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00006083if { (eval echo configure:6084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006084 rm -rf conftest*
6085 ac_cv_have_getc_unlocked=yes
6086else
6087 echo "configure: failed program was:" >&5
6088 cat conftest.$ac_ext >&5
6089 rm -rf conftest*
6090 ac_cv_have_getc_unlocked=no
6091fi
6092rm -f conftest*
6093fi
6094
6095echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
6096if test "$ac_cv_have_getc_unlocked" = yes
6097then
6098 cat >> confdefs.h <<\EOF
6099#define HAVE_GETC_UNLOCKED 1
6100EOF
6101
6102fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006103
Guido van Rossum95713eb2000-05-18 20:53:31 +00006104# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
6105# Add sys/socket.h to confdefs.h
6106cat >> confdefs.h <<\EOF
6107#ifdef HAVE_SYS_SOCKET_H
6108#include <sys/socket.h>
6109#endif
6110EOF
6111echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00006112echo "configure:6113: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006113if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00006114 echo $ac_n "(cached) $ac_c" 1>&6
6115else
6116 cat > conftest.$ac_ext <<EOF
Guido van Rossum6abce912001-03-20 13:09:14 +00006117#line 6118 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00006118#include "confdefs.h"
6119#include <sys/types.h>
6120#if STDC_HEADERS
6121#include <stdlib.h>
6122#include <stddef.h>
6123#endif
6124EOF
6125if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6126 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6127 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006128 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00006129else
6130 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006131 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00006132fi
6133rm -f conftest*
6134
6135fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006136echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
6137if test $ac_cv_type_socklen_t = no; then
6138 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00006139#define socklen_t int
6140EOF
6141
6142fi
6143
6144
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00006145# Add Python/ prefix to LIBOBJS
6146libobjs=$LIBOBJS
6147LIBOBJS=
6148for obj in $libobjs; do
6149 LIBOBJS="$LIBOBJS Python/$obj"
6150done
6151
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006152#AC_MSG_CHECKING(for Modules/Setup)
6153#if test ! -f Modules/Setup ; then
6154# if test ! -d Modules ; then
6155# mkdir Modules
6156# fi
6157# cp "$srcdir/Modules/Setup.dist" Modules/Setup
6158# AC_MSG_RESULT(creating)
6159#else
6160# AC_MSG_RESULT(already exists)
6161#fi
6162
6163
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00006164SRCDIRS="Parser Grammar Objects Python Modules"
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00006165echo $ac_n "checking for build directories""... $ac_c" 1>&6
Guido van Rossum6abce912001-03-20 13:09:14 +00006166echo "configure:6167: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006167for dir in $SRCDIRS; do
6168 if test ! -d $dir; then
6169 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00006170 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006171done
6172echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00006173
Guido van Rossum627b2d71993-12-24 10:39:16 +00006174# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006175trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006176cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006177# This file is a shell script that caches the results of configure
6178# tests run on this system so they can be shared between configure
6179# scripts and configure runs. It is not useful on other systems.
6180# If it contains results you don't want to keep, you may remove or edit it.
6181#
6182# By default, configure uses ./config.cache as the cache file,
6183# creating it if it does not exist already. You can give configure
6184# the --cache-file=FILE option to use a different cache file; that is
6185# what configure does when it calls configure scripts in
6186# subdirectories, so they share the cache.
6187# Giving --cache-file=/dev/null disables caching, for debugging configure.
6188# config.status only pays attention to the cache file if you give it the
6189# --recheck option to rerun configure.
6190#
6191EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006192# The following way of writing the cache mishandles newlines in values,
6193# but we know of no workaround that is simple, portable, and efficient.
6194# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006195# Ultrix sh set writes to stderr and can't be redirected directly,
6196# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006197(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006198 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006199 *ac_space=\ *)
6200 # `set' does not quote correctly, so add quotes (double-quote substitution
6201 # turns \\\\ into \\, and sed turns \\ into \).
6202 sed -n \
6203 -e "s/'/'\\\\''/g" \
6204 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6205 ;;
6206 *)
6207 # `set' quotes correctly as required by POSIX, so do not add quotes.
6208 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6209 ;;
6210 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006211if cmp -s $cache_file confcache; then
6212 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006213else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006214 if test -w $cache_file; then
6215 echo "updating cache $cache_file"
6216 cat confcache > $cache_file
6217 else
6218 echo "not updating unwritable cache $cache_file"
6219 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006220fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006221rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00006222
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006223trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006224
6225test "x$prefix" = xNONE && prefix=$ac_default_prefix
6226# Let make expand exec_prefix.
6227test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00006228
Guido van Rossum7f43da71994-08-01 12:15:30 +00006229# Any assignment to VPATH causes Sun make to only execute
6230# the first set of double-colon rules, so remove it if not needed.
6231# If there is a colon in the path, we need to keep it.
6232if test "x$srcdir" = x.; then
6233 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6234fi
6235
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006236trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00006237
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006238DEFS=-DHAVE_CONFIG_H
6239
6240# Without the "./", some shells look in PATH for config.status.
6241: ${CONFIG_STATUS=./config.status}
6242
6243echo creating $CONFIG_STATUS
6244rm -f $CONFIG_STATUS
6245cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006246#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00006247# Generated automatically by configure.
6248# Run this file to recreate the current configuration.
6249# This directory was configured as follows,
6250# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6251#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006252# $0 $ac_configure_args
6253#
6254# Compiler output produced by configure, useful for debugging
6255# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00006256
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006257ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006258for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00006259do
Guido van Rossum7f43da71994-08-01 12:15:30 +00006260 case "\$ac_option" in
6261 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006262 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6263 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00006264 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006265 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006266 exit 0 ;;
6267 -help | --help | --hel | --he | --h)
6268 echo "\$ac_cs_usage"; exit 0 ;;
6269 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006270 esac
6271done
6272
Guido van Rossum7f43da71994-08-01 12:15:30 +00006273ac_given_srcdir=$srcdir
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006274ac_given_INSTALL="$INSTALL"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006275
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00006276trap 'rm -fr `echo "Makefile.pre Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006277EOF
6278cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006279
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006280# Protect against being on the right side of a sed subst in config.status.
6281sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6282 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006283$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00006284$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006285s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006286s%@CFLAGS@%$CFLAGS%g
6287s%@CPPFLAGS@%$CPPFLAGS%g
6288s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006289s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006290s%@DEFS@%$DEFS%g
6291s%@LDFLAGS@%$LDFLAGS%g
6292s%@LIBS@%$LIBS%g
6293s%@exec_prefix@%$exec_prefix%g
6294s%@prefix@%$prefix%g
6295s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006296s%@bindir@%$bindir%g
6297s%@sbindir@%$sbindir%g
6298s%@libexecdir@%$libexecdir%g
6299s%@datadir@%$datadir%g
6300s%@sysconfdir@%$sysconfdir%g
6301s%@sharedstatedir@%$sharedstatedir%g
6302s%@localstatedir@%$localstatedir%g
6303s%@libdir@%$libdir%g
6304s%@includedir@%$includedir%g
6305s%@oldincludedir@%$oldincludedir%g
6306s%@infodir@%$infodir%g
6307s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00006308s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006309s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00006310s%@SGI_ABI@%$SGI_ABI%g
Martin v. Löwis22352952000-12-13 17:37:02 +00006311s%@CXX@%$CXX%g
Guido van Rossumca563f22001-01-23 01:52:44 +00006312s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006313s%@CC@%$CC%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006314s%@EXEEXT@%$EXEEXT%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00006315s%@LIBRARY@%$LIBRARY%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006316s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumca563f22001-01-23 01:52:44 +00006317s%@DLLLIBRARY@%$DLLLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00006318s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006319s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006320s%@AR@%$AR%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006321s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006322s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006323s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006324s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006325s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006326s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006327s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006328s%@SO@%$SO%g
6329s%@LDSHARED@%$LDSHARED%g
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00006330s%@BLDSHARED@%$BLDSHARED%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006331s%@CCSHARED@%$CCSHARED%g
6332s%@LINKFORSHARED@%$LINKFORSHARED%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00006333s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006334s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
6335s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
Guido van Rossum009f7871997-12-04 00:51:42 +00006336s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00006337s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00006338s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006339s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00006340s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006341s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006342s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
6343s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
6344s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006345s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006346s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006347s%@LIBM@%$LIBM%g
6348s%@LIBC@%$LIBC%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006349s%@SRCDIRS@%$SRCDIRS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006350
6351CEOF
6352EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006353
6354cat >> $CONFIG_STATUS <<\EOF
6355
6356# Split the substitutions into bite-sized pieces for seds with
6357# small command number limits, like on Digital OSF/1 and HP-UX.
6358ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6359ac_file=1 # Number of current file.
6360ac_beg=1 # First line for current file.
6361ac_end=$ac_max_sed_cmds # Line after last line for current file.
6362ac_more_lines=:
6363ac_sed_cmds=""
6364while $ac_more_lines; do
6365 if test $ac_beg -gt 1; then
6366 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6367 else
6368 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6369 fi
6370 if test ! -s conftest.s$ac_file; then
6371 ac_more_lines=false
6372 rm -f conftest.s$ac_file
6373 else
6374 if test -z "$ac_sed_cmds"; then
6375 ac_sed_cmds="sed -f conftest.s$ac_file"
6376 else
6377 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6378 fi
6379 ac_file=`expr $ac_file + 1`
6380 ac_beg=$ac_end
6381 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6382 fi
6383done
6384if test -z "$ac_sed_cmds"; then
6385 ac_sed_cmds=cat
6386fi
6387EOF
6388
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006389cat >> $CONFIG_STATUS <<EOF
6390
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00006391CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006392EOF
6393cat >> $CONFIG_STATUS <<\EOF
6394for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006395 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006396 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006397 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006398 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6399 *) ac_file_in="${ac_file}.in" ;;
6400 esac
6401
Guido van Rossumf78abae1997-01-21 22:02:36 +00006402 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006403
6404 # Remove last slash and all that follows it. Not all systems have dirname.
6405 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6406 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6407 # The file is in a subdirectory.
6408 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006409 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006410 # A "../" for each directory in $ac_dir_suffix.
6411 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6412 else
6413 ac_dir_suffix= ac_dots=
6414 fi
6415
6416 case "$ac_given_srcdir" in
6417 .) srcdir=.
6418 if test -z "$ac_dots"; then top_srcdir=.
6419 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6420 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6421 *) # Relative path.
6422 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6423 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6424 esac
6425
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006426 case "$ac_given_INSTALL" in
6427 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6428 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6429 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006430
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006431 echo creating "$ac_file"
6432 rm -f "$ac_file"
6433 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6434 case "$ac_file" in
6435 *Makefile*) ac_comsub="1i\\
6436# $configure_input" ;;
6437 *) ac_comsub= ;;
6438 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006439
6440 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 +00006441 sed -e "$ac_comsub
6442s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006443s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006444s%@top_srcdir@%$top_srcdir%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006445s%@INSTALL@%$INSTALL%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00006446" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00006447fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00006448rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006449
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006450# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6451# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00006452#
6453# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006454ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6455ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006456ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006457ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006458# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006459ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6460ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006461ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006462ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006463# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006464ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6465ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006466ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006467ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006468
Guido van Rossumf78abae1997-01-21 22:02:36 +00006469if test "${CONFIG_HEADERS+set}" != set; then
6470EOF
6471cat >> $CONFIG_STATUS <<EOF
6472 CONFIG_HEADERS="config.h"
6473EOF
6474cat >> $CONFIG_STATUS <<\EOF
6475fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006476for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006477 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006478 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006479 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006480 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6481 *) ac_file_in="${ac_file}.in" ;;
6482 esac
6483
Guido van Rossum7f43da71994-08-01 12:15:30 +00006484 echo creating $ac_file
6485
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006486 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006487 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6488 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006489
6490EOF
6491
6492# Transform confdefs.h into a sed script conftest.vals that substitutes
6493# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006494# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006495# Protect against being in an unquoted here document in config.status.
6496rm -f conftest.vals
6497cat > conftest.hdr <<\EOF
6498s/[\\&%]/\\&/g
6499s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006500s%#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 +00006501s%ac_d%ac_u%gp
6502s%ac_u%ac_e%gp
6503EOF
6504sed -n -f conftest.hdr confdefs.h > conftest.vals
6505rm -f conftest.hdr
6506
6507# This sed command replaces #undef with comments. This is necessary, for
6508# example, in the case of _POSIX_SOURCE, which is predefined and required
6509# on some systems where configure will not decide to define it.
6510cat >> conftest.vals <<\EOF
6511s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6512EOF
6513
6514# Break up conftest.vals because some shells have a limit on
6515# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006516
6517rm -f conftest.tail
6518while :
6519do
6520 ac_lines=`grep -c . conftest.vals`
6521 # grep -c gives empty output for an empty file on some AIX systems.
6522 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6523 # Write a limited-size here document to conftest.frag.
6524 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6525 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6526 echo 'CEOF
6527 sed -f conftest.frag conftest.in > conftest.out
6528 rm -f conftest.in
6529 mv conftest.out conftest.in
6530' >> $CONFIG_STATUS
6531 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6532 rm -f conftest.vals
6533 mv conftest.tail conftest.vals
6534done
6535rm -f conftest.vals
6536
6537cat >> $CONFIG_STATUS <<\EOF
6538 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006539 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006540 cat conftest.in >> conftest.h
6541 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006542 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006543 echo "$ac_file is unchanged"
6544 rm -f conftest.h
6545 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006546 # Remove last slash and all that follows it. Not all systems have dirname.
6547 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6548 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6549 # The file is in a subdirectory.
6550 test ! -d "$ac_dir" && mkdir "$ac_dir"
6551 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006552 rm -f $ac_file
6553 mv conftest.h $ac_file
6554 fi
6555fi; done
6556
Guido van Rossumf78abae1997-01-21 22:02:36 +00006557EOF
6558cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006559
Guido van Rossumf78abae1997-01-21 22:02:36 +00006560EOF
6561cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006562
6563exit 0
6564EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006565chmod +x $CONFIG_STATUS
6566rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006567test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006568
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00006569
6570echo "creating Setup"
6571if test ! -f Modules/Setup
6572then
6573 cp $srcdir/Modules/Setup.dist Modules/Setup
6574fi
6575
6576echo "creating Setup.local"
6577if test ! -f Modules/Setup.local
6578then
6579 echo "# Edit this file for local setup changes" >Modules/Setup.local
6580fi
6581
6582echo "creating Makefile"
6583$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
6584 -s Modules Modules/Setup.config \
6585 Modules/Setup Modules/Setup.local
Neil Schemenauerc761fc82001-02-19 04:50:49 +00006586mv config.c Modules