blob: e545eda8b25135ebdbc7c354d6f5565b58b47a62 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003# From configure.in Revision: 1.231
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
Fred Drake109d9862001-07-11 06:27:56 +000029 --with-pydebug build with Py_DEBUG defined"
30ac_help="$ac_help
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000031 --enable-ipv6 Enable ipv6 (with ipv4) support
32 --disable-ipv6 Disable ipv6 support"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000033ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000034 --with-libs='lib1 ...' link against additional libs"
Guido van Rossuma68acba1996-07-31 17:36:39 +000035ac_help="$ac_help
Neil Schemenauerd32c2492001-01-24 17:25:28 +000036 --with-signal-module disable/enable signal module"
37ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000038 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000039ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000040 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000041ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000042 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000043ac_help="$ac_help
Guido van Rossum9e8181b2000-09-19 00:46:46 +000044 --with-pth use GNU pth threading libraries"
45ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000046 --with(out)-cycle-gc disable/enable garbage collection"
47ac_help="$ac_help
Neil Schemenauera35c6882001-02-27 04:45:05 +000048 --with(out)-pymalloc disable/enable specialized mallocs"
49ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000050 --with-wctype-functions use wctype.h functions"
51ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000052 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000053ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000054 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000055ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000056 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000057ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000058 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000059ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000060 --with-libc=STRING C library"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000061ac_help="$ac_help
62 --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)"
Guido van Rossum627b2d71993-12-24 10:39:16 +000063
Guido van Rossum7f43da71994-08-01 12:15:30 +000064# Initialize some variables set by options.
65# The variables have the same names as the options, with
66# dashes changed to underlines.
67build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000068cache_file=./config.cache
69exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000070host=NONE
71no_create=
72nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000073no_recursion=
74prefix=NONE
75program_prefix=NONE
76program_suffix=NONE
77program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000078silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000079site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000080srcdir=
81target=NONE
82verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000083x_includes=NONE
84x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000085bindir='${exec_prefix}/bin'
86sbindir='${exec_prefix}/sbin'
87libexecdir='${exec_prefix}/libexec'
88datadir='${prefix}/share'
89sysconfdir='${prefix}/etc'
90sharedstatedir='${prefix}/com'
91localstatedir='${prefix}/var'
92libdir='${exec_prefix}/lib'
93includedir='${prefix}/include'
94oldincludedir='/usr/include'
95infodir='${prefix}/info'
96mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000097
98# Initialize some other variables.
99subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000100MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000101SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +0000102# Maximum number of lines to put in a shell here document.
103ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +0000104
105ac_prev=
106for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000107do
Guido van Rossum627b2d71993-12-24 10:39:16 +0000108
Guido van Rossum7f43da71994-08-01 12:15:30 +0000109 # If the previous option needs an argument, assign it.
110 if test -n "$ac_prev"; then
111 eval "$ac_prev=\$ac_option"
112 ac_prev=
113 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000114 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000115
Guido van Rossum7f43da71994-08-01 12:15:30 +0000116 case "$ac_option" in
117 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
118 *) ac_optarg= ;;
119 esac
120
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000121 # Accept the important Cygnus configure options, so we can diagnose typos.
122
Guido van Rossum7f43da71994-08-01 12:15:30 +0000123 case "$ac_option" in
124
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000125 -bindir | --bindir | --bindi | --bind | --bin | --bi)
126 ac_prev=bindir ;;
127 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
128 bindir="$ac_optarg" ;;
129
130 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000131 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000132 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000133 build="$ac_optarg" ;;
134
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000135 -cache-file | --cache-file | --cache-fil | --cache-fi \
136 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
137 ac_prev=cache_file ;;
138 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
139 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
140 cache_file="$ac_optarg" ;;
141
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000142 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
143 ac_prev=datadir ;;
144 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
145 | --da=*)
146 datadir="$ac_optarg" ;;
147
Guido van Rossum7f43da71994-08-01 12:15:30 +0000148 -disable-* | --disable-*)
149 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000150 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000151 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000152 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000153 fi
154 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
155 eval "enable_${ac_feature}=no" ;;
156
157 -enable-* | --enable-*)
158 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000159 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000160 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000161 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000162 fi
163 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
164 case "$ac_option" in
165 *=*) ;;
166 *) ac_optarg=yes ;;
167 esac
168 eval "enable_${ac_feature}='$ac_optarg'" ;;
169
Guido van Rossum7f43da71994-08-01 12:15:30 +0000170 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
171 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
172 | --exec | --exe | --ex)
173 ac_prev=exec_prefix ;;
174 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
175 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
176 | --exec=* | --exe=* | --ex=*)
177 exec_prefix="$ac_optarg" ;;
178
179 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000180 # Obsolete; use --with-gas.
181 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000182
183 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000184 # Omit some internal or obsolete options to make the list less imposing.
185 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000186 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000187Usage: configure [options] [host]
188Options: [defaults in brackets after descriptions]
189Configuration:
190 --cache-file=FILE cache test results in FILE
191 --help print this message
192 --no-create do not create output files
193 --quiet, --silent do not print \`checking...' messages
194 --version print the version of autoconf that created configure
195Directory and file names:
196 --prefix=PREFIX install architecture-independent files in PREFIX
197 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000198 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000199 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000200 --bindir=DIR user executables in DIR [EPREFIX/bin]
201 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
202 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
203 --datadir=DIR read-only architecture-independent data in DIR
204 [PREFIX/share]
205 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
206 --sharedstatedir=DIR modifiable architecture-independent data in DIR
207 [PREFIX/com]
208 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
209 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
210 --includedir=DIR C header files in DIR [PREFIX/include]
211 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
212 --infodir=DIR info documentation in DIR [PREFIX/info]
213 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000214 --srcdir=DIR find the sources in DIR [configure dir or ..]
215 --program-prefix=PREFIX prepend PREFIX to installed program names
216 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000217 --program-transform-name=PROGRAM
218 run sed PROGRAM on installed program names
219EOF
220 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000221Host type:
222 --build=BUILD configure for building on BUILD [BUILD=HOST]
223 --host=HOST configure for HOST [guessed]
224 --target=TARGET configure for TARGET [TARGET=HOST]
225Features and packages:
226 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
227 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
228 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
229 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
230 --x-includes=DIR X include files are in DIR
231 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000232EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000233 if test -n "$ac_help"; then
234 echo "--enable and --with options recognized:$ac_help"
235 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000236 exit 0 ;;
237
238 -host | --host | --hos | --ho)
239 ac_prev=host ;;
240 -host=* | --host=* | --hos=* | --ho=*)
241 host="$ac_optarg" ;;
242
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000243 -includedir | --includedir | --includedi | --included | --include \
244 | --includ | --inclu | --incl | --inc)
245 ac_prev=includedir ;;
246 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
247 | --includ=* | --inclu=* | --incl=* | --inc=*)
248 includedir="$ac_optarg" ;;
249
250 -infodir | --infodir | --infodi | --infod | --info | --inf)
251 ac_prev=infodir ;;
252 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
253 infodir="$ac_optarg" ;;
254
255 -libdir | --libdir | --libdi | --libd)
256 ac_prev=libdir ;;
257 -libdir=* | --libdir=* | --libdi=* | --libd=*)
258 libdir="$ac_optarg" ;;
259
260 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
261 | --libexe | --libex | --libe)
262 ac_prev=libexecdir ;;
263 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
264 | --libexe=* | --libex=* | --libe=*)
265 libexecdir="$ac_optarg" ;;
266
267 -localstatedir | --localstatedir | --localstatedi | --localstated \
268 | --localstate | --localstat | --localsta | --localst \
269 | --locals | --local | --loca | --loc | --lo)
270 ac_prev=localstatedir ;;
271 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
272 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
273 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
274 localstatedir="$ac_optarg" ;;
275
276 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
277 ac_prev=mandir ;;
278 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
279 mandir="$ac_optarg" ;;
280
Guido van Rossum7f43da71994-08-01 12:15:30 +0000281 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000282 # Obsolete; use --without-fp.
283 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000284
285 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
286 | --no-cr | --no-c)
287 no_create=yes ;;
288
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000289 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
290 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
291 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000292
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000293 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
294 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
295 | --oldin | --oldi | --old | --ol | --o)
296 ac_prev=oldincludedir ;;
297 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
298 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
299 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
300 oldincludedir="$ac_optarg" ;;
301
Guido van Rossum7f43da71994-08-01 12:15:30 +0000302 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
303 ac_prev=prefix ;;
304 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
305 prefix="$ac_optarg" ;;
306
307 -program-prefix | --program-prefix | --program-prefi | --program-pref \
308 | --program-pre | --program-pr | --program-p)
309 ac_prev=program_prefix ;;
310 -program-prefix=* | --program-prefix=* | --program-prefi=* \
311 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
312 program_prefix="$ac_optarg" ;;
313
314 -program-suffix | --program-suffix | --program-suffi | --program-suff \
315 | --program-suf | --program-su | --program-s)
316 ac_prev=program_suffix ;;
317 -program-suffix=* | --program-suffix=* | --program-suffi=* \
318 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
319 program_suffix="$ac_optarg" ;;
320
321 -program-transform-name | --program-transform-name \
322 | --program-transform-nam | --program-transform-na \
323 | --program-transform-n | --program-transform- \
324 | --program-transform | --program-transfor \
325 | --program-transfo | --program-transf \
326 | --program-trans | --program-tran \
327 | --progr-tra | --program-tr | --program-t)
328 ac_prev=program_transform_name ;;
329 -program-transform-name=* | --program-transform-name=* \
330 | --program-transform-nam=* | --program-transform-na=* \
331 | --program-transform-n=* | --program-transform-=* \
332 | --program-transform=* | --program-transfor=* \
333 | --program-transfo=* | --program-transf=* \
334 | --program-trans=* | --program-tran=* \
335 | --progr-tra=* | --program-tr=* | --program-t=*)
336 program_transform_name="$ac_optarg" ;;
337
338 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
339 | -silent | --silent | --silen | --sile | --sil)
340 silent=yes ;;
341
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000342 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
343 ac_prev=sbindir ;;
344 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
345 | --sbi=* | --sb=*)
346 sbindir="$ac_optarg" ;;
347
348 -sharedstatedir | --sharedstatedir | --sharedstatedi \
349 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
350 | --sharedst | --shareds | --shared | --share | --shar \
351 | --sha | --sh)
352 ac_prev=sharedstatedir ;;
353 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
354 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
355 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
356 | --sha=* | --sh=*)
357 sharedstatedir="$ac_optarg" ;;
358
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000359 -site | --site | --sit)
360 ac_prev=site ;;
361 -site=* | --site=* | --sit=*)
362 site="$ac_optarg" ;;
363
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
365 ac_prev=srcdir ;;
366 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
367 srcdir="$ac_optarg" ;;
368
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000369 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
370 | --syscon | --sysco | --sysc | --sys | --sy)
371 ac_prev=sysconfdir ;;
372 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
373 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
374 sysconfdir="$ac_optarg" ;;
375
Guido van Rossum7f43da71994-08-01 12:15:30 +0000376 -target | --target | --targe | --targ | --tar | --ta | --t)
377 ac_prev=target ;;
378 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
379 target="$ac_optarg" ;;
380
381 -v | -verbose | --verbose | --verbos | --verbo | --verb)
382 verbose=yes ;;
383
384 -version | --version | --versio | --versi | --vers)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000385 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000386 exit 0 ;;
387
388 -with-* | --with-*)
389 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000390 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000391 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000393 fi
394 ac_package=`echo $ac_package| sed 's/-/_/g'`
395 case "$ac_option" in
396 *=*) ;;
397 *) ac_optarg=yes ;;
398 esac
399 eval "with_${ac_package}='$ac_optarg'" ;;
400
401 -without-* | --without-*)
402 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000403 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000404 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000405 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000406 fi
407 ac_package=`echo $ac_package| sed 's/-/_/g'`
408 eval "with_${ac_package}=no" ;;
409
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000410 --x)
411 # Obsolete; use --with-x.
412 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000413
414 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
415 | --x-incl | --x-inc | --x-in | --x-i)
416 ac_prev=x_includes ;;
417 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
418 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
419 x_includes="$ac_optarg" ;;
420
421 -x-libraries | --x-libraries | --x-librarie | --x-librari \
422 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
423 ac_prev=x_libraries ;;
424 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
425 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
426 x_libraries="$ac_optarg" ;;
427
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000428 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000429 ;;
430
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000431 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000432 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000433 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000434 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000435 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000436 { 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 +0000437 fi
438 nonopt="$ac_option"
439 ;;
440
441 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000442done
443
Guido van Rossum7f43da71994-08-01 12:15:30 +0000444if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000445 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000446fi
447
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000448trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000449
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000450# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000451# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000452# 1 file creation
453# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000454# 3 some systems may open it to /dev/tty
455# 4 used on the Kubota Titan
456# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000457# 5 compiler messages saved in config.log
458if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000459 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000460else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000461 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000462fi
463exec 5>./config.log
464
465echo "\
466This file contains any messages produced by compilers while
467running configure, to aid debugging if configure makes a mistake.
468" 1>&5
469
470# Strip out --no-create and --no-recursion so they do not pile up.
471# Also quote any args containing shell metacharacters.
472ac_configure_args=
473for ac_arg
474do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000475 case "$ac_arg" in
476 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
477 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000478 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
479 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
480 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
481 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
482 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483 esac
484done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000485
486# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000487# Only set these to C if already set. These must not be set unconditionally
488# because not all systems understand e.g. LANG=C (notably SCO).
489# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
490# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000491if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000492if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
493if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
494if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000495
Guido van Rossum7f43da71994-08-01 12:15:30 +0000496# confdefs.h avoids OS command line length limits that DEFS can exceed.
497rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000498# AIX cpp loses on an empty file, so make sure it contains at least a newline.
499echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000500
501# A filename unique to this package, relative to the directory that
502# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000503ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000504
505# Find the source files, if location was not specified.
506if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000507 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000508 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000509 ac_prog=$0
510 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
511 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
512 srcdir=$ac_confdir
513 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000514 srcdir=..
515 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000516else
517 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000518fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000519if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000520 if test "$ac_srcdir_defaulted" = yes; then
521 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000522 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000523 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000524 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000525fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000526srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
527
528# Prefer explicitly selected file to automatically selected ones.
529if test -z "$CONFIG_SITE"; then
530 if test "x$prefix" != xNONE; then
531 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
532 else
533 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
534 fi
535fi
536for ac_site_file in $CONFIG_SITE; do
537 if test -r "$ac_site_file"; then
538 echo "loading site script $ac_site_file"
539 . "$ac_site_file"
540 fi
541done
542
543if test -r "$cache_file"; then
544 echo "loading cache $cache_file"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000545 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000546else
547 echo "creating cache $cache_file"
548 > $cache_file
549fi
550
Guido van Rossum7f43da71994-08-01 12:15:30 +0000551ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000552# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000553ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000555ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000556cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000557
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000558ac_exeext=
559ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000560if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
561 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
562 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
563 ac_n= ac_c='
564' ac_t=' '
565 else
566 ac_n=-n ac_c= ac_t=
567 fi
568else
569 ac_n= ac_c='\c' ac_t=
570fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000571
Guido van Rossum0a516c91994-09-12 10:58:40 +0000572
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000573
Guido van Rossum627b2d71993-12-24 10:39:16 +0000574
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000575# Set VERSION so we only need to edit in one place (i.e., here)
576
Guido van Rossum6db412b2001-04-18 04:37:57 +0000577VERSION=2.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000578
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +0000579# Arguments passed to configure.
580
581CONFIG_ARGS="$ac_configure_args"
582
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000583# NEXTSTEP|MacOSX|Darwin stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000584if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000585
586 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000587echo "configure:588: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000588 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000589if test "${with_next_archs+set}" = set; then
590 withval="$with_next_archs"
591
Guido van Rossum563e7081996-09-10 18:20:48 +0000592 if test -n "$withval"; then
593 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
594 # GCC does not currently support multi archs on the NeXT
595 with_gcc=no
596 fi
597 echo "$ac_t""$with_next_archs" 1>&6
598
599else
600 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000601fi
602
Guido van Rossum563e7081996-09-10 18:20:48 +0000603
604 if test -z "$MACHDEP"
605 then
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000606 ac_sys_system=`uname -s`
607 if test "$ac_sys_system" = "Darwin" ; then
608 ac_sys_release=`uname -r`
609 else
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000610 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000611 sed -e 's/://' -e 's/\./_/'` && \
612 ac_sys_system=next && ac_sys_release=$4
613 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000614
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000615 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000616 fi
617fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000618
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000619# Check whether --with-next-framework or --without-next-framework was given.
620if test "${with_next_framework+set}" = set; then
621 withval="$with_next_framework"
622 :
623fi
624
625# Check whether --with-dyld or --without-dyld was given.
626if test "${with_dyld+set}" = set; then
627 withval="$with_dyld"
628 :
629fi
630
Guido van Rossum91922671997-10-09 20:24:13 +0000631
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000632# Set name for machine-dependent library files
633
634echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000635echo "configure:636: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000636if test -z "$MACHDEP"
637then
Guido van Rossum563e7081996-09-10 18:20:48 +0000638 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +0000639 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000640 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000641 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000642 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000643 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000644 ac_md_system=`echo $ac_sys_system |
645 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
646 ac_md_release=`echo $ac_sys_release |
647 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000648 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000649
Guido van Rossum07397971997-04-29 21:49:50 +0000650 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000651 cygwin*) MACHDEP="cygwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +0000652 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000653 esac
654fi
Guido van Rossum91922671997-10-09 20:24:13 +0000655
656#
657# SGI compilers allow the specification of the both the ABI and the
658# ISA on the command line. Depending on the values of these switches,
659# different and often incompatable code will be generated.
660#
661# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
662# thus supply support for various ABI/ISA combinations. The MACHDEP
663# variable is also adjusted.
664#
665
666if test ! -z "$SGI_ABI"
667then
668 CC="cc $SGI_ABI"
669 LDFLAGS="$SGI_ABI $LDFLAGS"
670 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
671fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000672echo "$ac_t""$MACHDEP" 1>&6
673
Guido van Rossum627b2d71993-12-24 10:39:16 +0000674# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000675echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000676echo "configure:677: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000677# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000678if test "${with_gcc+set}" = set; then
679 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000680
681 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000682 no) CC=cc
683 without_gcc=yes;;
684 yes) CC=gcc
685 without_gcc=no;;
686 *) CC=$withval
687 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000688 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000689else
Guido van Rossume77438c1995-09-13 18:59:59 +0000690
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000691 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000692 OSF1) CC=cc
693 without_gcc=;;
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000694 AIX*) CC=cc_r
695 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000696 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000697 case $BE_HOST_CPU in
698 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000699 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000700 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000701 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 +0000702 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000703 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000704 ;;
705 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000706 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000707 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000708 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000709 ;;
710 *)
Fred Drake5790be12000-10-09 17:06:13 +0000711 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000712 ;;
713 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000714 AR="\$(srcdir)/Modules/ar_beos"
715 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000716 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000717 Monterey*)
718 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +0000719 without_gcc=;;
720 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000721 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000722fi
723
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000724echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000725
Guido van Rossum95012191999-12-16 17:50:52 +0000726
727
Fred Drakea1a84e72001-03-06 05:52:16 +0000728MAINOBJ=python.o
Guido van Rossum95012191999-12-16 17:50:52 +0000729echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000730echo "configure:731: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000731# Check whether --with-cxx or --without-cxx was given.
732if test "${with_cxx+set}" = set; then
733 withval="$with_cxx"
734
Martin v. Löwis22352952000-12-13 17:37:02 +0000735 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000736 case $withval in
737 no) CXX=
738 with_cxx=no;;
739 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +0000740 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +0000741 with_cxx=$withval;;
742 esac
743else
744
745 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000746 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000747
748fi
749
750echo "$ac_t""$with_cxx" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000751
752
753if test "$check_cxx" = "yes"
754then
755 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
756do
757# Extract the first word of "$ac_prog", so it can be a program name with args.
758set dummy $ac_prog; ac_word=$2
759echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000760echo "configure:761: checking for $ac_word" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000761if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
762 echo $ac_n "(cached) $ac_c" 1>&6
763else
764 if test -n "$CXX"; then
765 ac_cv_prog_CXX="$CXX" # Let the user override the test.
766else
767 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
768 ac_dummy="$PATH"
769 for ac_dir in $ac_dummy; do
770 test -z "$ac_dir" && ac_dir=.
771 if test -f $ac_dir/$ac_word; then
772 ac_cv_prog_CXX="$ac_prog"
773 break
774 fi
775 done
776 IFS="$ac_save_ifs"
777fi
778fi
779CXX="$ac_cv_prog_CXX"
780if test -n "$CXX"; then
781 echo "$ac_t""$CXX" 1>&6
782else
783 echo "$ac_t""no" 1>&6
784fi
785
786test -n "$CXX" && break
787done
788test -n "$CXX" || CXX="notfound"
789
790 if test "$CXX" = "notfound"
791 then
792 CXX=
793 else
794 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000795echo "configure:796: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000796
797ac_ext=C
798# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
799ac_cpp='$CXXCPP $CPPFLAGS'
800ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
801ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
802cross_compiling=$ac_cv_prog_cxx_cross
803
804cat > conftest.$ac_ext << EOF
805
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000806#line 807 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000807#include "confdefs.h"
808
809int main(){return(0);}
810EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000811if { (eval echo configure:812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis22352952000-12-13 17:37:02 +0000812 ac_cv_prog_cxx_works=yes
813 # If we can't run a trivial program, we are probably using a cross compiler.
814 if (./conftest; exit) 2>/dev/null; then
815 ac_cv_prog_cxx_cross=no
816 else
817 ac_cv_prog_cxx_cross=yes
818 fi
819else
820 echo "configure: failed program was:" >&5
821 cat conftest.$ac_ext >&5
822 ac_cv_prog_cxx_works=no
823fi
824rm -fr conftest*
825ac_ext=c
826# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
827ac_cpp='$CPP $CPPFLAGS'
828ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
829ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
830cross_compiling=$ac_cv_prog_cc_cross
831
832echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
833if test $ac_cv_prog_cxx_works = no; then
834 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
835fi
836echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000837echo "configure:838: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000838echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
839cross_compiling=$ac_cv_prog_cxx_cross
840
841 fi
842fi
843
Guido van Rossum8b131c51995-03-09 14:10:13 +0000844# If the user switches compilers, we can't believe the cache
845if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
846then
847 { echo "configure: error: cached CC is different -- throw away $cache_file
848(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
849fi
850
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851# Extract the first word of "gcc", so it can be a program name with args.
852set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000853echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000854echo "configure:855: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000855if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000856 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857else
858 if test -n "$CC"; then
859 ac_cv_prog_CC="$CC" # Let the user override the test.
860else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000861 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
862 ac_dummy="$PATH"
863 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864 test -z "$ac_dir" && ac_dir=.
865 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000867 break
868 fi
869 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000871fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872fi
873CC="$ac_cv_prog_CC"
874if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000875 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000877 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000879
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000880if test -z "$CC"; then
881 # Extract the first word of "cc", so it can be a program name with args.
882set dummy cc; ac_word=$2
883echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000884echo "configure:885: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000885if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886 echo $ac_n "(cached) $ac_c" 1>&6
887else
888 if test -n "$CC"; then
889 ac_cv_prog_CC="$CC" # Let the user override the test.
890else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000891 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000893 ac_dummy="$PATH"
894 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895 test -z "$ac_dir" && ac_dir=.
896 if test -f $ac_dir/$ac_word; then
897 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
898 ac_prog_rejected=yes
899 continue
900 fi
901 ac_cv_prog_CC="cc"
902 break
903 fi
904 done
905 IFS="$ac_save_ifs"
906if test $ac_prog_rejected = yes; then
907 # We found a bogon in the path, so make sure we never use it.
908 set dummy $ac_cv_prog_CC
909 shift
910 if test $# -gt 0; then
911 # We chose a different compiler from the bogus one.
912 # However, it has the same basename, so the bogon will be chosen
913 # first if we set CC to just the basename; use the full file name.
914 shift
915 set dummy "$ac_dir/$ac_word" "$@"
916 shift
917 ac_cv_prog_CC="$@"
918 fi
919fi
920fi
921fi
922CC="$ac_cv_prog_CC"
923if test -n "$CC"; then
924 echo "$ac_t""$CC" 1>&6
925else
926 echo "$ac_t""no" 1>&6
927fi
928
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000929 if test -z "$CC"; then
930 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000931 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000932 # Extract the first word of "cl", so it can be a program name with args.
933set dummy cl; ac_word=$2
934echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000935echo "configure:936: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000936if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000937 echo $ac_n "(cached) $ac_c" 1>&6
938else
939 if test -n "$CC"; then
940 ac_cv_prog_CC="$CC" # Let the user override the test.
941else
942 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
943 ac_dummy="$PATH"
944 for ac_dir in $ac_dummy; do
945 test -z "$ac_dir" && ac_dir=.
946 if test -f $ac_dir/$ac_word; then
947 ac_cv_prog_CC="cl"
948 break
949 fi
950 done
951 IFS="$ac_save_ifs"
952fi
953fi
954CC="$ac_cv_prog_CC"
955if test -n "$CC"; then
956 echo "$ac_t""$CC" 1>&6
957else
958 echo "$ac_t""no" 1>&6
959fi
960 ;;
961 esac
962 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000963 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
964fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000965
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000966echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000967echo "configure:968: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000968
969ac_ext=c
970# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
971ac_cpp='$CPP $CPPFLAGS'
972ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000973ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000974cross_compiling=$ac_cv_prog_cc_cross
975
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000976cat > conftest.$ac_ext << EOF
977
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000978#line 979 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000979#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000980
Guido van Rossumf78abae1997-01-21 22:02:36 +0000981main(){return(0);}
982EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000983if { (eval echo configure:984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000984 ac_cv_prog_cc_works=yes
985 # If we can't run a trivial program, we are probably using a cross compiler.
986 if (./conftest; exit) 2>/dev/null; then
987 ac_cv_prog_cc_cross=no
988 else
989 ac_cv_prog_cc_cross=yes
990 fi
991else
992 echo "configure: failed program was:" >&5
993 cat conftest.$ac_ext >&5
994 ac_cv_prog_cc_works=no
995fi
996rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000997ac_ext=c
998# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
999ac_cpp='$CPP $CPPFLAGS'
1000ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1001ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1002cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +00001003
1004echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1005if test $ac_cv_prog_cc_works = no; then
1006 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1007fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001008echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001009echo "configure:1010: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001010echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1011cross_compiling=$ac_cv_prog_cc_cross
1012
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001013echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001014echo "configure:1015: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001015if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001016 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017else
1018 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001019#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001020 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001021#endif
1022EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001023if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001024 ac_cv_prog_gcc=yes
1025else
1026 ac_cv_prog_gcc=no
1027fi
1028fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001030echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001031
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001032if test $ac_cv_prog_gcc = yes; then
1033 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001034else
1035 GCC=
1036fi
1037
1038ac_test_CFLAGS="${CFLAGS+set}"
1039ac_save_CFLAGS="$CFLAGS"
1040CFLAGS=
1041echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001042echo "configure:1043: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001043if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001044 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001045else
1046 echo 'void f(){}' > conftest.c
1047if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001048 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001049else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001050 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001051fi
1052rm -f conftest*
1053
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001054fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
Guido van Rossumf78abae1997-01-21 22:02:36 +00001056echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001057if test "$ac_test_CFLAGS" = set; then
1058 CFLAGS="$ac_save_CFLAGS"
1059elif test $ac_cv_prog_cc_g = yes; then
1060 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001061 CFLAGS="-g -O2"
1062 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001063 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001064 fi
1065else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001066 if test "$GCC" = yes; then
1067 CFLAGS="-O2"
1068 else
1069 CFLAGS=
1070 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071fi
1072
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001073echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001074echo "configure:1075: checking for Cygwin environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001075if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1076 echo $ac_n "(cached) $ac_c" 1>&6
1077else
1078 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001079#line 1080 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001080#include "confdefs.h"
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001081
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001082int main() {
1083
1084#ifndef __CYGWIN__
1085#define __CYGWIN__ __CYGWIN32__
1086#endif
1087return __CYGWIN__;
1088; return 0; }
1089EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001090if { (eval echo configure:1091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001091 rm -rf conftest*
1092 ac_cv_cygwin=yes
1093else
1094 echo "configure: failed program was:" >&5
1095 cat conftest.$ac_ext >&5
1096 rm -rf conftest*
1097 ac_cv_cygwin=no
1098fi
1099rm -f conftest*
1100rm -f conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001101fi
1102
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001103echo "$ac_t""$ac_cv_cygwin" 1>&6
1104CYGWIN=
1105test "$ac_cv_cygwin" = yes && CYGWIN=yes
1106echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001107echo "configure:1108: checking for mingw32 environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001108if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1109 echo $ac_n "(cached) $ac_c" 1>&6
1110else
1111 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001112#line 1113 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001113#include "confdefs.h"
1114
1115int main() {
1116return __MINGW32__;
1117; return 0; }
1118EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001119if { (eval echo configure:1120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001120 rm -rf conftest*
1121 ac_cv_mingw32=yes
1122else
1123 echo "configure: failed program was:" >&5
1124 cat conftest.$ac_ext >&5
1125 rm -rf conftest*
1126 ac_cv_mingw32=no
1127fi
1128rm -f conftest*
1129rm -f conftest*
1130fi
1131
1132echo "$ac_t""$ac_cv_mingw32" 1>&6
1133MINGW32=
1134test "$ac_cv_mingw32" = yes && MINGW32=yes
1135
1136
1137echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001138echo "configure:1139: checking for executable suffix" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001139if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1140 echo $ac_n "(cached) $ac_c" 1>&6
1141else
1142 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1143 ac_cv_exeext=.exe
1144else
1145 rm -f conftest*
1146 echo 'int main () { return 0; }' > conftest.$ac_ext
1147 ac_cv_exeext=
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001148 if { (eval echo configure:1149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001149 for file in conftest.*; do
1150 case $file in
1151 *.c | *.o | *.obj) ;;
1152 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1153 esac
1154 done
1155 else
1156 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1157 fi
1158 rm -f conftest*
1159 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1160fi
1161fi
1162
1163EXEEXT=""
1164test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1165echo "$ac_t""${ac_cv_exeext}" 1>&6
1166ac_exeext=$EXEEXT
1167
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001168echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001169echo "configure:1170: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001170# Check whether --with-suffix or --without-suffix was given.
1171if test "${with_suffix+set}" = set; then
1172 withval="$with_suffix"
1173
1174 case $withval in
1175 no) EXEEXT=;;
1176 yes) EXEEXT=.exe;;
1177 *) EXEEXT=$withval;;
1178 esac
1179fi
1180
1181echo "$ac_t""$EXEEXT" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001182
Guido van Rossumdd997f71998-10-07 19:58:26 +00001183case $MACHDEP in
1184bsdos*)
1185 case $CC in
1186 gcc) CC="$CC -D_HAVE_BSDI";;
1187 esac;;
1188esac
1189
Guido van Rossum24b1e751997-08-21 02:29:16 +00001190case $ac_sys_system in
1191hp*|HP*)
1192 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001193 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001194 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001195Monterey*)
1196 case $CC in
1197 cc) CC="$CC -Wl,-Bexport";;
1198 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001199SunOS*)
1200 # Some functions have a prototype only with that define, e.g. confstr
1201 cat >> confdefs.h <<\EOF
1202#define __EXTENSIONS__ 1
1203EOF
1204
1205 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001206esac
1207
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001208
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001209
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001210echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001211echo "configure:1212: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001212if test -z "$LIBRARY"
1213then
1214 LIBRARY='libpython$(VERSION).a'
1215fi
1216echo "$ac_t""$LIBRARY" 1>&6
1217
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001218# LDLIBRARY is the name of the library to link against (as opposed to the
1219# name of the library into which to insert object files). On systems
1220# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
Guido van Rossumaef734b2001-01-10 21:09:12 +00001221# the Makefiles). On Cygwin LDLIBRARY is the import library, DLLLIBRARY is the
1222# shared (i.e., DLL) library.
1223
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001224
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001225LDLIBRARY="$LIBRARY"
Guido van Rossumca563f22001-01-23 01:52:44 +00001226DLLLIBRARY=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001227
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001228# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001229# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001230# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001231
1232echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001233echo "configure:1234: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001234if test -z "$LINKCC"
1235then
1236 case $ac_sys_system in
1237 AIX*)
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001238 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001239 dgux*)
1240 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001241 Monterey64*)
1242 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001243 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001244 esac
1245fi
1246echo "$ac_t""$LINKCC" 1>&6
1247
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001248echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001249echo "configure:1250: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001250
1251# NeXT framework builds require that the 'ar' library be converted into
1252# a bundle using libtool.
1253if test "$with_next_framework"
1254then
1255 LDLIBRARY='libpython$(VERSION).dylib'
1256fi
1257
1258# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001259case $MACHDEP in
1260dguxR4)
1261 LDLIBRARY='libpython$(VERSION).so'
1262 OPT="$OPT -pic"
1263 ;;
1264beos*)
1265 LDLIBRARY='libpython$(VERSION).so'
1266 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001267cygwin*)
1268 LDLIBRARY='libpython$(VERSION).dll.a'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001269 DLLLIBRARY='libpython$(VERSION).dll'
Guido van Rossumaef734b2001-01-10 21:09:12 +00001270 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001271esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001272echo "$ac_t""$LDLIBRARY" 1>&6
1273
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001274# Extract the first word of "ranlib", so it can be a program name with args.
1275set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001276echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001277echo "configure:1278: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001278if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001279 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001280else
1281 if test -n "$RANLIB"; then
1282 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1283else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001284 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1285 ac_dummy="$PATH"
1286 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001287 test -z "$ac_dir" && ac_dir=.
1288 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290 break
1291 fi
1292 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001293 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001294 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001296fi
1297RANLIB="$ac_cv_prog_RANLIB"
1298if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001299 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001300else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001301 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001302fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303
1304
Guido van Rossum7f43da71994-08-01 12:15:30 +00001305for ac_prog in ar aal
1306do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001307# Extract the first word of "$ac_prog", so it can be a program name with args.
1308set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001309echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001310echo "configure:1311: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001311if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001312 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001313else
1314 if test -n "$AR"; then
1315 ac_cv_prog_AR="$AR" # Let the user override the test.
1316else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001317 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1318 ac_dummy="$PATH"
1319 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001320 test -z "$ac_dir" && ac_dir=.
1321 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001322 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001323 break
1324 fi
1325 done
1326 IFS="$ac_save_ifs"
1327fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001328fi
1329AR="$ac_cv_prog_AR"
1330if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001331 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001332else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001333 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001334fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001335
1336test -n "$AR" && break
1337done
1338test -n "$AR" || AR="ar"
1339
Neil Schemenauera42c8272001-03-31 00:01:55 +00001340
1341case $MACHDEP in
1342bsdos*)
1343 # install -d does not work on BSDI
1344 if test -z "$INSTALL"
1345 then
1346 INSTALL="${srcdir}/install-sh -c"
1347 fi
1348esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001349ac_aux_dir=
1350for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1351 if test -f $ac_dir/install-sh; then
1352 ac_aux_dir=$ac_dir
1353 ac_install_sh="$ac_aux_dir/install-sh -c"
1354 break
1355 elif test -f $ac_dir/install.sh; then
1356 ac_aux_dir=$ac_dir
1357 ac_install_sh="$ac_aux_dir/install.sh -c"
1358 break
1359 fi
1360done
1361if test -z "$ac_aux_dir"; then
1362 { 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 +00001363fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001364ac_config_guess=$ac_aux_dir/config.guess
1365ac_config_sub=$ac_aux_dir/config.sub
1366ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1367
1368# Find a good install program. We prefer a C program (faster),
1369# so one script is as good as another. But avoid the broken or
1370# incompatible versions:
1371# SysV /etc/install, /usr/sbin/install
1372# SunOS /usr/etc/install
1373# IRIX /sbin/install
1374# AIX /bin/install
1375# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1376# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1377# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1378# ./install, which can be erroneously created by make from ./install.sh.
1379echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001380echo "configure:1381: checking for a BSD compatible install" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001381if test -z "$INSTALL"; then
1382if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1383 echo $ac_n "(cached) $ac_c" 1>&6
1384else
1385 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1386 for ac_dir in $PATH; do
1387 # Account for people who put trailing slashes in PATH elements.
1388 case "$ac_dir/" in
1389 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1390 *)
1391 # OSF1 and SCO ODT 3.0 have their own names for install.
1392 # Don't use installbsd from OSF since it installs stuff as root
1393 # by default.
1394 for ac_prog in ginstall scoinst install; do
1395 if test -f $ac_dir/$ac_prog; then
1396 if test $ac_prog = install &&
1397 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1398 # AIX install. It has an incompatible calling convention.
1399 :
1400 else
1401 ac_cv_path_install="$ac_dir/$ac_prog -c"
1402 break 2
1403 fi
1404 fi
1405 done
1406 ;;
1407 esac
1408 done
1409 IFS="$ac_save_IFS"
1410
1411fi
1412 if test "${ac_cv_path_install+set}" = set; then
1413 INSTALL="$ac_cv_path_install"
1414 else
1415 # As a last resort, use the slow shell script. We don't cache a
1416 # path for INSTALL within a source directory, because that will
1417 # break other packages using the cache if that directory is
1418 # removed, or if the path is relative.
1419 INSTALL="$ac_install_sh"
1420 fi
1421fi
1422echo "$ac_t""$INSTALL" 1>&6
1423
1424# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1425# It thinks the first close brace ends the variable substitution.
1426test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1427
1428test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1429
1430test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1431
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001432
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001433# Not every filesystem supports hard links
1434
1435if test -z "$LN" ; then
1436 case $ac_sys_system in
1437 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001438 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001439 *) LN=ln;;
1440 esac
1441fi
1442
Fred Drake109d9862001-07-11 06:27:56 +00001443# Check for --with-pydebug
1444echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001445echo "configure:1446: checking for --with-pydebug" >&5
Fred Drake109d9862001-07-11 06:27:56 +00001446# Check whether --with-pydebug or --without-pydebug was given.
1447if test "${with_pydebug+set}" = set; then
1448 withval="$with_pydebug"
1449
1450if test "$withval" != no
1451then cat >> confdefs.h <<\EOF
1452#define Py_DEBUG 1
1453EOF
1454 echo "$ac_t""yes" 1>&6; Py_DEBUG='true'
1455else echo "$ac_t""no" 1>&6; Py_DEBUG='false'
1456fi
1457else
1458 echo "$ac_t""no" 1>&6
1459fi
1460
1461
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001462# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001463
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001464if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001465then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001466 case $GCC in
1467 yes)
1468 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001469 yes)
Fred Drake109d9862001-07-11 06:27:56 +00001470 if test "$Py_DEBUG" = 'true' ; then
1471 # Optimization messes up debuggers, so turn it off for
1472 # debug builds.
1473 OPT="-g -Wall -Wstrict-prototypes"
1474 else
1475 OPT="-g -O3 -Wall -Wstrict-prototypes"
1476 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001477 *)
Fred Drake109d9862001-07-11 06:27:56 +00001478 OPT="-O3 -Wall -Wstrict-prototypes";;
1479 esac
1480 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001481 *)
1482 case $ac_sys_system in
1483 UnixWare*)
1484 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1485 *)
1486 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001487 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001488 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001489fi
1490
Trent Mick635f6fb2000-08-23 21:33:05 +00001491# The current (beta) Monterey compiler dies with optimizations
1492case $ac_sys_system in
1493Monterey*) OPT="";;
1494esac
1495
Guido van Rossum563e7081996-09-10 18:20:48 +00001496if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001497then
1498 OPT="$OPT $ac_arch_flags"
1499fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001500# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001501echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001502echo "configure:1503: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001503# On Suns, sometimes $CPP names a directory.
1504if test -n "$CPP" && test -d "$CPP"; then
1505 CPP=
1506fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001507if test -z "$CPP"; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001508if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001509 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001510else
1511 # This must be in double quotes, not single quotes, because CPP may get
1512 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001513 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001514 # On the NeXT, cc -E runs the code through the compiler's parser,
1515 # not just through cpp.
1516 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001517#line 1518 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001518#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001519#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001520Syntax Error
1521EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001522ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001523{ (eval echo configure:1524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001524ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1525if test -z "$ac_err"; then
1526 :
1527else
1528 echo "$ac_err" >&5
1529 echo "configure: failed program was:" >&5
1530 cat conftest.$ac_ext >&5
1531 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001532 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001533 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001534#line 1535 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001535#include "confdefs.h"
1536#include <assert.h>
1537Syntax Error
1538EOF
1539ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001540{ (eval echo configure:1541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001541ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001542if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001543 :
1544else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001545 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001546 echo "configure: failed program was:" >&5
1547 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001548 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001549 CPP="${CC-cc} -nologo -E"
1550 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001551#line 1552 "configure"
Guido van Rossumff555e32000-09-22 15:38:21 +00001552#include "confdefs.h"
1553#include <assert.h>
1554Syntax Error
1555EOF
1556ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001557{ (eval echo configure:1558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumff555e32000-09-22 15:38:21 +00001558ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1559if test -z "$ac_err"; then
1560 :
1561else
1562 echo "$ac_err" >&5
1563 echo "configure: failed program was:" >&5
1564 cat conftest.$ac_ext >&5
1565 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001566 CPP=/lib/cpp
1567fi
1568rm -f conftest*
1569fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001570rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001571fi
1572rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001573 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001574fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001575 CPP="$ac_cv_prog_CPP"
1576else
1577 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001578fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001579echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001580
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001581echo $ac_n "checking for AIX""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001582echo "configure:1583: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001583cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001584#line 1585 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001585#include "confdefs.h"
1586#ifdef _AIX
1587 yes
1588#endif
1589
1590EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001591if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1592 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001593 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001594 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001595#define _ALL_SOURCE 1
1596EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001597
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001598else
1599 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001600 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001601fi
1602rm -f conftest*
1603
1604
Guido van Rossumf78abae1997-01-21 22:02:36 +00001605ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001606echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001607echo "configure:1608: checking for minix/config.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001608if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001609 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001610else
1611 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001612#line 1613 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001613#include "confdefs.h"
1614#include <minix/config.h>
1615EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001616ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001617{ (eval echo configure:1618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001618ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001619if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001620 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001621 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001622else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001623 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001624 echo "configure: failed program was:" >&5
1625 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001626 rm -rf conftest*
1627 eval "ac_cv_header_$ac_safe=no"
1628fi
1629rm -f conftest*
1630fi
1631if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001632 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001633 MINIX=yes
1634else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001635 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001636MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001637fi
1638
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001639if test "$MINIX" = yes; then
1640 cat >> confdefs.h <<\EOF
1641#define _POSIX_SOURCE 1
1642EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001643
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001644 cat >> confdefs.h <<\EOF
1645#define _POSIX_1_SOURCE 2
1646EOF
1647
1648 cat >> confdefs.h <<\EOF
1649#define _MINIX 1
1650EOF
1651
1652fi
1653
Guido van Rossumda88dad1995-01-26 00:46:29 +00001654
Guido van Rossum91922671997-10-09 20:24:13 +00001655echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001656echo "configure:1657: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001657if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001658 echo $ac_n "(cached) $ac_c" 1>&6
1659else
1660 ac_save_cc="$CC"
1661CC="$CC -OPT:Olimit=0"
1662if test "$cross_compiling" = yes; then
1663 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1664else
1665 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001666#line 1667 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001667#include "confdefs.h"
1668int main() { return 0; }
1669EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001670if { (eval echo configure:1671: \"$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 +00001671then
1672 ac_cv_opt_olimit_ok=yes
1673else
1674 echo "configure: failed program was:" >&5
1675 cat conftest.$ac_ext >&5
1676 rm -fr conftest*
1677 ac_cv_opt_olimit_ok=no
1678fi
1679rm -fr conftest*
1680fi
1681
1682CC="$ac_save_cc"
1683fi
1684
1685echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001686if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001687 case $ac_sys_system in
1688 Darwin*) OPT="$OPT" ;;
1689 *) OPT="$OPT -OPT:Olimit=0";;
1690 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001691else
1692 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001693echo "configure:1694: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001694 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001695 echo $ac_n "(cached) $ac_c" 1>&6
1696else
1697 ac_save_cc="$CC"
1698 CC="$CC -Olimit 1500"
1699 if test "$cross_compiling" = yes; then
1700 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1701else
1702 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001703#line 1704 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001704#include "confdefs.h"
1705int main() { return 0; }
1706EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001707if { (eval echo configure:1708: \"$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 +00001708then
1709 ac_cv_olimit_ok=yes
1710else
1711 echo "configure: failed program was:" >&5
1712 cat conftest.$ac_ext >&5
1713 rm -fr conftest*
1714 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001715fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001716rm -fr conftest*
1717fi
1718
1719 CC="$ac_save_cc"
1720fi
1721
1722 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1723 if test $ac_cv_olimit_ok = yes; then
1724 OPT="$OPT -Olimit 1500"
1725 fi
1726fi
1727
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001728# Check for enable-ipv6
Martin v. Löwisb9268662001-07-18 16:24:30 +00001729# XXX definition of ss_family disabled until author clarifies rationale.
1730# DEFS="$DEFS -Dss_family=__ss_family -Dss_len=__ss_len"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001731echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001732echo "configure:1733: checking whether to enable ipv6" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001733# Check whether --enable-ipv6 or --disable-ipv6 was given.
1734if test "${enable_ipv6+set}" = set; then
1735 enableval="$enable_ipv6"
1736 case "$enableval" in
1737 no)
1738 echo "$ac_t""no" 1>&6
1739 ipv6=no
1740 ;;
1741 *) echo "$ac_t""yes" 1>&6
1742 cat >> confdefs.h <<\EOF
1743#define ENABLE_IPV6 1
1744EOF
1745
1746 ipv6=yes
1747 ;;
1748 esac
1749else
1750 if test "$cross_compiling" = yes; then
1751 echo "$ac_t""no" 1>&6
1752 ipv6=no
1753
1754else
1755 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001756#line 1757 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001757#include "confdefs.h"
Fred Drake109d9862001-07-11 06:27:56 +00001758 /* AF_INET6 available check */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001759#include <sys/types.h>
1760#include <sys/socket.h>
1761main()
1762{
1763 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
1764 exit(1);
1765 else
1766 exit(0);
1767}
1768
1769EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001770if { (eval echo configure:1771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001771then
1772 echo "$ac_t""yes" 1>&6
1773 cat >> confdefs.h <<\EOF
1774#define ENABLE_IPV6 1
1775EOF
1776
1777 ipv6=yes
1778else
1779 echo "configure: failed program was:" >&5
1780 cat conftest.$ac_ext >&5
1781 rm -fr conftest*
1782 echo "$ac_t""no" 1>&6
1783 ipv6=no
1784fi
1785rm -fr conftest*
1786fi
1787
1788fi
1789
1790
1791ipv6type=unknown
1792ipv6lib=none
1793ipv6trylibc=no
1794
1795if test "$ipv6" = "yes"; then
1796 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001797echo "configure:1798: checking ipv6 stack type" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001798 for i in inria kame linux-glibc linux-inet6 toshiba v6d zeta; do
1799 case $i in
1800 inria)
1801 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001802#line 1803 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001803#include "confdefs.h"
1804dnl
1805#include <netinet/in.h>
1806#ifdef IPV6_INRIA_VERSION
1807yes
1808#endif
1809EOF
1810if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1811 egrep "yes" >/dev/null 2>&1; then
1812 rm -rf conftest*
1813 ipv6type=$i;
1814 OPT="-DINET6 $OPT"
1815fi
1816rm -f conftest*
1817
1818 ;;
1819 kame)
1820 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001821#line 1822 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001822#include "confdefs.h"
1823dnl
1824#include <netinet/in.h>
1825#ifdef __KAME__
1826yes
1827#endif
1828EOF
1829if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1830 egrep "yes" >/dev/null 2>&1; then
1831 rm -rf conftest*
1832 ipv6type=$i;
1833 ipv6lib=inet6
1834 ipv6libdir=/usr/local/v6/lib
1835 ipv6trylibc=yes
1836 OPT="-DINET6 $OPT"
1837fi
1838rm -f conftest*
1839
1840 ;;
1841 linux-glibc)
1842 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001843#line 1844 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001844#include "confdefs.h"
1845dnl
1846#include <features.h>
1847#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
1848yes
1849#endif
1850EOF
1851if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1852 egrep "yes" >/dev/null 2>&1; then
1853 rm -rf conftest*
1854 ipv6type=$i;
1855 ipv6trylibc=yes
1856 OPT="-DINET6 $OPT"
1857fi
1858rm -f conftest*
1859
1860 ;;
1861 linux-inet6)
1862 if test -d /usr/inet6; then
1863 ipv6type=$i
1864 ipv6lib=inet6
1865 ipv6libdir=/usr/inet6/lib
1866 OPT="-DINET6 -I/usr/inet6/include $OPT"
1867 fi
1868 ;;
1869 toshiba)
1870 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001871#line 1872 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001872#include "confdefs.h"
1873dnl
1874#include <sys/param.h>
1875#ifdef _TOSHIBA_INET6
1876yes
1877#endif
1878EOF
1879if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1880 egrep "yes" >/dev/null 2>&1; then
1881 rm -rf conftest*
1882 ipv6type=$i;
1883 ipv6lib=inet6;
1884 ipv6libdir=/usr/local/v6/lib;
1885 OPT="-DINET6 $OPT"
1886fi
1887rm -f conftest*
1888
1889 ;;
1890 v6d)
1891 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001892#line 1893 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001893#include "confdefs.h"
1894dnl
1895#include </usr/local/v6/include/sys/v6config.h>
1896#ifdef __V6D__
1897yes
1898#endif
1899EOF
1900if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1901 egrep "yes" >/dev/null 2>&1; then
1902 rm -rf conftest*
1903 ipv6type=$i;
1904 ipv6lib=v6;
1905 ipv6libdir=/usr/local/v6/lib;
1906 OPT="-I/usr/local/v6/include $OPT"
1907fi
1908rm -f conftest*
1909
1910 ;;
1911 zeta)
1912 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001913#line 1914 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001914#include "confdefs.h"
1915dnl
1916#include <sys/param.h>
1917#ifdef _ZETA_MINAMI_INET6
1918yes
1919#endif
1920EOF
1921if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1922 egrep "yes" >/dev/null 2>&1; then
1923 rm -rf conftest*
1924 ipv6type=$i;
1925 ipv6lib=inet6;
1926 ipv6libdir=/usr/local/v6/lib;
1927 OPT="-DINET6 $OPT"
1928fi
1929rm -f conftest*
1930
1931 ;;
1932 esac
1933 if test "$ipv6type" != "unknown"; then
1934 break
1935 fi
1936 done
1937 echo "$ac_t""$ipv6type" 1>&6
1938fi
1939
1940if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
1941 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
1942 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
1943 echo "using lib$ipv6lib"
1944 else
1945 if test $ipv6trylibc = "yes"; then
1946 echo "using libc"
1947 else
1948 echo 'Fatal: no $ipv6lib library found. cannot continue.'
1949 echo "You need to fetch lib$ipv6lib.a from appropriate"
1950 echo 'ipv6 kit and compile beforehand.'
1951 exit 1
1952 fi
1953 fi
1954fi
1955
Martin v. Löwis130fb172001-07-19 11:00:41 +00001956# -Kpthread, if available, provides the right #defines
1957# and linker options to make pthread_create available
1958echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001959echo "configure:1960: checking whether $CC accepts -Kpthread" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00001960if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then
1961 echo $ac_n "(cached) $ac_c" 1>&6
1962else
1963 ac_save_cc="$CC"
1964CC="$CC -Kpthread"
1965cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001966#line 1967 "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00001967#include "confdefs.h"
1968#include <pthread.h>
1969int main() {
1970pthread_create(0,0,0,0)
1971; return 0; }
1972EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001973if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00001974 rm -rf conftest*
1975 ac_cv_kpthread=yes
1976else
1977 echo "configure: failed program was:" >&5
1978 cat conftest.$ac_ext >&5
1979 rm -rf conftest*
1980 ac_cv_kpthread=no
1981fi
1982rm -f conftest*
1983CC="$ac_save_cc"
1984fi
1985
1986
1987# GCC does not reject -Kpthread as an illegal option, it merely complains that
1988# it is unrecognized
1989if test "$GCC" = "yes"
1990then ac_cv_kpthread="no, we have gcc"
1991fi
1992echo "$ac_t""$ac_cv_kpthread" 1>&6
1993
Guido van Rossum84e7b241996-08-19 21:59:00 +00001994
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001995# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001996echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001997echo "configure:1998: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001998if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001999 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002000else
2001 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002002#line 2003 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002003#include "confdefs.h"
2004#include <stdlib.h>
2005#include <stdarg.h>
2006#include <string.h>
2007#include <float.h>
2008EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002009ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002010{ (eval echo configure:2011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002011ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00002012if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002013 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002014 ac_cv_header_stdc=yes
2015else
2016 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002017 echo "configure: failed program was:" >&5
2018 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002019 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002020 ac_cv_header_stdc=no
2021fi
2022rm -f conftest*
2023
2024if test $ac_cv_header_stdc = yes; then
2025 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2026cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002027#line 2028 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002028#include "confdefs.h"
2029#include <string.h>
2030EOF
2031if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2032 egrep "memchr" >/dev/null 2>&1; then
2033 :
2034else
2035 rm -rf conftest*
2036 ac_cv_header_stdc=no
2037fi
2038rm -f conftest*
2039
2040fi
2041
2042if test $ac_cv_header_stdc = yes; then
2043 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2044cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002045#line 2046 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002046#include "confdefs.h"
2047#include <stdlib.h>
2048EOF
2049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2050 egrep "free" >/dev/null 2>&1; then
2051 :
2052else
2053 rm -rf conftest*
2054 ac_cv_header_stdc=no
2055fi
2056rm -f conftest*
2057
2058fi
2059
2060if test $ac_cv_header_stdc = yes; then
2061 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2062if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002063 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002064else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002065 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002066#line 2067 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002067#include "confdefs.h"
2068#include <ctype.h>
2069#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2070#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002071#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00002072int main () { int i; for (i = 0; i < 256; i++)
2073if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2074exit (0); }
2075
2076EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002077if { (eval echo configure:2078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00002078then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002079 :
2080else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002081 echo "configure: failed program was:" >&5
2082 cat conftest.$ac_ext >&5
2083 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002084 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002085fi
2086rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002087fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002088
2089fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002090fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002091
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002092echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002093if test $ac_cv_header_stdc = yes; then
2094 cat >> confdefs.h <<\EOF
2095#define STDC_HEADERS 1
2096EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002097
2098fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002099
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00002100for 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 +00002101signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00002102sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002103sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00002104sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Thomas Wouterse38b2f12001-07-11 22:35:31 +00002105ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00002106do
Guido van Rossumf78abae1997-01-21 22:02:36 +00002107ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002108echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002109echo "configure:2110: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002110if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002111 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002112else
2113 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002114#line 2115 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002115#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002116#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00002117EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002118ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002119{ (eval echo configure:2120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002120ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00002121if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002122 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002123 eval "ac_cv_header_$ac_safe=yes"
2124else
2125 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002126 echo "configure: failed program was:" >&5
2127 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002128 rm -rf conftest*
2129 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002130fi
2131rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002132fi
2133if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002134 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002135 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002136 cat >> confdefs.h <<EOF
2137#define $ac_tr_hdr 1
2138EOF
2139
2140else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002141 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002142fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002143done
2144
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002145ac_header_dirent=no
2146for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2147do
Guido van Rossumf78abae1997-01-21 22:02:36 +00002148ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002149echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002150echo "configure:2151: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002151if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002152 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002153else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002154 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002155#line 2156 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002156#include "confdefs.h"
2157#include <sys/types.h>
2158#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002159int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002160DIR *dirp = 0;
2161; return 0; }
2162EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002163if { (eval echo configure:2164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002164 rm -rf conftest*
2165 eval "ac_cv_header_dirent_$ac_safe=yes"
2166else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002167 echo "configure: failed program was:" >&5
2168 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002169 rm -rf conftest*
2170 eval "ac_cv_header_dirent_$ac_safe=no"
2171fi
2172rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002173fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002174if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002175 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002176 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002177 cat >> confdefs.h <<EOF
2178#define $ac_tr_hdr 1
2179EOF
2180 ac_header_dirent=$ac_hdr; break
2181else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002182 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002183fi
2184done
2185# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2186if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002187echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002188echo "configure:2189: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002189ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002190if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002191 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002192else
2193 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002194LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002195cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002196#line 2197 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002197#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002198/* Override any gcc2 internal prototype to avoid an error. */
2199/* We use char because int might match the return type of a gcc2
2200 builtin and then its argument prototype would still apply. */
2201char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002202
Guido van Rossumf78abae1997-01-21 22:02:36 +00002203int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002204opendir()
2205; return 0; }
2206EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002207if { (eval echo configure:2208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002208 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002209 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002210else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002211 echo "configure: failed program was:" >&5
2212 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002213 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002214 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002215fi
2216rm -f conftest*
2217LIBS="$ac_save_LIBS"
2218
2219fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002220if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002221 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002222 LIBS="$LIBS -ldir"
2223else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002224 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002225fi
2226
2227else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002228echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002229echo "configure:2230: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002230ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002231if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002232 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002233else
2234 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002235LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002236cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002237#line 2238 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002238#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002239/* Override any gcc2 internal prototype to avoid an error. */
2240/* We use char because int might match the return type of a gcc2
2241 builtin and then its argument prototype would still apply. */
2242char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002243
Guido van Rossumf78abae1997-01-21 22:02:36 +00002244int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002245opendir()
2246; return 0; }
2247EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002248if { (eval echo configure:2249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002249 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002250 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002251else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002252 echo "configure: failed program was:" >&5
2253 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002254 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002255 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002256fi
2257rm -f conftest*
2258LIBS="$ac_save_LIBS"
2259
2260fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002261if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002262 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002263 LIBS="$LIBS -lx"
2264else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002265 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002266fi
2267
2268fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002269
2270
2271# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00002272was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002273echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002274echo "configure:2275: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002275cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002276#line 2277 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002277#include "confdefs.h"
2278#include <time.h>
2279EOF
2280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2281 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002282 rm -rf conftest*
2283 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002284else
2285 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002286 cat >> confdefs.h <<\EOF
2287#define clock_t long
2288EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002289
2290fi
2291rm -f conftest*
2292
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002293echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002294
Guido van Rossum84e7b241996-08-19 21:59:00 +00002295# Add some code to confdefs.h so that the test for off_t works on SCO
2296cat >> confdefs.h <<\EOF
2297#if defined(SCO_DS)
2298#undef _OFF_T
2299#endif
2300EOF
2301
Guido van Rossumef2255b2000-03-10 22:30:29 +00002302# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002303echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002304echo "configure:2305: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002305if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002306 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002307else
2308 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002309#line 2310 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002310#include "confdefs.h"
2311#include <sys/types.h>
2312#if STDC_HEADERS
2313#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002314#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002315#endif
2316EOF
2317if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002318 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 +00002319 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002320 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002321else
2322 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002323 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002324fi
2325rm -f conftest*
2326
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002327fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002328echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2329if test $ac_cv_type_mode_t = no; then
2330 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002331#define mode_t int
2332EOF
2333
2334fi
2335
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002336echo $ac_n "checking for off_t""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002337echo "configure:2338: checking for off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002338if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002339 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002340else
2341 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002342#line 2343 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002343#include "confdefs.h"
2344#include <sys/types.h>
2345#if STDC_HEADERS
2346#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002347#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002348#endif
2349EOF
2350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002351 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 +00002352 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002353 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002354else
2355 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002356 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002357fi
2358rm -f conftest*
2359
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002360fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002361echo "$ac_t""$ac_cv_type_off_t" 1>&6
2362if test $ac_cv_type_off_t = no; then
2363 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002364#define off_t long
2365EOF
2366
2367fi
2368
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002369echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002370echo "configure:2371: checking for pid_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002371if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002372 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002373else
2374 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002375#line 2376 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002376#include "confdefs.h"
2377#include <sys/types.h>
2378#if STDC_HEADERS
2379#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002380#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002381#endif
2382EOF
2383if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002384 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 +00002385 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002386 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002387else
2388 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002389 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002390fi
2391rm -f conftest*
2392
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002393fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002394echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2395if test $ac_cv_type_pid_t = no; then
2396 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002397#define pid_t int
2398EOF
2399
2400fi
2401
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002402echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002403echo "configure:2404: checking return type of signal handlers" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002404if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002405 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002406else
2407 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002408#line 2409 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002409#include "confdefs.h"
2410#include <sys/types.h>
2411#include <signal.h>
2412#ifdef signal
2413#undef signal
2414#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002415#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002416extern "C" void (*signal (int, void (*)(int)))(int);
2417#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002418void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002419#endif
2420
Guido van Rossumf78abae1997-01-21 22:02:36 +00002421int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002422int i;
2423; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002424EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002425if { (eval echo configure:2426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002426 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002427 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002428else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002429 echo "configure: failed program was:" >&5
2430 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002431 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002432 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002433fi
2434rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002435fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002436
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002437echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002438cat >> confdefs.h <<EOF
2439#define RETSIGTYPE $ac_cv_type_signal
2440EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002441
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002442
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002443echo $ac_n "checking for size_t""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002444echo "configure:2445: checking for size_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002445if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002446 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002447else
2448 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002449#line 2450 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002450#include "confdefs.h"
2451#include <sys/types.h>
2452#if STDC_HEADERS
2453#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002454#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002455#endif
2456EOF
2457if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002458 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 +00002459 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002460 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002461else
2462 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002463 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002464fi
2465rm -f conftest*
2466
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002467fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002468echo "$ac_t""$ac_cv_type_size_t" 1>&6
2469if test $ac_cv_type_size_t = no; then
2470 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002471#define size_t unsigned
2472EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002473
2474fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002475
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002476echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002477echo "configure:2478: checking for uid_t in sys/types.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002478if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002479 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002480else
2481 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002482#line 2483 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002483#include "confdefs.h"
2484#include <sys/types.h>
2485EOF
2486if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2487 egrep "uid_t" >/dev/null 2>&1; then
2488 rm -rf conftest*
2489 ac_cv_type_uid_t=yes
2490else
2491 rm -rf conftest*
2492 ac_cv_type_uid_t=no
2493fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002494rm -f conftest*
2495
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002496fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002497
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002498echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002499if test $ac_cv_type_uid_t = no; then
2500 cat >> confdefs.h <<\EOF
2501#define uid_t int
2502EOF
2503
2504 cat >> confdefs.h <<\EOF
2505#define gid_t int
2506EOF
2507
2508fi
2509
Guido van Rossum627b2d71993-12-24 10:39:16 +00002510
Guido van Rossumef2255b2000-03-10 22:30:29 +00002511# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002512echo $ac_n "checking size of int""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002513echo "configure:2514: checking size of int" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002514if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002515 echo $ac_n "(cached) $ac_c" 1>&6
2516else
2517 if test "$cross_compiling" = yes; then
2518 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2519else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002520 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002521#line 2522 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002522#include "confdefs.h"
2523#include <stdio.h>
2524main()
2525{
2526 FILE *f=fopen("conftestval", "w");
2527 if (!f) exit(1);
2528 fprintf(f, "%d\n", sizeof(int));
2529 exit(0);
2530}
2531EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002532if { (eval echo configure:2533: \"$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 +00002533then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002534 ac_cv_sizeof_int=`cat conftestval`
2535else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002536 echo "configure: failed program was:" >&5
2537 cat conftest.$ac_ext >&5
2538 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002539 ac_cv_sizeof_int=0
2540fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002541rm -fr conftest*
2542fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002543
2544fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002545echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2546cat >> confdefs.h <<EOF
2547#define SIZEOF_INT $ac_cv_sizeof_int
2548EOF
2549
2550
2551echo $ac_n "checking size of long""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002552echo "configure:2553: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002553if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002554 echo $ac_n "(cached) $ac_c" 1>&6
2555else
2556 if test "$cross_compiling" = yes; then
2557 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2558else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002559 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002560#line 2561 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002561#include "confdefs.h"
2562#include <stdio.h>
2563main()
2564{
2565 FILE *f=fopen("conftestval", "w");
2566 if (!f) exit(1);
2567 fprintf(f, "%d\n", sizeof(long));
2568 exit(0);
2569}
2570EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002571if { (eval echo configure:2572: \"$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 +00002572then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002573 ac_cv_sizeof_long=`cat conftestval`
2574else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002575 echo "configure: failed program was:" >&5
2576 cat conftest.$ac_ext >&5
2577 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002578 ac_cv_sizeof_long=0
2579fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002580rm -fr conftest*
2581fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002582
2583fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002584echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2585cat >> confdefs.h <<EOF
2586#define SIZEOF_LONG $ac_cv_sizeof_long
2587EOF
2588
2589
Guido van Rossumad678af1998-10-02 14:42:15 +00002590echo $ac_n "checking size of void *""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002591echo "configure:2592: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002592if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002593 echo $ac_n "(cached) $ac_c" 1>&6
2594else
2595 if test "$cross_compiling" = yes; then
2596 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2597else
2598 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002599#line 2600 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002600#include "confdefs.h"
2601#include <stdio.h>
2602main()
2603{
2604 FILE *f=fopen("conftestval", "w");
2605 if (!f) exit(1);
2606 fprintf(f, "%d\n", sizeof(void *));
2607 exit(0);
2608}
2609EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002610if { (eval echo configure:2611: \"$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 +00002611then
2612 ac_cv_sizeof_void_p=`cat conftestval`
2613else
2614 echo "configure: failed program was:" >&5
2615 cat conftest.$ac_ext >&5
2616 rm -fr conftest*
2617 ac_cv_sizeof_void_p=0
2618fi
2619rm -fr conftest*
2620fi
2621
2622fi
2623echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2624cat >> confdefs.h <<EOF
2625#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2626EOF
2627
2628
Guido van Rossumef2255b2000-03-10 22:30:29 +00002629echo $ac_n "checking size of char""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002630echo "configure:2631: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002631if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002632 echo $ac_n "(cached) $ac_c" 1>&6
2633else
2634 if test "$cross_compiling" = yes; then
2635 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2636else
2637 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002638#line 2639 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002639#include "confdefs.h"
2640#include <stdio.h>
2641main()
2642{
2643 FILE *f=fopen("conftestval", "w");
2644 if (!f) exit(1);
2645 fprintf(f, "%d\n", sizeof(char));
2646 exit(0);
2647}
2648EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002649if { (eval echo configure:2650: \"$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 +00002650then
2651 ac_cv_sizeof_char=`cat conftestval`
2652else
2653 echo "configure: failed program was:" >&5
2654 cat conftest.$ac_ext >&5
2655 rm -fr conftest*
2656 ac_cv_sizeof_char=0
2657fi
2658rm -fr conftest*
2659fi
2660
2661fi
2662echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2663cat >> confdefs.h <<EOF
2664#define SIZEOF_CHAR $ac_cv_sizeof_char
2665EOF
2666
2667
2668echo $ac_n "checking size of short""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002669echo "configure:2670: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002670if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002671 echo $ac_n "(cached) $ac_c" 1>&6
2672else
2673 if test "$cross_compiling" = yes; then
2674 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2675else
2676 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002677#line 2678 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002678#include "confdefs.h"
2679#include <stdio.h>
2680main()
2681{
2682 FILE *f=fopen("conftestval", "w");
2683 if (!f) exit(1);
2684 fprintf(f, "%d\n", sizeof(short));
2685 exit(0);
2686}
2687EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002688if { (eval echo configure:2689: \"$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 +00002689then
2690 ac_cv_sizeof_short=`cat conftestval`
2691else
2692 echo "configure: failed program was:" >&5
2693 cat conftest.$ac_ext >&5
2694 rm -fr conftest*
2695 ac_cv_sizeof_short=0
2696fi
2697rm -fr conftest*
2698fi
2699
2700fi
2701echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2702cat >> confdefs.h <<EOF
2703#define SIZEOF_SHORT $ac_cv_sizeof_short
2704EOF
2705
2706
2707echo $ac_n "checking size of float""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002708echo "configure:2709: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002709if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002710 echo $ac_n "(cached) $ac_c" 1>&6
2711else
2712 if test "$cross_compiling" = yes; then
2713 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2714else
2715 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002716#line 2717 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002717#include "confdefs.h"
2718#include <stdio.h>
2719main()
2720{
2721 FILE *f=fopen("conftestval", "w");
2722 if (!f) exit(1);
2723 fprintf(f, "%d\n", sizeof(float));
2724 exit(0);
2725}
2726EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002727if { (eval echo configure:2728: \"$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 +00002728then
2729 ac_cv_sizeof_float=`cat conftestval`
2730else
2731 echo "configure: failed program was:" >&5
2732 cat conftest.$ac_ext >&5
2733 rm -fr conftest*
2734 ac_cv_sizeof_float=0
2735fi
2736rm -fr conftest*
2737fi
2738
2739fi
2740echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2741cat >> confdefs.h <<EOF
2742#define SIZEOF_FLOAT $ac_cv_sizeof_float
2743EOF
2744
2745
2746echo $ac_n "checking size of double""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002747echo "configure:2748: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002748if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002749 echo $ac_n "(cached) $ac_c" 1>&6
2750else
2751 if test "$cross_compiling" = yes; then
2752 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2753else
2754 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002755#line 2756 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002756#include "confdefs.h"
2757#include <stdio.h>
2758main()
2759{
2760 FILE *f=fopen("conftestval", "w");
2761 if (!f) exit(1);
2762 fprintf(f, "%d\n", sizeof(double));
2763 exit(0);
2764}
2765EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002766if { (eval echo configure:2767: \"$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 +00002767then
2768 ac_cv_sizeof_double=`cat conftestval`
2769else
2770 echo "configure: failed program was:" >&5
2771 cat conftest.$ac_ext >&5
2772 rm -fr conftest*
2773 ac_cv_sizeof_double=0
2774fi
2775rm -fr conftest*
2776fi
2777
2778fi
2779echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2780cat >> confdefs.h <<EOF
2781#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2782EOF
2783
2784
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002785echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002786echo "configure:2787: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002787if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002788 echo $ac_n "(cached) $ac_c" 1>&6
2789else
2790 if test "$cross_compiling" = yes; then
2791 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2792else
2793 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002794#line 2795 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002795#include "confdefs.h"
2796#include <stdio.h>
2797main()
2798{
2799 FILE *f=fopen("conftestval", "w");
2800 if (!f) exit(1);
2801 fprintf(f, "%d\n", sizeof(fpos_t));
2802 exit(0);
2803}
2804EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002805if { (eval echo configure:2806: \"$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 +00002806then
2807 ac_cv_sizeof_fpos_t=`cat conftestval`
2808else
2809 echo "configure: failed program was:" >&5
2810 cat conftest.$ac_ext >&5
2811 rm -fr conftest*
2812 ac_cv_sizeof_fpos_t=0
2813fi
2814rm -fr conftest*
2815fi
2816
2817fi
2818echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2819cat >> confdefs.h <<EOF
2820#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2821EOF
2822
2823
Guido van Rossum0a516c91994-09-12 10:58:40 +00002824
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002825echo $ac_n "checking for long long support""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002826echo "configure:2827: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002827have_long_long=no
2828cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002829#line 2830 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002830#include "confdefs.h"
2831
2832int main() {
2833long long x; x = (long long)0;
2834; return 0; }
2835EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002836if { (eval echo configure:2837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002837 rm -rf conftest*
2838 cat >> confdefs.h <<\EOF
2839#define HAVE_LONG_LONG 1
2840EOF
2841 have_long_long=yes
2842else
2843 echo "configure: failed program was:" >&5
2844 cat conftest.$ac_ext >&5
2845fi
2846rm -f conftest*
2847echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002848if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002849echo $ac_n "checking size of long long""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002850echo "configure:2851: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002851if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002852 echo $ac_n "(cached) $ac_c" 1>&6
2853else
2854 if test "$cross_compiling" = yes; then
2855 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2856else
2857 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002858#line 2859 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002859#include "confdefs.h"
2860#include <stdio.h>
2861main()
2862{
2863 FILE *f=fopen("conftestval", "w");
2864 if (!f) exit(1);
2865 fprintf(f, "%d\n", sizeof(long long));
2866 exit(0);
2867}
2868EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002869if { (eval echo configure:2870: \"$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 +00002870then
2871 ac_cv_sizeof_long_long=`cat conftestval`
2872else
2873 echo "configure: failed program was:" >&5
2874 cat conftest.$ac_ext >&5
2875 rm -fr conftest*
2876 ac_cv_sizeof_long_long=0
2877fi
2878rm -fr conftest*
2879fi
2880
2881fi
2882echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2883cat >> confdefs.h <<EOF
2884#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2885EOF
2886
2887
2888fi
2889
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002890echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002891echo "configure:2892: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002892have_uintptr_t=no
2893cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002894#line 2895 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002895#include "confdefs.h"
2896
2897int main() {
2898uintptr_t x; x = (uintptr_t)0;
2899; return 0; }
2900EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002901if { (eval echo configure:2902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002902 rm -rf conftest*
2903 cat >> confdefs.h <<\EOF
2904#define HAVE_UINTPTR_T 1
2905EOF
2906 have_uintptr_t=yes
2907else
2908 echo "configure: failed program was:" >&5
2909 cat conftest.$ac_ext >&5
2910fi
2911rm -f conftest*
2912echo "$ac_t""$have_uintptr_t" 1>&6
2913if test "$have_uintptr_t" = yes ; then
2914echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002915echo "configure:2916: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002916if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002917 echo $ac_n "(cached) $ac_c" 1>&6
2918else
2919 if test "$cross_compiling" = yes; then
2920 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2921else
2922 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002923#line 2924 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002924#include "confdefs.h"
2925#include <stdio.h>
2926main()
2927{
2928 FILE *f=fopen("conftestval", "w");
2929 if (!f) exit(1);
2930 fprintf(f, "%d\n", sizeof(uintptr_t));
2931 exit(0);
2932}
2933EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002934if { (eval echo configure:2935: \"$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 +00002935then
2936 ac_cv_sizeof_uintptr_t=`cat conftestval`
2937else
2938 echo "configure: failed program was:" >&5
2939 cat conftest.$ac_ext >&5
2940 rm -fr conftest*
2941 ac_cv_sizeof_uintptr_t=0
2942fi
2943rm -fr conftest*
2944fi
2945
2946fi
2947echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2948cat >> confdefs.h <<EOF
2949#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2950EOF
2951
2952
2953fi
2954
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002955# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2956echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002957echo "configure:2958: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002958if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002959 echo $ac_n "(cached) $ac_c" 1>&6
2960else
2961 if test "$cross_compiling" = yes; then
2962 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2963else
2964 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002965#line 2966 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002966#include "confdefs.h"
2967#include <stdio.h>
2968#include <sys/types.h>
2969main()
2970{
2971 FILE *f=fopen("conftestval", "w");
2972 if (!f) exit(1);
2973 fprintf(f, "%d\n", sizeof(off_t));
2974 exit(0);
2975}
2976EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002977if { (eval echo configure:2978: \"$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 +00002978then
2979 ac_cv_sizeof_off_t=`cat conftestval`
2980else
2981 echo "configure: failed program was:" >&5
2982 cat conftest.$ac_ext >&5
2983 rm -fr conftest*
2984 ac_cv_sizeof_off_t=0
2985fi
2986rm -fr conftest*
2987fi
2988
2989
2990fi
2991
2992echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2993cat >> confdefs.h <<EOF
2994#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2995EOF
2996
2997
2998echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002999echo "configure:3000: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00003000if test "$have_long_long" = yes -a \
3001 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
3002 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003003 cat >> confdefs.h <<\EOF
3004#define HAVE_LARGEFILE_SUPPORT 1
3005EOF
3006
3007 echo "$ac_t""yes" 1>&6
3008else
3009 echo "$ac_t""no" 1>&6
3010fi
3011
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003012# AC_CHECK_SIZEOF() doesn't include <time.h>.
3013echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003014echo "configure:3015: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003015if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003016 echo $ac_n "(cached) $ac_c" 1>&6
3017else
3018 if test "$cross_compiling" = yes; then
3019 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3020else
3021 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003022#line 3023 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003023#include "confdefs.h"
3024#include <stdio.h>
3025#include <time.h>
3026main()
3027{
3028 FILE *f=fopen("conftestval", "w");
3029 if (!f) exit(1);
3030 fprintf(f, "%d\n", sizeof(time_t));
3031 exit(0);
3032}
3033EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003034if { (eval echo configure:3035: \"$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 +00003035then
3036 ac_cv_sizeof_time_t=`cat conftestval`
3037else
3038 echo "configure: failed program was:" >&5
3039 cat conftest.$ac_ext >&5
3040 rm -fr conftest*
3041 ac_cv_sizeof_time_t=0
3042fi
3043rm -fr conftest*
3044fi
3045
3046
3047fi
3048
3049echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
3050cat >> confdefs.h <<EOF
3051#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
3052EOF
3053
3054
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003055
Trent Mick635f6fb2000-08-23 21:33:05 +00003056# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00003057ac_save_cc="$CC"
3058if test "$ac_cv_kpthread" = "yes"
3059then CC="$CC -Kpthread"
3060fi
Trent Mick635f6fb2000-08-23 21:33:05 +00003061echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003062echo "configure:3063: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00003063have_pthread_t=no
3064cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003065#line 3066 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00003066#include "confdefs.h"
3067#include <pthread.h>
3068int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00003069pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00003070; return 0; }
3071EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003072if { (eval echo configure:3073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00003073 rm -rf conftest*
3074 have_pthread_t=yes
3075else
3076 echo "configure: failed program was:" >&5
3077 cat conftest.$ac_ext >&5
3078fi
3079rm -f conftest*
3080echo "$ac_t""$have_pthread_t" 1>&6
3081if test "$have_pthread_t" = yes ; then
3082 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
3083 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003084echo "configure:3085: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003085 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00003086 echo $ac_n "(cached) $ac_c" 1>&6
3087else
3088 if test "$cross_compiling" = yes; then
3089 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3090else
3091 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003092#line 3093 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00003093#include "confdefs.h"
3094#include <stdio.h>
3095 #include <pthread.h>
3096 main()
3097 {
3098 FILE *f=fopen("conftestval", "w");
3099 if (!f) exit(1);
3100 fprintf(f, "%d\n", sizeof(pthread_t));
3101 exit(0);
3102 }
3103EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003104if { (eval echo configure:3105: \"$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 +00003105then
3106 ac_cv_sizeof_pthread_t=`cat conftestval`
3107else
3108 echo "configure: failed program was:" >&5
3109 cat conftest.$ac_ext >&5
3110 rm -fr conftest*
3111 ac_cv_sizeof_pthread_t=0
3112fi
3113rm -fr conftest*
3114fi
3115
3116
3117fi
3118
3119 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
3120 cat >> confdefs.h <<EOF
3121#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
3122EOF
3123
3124fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00003125CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00003126
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003127# Minor variations in building a framework between NextStep versions 4 and 5
3128
3129case $ac_sys_system/$ac_sys_release in
Guido van Rossum5839e582000-10-09 19:52:35 +00003130 Darwin/*)
3131 ns_undef_sym='_environ'
3132 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003133 next/4*)
3134 ns_undef_sym='__environ'
3135 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
3136 next/5*)
3137 ns_undef_sym='_environ'
3138 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
3139esac
3140
3141echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003142echo "configure:3143: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003143if test "$with_next_framework"
3144then
3145 OPT="$OPT -fno-common"
3146 # -U __environ is needed since bundles don't have access
3147 # to crt0 when built but will always be linked against it
3148 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
3149 cat >> confdefs.h <<\EOF
3150#define WITH_NEXT_FRAMEWORK 1
3151EOF
3152
3153 echo "$ac_t""yes" 1>&6
3154else
3155 echo "$ac_t""no" 1>&6
3156fi
3157
3158echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003159echo "configure:3160: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003160if test "$with_next_framework" -o "$with_dyld"
3161then
3162 if test "$with_dyld"
3163 then
3164 echo "$ac_t""yes" 1>&6
3165 else
3166 echo "$ac_t""required for framework build" 1>&6
3167 fi
3168 cat >> confdefs.h <<\EOF
3169#define WITH_DYLD 1
3170EOF
3171
3172 ns_dyld='set'
3173else
3174 echo "$ac_t""no" 1>&6
3175fi
3176
Guido van Rossum0a516c91994-09-12 10:58:40 +00003177# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00003178
3179
3180
3181
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003182
Guido van Rossum0a516c91994-09-12 10:58:40 +00003183# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00003184# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003185echo $ac_n "checking SO""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003186echo "configure:3187: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003187if test -z "$SO"
3188then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003189 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003190 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003191 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003192 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003193 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003194fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003195echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003196# LDSHARED is the ld *command* used to create shared library
3197# -- "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 +00003198# (Shared libraries in this instance are shared modules to be loaded into
3199# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003200echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003201echo "configure:3202: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003202if test -z "$LDSHARED"
3203then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003204 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003205 AIX*)
3206 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
3207 LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp"
3208 ;;
3209 BeOS*)
3210 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
3211 LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
3212 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003213 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003214 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003215 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00003216 SunOS/5*)
3217 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003218 then LDSHARED='$(CC) -shared'
Greg Ward57c9a6632000-05-26 12:22:54 +00003219 else LDSHARED="ld -G";
3220 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003221 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003222 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3223 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum3dc0a512000-10-05 18:00:06 +00003224 Darwin/*|next/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003225 if test "$ns_dyld"
Guido van Rossumacb14c72001-01-10 21:41:16 +00003226 then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003227 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
3228 fi
Guido van Rossum3dc0a512000-10-05 18:00:06 +00003229 if test "$with_next_framework" ; then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003230 LDSHARED="$LDSHARED \$(LDLIBRARY)"
3231 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00003232 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003233 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003234 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003235 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00003236 NetBSD*)
3237 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3238 then
3239 LDSHARED="cc -shared"
3240 else
3241 LDSHARED="ld -Bshareable"
3242 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003243 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003244 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003245 then
3246 LDSHARED="cc -shared ${LDFLAGS}"
3247 else
3248 LDSHARED="ld -Bshareable ${LDFLAGS}"
3249 fi;;
Martin v. Löwisbec19582001-03-21 15:57:54 +00003250 UnixWare*)
3251 if test "$GCC" = "yes"
3252 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003253 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003254 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003255 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003256 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003257 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003258 *) LDSHARED="ld";;
3259 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003260fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003261echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003262BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003263# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003264# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003265echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003266echo "configure:3267: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003267if test -z "$CCSHARED"
3268then
Guido van Rossum07397971997-04-29 21:49:50 +00003269 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003270 SunOS*) if test "$GCC" = yes;
3271 then CCSHARED="-fPIC";
3272 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003273 hp*|HP*) if test "$GCC" = yes;
3274 then CCSHARED="-fpic";
3275 else CCSHARED="+z";
3276 fi;;
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003277 Linux*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003278 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003279 OpenBSD*) CCSHARED="-fpic";;
3280 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Martin v. Löwisbec19582001-03-21 15:57:54 +00003281 UnixWare*)
3282 if test "$GCC" = "yes"
3283 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003284 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003285 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003286 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003287 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003288 IRIX*/6*) case $CC in
3289 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003290 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003291 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003292 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003293 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003294fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003295echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003296# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003297# the python executable -- this is only needed for a few systems
3298echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003299echo "configure:3300: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003300if test -z "$LINKFORSHARED"
3301then
Guido van Rossum07397971997-04-29 21:49:50 +00003302 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003303 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003304 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00003305 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003306 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00003307 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003308 # -u libsys_s pulls in all symbols in libsys
3309 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
3310 # -u __dummy makes the linker aware of the objc runtime
3311 # in System.framework; otherwise, __objcInit (referenced in
3312 # crt1.o) gets erroneously defined as common, which breaks dynamic
3313 # loading of any modules which reference it in System.framework
3314 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Neil Schemenauer4e425612001-06-19 15:44:15 +00003315 Darwin/*) LINKFORSHARED="-u __dummy -u _PyMac_Error -framework System -framework Foundation -framework Carbon" ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003316 UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003317 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003318 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003319 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003320 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3321 then
3322 LINKFORSHARED="-Wl,--export-dynamic"
3323 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003324 SunOS/5*) case $CC in
3325 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003326 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003327 then
3328 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003329 fi;;
3330 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003331 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003332fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003333echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003334
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003335
3336echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003337echo "configure:3338: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003338if test ! "$LIBRARY" = "$LDLIBRARY"
3339then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003340 case $ac_sys_system in
3341 CYGWIN*)
3342 # Cygwin needs CCSHARED when building extension DLLs
3343 # but not when building the interpreter DLL.
3344 CFLAGSFORSHARED='';;
3345 *)
3346 CFLAGSFORSHARED='$(CCSHARED)'
3347 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003348fi
3349echo "$ac_t""$CFLAGSFORSHARED" 1>&6
3350
Guido van Rossum627b2d71993-12-24 10:39:16 +00003351# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00003352echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003353echo "configure:3354: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003354ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003355if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003356 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003357else
3358 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003359LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003360cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003361#line 3362 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003362#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003363/* Override any gcc2 internal prototype to avoid an error. */
3364/* We use char because int might match the return type of a gcc2
3365 builtin and then its argument prototype would still apply. */
3366char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003367
Guido van Rossumf78abae1997-01-21 22:02:36 +00003368int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003369dlopen()
3370; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003371EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003372if { (eval echo configure:3373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003373 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003374 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003375else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003376 echo "configure: failed program was:" >&5
3377 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003378 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003379 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003380fi
3381rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003382LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003383
Guido van Rossum627b2d71993-12-24 10:39:16 +00003384fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003385if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003386 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003387 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3388 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003389 cat >> confdefs.h <<EOF
3390#define $ac_tr_lib 1
3391EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003392
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003393 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003394
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003395else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003396 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003397fi
3398 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00003399echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003400echo "configure:3401: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003401ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003402if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003403 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003404else
3405 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003406LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003407cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003408#line 3409 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003409#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003410/* Override any gcc2 internal prototype to avoid an error. */
3411/* We use char because int might match the return type of a gcc2
3412 builtin and then its argument prototype would still apply. */
3413char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003414
Guido van Rossumf78abae1997-01-21 22:02:36 +00003415int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003416shl_load()
3417; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003418EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003419if { (eval echo configure:3420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003420 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003421 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003422else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003423 echo "configure: failed program was:" >&5
3424 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003425 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003426 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003427fi
3428rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003429LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003430
Guido van Rossum627b2d71993-12-24 10:39:16 +00003431fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003432if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003433 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003434 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3435 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003436 cat >> confdefs.h <<EOF
3437#define $ac_tr_lib 1
3438EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003439
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003440 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003441
3442else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003443 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003444fi
3445 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003446
3447# checks for system dependent C++ extensions support
3448case "$ac_sys_system" in
3449 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003450echo "configure:3451: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003451 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003452#line 3453 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003453#include "confdefs.h"
3454#include "/usr/lpp/xlC/include/load.h"
3455int main() {
3456loadAndInit("", 0, "")
3457; return 0; }
3458EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003459if { (eval echo configure:3460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003460 rm -rf conftest*
3461 cat >> confdefs.h <<\EOF
3462#define AIX_GENUINE_CPLUSPLUS 1
3463EOF
3464
3465 echo "$ac_t""yes" 1>&6
3466else
3467 echo "configure: failed program was:" >&5
3468 cat conftest.$ac_ext >&5
3469 rm -rf conftest*
3470 echo "$ac_t""no" 1>&6
3471fi
3472rm -f conftest*;;
3473 *) ;;
3474esac
3475
Guido van Rossum70c7f481998-03-26 18:44:10 +00003476# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3477# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003478# BeOS' sockets are stashed in libnet.
3479case "$ac_sys_system" in
3480IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003481*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003482echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003483echo "configure:3484: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003484ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003485if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003486 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003487else
3488 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003489LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003490cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003491#line 3492 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003492#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003493/* Override any gcc2 internal prototype to avoid an error. */
3494/* We use char because int might match the return type of a gcc2
3495 builtin and then its argument prototype would still apply. */
3496char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003497
Guido van Rossumf78abae1997-01-21 22:02:36 +00003498int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003499t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003500; return 0; }
3501EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003502if { (eval echo configure:3503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003503 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003504 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003505else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003506 echo "configure: failed program was:" >&5
3507 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003508 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003509 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003510fi
3511rm -f conftest*
3512LIBS="$ac_save_LIBS"
3513
3514fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003515if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003516 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003517 LIBS="-lnsl $LIBS"
3518else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003519 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003520fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003521 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003522echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003523echo "configure:3524: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003524ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003525if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003526 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003527else
3528 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003529LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003530cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003531#line 3532 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003532#include "confdefs.h"
3533/* Override any gcc2 internal prototype to avoid an error. */
3534/* We use char because int might match the return type of a gcc2
3535 builtin and then its argument prototype would still apply. */
3536char socket();
3537
3538int main() {
3539socket()
3540; return 0; }
3541EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003542if { (eval echo configure:3543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003543 rm -rf conftest*
3544 eval "ac_cv_lib_$ac_lib_var=yes"
3545else
3546 echo "configure: failed program was:" >&5
3547 cat conftest.$ac_ext >&5
3548 rm -rf conftest*
3549 eval "ac_cv_lib_$ac_lib_var=no"
3550fi
3551rm -f conftest*
3552LIBS="$ac_save_LIBS"
3553
3554fi
3555if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3556 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003557 LIBS="-lsocket $LIBS"
3558else
3559 echo "$ac_t""no" 1>&6
3560fi
3561 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003562;;
3563esac
3564case "$ac_sys_system" in
3565BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003566echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003567echo "configure:3568: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003568ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003569if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003570 echo $ac_n "(cached) $ac_c" 1>&6
3571else
3572 ac_save_LIBS="$LIBS"
3573LIBS="-lnet $LIBS $LIBS"
3574cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003575#line 3576 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003576#include "confdefs.h"
3577/* Override any gcc2 internal prototype to avoid an error. */
3578/* We use char because int might match the return type of a gcc2
3579 builtin and then its argument prototype would still apply. */
3580char socket();
3581
3582int main() {
3583socket()
3584; return 0; }
3585EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003586if { (eval echo configure:3587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003587 rm -rf conftest*
3588 eval "ac_cv_lib_$ac_lib_var=yes"
3589else
3590 echo "configure: failed program was:" >&5
3591 cat conftest.$ac_ext >&5
3592 rm -rf conftest*
3593 eval "ac_cv_lib_$ac_lib_var=no"
3594fi
3595rm -f conftest*
3596LIBS="$ac_save_LIBS"
3597
3598fi
3599if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3600 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003601 LIBS="-lnet $LIBS"
3602else
3603 echo "$ac_t""no" 1>&6
3604fi
3605 # BeOS
3606;;
3607esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003608
Guido van Rossuma68acba1996-07-31 17:36:39 +00003609echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003610echo "configure:3611: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003611# Check whether --with-libs or --without-libs was given.
3612if test "${with_libs+set}" = set; then
3613 withval="$with_libs"
3614
3615echo "$ac_t""$withval" 1>&6
3616LIBS="$withval $LIBS"
3617
3618else
3619 echo "$ac_t""no" 1>&6
3620fi
3621
Guido van Rossum7f43da71994-08-01 12:15:30 +00003622
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003623# Determine if signalmodule should be used.
3624
3625
3626echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003627echo "configure:3628: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003628# Check whether --with-signal-module or --without-signal-module was given.
3629if test "${with_signal_module+set}" = set; then
3630 withval="$with_signal_module"
3631 :
3632fi
3633
3634
3635if test -z "$with_signal_module"
3636then with_signal_module="yes"
3637fi
3638echo "$ac_t""$with_signal_module" 1>&6
3639
3640if test "${with_signal_module}" = "yes"; then
3641 USE_SIGNAL_MODULE=""
3642 SIGNAL_OBJS=""
3643else
3644 USE_SIGNAL_MODULE="#"
3645 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3646fi
3647
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003648# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003649
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003650USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003651
Guido van Rossumec2f0731997-01-22 20:54:01 +00003652echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003653echo "configure:3654: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003654
3655# Check whether --with-dec-threads or --without-dec-threads was given.
3656if test "${with_dec_threads+set}" = set; then
3657 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003658
3659echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003660LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003661if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003662 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003663fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003664else
3665 echo "$ac_t""no" 1>&6
3666fi
3667
3668
3669echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003670echo "configure:3671: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003671# Check whether --with-threads or --without-threads was given.
3672if test "${with_threads+set}" = set; then
3673 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003674 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003675fi
3676
3677
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003678# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003679# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003680if test "${with_thread+set}" = set; then
3681 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003682
3683with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003684fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003685
3686
3687if test -z "$with_threads"
3688then with_threads="yes"
3689fi
3690echo "$ac_t""$with_threads" 1>&6
3691
3692if test "$with_threads" = "no"
3693then
3694 USE_THREAD_MODULE="#"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003695elif test "$ac_cv_kpthread" = "yes"
3696then
3697 CC="$CC -Kpthread"
3698 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003699#define WITH_THREAD 1
3700EOF
3701
Martin v. Löwis130fb172001-07-19 11:00:41 +00003702 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003703#define _POSIX_THREADS 1
3704EOF
3705
Martin v. Löwis130fb172001-07-19 11:00:41 +00003706 LIBOBJS="$LIBOBJS thread.o"
3707else
3708 if test ! -z "$with_threads" -a -d "$with_threads"
3709 then LDFLAGS="$LDFLAGS -L$with_threads"
3710 fi
3711 if test ! -z "$withval" -a -d "$withval"
3712 then LDFLAGS="$LDFLAGS -L$withval"
3713 fi
3714 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003715#define _REENTRANT 1
3716EOF
3717
Martin v. Löwis130fb172001-07-19 11:00:41 +00003718 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003719echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003720echo "configure:3721: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003721if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003722 echo $ac_n "(cached) $ac_c" 1>&6
3723else
3724 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003725#line 3726 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003726#include "confdefs.h"
3727#include <mach/cthreads.h>
3728EOF
3729ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003730{ (eval echo configure:3731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003731ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003732if test -z "$ac_err"; then
3733 rm -rf conftest*
3734 eval "ac_cv_header_$ac_safe=yes"
3735else
3736 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003737 echo "configure: failed program was:" >&5
3738 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003739 rm -rf conftest*
3740 eval "ac_cv_header_$ac_safe=no"
3741fi
3742rm -f conftest*
3743fi
3744if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3745 echo "$ac_t""yes" 1>&6
3746 cat >> confdefs.h <<\EOF
3747#define WITH_THREAD 1
3748EOF
3749
Martin v. Löwis130fb172001-07-19 11:00:41 +00003750 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003751#define C_THREADS 1
3752EOF
3753
Martin v. Löwis130fb172001-07-19 11:00:41 +00003754 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003755else
3756 echo "$ac_t""no" 1>&6
3757
Martin v. Löwis130fb172001-07-19 11:00:41 +00003758 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003759echo "configure:3760: checking for --with-pth" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00003760 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003761if test "${with_pth+set}" = set; then
3762 withval="$with_pth"
3763
Martin v. Löwis130fb172001-07-19 11:00:41 +00003764 echo "$ac_t""$withval" 1>&6
3765 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003766#define WITH_THREAD 1
3767EOF
3768
Martin v. Löwis130fb172001-07-19 11:00:41 +00003769 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003770#define HAVE_PTH 1
3771EOF
3772
Martin v. Löwis130fb172001-07-19 11:00:41 +00003773 LIBS="-lpth $LIBS"
3774 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003775else
3776
Martin v. Löwis130fb172001-07-19 11:00:41 +00003777 echo "$ac_t""no" 1>&6
3778 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003779echo "configure:3780: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003780ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003781if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003782 echo $ac_n "(cached) $ac_c" 1>&6
3783else
3784 ac_save_LIBS="$LIBS"
3785LIBS="-lpthread $LIBS"
3786cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003787#line 3788 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003788#include "confdefs.h"
3789/* Override any gcc2 internal prototype to avoid an error. */
3790/* We use char because int might match the return type of a gcc2
3791 builtin and then its argument prototype would still apply. */
3792char pthread_create();
3793
3794int main() {
3795pthread_create()
3796; return 0; }
3797EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003798if { (eval echo configure:3799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003799 rm -rf conftest*
3800 eval "ac_cv_lib_$ac_lib_var=yes"
3801else
3802 echo "configure: failed program was:" >&5
3803 cat conftest.$ac_ext >&5
3804 rm -rf conftest*
3805 eval "ac_cv_lib_$ac_lib_var=no"
3806fi
3807rm -f conftest*
3808LIBS="$ac_save_LIBS"
3809
3810fi
3811if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3812 echo "$ac_t""yes" 1>&6
3813 cat >> confdefs.h <<\EOF
3814#define WITH_THREAD 1
3815EOF
3816
Martin v. Löwis130fb172001-07-19 11:00:41 +00003817 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003818#define _POSIX_THREADS 1
3819EOF
3820
Martin v. Löwis130fb172001-07-19 11:00:41 +00003821 LIBS="-lpthread $LIBS"
3822 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003823else
3824 echo "$ac_t""no" 1>&6
3825
Martin v. Löwis130fb172001-07-19 11:00:41 +00003826 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003827echo "configure:3828: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003828if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003829 echo $ac_n "(cached) $ac_c" 1>&6
3830else
3831 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003832#line 3833 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003833#include "confdefs.h"
3834/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003835 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003836#include <assert.h>
3837/* Override any gcc2 internal prototype to avoid an error. */
3838/* We use char because int might match the return type of a gcc2
3839 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003840char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003841
3842int main() {
3843
3844/* The GNU C library defines this for functions which it implements
3845 to always fail with ENOSYS. Some functions are actually named
3846 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003847#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003848choke me
3849#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003850pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003851#endif
3852
3853; return 0; }
3854EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003855if { (eval echo configure:3856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003856 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003857 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003858else
3859 echo "configure: failed program was:" >&5
3860 cat conftest.$ac_ext >&5
3861 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003862 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003863fi
3864rm -f conftest*
3865fi
3866
Guido van Rossumea516321998-12-17 18:08:55 +00003867if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003868 echo "$ac_t""yes" 1>&6
3869 cat >> confdefs.h <<\EOF
3870#define WITH_THREAD 1
3871EOF
3872
Martin v. Löwis130fb172001-07-19 11:00:41 +00003873 case $ac_sys_system in
3874 Darwin*) ;;
3875 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003876#define _POSIX_THREADS 1
3877EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003878;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003879 esac
3880 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003881else
3882 echo "$ac_t""no" 1>&6
3883
Martin v. Löwis130fb172001-07-19 11:00:41 +00003884 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003885echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003886echo "configure:3887: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003887if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003888 echo $ac_n "(cached) $ac_c" 1>&6
3889else
3890 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003891#line 3892 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003892#include "confdefs.h"
3893#include <kernel/OS.h>
3894EOF
3895ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003896{ (eval echo configure:3897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003897ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003898if test -z "$ac_err"; then
3899 rm -rf conftest*
3900 eval "ac_cv_header_$ac_safe=yes"
3901else
3902 echo "$ac_err" >&5
3903 echo "configure: failed program was:" >&5
3904 cat conftest.$ac_ext >&5
3905 rm -rf conftest*
3906 eval "ac_cv_header_$ac_safe=no"
3907fi
3908rm -f conftest*
3909fi
3910if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3911 echo "$ac_t""yes" 1>&6
3912 cat >> confdefs.h <<\EOF
3913#define WITH_THREAD 1
3914EOF
3915
Martin v. Löwis130fb172001-07-19 11:00:41 +00003916 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003917#define BEOS_THREADS 1
3918EOF
3919
Martin v. Löwis130fb172001-07-19 11:00:41 +00003920 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003921else
3922 echo "$ac_t""no" 1>&6
3923
Martin v. Löwis130fb172001-07-19 11:00:41 +00003924 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003925echo "configure:3926: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003926ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003927if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003928 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003929else
3930 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003931LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003932cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003933#line 3934 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003934#include "confdefs.h"
3935/* Override any gcc2 internal prototype to avoid an error. */
3936/* We use char because int might match the return type of a gcc2
3937 builtin and then its argument prototype would still apply. */
3938char pthread_create();
3939
3940int main() {
3941pthread_create()
3942; return 0; }
3943EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003944if { (eval echo configure:3945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003945 rm -rf conftest*
3946 eval "ac_cv_lib_$ac_lib_var=yes"
3947else
3948 echo "configure: failed program was:" >&5
3949 cat conftest.$ac_ext >&5
3950 rm -rf conftest*
3951 eval "ac_cv_lib_$ac_lib_var=no"
3952fi
3953rm -f conftest*
3954LIBS="$ac_save_LIBS"
3955
3956fi
3957if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3958 echo "$ac_t""yes" 1>&6
3959 cat >> confdefs.h <<\EOF
3960#define WITH_THREAD 1
3961EOF
3962
Martin v. Löwis130fb172001-07-19 11:00:41 +00003963 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003964#define _POSIX_THREADS 1
3965EOF
3966
Martin v. Löwis130fb172001-07-19 11:00:41 +00003967 LIBS="$LIBS -lpthreads"
3968 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003969else
3970 echo "$ac_t""no" 1>&6
3971
Martin v. Löwis130fb172001-07-19 11:00:41 +00003972 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003973echo "configure:3974: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003974ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003975if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003976 echo $ac_n "(cached) $ac_c" 1>&6
3977else
3978 ac_save_LIBS="$LIBS"
3979LIBS="-lc_r $LIBS"
3980cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003981#line 3982 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003982#include "confdefs.h"
3983/* Override any gcc2 internal prototype to avoid an error. */
3984/* We use char because int might match the return type of a gcc2
3985 builtin and then its argument prototype would still apply. */
3986char pthread_create();
3987
3988int main() {
3989pthread_create()
3990; return 0; }
3991EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003992if { (eval echo configure:3993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003993 rm -rf conftest*
3994 eval "ac_cv_lib_$ac_lib_var=yes"
3995else
3996 echo "configure: failed program was:" >&5
3997 cat conftest.$ac_ext >&5
3998 rm -rf conftest*
3999 eval "ac_cv_lib_$ac_lib_var=no"
4000fi
4001rm -f conftest*
4002LIBS="$ac_save_LIBS"
4003
4004fi
4005if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4006 echo "$ac_t""yes" 1>&6
4007 cat >> confdefs.h <<\EOF
4008#define WITH_THREAD 1
4009EOF
4010
Martin v. Löwis130fb172001-07-19 11:00:41 +00004011 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00004012#define _POSIX_THREADS 1
4013EOF
4014
Martin v. Löwis130fb172001-07-19 11:00:41 +00004015 LIBS="$LIBS -lc_r"
4016 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004017else
4018 echo "$ac_t""no" 1>&6
4019
Martin v. Löwis130fb172001-07-19 11:00:41 +00004020 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004021echo "configure:4022: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00004022ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004023if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004024 echo $ac_n "(cached) $ac_c" 1>&6
4025else
4026 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00004027LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004028cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004029#line 4030 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004030#include "confdefs.h"
4031/* Override any gcc2 internal prototype to avoid an error. */
4032/* We use char because int might match the return type of a gcc2
4033 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00004034char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004035
4036int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00004037__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004038; return 0; }
4039EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004040if { (eval echo configure:4041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004041 rm -rf conftest*
4042 eval "ac_cv_lib_$ac_lib_var=yes"
4043else
4044 echo "configure: failed program was:" >&5
4045 cat conftest.$ac_ext >&5
4046 rm -rf conftest*
4047 eval "ac_cv_lib_$ac_lib_var=no"
4048fi
4049rm -f conftest*
4050LIBS="$ac_save_LIBS"
4051
4052fi
4053if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4054 echo "$ac_t""yes" 1>&6
4055 cat >> confdefs.h <<\EOF
4056#define WITH_THREAD 1
4057EOF
4058
Martin v. Löwis130fb172001-07-19 11:00:41 +00004059 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004060#define _POSIX_THREADS 1
4061EOF
4062
Martin v. Löwis130fb172001-07-19 11:00:41 +00004063 LIBS="$LIBS -lthread"
4064 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00004065else
4066 echo "$ac_t""no" 1>&6
4067
Martin v. Löwis130fb172001-07-19 11:00:41 +00004068 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004069echo "configure:4070: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004070ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
4071if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4072 echo $ac_n "(cached) $ac_c" 1>&6
4073else
4074 ac_save_LIBS="$LIBS"
4075LIBS="-lpthread $LIBS"
4076cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004077#line 4078 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004078#include "confdefs.h"
4079/* Override any gcc2 internal prototype to avoid an error. */
4080/* We use char because int might match the return type of a gcc2
4081 builtin and then its argument prototype would still apply. */
4082char __pthread_create_system();
4083
4084int main() {
4085__pthread_create_system()
4086; return 0; }
4087EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004088if { (eval echo configure:4089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004089 rm -rf conftest*
4090 eval "ac_cv_lib_$ac_lib_var=yes"
4091else
4092 echo "configure: failed program was:" >&5
4093 cat conftest.$ac_ext >&5
4094 rm -rf conftest*
4095 eval "ac_cv_lib_$ac_lib_var=no"
4096fi
4097rm -f conftest*
4098LIBS="$ac_save_LIBS"
4099
4100fi
4101if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4102 echo "$ac_t""yes" 1>&6
4103 cat >> confdefs.h <<\EOF
4104#define WITH_THREAD 1
4105EOF
4106
Martin v. Löwis130fb172001-07-19 11:00:41 +00004107 cat >> confdefs.h <<\EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004108#define _POSIX_THREADS 1
4109EOF
4110
Martin v. Löwis130fb172001-07-19 11:00:41 +00004111 LIBS="$LIBS -lpthread"
4112 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004113else
4114 echo "$ac_t""no" 1>&6
4115
Martin v. Löwis130fb172001-07-19 11:00:41 +00004116 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004117echo "configure:4118: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00004118ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004119if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00004120 echo $ac_n "(cached) $ac_c" 1>&6
4121else
4122 ac_save_LIBS="$LIBS"
4123LIBS="-lcma $LIBS"
4124cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004125#line 4126 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004126#include "confdefs.h"
4127/* Override any gcc2 internal prototype to avoid an error. */
4128/* We use char because int might match the return type of a gcc2
4129 builtin and then its argument prototype would still apply. */
4130char pthread_create();
4131
4132int main() {
4133pthread_create()
4134; return 0; }
4135EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004136if { (eval echo configure:4137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00004137 rm -rf conftest*
4138 eval "ac_cv_lib_$ac_lib_var=yes"
4139else
4140 echo "configure: failed program was:" >&5
4141 cat conftest.$ac_ext >&5
4142 rm -rf conftest*
4143 eval "ac_cv_lib_$ac_lib_var=no"
4144fi
4145rm -f conftest*
4146LIBS="$ac_save_LIBS"
4147
4148fi
4149if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4150 echo "$ac_t""yes" 1>&6
4151 cat >> confdefs.h <<\EOF
4152#define WITH_THREAD 1
4153EOF
4154
Martin v. Löwis130fb172001-07-19 11:00:41 +00004155 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00004156#define _POSIX_THREADS 1
4157EOF
4158
Martin v. Löwis130fb172001-07-19 11:00:41 +00004159 LIBS="$LIBS -lcma"
4160 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004161else
4162 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00004163
Martin v. Löwis130fb172001-07-19 11:00:41 +00004164 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00004165fi
4166
Martin v. Löwis130fb172001-07-19 11:00:41 +00004167
Guido van Rossum627b2d71993-12-24 10:39:16 +00004168fi
4169
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004170fi
4171
Guido van Rossum0be3e491997-05-22 20:33:33 +00004172fi
4173
Guido van Rossum49545951997-12-02 19:28:29 +00004174fi
4175
Guido van Rossumb93a8621998-05-07 13:27:32 +00004176fi
4177
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004178fi
4179
Guido van Rossumad678af1998-10-02 14:42:15 +00004180fi
4181
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004182fi
4183
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004184fi
4185
Guido van Rossum0be3e491997-05-22 20:33:33 +00004186
Martin v. Löwis130fb172001-07-19 11:00:41 +00004187 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004188echo "configure:4189: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004189ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004190if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004191 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192else
4193 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004194LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004195cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004196#line 4197 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004197#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004198/* Override any gcc2 internal prototype to avoid an error. */
4199/* We use char because int might match the return type of a gcc2
4200 builtin and then its argument prototype would still apply. */
4201char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004202
Guido van Rossumf78abae1997-01-21 22:02:36 +00004203int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004204usconfig()
4205; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004206EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004207if { (eval echo configure:4208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004208 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004209 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004210else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004211 echo "configure: failed program was:" >&5
4212 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004213 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004214 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004215fi
4216rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004217LIBS="$ac_save_LIBS"
4218
4219fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004220if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004221 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004222 cat >> confdefs.h <<\EOF
4223#define WITH_THREAD 1
4224EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004225
Martin v. Löwis130fb172001-07-19 11:00:41 +00004226 LIBS="$LIBS -lmpc"
4227 LIBOBJS="$LIBOBJS thread.o"
4228 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004229else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004230 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004231fi
4232
Martin v. Löwis130fb172001-07-19 11:00:41 +00004233 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004234echo "configure:4235: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004235ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004236if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004237 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004238else
4239 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004240LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004241cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004242#line 4243 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004243#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004244/* Override any gcc2 internal prototype to avoid an error. */
4245/* We use char because int might match the return type of a gcc2
4246 builtin and then its argument prototype would still apply. */
4247char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004248
Guido van Rossumf78abae1997-01-21 22:02:36 +00004249int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004250thr_create()
4251; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004252EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004253if { (eval echo configure:4254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004254 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004255 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004257 echo "configure: failed program was:" >&5
4258 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004259 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004260 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004261fi
4262rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263LIBS="$ac_save_LIBS"
4264
4265fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004266if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004267 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268 cat >> confdefs.h <<\EOF
4269#define WITH_THREAD 1
4270EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004271
Martin v. Löwis130fb172001-07-19 11:00:41 +00004272 LIBS="$LIBS -lthread"
4273 LIBOBJS="$LIBOBJS thread.o"
4274 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004275else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004276 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004277fi
4278
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004279
Martin v. Löwis130fb172001-07-19 11:00:41 +00004280 if test "$USE_THREAD_MODULE" != "#"
4281 then
4282 # If the above checks didn't disable threads, (at least) OSF1
4283 # needs this '-threads' argument during linking.
4284 case $ac_sys_system in
4285 OSF1) LDLAST=-threads;;
4286 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004287 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004288fi
4289
Barry Warsawef82cd72000-06-30 16:21:01 +00004290# Check for GC support
4291
4292USE_GC_MODULE=""
4293echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004294echo "configure:4295: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004295# Check whether --with-cycle-gc or --without-cycle-gc was given.
4296if test "${with_cycle_gc+set}" = set; then
4297 withval="$with_cycle_gc"
4298 :
4299fi
4300
4301
4302if test -z "$with_cycle_gc"
4303then with_cycle_gc="yes"
4304fi
4305if test "$with_cycle_gc" = "no"
4306then
4307 USE_GC_MODULE="#"
4308else
4309 cat >> confdefs.h <<\EOF
4310#define WITH_CYCLE_GC 1
4311EOF
4312
4313fi
4314echo "$ac_t""$with_cycle_gc" 1>&6
4315
Neil Schemenauera35c6882001-02-27 04:45:05 +00004316# Check for Python-specific malloc support
4317echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004318echo "configure:4319: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004319# Check whether --with-pymalloc or --without-pymalloc was given.
4320if test "${with_pymalloc+set}" = set; then
4321 withval="$with_pymalloc"
4322
4323if test "$withval" != no
4324then cat >> confdefs.h <<\EOF
4325#define WITH_PYMALLOC 1
4326EOF
4327 echo "$ac_t""yes" 1>&6
4328else echo "$ac_t""no" 1>&6
4329fi
4330else
4331 echo "$ac_t""no" 1>&6
4332fi
4333
4334
Barry Warsawef82cd72000-06-30 16:21:01 +00004335# Check for --with-wctype-functions
4336echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004337echo "configure:4338: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004338# Check whether --with-wctype-functions or --without-wctype-functions was given.
4339if test "${with_wctype_functions+set}" = set; then
4340 withval="$with_wctype_functions"
4341
4342if test "$withval" != no
4343then cat >> confdefs.h <<\EOF
4344#define WANT_WCTYPE_FUNCTIONS 1
4345EOF
4346 echo "$ac_t""yes" 1>&6
4347else echo "$ac_t""no" 1>&6
4348fi
4349else
4350 echo "$ac_t""no" 1>&6
4351fi
4352
4353
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004354# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004355
4356DLINCLDIR=/
4357
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004358echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004359echo "configure:4360: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004360# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004361if test "${with_sgi_dl+set}" = set; then
4362 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004363
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004364echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004365cat >> confdefs.h <<\EOF
4366#define WITH_SGI_DL 1
4367EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004368
Guido van Rossume97ee181999-12-20 21:27:22 +00004369DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004370dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004371if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004372then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004373else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004374fi
4375DLINCLDIR=${dldir}
4376LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004377else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004378 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004379fi
4380
4381
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004382echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004383echo "configure:4384: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004384# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004385if test "${with_dl_dld+set}" = set; then
4386 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004387
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004388echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004389cat >> confdefs.h <<\EOF
4390#define WITH_DL_DLD 1
4391EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004392
Guido van Rossume97ee181999-12-20 21:27:22 +00004393DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004394dldir=`echo "$withval" | sed 's/,.*//'`
4395dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004396if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004397then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004398else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004399fi
4400DLINCLDIR=${dldir}
4401LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004402else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004403 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004404fi
4405
4406
Guido van Rossume97ee181999-12-20 21:27:22 +00004407# the dlopen() function means we might want to use dynload_shlib.o. some
4408# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004409for ac_func in dlopen
4410do
4411echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004412echo "configure:4413: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004413if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004414 echo $ac_n "(cached) $ac_c" 1>&6
4415else
4416 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004417#line 4418 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004418#include "confdefs.h"
4419/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004420 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004421#include <assert.h>
4422/* Override any gcc2 internal prototype to avoid an error. */
4423/* We use char because int might match the return type of a gcc2
4424 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004425char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004426
4427int main() {
4428
4429/* The GNU C library defines this for functions which it implements
4430 to always fail with ENOSYS. Some functions are actually named
4431 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004432#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004433choke me
4434#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004435$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004436#endif
4437
4438; return 0; }
4439EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004440if { (eval echo configure:4441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004441 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004442 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004443else
4444 echo "configure: failed program was:" >&5
4445 cat conftest.$ac_ext >&5
4446 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004447 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004448fi
4449rm -f conftest*
4450fi
4451
Thomas Wouters3a584202000-08-05 23:28:51 +00004452if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004453 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004454 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4455 cat >> confdefs.h <<EOF
4456#define $ac_tr_func 1
4457EOF
4458
Guido van Rossume97ee181999-12-20 21:27:22 +00004459else
4460 echo "$ac_t""no" 1>&6
4461fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004462done
Guido van Rossume97ee181999-12-20 21:27:22 +00004463
4464
4465# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4466# loading of modules.
4467
4468echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004469echo "configure:4470: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004470if test -z "$DYNLOADFILE"
4471then
4472 case $ac_sys_system/$ac_sys_release in
4473 AIX*) DYNLOADFILE="dynload_aix.o";;
4474 BeOS*) DYNLOADFILE="dynload_beos.o";;
4475 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossum5839e582000-10-09 19:52:35 +00004476 Darwin/*|next/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004477 *)
4478 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4479 # out any dynamic loading
4480 if test "$ac_cv_func_dlopen" = yes
4481 then DYNLOADFILE="dynload_shlib.o"
4482 else DYNLOADFILE="dynload_stub.o"
4483 fi
4484 ;;
4485 esac
4486fi
4487echo "$ac_t""$DYNLOADFILE" 1>&6
4488if test "$DYNLOADFILE" != "dynload_stub.o"
4489then
4490 cat >> confdefs.h <<\EOF
4491#define HAVE_DYNAMIC_LOADING 1
4492EOF
4493
4494fi
4495
Neil Schemenauer4e425612001-06-19 15:44:15 +00004496# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4497
4498
4499echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004500echo "configure:4501: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004501if test -z "$MACHDEP_OBJS"
4502then
4503 case $ac_sys_system/$ac_sys_release in
4504 Darwin/*)
4505 MACHDEP_OBJS="Mac/Python/macglue.o"
4506 cat >> confdefs.h <<\EOF
4507#define USE_TOOLBOX_OBJECT_GLUE 1
4508EOF
4509
4510 ;;
4511 *) MACHDEP_OBJS="";;
4512 esac
4513fi
4514echo "$ac_t""$DYNLOADFILE" 1>&6
4515
Guido van Rossum627b2d71993-12-24 10:39:16 +00004516# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00004517for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004518 flock fork fsync fdatasync fpathconf ftime ftruncate \
Andrew M. Kuchlinga9586c72001-01-08 17:58:56 +00004519 getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwisb9ab1592001-06-24 21:18:26 +00004520 inet_pton kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004521 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004522 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004523 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00004524 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00004525 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004526 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Woutersc2c12dc2001-07-11 14:45:34 +00004527 truncate uname waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00004528do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004529echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004530echo "configure:4531: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004531if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004532 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004533else
4534 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004535#line 4536 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004536#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004537/* System header to define __stub macros and hopefully few prototypes,
4538 which can conflict with char $ac_func(); below. */
4539#include <assert.h>
4540/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004541/* We use char because int might match the return type of a gcc2
4542 builtin and then its argument prototype would still apply. */
4543char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004544
Guido van Rossumf78abae1997-01-21 22:02:36 +00004545int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004546
Guido van Rossum627b2d71993-12-24 10:39:16 +00004547/* The GNU C library defines this for functions which it implements
4548 to always fail with ENOSYS. Some functions are actually named
4549 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004550#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004551choke me
4552#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004553$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004554#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004555
Guido van Rossum7f43da71994-08-01 12:15:30 +00004556; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004557EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004558if { (eval echo configure:4559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004559 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004560 eval "ac_cv_func_$ac_func=yes"
4561else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004562 echo "configure: failed program was:" >&5
4563 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004564 rm -rf conftest*
4565 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004566fi
4567rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004568fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004569
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004570if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004571 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004572 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004573 cat >> confdefs.h <<EOF
4574#define $ac_tr_func 1
4575EOF
4576
4577else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004578 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004579fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004580done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004581
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004582
Fred Drake8cef4cf2000-06-28 16:40:38 +00004583# check for openpty and forkpty
4584
4585for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004586do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004587echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004588echo "configure:4589: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004589if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004590 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004591else
4592 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004593#line 4594 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004594#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004595/* System header to define __stub macros and hopefully few prototypes,
4596 which can conflict with char $ac_func(); below. */
4597#include <assert.h>
4598/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004599/* We use char because int might match the return type of a gcc2
4600 builtin and then its argument prototype would still apply. */
4601char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004602
Guido van Rossumf78abae1997-01-21 22:02:36 +00004603int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004604
Guido van Rossum627b2d71993-12-24 10:39:16 +00004605/* The GNU C library defines this for functions which it implements
4606 to always fail with ENOSYS. Some functions are actually named
4607 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004608#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004609choke me
4610#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004611$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004612#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004613
Guido van Rossum7f43da71994-08-01 12:15:30 +00004614; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004615EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004616if { (eval echo configure:4617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004617 rm -rf conftest*
4618 eval "ac_cv_func_$ac_func=yes"
4619else
4620 echo "configure: failed program was:" >&5
4621 cat conftest.$ac_ext >&5
4622 rm -rf conftest*
4623 eval "ac_cv_func_$ac_func=no"
4624fi
4625rm -f conftest*
4626fi
4627
4628if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4629 echo "$ac_t""yes" 1>&6
4630 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4631 cat >> confdefs.h <<EOF
4632#define $ac_tr_func 1
4633EOF
4634
4635else
4636 echo "$ac_t""no" 1>&6
4637echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004638echo "configure:4639: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004639ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004640if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004641 echo $ac_n "(cached) $ac_c" 1>&6
4642else
4643 ac_save_LIBS="$LIBS"
4644LIBS="-lutil $LIBS"
4645cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004646#line 4647 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004647#include "confdefs.h"
4648/* Override any gcc2 internal prototype to avoid an error. */
4649/* We use char because int might match the return type of a gcc2
4650 builtin and then its argument prototype would still apply. */
4651char openpty();
4652
4653int main() {
4654openpty()
4655; return 0; }
4656EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004657if { (eval echo configure:4658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004658 rm -rf conftest*
4659 eval "ac_cv_lib_$ac_lib_var=yes"
4660else
4661 echo "configure: failed program was:" >&5
4662 cat conftest.$ac_ext >&5
4663 rm -rf conftest*
4664 eval "ac_cv_lib_$ac_lib_var=no"
4665fi
4666rm -f conftest*
4667LIBS="$ac_save_LIBS"
4668
4669fi
4670if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4671 echo "$ac_t""yes" 1>&6
4672 cat >> confdefs.h <<\EOF
4673#define HAVE_OPENPTY 1
4674EOF
4675 LIBS="$LIBS -lutil"
4676else
4677 echo "$ac_t""no" 1>&6
4678fi
4679
4680fi
4681done
4682
4683for ac_func in forkpty
4684do
4685echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004686echo "configure:4687: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004687if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004688 echo $ac_n "(cached) $ac_c" 1>&6
4689else
4690 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004691#line 4692 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004692#include "confdefs.h"
4693/* System header to define __stub macros and hopefully few prototypes,
4694 which can conflict with char $ac_func(); below. */
4695#include <assert.h>
4696/* Override any gcc2 internal prototype to avoid an error. */
4697/* We use char because int might match the return type of a gcc2
4698 builtin and then its argument prototype would still apply. */
4699char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004700
4701int main() {
4702
4703/* The GNU C library defines this for functions which it implements
4704 to always fail with ENOSYS. Some functions are actually named
4705 something starting with __ and the normal name is an alias. */
4706#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4707choke me
4708#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004709$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004710#endif
4711
4712; return 0; }
4713EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004714if { (eval echo configure:4715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004715 rm -rf conftest*
4716 eval "ac_cv_func_$ac_func=yes"
4717else
4718 echo "configure: failed program was:" >&5
4719 cat conftest.$ac_ext >&5
4720 rm -rf conftest*
4721 eval "ac_cv_func_$ac_func=no"
4722fi
4723rm -f conftest*
4724fi
4725
4726if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4727 echo "$ac_t""yes" 1>&6
4728 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4729 cat >> confdefs.h <<EOF
4730#define $ac_tr_func 1
4731EOF
4732
4733else
4734 echo "$ac_t""no" 1>&6
4735echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004736echo "configure:4737: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004737ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004738if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004739 echo $ac_n "(cached) $ac_c" 1>&6
4740else
4741 ac_save_LIBS="$LIBS"
4742LIBS="-lutil $LIBS"
4743cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004744#line 4745 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004745#include "confdefs.h"
4746/* Override any gcc2 internal prototype to avoid an error. */
4747/* We use char because int might match the return type of a gcc2
4748 builtin and then its argument prototype would still apply. */
4749char forkpty();
4750
4751int main() {
4752forkpty()
4753; return 0; }
4754EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004755if { (eval echo configure:4756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004756 rm -rf conftest*
4757 eval "ac_cv_lib_$ac_lib_var=yes"
4758else
4759 echo "configure: failed program was:" >&5
4760 cat conftest.$ac_ext >&5
4761 rm -rf conftest*
4762 eval "ac_cv_lib_$ac_lib_var=no"
4763fi
4764rm -f conftest*
4765LIBS="$ac_save_LIBS"
4766
4767fi
4768if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4769 echo "$ac_t""yes" 1>&6
4770 cat >> confdefs.h <<\EOF
4771#define HAVE_FORKPTY 1
4772EOF
4773 LIBS="$LIBS -lutil"
4774else
4775 echo "$ac_t""no" 1>&6
4776fi
4777
4778fi
4779done
4780
4781
4782# check for long file support functions
4783for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4784do
4785echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004786echo "configure:4787: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004787if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004788 echo $ac_n "(cached) $ac_c" 1>&6
4789else
4790 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004791#line 4792 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004792#include "confdefs.h"
4793/* System header to define __stub macros and hopefully few prototypes,
4794 which can conflict with char $ac_func(); below. */
4795#include <assert.h>
4796/* Override any gcc2 internal prototype to avoid an error. */
4797/* We use char because int might match the return type of a gcc2
4798 builtin and then its argument prototype would still apply. */
4799char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004800
4801int main() {
4802
4803/* The GNU C library defines this for functions which it implements
4804 to always fail with ENOSYS. Some functions are actually named
4805 something starting with __ and the normal name is an alias. */
4806#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4807choke me
4808#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004809$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004810#endif
4811
4812; return 0; }
4813EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004814if { (eval echo configure:4815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004815 rm -rf conftest*
4816 eval "ac_cv_func_$ac_func=yes"
4817else
4818 echo "configure: failed program was:" >&5
4819 cat conftest.$ac_ext >&5
4820 rm -rf conftest*
4821 eval "ac_cv_func_$ac_func=no"
4822fi
4823rm -f conftest*
4824fi
4825
4826if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4827 echo "$ac_t""yes" 1>&6
4828 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4829 cat >> confdefs.h <<EOF
4830#define $ac_tr_func 1
4831EOF
4832
4833else
4834 echo "$ac_t""no" 1>&6
4835fi
4836done
4837
4838
4839for ac_func in dup2 getcwd strdup strerror memmove
4840do
4841echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004842echo "configure:4843: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004843if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004844 echo $ac_n "(cached) $ac_c" 1>&6
4845else
4846 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004847#line 4848 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004848#include "confdefs.h"
4849/* System header to define __stub macros and hopefully few prototypes,
4850 which can conflict with char $ac_func(); below. */
4851#include <assert.h>
4852/* Override any gcc2 internal prototype to avoid an error. */
4853/* We use char because int might match the return type of a gcc2
4854 builtin and then its argument prototype would still apply. */
4855char $ac_func();
4856
4857int main() {
4858
4859/* The GNU C library defines this for functions which it implements
4860 to always fail with ENOSYS. Some functions are actually named
4861 something starting with __ and the normal name is an alias. */
4862#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4863choke me
4864#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004865$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004866#endif
4867
4868; return 0; }
4869EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004870if { (eval echo configure:4871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004871 rm -rf conftest*
4872 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004873else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004874 echo "configure: failed program was:" >&5
4875 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004876 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004877 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004878fi
4879rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004880fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004881
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004882if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004883 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004884 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4885 cat >> confdefs.h <<EOF
4886#define $ac_tr_func 1
4887EOF
4888
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004889else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004890 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004891LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004892fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004893done
4894
Guido van Rossumf78abae1997-01-21 22:02:36 +00004895
Thomas Wouters3a584202000-08-05 23:28:51 +00004896for ac_func in getpgrp
4897do
4898echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004899echo "configure:4900: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004900if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004901 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004902else
4903 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004904#line 4905 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004905#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004906/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004907 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004908#include <assert.h>
4909/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004910/* We use char because int might match the return type of a gcc2
4911 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004912char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004913
Guido van Rossumf78abae1997-01-21 22:02:36 +00004914int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004915
Guido van Rossum627b2d71993-12-24 10:39:16 +00004916/* The GNU C library defines this for functions which it implements
4917 to always fail with ENOSYS. Some functions are actually named
4918 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004919#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004920choke me
4921#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004922$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004923#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004924
4925; return 0; }
4926EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004927if { (eval echo configure:4928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004928 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004929 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004930else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004931 echo "configure: failed program was:" >&5
4932 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004933 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004934 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004935fi
4936rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004937fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004938
Thomas Wouters3a584202000-08-05 23:28:51 +00004939if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004940 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004941 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4942 cat >> confdefs.h <<EOF
4943#define $ac_tr_func 1
4944EOF
4945 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004946#line 4947 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004947#include "confdefs.h"
4948#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004949int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004950getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004951; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004952EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004953if { (eval echo configure:4954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004954 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004955 cat >> confdefs.h <<\EOF
4956#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004957EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004958
Guido van Rossumf78abae1997-01-21 22:02:36 +00004959else
4960 echo "configure: failed program was:" >&5
4961 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004962fi
4963rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004964else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004965 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004966fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004967done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004968
Thomas Wouters3a584202000-08-05 23:28:51 +00004969for ac_func in setpgrp
4970do
4971echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004972echo "configure:4973: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004973if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004974 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004975else
4976 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00004977#line 4978 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004978#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004979/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004980 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004981#include <assert.h>
4982/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004983/* We use char because int might match the return type of a gcc2
4984 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004985char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004986
Guido van Rossumf78abae1997-01-21 22:02:36 +00004987int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004988
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004989/* The GNU C library defines this for functions which it implements
4990 to always fail with ENOSYS. Some functions are actually named
4991 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004992#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004993choke me
4994#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004995$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004996#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004997
4998; return 0; }
4999EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005000if { (eval echo configure:5001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005001 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005002 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005003else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005004 echo "configure: failed program was:" >&5
5005 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005006 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005007 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005008fi
5009rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005010fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005011
Thomas Wouters3a584202000-08-05 23:28:51 +00005012if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005013 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005014 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5015 cat >> confdefs.h <<EOF
5016#define $ac_tr_func 1
5017EOF
5018 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005019#line 5020 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005020#include "confdefs.h"
5021#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005022int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005023setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005024; return 0; }
5025EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005026if { (eval echo configure:5027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005027 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005028 cat >> confdefs.h <<\EOF
5029#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005030EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005031
Guido van Rossumf78abae1997-01-21 22:02:36 +00005032else
5033 echo "configure: failed program was:" >&5
5034 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005035fi
5036rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005037else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005038 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005039fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005040done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005041
Thomas Wouters3a584202000-08-05 23:28:51 +00005042for ac_func in gettimeofday
5043do
5044echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005045echo "configure:5046: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005046if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005047 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005048else
5049 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005050#line 5051 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005051#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005052/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005053 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005054#include <assert.h>
5055/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005056/* We use char because int might match the return type of a gcc2
5057 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005058char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005059
Guido van Rossumf78abae1997-01-21 22:02:36 +00005060int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005061
5062/* The GNU C library defines this for functions which it implements
5063 to always fail with ENOSYS. Some functions are actually named
5064 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005065#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005066choke me
5067#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005068$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005069#endif
5070
5071; return 0; }
5072EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005073if { (eval echo configure:5074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005074 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005075 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005076else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005077 echo "configure: failed program was:" >&5
5078 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005079 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005080 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005081fi
5082rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005083fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005084
Thomas Wouters3a584202000-08-05 23:28:51 +00005085if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005086 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005087 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5088 cat >> confdefs.h <<EOF
5089#define $ac_tr_func 1
5090EOF
5091 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005092#line 5093 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005093#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005094#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005095int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005096gettimeofday((struct timeval*)0,(struct timezone*)0);
5097; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005098EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005099if { (eval echo configure:5100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005100 :
5101else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005102 echo "configure: failed program was:" >&5
5103 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005104 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005105 cat >> confdefs.h <<\EOF
5106#define GETTIMEOFDAY_NO_TZ 1
5107EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005108
5109fi
5110rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005111else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005112 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005113fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005114done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005115
5116
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005117for ac_func in getaddrinfo
5118do
5119echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005120echo "configure:5121: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005121if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5122 echo $ac_n "(cached) $ac_c" 1>&6
5123else
5124 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005125#line 5126 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005126#include "confdefs.h"
5127/* System header to define __stub macros and hopefully few prototypes,
5128 which can conflict with char $ac_func(); below. */
5129#include <assert.h>
5130/* Override any gcc2 internal prototype to avoid an error. */
5131/* We use char because int might match the return type of a gcc2
5132 builtin and then its argument prototype would still apply. */
5133char $ac_func();
5134
5135int main() {
5136
5137/* The GNU C library defines this for functions which it implements
5138 to always fail with ENOSYS. Some functions are actually named
5139 something starting with __ and the normal name is an alias. */
5140#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5141choke me
5142#else
5143$ac_func();
5144#endif
5145
5146; return 0; }
5147EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005148if { (eval echo configure:5149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005149 rm -rf conftest*
5150 eval "ac_cv_func_$ac_func=yes"
5151else
5152 echo "configure: failed program was:" >&5
5153 cat conftest.$ac_ext >&5
5154 rm -rf conftest*
5155 eval "ac_cv_func_$ac_func=no"
5156fi
5157rm -f conftest*
5158fi
5159
5160if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5161 echo "$ac_t""yes" 1>&6
5162 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5163 cat >> confdefs.h <<EOF
5164#define $ac_tr_func 1
5165EOF
5166 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005167echo "configure:5168: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005168if test "$cross_compiling" = yes; then
5169 echo "$ac_t""buggy" 1>&6
5170buggygetaddrinfo=yes
5171else
5172 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005173#line 5174 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005174#include "confdefs.h"
5175
5176#include <sys/types.h>
5177#include <netdb.h>
5178#include <string.h>
5179#include <sys/socket.h>
5180#include <netinet/in.h>
5181
5182main()
5183{
5184 int passive, gaierr, inet4 = 0, inet6 = 0;
5185 struct addrinfo hints, *ai, *aitop;
5186 char straddr[INET6_ADDRSTRLEN], strport[16];
5187
5188 for (passive = 0; passive <= 1; passive++) {
5189 memset(&hints, 0, sizeof(hints));
5190 hints.ai_family = AF_UNSPEC;
5191 hints.ai_flags = passive ? AI_PASSIVE : 0;
5192 hints.ai_socktype = SOCK_STREAM;
5193 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5194 (void)gai_strerror(gaierr);
5195 goto bad;
5196 }
5197 for (ai = aitop; ai; ai = ai->ai_next) {
5198 if (ai->ai_addr == NULL ||
5199 ai->ai_addrlen == 0 ||
5200 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5201 straddr, sizeof(straddr), strport, sizeof(strport),
5202 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5203 goto bad;
5204 }
5205 switch (ai->ai_family) {
5206 case AF_INET:
5207 if (strcmp(strport, "54321") != 0) {
5208 goto bad;
5209 }
5210 if (passive) {
5211 if (strcmp(straddr, "0.0.0.0") != 0) {
5212 goto bad;
5213 }
5214 } else {
5215 if (strcmp(straddr, "127.0.0.1") != 0) {
5216 goto bad;
5217 }
5218 }
5219 inet4++;
5220 break;
5221 case AF_INET6:
5222 if (strcmp(strport, "54321") != 0) {
5223 goto bad;
5224 }
5225 if (passive) {
5226 if (strcmp(straddr, "::") != 0) {
5227 goto bad;
5228 }
5229 } else {
5230 if (strcmp(straddr, "::1") != 0) {
5231 goto bad;
5232 }
5233 }
5234 inet6++;
5235 break;
5236 case AF_UNSPEC:
5237 goto bad;
5238 break;
5239 default:
5240 /* another family support? */
5241 break;
5242 }
5243 }
5244 }
5245
5246 if (!(inet4 == 0 || inet4 == 2))
5247 goto bad;
5248 if (!(inet6 == 0 || inet6 == 2))
5249 goto bad;
5250
5251 if (aitop)
5252 freeaddrinfo(aitop);
5253 exit(0);
5254
5255 bad:
5256 if (aitop)
5257 freeaddrinfo(aitop);
5258 exit(1);
5259}
5260
5261EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005262if { (eval echo configure:5263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005263then
5264 echo "$ac_t""good" 1>&6
5265buggygetaddrinfo=no
5266else
5267 echo "configure: failed program was:" >&5
5268 cat conftest.$ac_ext >&5
5269 rm -fr conftest*
5270 echo "$ac_t""buggy" 1>&6
5271buggygetaddrinfo=yes
5272fi
5273rm -fr conftest*
5274fi
5275
5276else
5277 echo "$ac_t""no" 1>&6
5278buggygetaddrinfo=yes
5279fi
5280done
5281
5282
5283if test "$buggygetaddrinfo" = "yes"; then
5284 if test "$ipv6" = "yes"; then
5285 echo 'Fatal: You must get working getaddrinfo() function.'
5286 echo ' or you can specify "--disable-ipv6"'.
5287 exit 1
5288 fi
5289fi
5290for ac_func in getaddrinfo getnameinfo
5291do
5292echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005293echo "configure:5294: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005294if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5295 echo $ac_n "(cached) $ac_c" 1>&6
5296else
5297 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005298#line 5299 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005299#include "confdefs.h"
5300/* System header to define __stub macros and hopefully few prototypes,
5301 which can conflict with char $ac_func(); below. */
5302#include <assert.h>
5303/* Override any gcc2 internal prototype to avoid an error. */
5304/* We use char because int might match the return type of a gcc2
5305 builtin and then its argument prototype would still apply. */
5306char $ac_func();
5307
5308int main() {
5309
5310/* The GNU C library defines this for functions which it implements
5311 to always fail with ENOSYS. Some functions are actually named
5312 something starting with __ and the normal name is an alias. */
5313#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5314choke me
5315#else
5316$ac_func();
5317#endif
5318
5319; return 0; }
5320EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005321if { (eval echo configure:5322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005322 rm -rf conftest*
5323 eval "ac_cv_func_$ac_func=yes"
5324else
5325 echo "configure: failed program was:" >&5
5326 cat conftest.$ac_ext >&5
5327 rm -rf conftest*
5328 eval "ac_cv_func_$ac_func=no"
5329fi
5330rm -f conftest*
5331fi
5332
5333if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5334 echo "$ac_t""yes" 1>&6
5335 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5336 cat >> confdefs.h <<EOF
5337#define $ac_tr_func 1
5338EOF
5339
5340else
5341 echo "$ac_t""no" 1>&6
5342fi
5343done
5344
5345
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005346# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005347echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005348echo "configure:5349: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005349if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005350 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005351else
5352 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005353#line 5354 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005354#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005355#include <sys/types.h>
5356#include <sys/time.h>
5357#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005358int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005359struct tm *tp;
5360; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005361EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005362if { (eval echo configure:5363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005363 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005364 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005365else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005366 echo "configure: failed program was:" >&5
5367 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005368 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005369 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005370fi
5371rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005372fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005373
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005374echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005375if test $ac_cv_header_time = yes; then
5376 cat >> confdefs.h <<\EOF
5377#define TIME_WITH_SYS_TIME 1
5378EOF
5379
5380fi
5381
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005382echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005383echo "configure:5384: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005384if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005385 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005386else
5387 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005388#line 5389 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005389#include "confdefs.h"
5390#include <sys/types.h>
5391#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005392int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005393struct tm *tp; tp->tm_sec;
5394; return 0; }
5395EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005396if { (eval echo configure:5397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005397 rm -rf conftest*
5398 ac_cv_struct_tm=time.h
5399else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005400 echo "configure: failed program was:" >&5
5401 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005402 rm -rf conftest*
5403 ac_cv_struct_tm=sys/time.h
5404fi
5405rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005406fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005407
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005408echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005409if test $ac_cv_struct_tm = sys/time.h; then
5410 cat >> confdefs.h <<\EOF
5411#define TM_IN_SYS_TIME 1
5412EOF
5413
5414fi
5415
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005416echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005417echo "configure:5418: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005418if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005419 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005420else
5421 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005422#line 5423 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005423#include "confdefs.h"
5424#include <sys/types.h>
5425#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005426int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005427struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005428; return 0; }
5429EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005430if { (eval echo configure:5431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005431 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005432 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005433else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005434 echo "configure: failed program was:" >&5
5435 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005436 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005437 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005438fi
5439rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005440fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005441
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005442echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5443if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005444 cat >> confdefs.h <<\EOF
5445#define HAVE_TM_ZONE 1
5446EOF
5447
5448else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005449 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005450echo "configure:5451: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005451if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005452 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005453else
5454 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005455#line 5456 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005456#include "confdefs.h"
5457#include <time.h>
5458#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005459extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005460#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00005461int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005462atoi(*tzname);
5463; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005464EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005465if { (eval echo configure:5466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005466 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005467 ac_cv_var_tzname=yes
5468else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005469 echo "configure: failed program was:" >&5
5470 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005471 rm -rf conftest*
5472 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005473fi
5474rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005475fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005476
5477echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005478 if test $ac_cv_var_tzname = yes; then
5479 cat >> confdefs.h <<\EOF
5480#define HAVE_TZNAME 1
5481EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005482
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005483 fi
5484fi
5485
5486
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005487echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005488echo "configure:5489: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005489if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005490 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005491else
5492 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005493#line 5494 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005494#include "confdefs.h"
5495#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005496int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005497return altzone;
5498; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005499EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005500if { (eval echo configure:5501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005501 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005502 ac_cv_header_time_altzone=yes
5503else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005504 echo "configure: failed program was:" >&5
5505 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005506 rm -rf conftest*
5507 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005508fi
5509rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005510fi
5511
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005512echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005513if test $ac_cv_header_time_altzone = yes; then
5514 cat >> confdefs.h <<\EOF
5515#define HAVE_ALTZONE 1
5516EOF
5517
5518fi
5519
Guido van Rossumda88dad1995-01-26 00:46:29 +00005520was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005521echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005522echo "configure:5523: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005523cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005524#line 5525 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005525#include "confdefs.h"
5526
5527#include <sys/types.h>
5528#include <sys/select.h>
5529#include <sys/time.h>
5530
Guido van Rossumf78abae1997-01-21 22:02:36 +00005531int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005532;
5533; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005534EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005535if { (eval echo configure:5536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005536 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005537 cat >> confdefs.h <<\EOF
5538#define SYS_SELECT_WITH_SYS_TIME 1
5539EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005540 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005541else
5542 echo "configure: failed program was:" >&5
5543 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005544fi
5545rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005546echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005547
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005548echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005549echo "configure:5550: checking for addrinfo" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005550if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
5551 echo $ac_n "(cached) $ac_c" 1>&6
5552else
5553 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005554#line 5555 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005555#include "confdefs.h"
5556
5557# include <netdb.h>
5558int main() {
5559struct addrinfo a
5560; return 0; }
5561EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005562if { (eval echo configure:5563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005563 rm -rf conftest*
5564 ac_cv_struct_addrinfo=yes
5565else
5566 echo "configure: failed program was:" >&5
5567 cat conftest.$ac_ext >&5
5568 rm -rf conftest*
5569 ac_cv_struct_addrinfo=no
5570fi
5571rm -f conftest*
5572fi
5573
5574echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
5575if test $ac_cv_struct_addrinfo = yes; then
5576 cat >> confdefs.h <<\EOF
5577#define HAVE_ADDRINFO 1
5578EOF
5579
5580fi
5581
5582echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005583echo "configure:5584: checking for sockaddr_storage" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005584if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
5585 echo $ac_n "(cached) $ac_c" 1>&6
5586else
5587 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005588#line 5589 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005589#include "confdefs.h"
5590
5591# include <sys/types.h>
5592# include <sys/socket.h>
5593int main() {
5594struct sockaddr_storage s
5595; return 0; }
5596EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005597if { (eval echo configure:5598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005598 rm -rf conftest*
5599 ac_cv_struct_sockaddr_storage=yes
5600else
5601 echo "configure: failed program was:" >&5
5602 cat conftest.$ac_ext >&5
5603 rm -rf conftest*
5604 ac_cv_struct_sockaddr_storage=no
5605fi
5606rm -f conftest*
5607fi
5608
5609echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
5610if test $ac_cv_struct_sockaddr_storage = yes; then
5611 cat >> confdefs.h <<\EOF
5612#define HAVE_SOCKADDR_STORAGE 1
5613EOF
5614
5615fi
5616
Guido van Rossum627b2d71993-12-24 10:39:16 +00005617# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00005618
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005619echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005620echo "configure:5621: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005621if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005622 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005623else
5624 if test "$GCC" = yes; then
5625 # GCC predefines this symbol on systems where it applies.
5626cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005627#line 5628 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005628#include "confdefs.h"
5629#ifdef __CHAR_UNSIGNED__
5630 yes
5631#endif
5632
5633EOF
5634if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5635 egrep "yes" >/dev/null 2>&1; then
5636 rm -rf conftest*
5637 ac_cv_c_char_unsigned=yes
5638else
5639 rm -rf conftest*
5640 ac_cv_c_char_unsigned=no
5641fi
5642rm -f conftest*
5643
5644else
5645if test "$cross_compiling" = yes; then
5646 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5647else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005648 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005649#line 5650 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005650#include "confdefs.h"
5651/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005652#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00005653#define volatile
5654#endif
5655main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00005656 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005657}
5658EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005659if { (eval echo configure:5660: \"$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 +00005660then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005661 ac_cv_c_char_unsigned=yes
5662else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005663 echo "configure: failed program was:" >&5
5664 cat conftest.$ac_ext >&5
5665 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005666 ac_cv_c_char_unsigned=no
5667fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005668rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005669fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005670
5671fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005672fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005673
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005674echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005675if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5676 cat >> confdefs.h <<\EOF
5677#define __CHAR_UNSIGNED__ 1
5678EOF
5679
5680fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005681
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005682echo $ac_n "checking for working const""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005683echo "configure:5684: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005684if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005685 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005686else
5687 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005688#line 5689 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005689#include "confdefs.h"
5690
Guido van Rossumf78abae1997-01-21 22:02:36 +00005691int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005692
5693/* Ultrix mips cc rejects this. */
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005694typedef int charset[2]; const charset x = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005695/* SunOS 4.1.1 cc rejects this. */
5696char const *const *ccp;
5697char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005698/* NEC SVR4.0.2 mips cc rejects this. */
5699struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005700static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005701/* AIX XL C 1.02.0.0 rejects this.
5702 It does not let you subtract one const X* pointer from another in an arm
5703 of an if-expression whose if-part is not a constant expression */
5704const char *g = "string";
5705ccp = &g + (g ? g-g : 0);
5706/* HPUX 7.0 cc rejects these. */
5707++ccp;
5708p = (char**) ccp;
5709ccp = (char const *const *) p;
5710{ /* SCO 3.2v4 cc rejects this. */
5711 char *t;
5712 char const *s = 0 ? (char *) 0 : (char const *) 0;
5713
5714 *t++ = 0;
5715}
5716{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005717 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005718 const int *foo = &x[0];
5719 ++foo;
5720}
5721{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5722 typedef const int *iptr;
5723 iptr p = 0;
5724 ++p;
5725}
5726{ /* AIX XL C 1.02.0.0 rejects this saying
5727 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5728 struct s { int j; const int *ap[3]; };
5729 struct s *b; b->j = 5;
5730}
5731{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5732 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005733}
5734
5735; return 0; }
5736EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005737if { (eval echo configure:5738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005738 rm -rf conftest*
5739 ac_cv_c_const=yes
5740else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005741 echo "configure: failed program was:" >&5
5742 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005743 rm -rf conftest*
5744 ac_cv_c_const=no
5745fi
5746rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005747fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005748
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005749echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005750if test $ac_cv_c_const = no; then
5751 cat >> confdefs.h <<\EOF
5752#define const
5753EOF
5754
5755fi
5756
5757
Guido van Rossumda88dad1995-01-26 00:46:29 +00005758works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005759echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005760echo "configure:5761: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005761cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005762#line 5763 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005763#include "confdefs.h"
5764
Guido van Rossumf78abae1997-01-21 22:02:36 +00005765int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005766volatile int x; x = 0;
5767; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005768EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005769if { (eval echo configure:5770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005770 rm -rf conftest*
5771 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005772else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005773 echo "configure: failed program was:" >&5
5774 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005775 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005776 cat >> confdefs.h <<\EOF
5777#define volatile
5778EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005779
5780fi
5781rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005782echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005783
Guido van Rossumda88dad1995-01-26 00:46:29 +00005784works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005785echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005786echo "configure:5787: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005787cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005788#line 5789 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005789#include "confdefs.h"
5790
Guido van Rossumf78abae1997-01-21 22:02:36 +00005791int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005792signed char c;
5793; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005794EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005795if { (eval echo configure:5796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005796 rm -rf conftest*
5797 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005798else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005799 echo "configure: failed program was:" >&5
5800 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005801 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005802 cat >> confdefs.h <<\EOF
5803#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00005804EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005805
5806fi
5807rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005808echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005809
Guido van Rossumda88dad1995-01-26 00:46:29 +00005810have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005811echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005812echo "configure:5813: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005813cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005814#line 5815 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005815#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005816int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005817int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005818return foo(10);
5819; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005820EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005821if { (eval echo configure:5822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005822 rm -rf conftest*
5823 cat >> confdefs.h <<\EOF
5824#define HAVE_PROTOTYPES 1
5825EOF
5826 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005827else
5828 echo "configure: failed program was:" >&5
5829 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005830fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005831rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005832echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005833
Guido van Rossumda88dad1995-01-26 00:46:29 +00005834works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005835echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005836echo "configure:5837: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005837cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005838#line 5839 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005839#include "confdefs.h"
5840
5841#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00005842int foo(int x, ...) {
5843 va_list va;
5844 va_start(va, x);
5845 va_arg(va, int);
5846 va_arg(va, char *);
5847 va_arg(va, double);
5848 return 0;
5849}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005850
Guido van Rossumf78abae1997-01-21 22:02:36 +00005851int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005852return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005853; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005854EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005855if { (eval echo configure:5856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005856 rm -rf conftest*
5857 cat >> confdefs.h <<\EOF
5858#define HAVE_STDARG_PROTOTYPES 1
5859EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005860 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005861else
5862 echo "configure: failed program was:" >&5
5863 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005864fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005865rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005866echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005867
Guido van Rossumda88dad1995-01-26 00:46:29 +00005868if test "$have_prototypes" = yes; then
5869bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005870echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005871echo "configure:5872: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005872cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005873#line 5874 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005874#include "confdefs.h"
5875#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005876int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005877char **t;execve("@",t,t);
5878; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005879EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005880if { (eval echo configure:5881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005881 :
5882else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005883 echo "configure: failed program was:" >&5
5884 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005885 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005886 cat >> confdefs.h <<\EOF
5887#define BAD_EXEC_PROTOTYPES 1
5888EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005889 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005890fi
5891rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005892echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005893fi
5894
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005895# check if sockaddr has sa_len member
5896echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005897echo "configure:5898: checking if sockaddr has sa_len member" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005898cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005899#line 5900 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005900#include "confdefs.h"
5901#include <sys/types.h>
5902#include <sys/socket.h>
5903int main() {
5904struct sockaddr x;
5905x.sa_len = 0;
5906; return 0; }
5907EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005908if { (eval echo configure:5909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005909 rm -rf conftest*
5910 echo "$ac_t""yes" 1>&6
5911 cat >> confdefs.h <<\EOF
5912#define HAVE_SOCKADDR_SA_LEN 1
5913EOF
5914
5915else
5916 echo "configure: failed program was:" >&5
5917 cat conftest.$ac_ext >&5
5918 rm -rf conftest*
5919 echo "$ac_t""no" 1>&6
5920fi
5921rm -f conftest*
5922
Guido van Rossumda88dad1995-01-26 00:46:29 +00005923bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005924echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005925echo "configure:5926: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005926if test "$cross_compiling" = yes; then
5927 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5928else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005929 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005930#line 5931 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005931#include "confdefs.h"
5932
5933struct s { int a; int b; };
5934static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005935int foobar() {
5936 static int random;
5937 random = (int) &foo;
5938 return random;
5939}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005940static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005941main() {
5942 exit(!((int)&foo == foobar()));
5943}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005944
5945EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005946if { (eval echo configure:5947: \"$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 +00005947then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005948 :
5949else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005950 echo "configure: failed program was:" >&5
5951 cat conftest.$ac_ext >&5
5952 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005953 cat >> confdefs.h <<\EOF
5954#define BAD_STATIC_FORWARD 1
5955EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005956 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005957fi
5958rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005959fi
5960
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005961echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005962
Guido van Rossumda88dad1995-01-26 00:46:29 +00005963va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005964echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005965echo "configure:5966: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005966cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005967#line 5968 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005968#include "confdefs.h"
5969
5970#ifdef HAVE_STDARG_PROTOTYPES
5971#include <stdarg.h>
5972#else
5973#include <varargs.h>
5974#endif
5975
Guido van Rossumf78abae1997-01-21 22:02:36 +00005976int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005977va_list list1, list2; list1 = list2;
5978; return 0; }
5979EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005980if { (eval echo configure:5981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005981 :
5982else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005983 echo "configure: failed program was:" >&5
5984 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005985 rm -rf conftest*
5986 cat >> confdefs.h <<\EOF
5987#define VA_LIST_IS_ARRAY 1
5988EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005989 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005990fi
5991rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005992echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005993
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005994# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5995echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00005996echo "configure:5997: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005997if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005998 echo $ac_n "(cached) $ac_c" 1>&6
5999else
6000 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006001#line 6002 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006002#include "confdefs.h"
6003/* System header to define __stub macros and hopefully few prototypes,
6004 which can conflict with char gethostbyname_r(); below. */
6005#include <assert.h>
6006/* Override any gcc2 internal prototype to avoid an error. */
6007/* We use char because int might match the return type of a gcc2
6008 builtin and then its argument prototype would still apply. */
6009char gethostbyname_r();
6010
6011int main() {
6012
6013/* The GNU C library defines this for functions which it implements
6014 to always fail with ENOSYS. Some functions are actually named
6015 something starting with __ and the normal name is an alias. */
6016#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6017choke me
6018#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006019gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006020#endif
6021
6022; return 0; }
6023EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006024if { (eval echo configure:6025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006025 rm -rf conftest*
6026 eval "ac_cv_func_gethostbyname_r=yes"
6027else
6028 echo "configure: failed program was:" >&5
6029 cat conftest.$ac_ext >&5
6030 rm -rf conftest*
6031 eval "ac_cv_func_gethostbyname_r=no"
6032fi
6033rm -f conftest*
6034fi
6035
6036if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6037 echo "$ac_t""yes" 1>&6
6038
6039 cat >> confdefs.h <<\EOF
6040#define HAVE_GETHOSTBYNAME_R 1
6041EOF
6042
6043 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006044echo "configure:6045: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006045 OLD_CFLAGS=$CFLAGS
6046 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
6047 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006048#line 6049 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006049#include "confdefs.h"
6050
6051# include <netdb.h>
6052
6053int main() {
6054
6055 char *name;
6056 struct hostent *he, *res;
6057 char buffer[2048];
6058 int buflen = 2048;
6059 int h_errnop;
6060
6061 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
6062
6063; return 0; }
6064EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006065if { (eval echo configure:6066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006066 rm -rf conftest*
6067
6068 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006069#define HAVE_GETHOSTBYNAME_R 1
6070EOF
6071
6072 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006073#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6074EOF
6075
6076 echo "$ac_t""yes" 1>&6
6077
6078else
6079 echo "configure: failed program was:" >&5
6080 cat conftest.$ac_ext >&5
6081 rm -rf conftest*
6082
6083 echo "$ac_t""no" 1>&6
6084 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006085echo "configure:6086: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006086 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006087#line 6088 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006088#include "confdefs.h"
6089
6090# include <netdb.h>
6091
6092int main() {
6093
6094 char *name;
6095 struct hostent *he;
6096 char buffer[2048];
6097 int buflen = 2048;
6098 int h_errnop;
6099
6100 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
6101
6102; return 0; }
6103EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006104if { (eval echo configure:6105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006105 rm -rf conftest*
6106
6107 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006108#define HAVE_GETHOSTBYNAME_R 1
6109EOF
6110
6111 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006112#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6113EOF
6114
6115 echo "$ac_t""yes" 1>&6
6116
6117else
6118 echo "configure: failed program was:" >&5
6119 cat conftest.$ac_ext >&5
6120 rm -rf conftest*
6121
6122 echo "$ac_t""no" 1>&6
6123 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006124echo "configure:6125: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006125 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006126#line 6127 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006127#include "confdefs.h"
6128
6129# include <netdb.h>
6130
6131int main() {
6132
6133 char *name;
6134 struct hostent *he;
6135 struct hostent_data data;
6136
6137 (void) gethostbyname_r(name, he, &data);
6138
6139; return 0; }
6140EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006141if { (eval echo configure:6142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006142 rm -rf conftest*
6143
6144 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006145#define HAVE_GETHOSTBYNAME_R 1
6146EOF
6147
6148 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006149#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6150EOF
6151
6152 echo "$ac_t""yes" 1>&6
6153
6154else
6155 echo "configure: failed program was:" >&5
6156 cat conftest.$ac_ext >&5
6157 rm -rf conftest*
6158
6159 echo "$ac_t""no" 1>&6
6160
6161fi
6162rm -f conftest*
6163
6164fi
6165rm -f conftest*
6166
6167fi
6168rm -f conftest*
6169 CFLAGS=$OLD_CFLAGS
6170
6171else
6172 echo "$ac_t""no" 1>&6
6173
Thomas Wouters3a584202000-08-05 23:28:51 +00006174 for ac_func in gethostbyname
6175do
6176echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006177echo "configure:6178: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006178if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006179 echo $ac_n "(cached) $ac_c" 1>&6
6180else
6181 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006182#line 6183 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006183#include "confdefs.h"
6184/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00006185 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006186#include <assert.h>
6187/* Override any gcc2 internal prototype to avoid an error. */
6188/* We use char because int might match the return type of a gcc2
6189 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006190char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006191
6192int main() {
6193
6194/* The GNU C library defines this for functions which it implements
6195 to always fail with ENOSYS. Some functions are actually named
6196 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006197#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006198choke me
6199#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006200$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006201#endif
6202
6203; return 0; }
6204EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006205if { (eval echo configure:6206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006206 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006207 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006208else
6209 echo "configure: failed program was:" >&5
6210 cat conftest.$ac_ext >&5
6211 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006212 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006213fi
6214rm -f conftest*
6215fi
6216
Thomas Wouters3a584202000-08-05 23:28:51 +00006217if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006218 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00006219 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6220 cat >> confdefs.h <<EOF
6221#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006222EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00006223
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006224else
6225 echo "$ac_t""no" 1>&6
6226fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006227done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006228
6229
6230fi
6231
6232
6233
6234
6235
6236
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006237
Guido van Rossum627b2d71993-12-24 10:39:16 +00006238# checks for system services
6239# (none yet)
6240
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006241# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006242echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006243echo "configure:6244: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006244if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006245 echo $ac_n "(cached) $ac_c" 1>&6
6246else
6247 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006248#line 6249 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006249#include "confdefs.h"
6250/* System header to define __stub macros and hopefully few prototypes,
6251 which can conflict with char __fpu_control(); below. */
6252#include <assert.h>
6253/* Override any gcc2 internal prototype to avoid an error. */
6254/* We use char because int might match the return type of a gcc2
6255 builtin and then its argument prototype would still apply. */
6256char __fpu_control();
6257
6258int main() {
6259
6260/* The GNU C library defines this for functions which it implements
6261 to always fail with ENOSYS. Some functions are actually named
6262 something starting with __ and the normal name is an alias. */
6263#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6264choke me
6265#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006266__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006267#endif
6268
6269; return 0; }
6270EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006271if { (eval echo configure:6272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006272 rm -rf conftest*
6273 eval "ac_cv_func___fpu_control=yes"
6274else
6275 echo "configure: failed program was:" >&5
6276 cat conftest.$ac_ext >&5
6277 rm -rf conftest*
6278 eval "ac_cv_func___fpu_control=no"
6279fi
6280rm -f conftest*
6281fi
6282
6283if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6284 echo "$ac_t""yes" 1>&6
6285 :
6286else
6287 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006288echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006289echo "configure:6290: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00006290ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006291if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006292 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006293else
6294 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006295LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006296cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006297#line 6298 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006298#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006299/* Override any gcc2 internal prototype to avoid an error. */
6300/* We use char because int might match the return type of a gcc2
6301 builtin and then its argument prototype would still apply. */
6302char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00006303
Guido van Rossumf78abae1997-01-21 22:02:36 +00006304int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006305__fpu_control()
6306; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006307EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006308if { (eval echo configure:6309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006309 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006310 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006311else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006312 echo "configure: failed program was:" >&5
6313 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006314 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006315 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006316fi
6317rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006318LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006319
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006320fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006321if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006322 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006323 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6324 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006325 cat >> confdefs.h <<EOF
6326#define $ac_tr_lib 1
6327EOF
6328
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006329 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006330
6331else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006332 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006333fi
6334
6335
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006336fi
6337
6338
Guido van Rossum7f253911997-05-09 02:42:48 +00006339# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00006340echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006341echo "configure:6342: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006342# Check whether --with-fpectl or --without-fpectl was given.
6343if test "${with_fpectl+set}" = set; then
6344 withval="$with_fpectl"
6345
6346if test "$withval" != no
6347then cat >> confdefs.h <<\EOF
6348#define WANT_SIGFPE_HANDLER 1
6349EOF
6350 echo "$ac_t""yes" 1>&6
6351else echo "$ac_t""no" 1>&6
6352fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006353else
6354 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006355fi
6356
6357
Guido van Rossum7f43da71994-08-01 12:15:30 +00006358# check for --with-libm=...
6359
Guido van Rossum563e7081996-09-10 18:20:48 +00006360case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006361Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006362next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006363BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006364*) LIBM=-lm
6365esac
Guido van Rossum7f253911997-05-09 02:42:48 +00006366echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006367echo "configure:6368: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006368# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006369if test "${with_libm+set}" = set; then
6370 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006371
Guido van Rossum7f253911997-05-09 02:42:48 +00006372if test "$withval" = no
6373then LIBM=
6374 echo "$ac_t""force LIBM empty" 1>&6
6375elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006376then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006377 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006378else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006379fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006380else
6381 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006382fi
6383
6384
6385# check for --with-libc=...
6386
Guido van Rossum7f253911997-05-09 02:42:48 +00006387echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006388echo "configure:6389: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006389# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006390if test "${with_libc+set}" = set; then
6391 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006392
Guido van Rossum7f253911997-05-09 02:42:48 +00006393if test "$withval" = no
6394then LIBC=
6395 echo "$ac_t""force LIBC empty" 1>&6
6396elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006397then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006398 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006399else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006400fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006401else
6402 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006403fi
6404
6405
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006406# check for hypot() in math library
6407LIBS_SAVE=$LIBS
6408LIBS="$LIBS $LIBM"
6409for ac_func in hypot
6410do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006411echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006412echo "configure:6413: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006413if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006414 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006415else
6416 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006417#line 6418 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006418#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006419/* System header to define __stub macros and hopefully few prototypes,
6420 which can conflict with char $ac_func(); below. */
6421#include <assert.h>
6422/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006423/* We use char because int might match the return type of a gcc2
6424 builtin and then its argument prototype would still apply. */
6425char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006426
Guido van Rossumf78abae1997-01-21 22:02:36 +00006427int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006428
6429/* The GNU C library defines this for functions which it implements
6430 to always fail with ENOSYS. Some functions are actually named
6431 something starting with __ and the normal name is an alias. */
6432#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6433choke me
6434#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006435$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006436#endif
6437
6438; return 0; }
6439EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006440if { (eval echo configure:6441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006441 rm -rf conftest*
6442 eval "ac_cv_func_$ac_func=yes"
6443else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006444 echo "configure: failed program was:" >&5
6445 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006446 rm -rf conftest*
6447 eval "ac_cv_func_$ac_func=no"
6448fi
6449rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006450fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00006451
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006452if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6453 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006454 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6455 cat >> confdefs.h <<EOF
6456#define $ac_tr_func 1
6457EOF
6458
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006459else
6460 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006461LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006462fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006463done
6464
Guido van Rossumf78abae1997-01-21 22:02:36 +00006465
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006466LIBS=$LIBS_SAVE
6467
Guido van Rossumad713701997-07-10 22:42:38 +00006468# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00006469echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006470echo "configure:6471: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006471if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00006472 echo $ac_n "(cached) $ac_c" 1>&6
6473else
6474 if test "$cross_compiling" = yes; then
6475 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6476else
6477 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006478#line 6479 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006479#include "confdefs.h"
6480#include <stdio.h>
6481#ifdef HAVE_STDLIB
6482#include <stdlib.h>
6483#else
6484char *malloc(), *realloc();
6485int *free();
6486#endif
6487main() {
6488 char *p;
6489 p = malloc(0);
6490 if (p == NULL) exit(1);
6491 p = realloc(p, 0);
6492 if (p == NULL) exit(1);
6493 free(p);
6494 exit(0);
6495}
6496EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006497if { (eval echo configure:6498: \"$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 +00006498then
6499 ac_cv_malloc_zero=nonnull
6500else
6501 echo "configure: failed program was:" >&5
6502 cat conftest.$ac_ext >&5
6503 rm -fr conftest*
6504 ac_cv_malloc_zero=null
6505fi
6506rm -fr conftest*
6507fi
6508
6509fi
6510
6511echo "$ac_t""$ac_cv_malloc_zero" 1>&6
6512if test "$ac_cv_malloc_zero" = null
6513then
6514 cat >> confdefs.h <<\EOF
6515#define MALLOC_ZERO_RETURNS_NULL 1
6516EOF
6517
6518fi
6519
Guido van Rossumef2255b2000-03-10 22:30:29 +00006520# check for wchar.h
6521ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6522echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006523echo "configure:6524: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006524if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006525 echo $ac_n "(cached) $ac_c" 1>&6
6526else
6527 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006528#line 6529 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006529#include "confdefs.h"
6530#include <wchar.h>
6531EOF
6532ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006533{ (eval echo configure:6534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006534ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6535if test -z "$ac_err"; then
6536 rm -rf conftest*
6537 eval "ac_cv_header_$ac_safe=yes"
6538else
6539 echo "$ac_err" >&5
6540 echo "configure: failed program was:" >&5
6541 cat conftest.$ac_ext >&5
6542 rm -rf conftest*
6543 eval "ac_cv_header_$ac_safe=no"
6544fi
6545rm -f conftest*
6546fi
6547if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6548 echo "$ac_t""yes" 1>&6
6549 cat >> confdefs.h <<\EOF
6550#define HAVE_WCHAR_H 1
6551EOF
6552 wchar_h="yes"
6553else
6554 echo "$ac_t""no" 1>&6
6555wchar_h="no"
6556
6557fi
6558
6559
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006560# determine wchar_t size
6561if test "$wchar_h" = yes
6562then
6563 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006564echo "configure:6565: checking size of wchar_t" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006565if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
6566 echo $ac_n "(cached) $ac_c" 1>&6
6567else
6568 if test "$cross_compiling" = yes; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006569 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6570else
6571 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006572#line 6573 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006573#include "confdefs.h"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006574#include <stdio.h>
6575main()
6576{
6577 FILE *f=fopen("conftestval", "w");
6578 if (!f) exit(1);
6579 fprintf(f, "%d\n", sizeof(wchar_t));
Guido van Rossumef2255b2000-03-10 22:30:29 +00006580 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00006581}
Guido van Rossumef2255b2000-03-10 22:30:29 +00006582EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006583if { (eval echo configure:6584: \"$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 +00006584then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006585 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006586else
6587 echo "configure: failed program was:" >&5
6588 cat conftest.$ac_ext >&5
6589 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006590 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00006591fi
6592rm -fr conftest*
6593fi
6594
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006595fi
6596echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
6597cat >> confdefs.h <<EOF
6598#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
6599EOF
6600
6601
6602fi
6603
6604echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006605echo "configure:6606: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006606# Check whether --enable-unicode or --disable-unicode was given.
6607if test "${enable_unicode+set}" = set; then
6608 enableval="$enable_unicode"
6609 :
6610else
6611 enable_unicode=yes
6612fi
6613
6614
6615if test $enable_unicode = yes
6616then
Martin v. Löwisfd917792001-06-27 20:22:04 +00006617 # Without any arguments, Py_UNICODE defaults to two-byte mode
6618 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006619fi
6620
6621case "$enable_unicode" in
6622ucs2) unicode_size="2"
6623 cat >> confdefs.h <<\EOF
6624#define Py_UNICODE_SIZE 2
6625EOF
6626
6627 ;;
6628ucs4) unicode_size="4"
6629 cat >> confdefs.h <<\EOF
6630#define Py_UNICODE_SIZE 4
6631EOF
6632
6633 ;;
6634esac
6635
6636if test "$enable_unicode" = "no"
6637then
6638 echo "$ac_t""not used" 1>&6
6639else
6640 cat >> confdefs.h <<\EOF
6641#define Py_USING_UNICODE 1
6642EOF
6643
6644 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
6645 then
6646 PY_UNICODE_TYPE="wchar_t"
6647 cat >> confdefs.h <<\EOF
6648#define HAVE_USABLE_WCHAR_T 1
6649EOF
6650
6651 cat >> confdefs.h <<\EOF
6652#define PY_UNICODE_TYPE wchar_t
6653EOF
6654
6655 elif test "$ac_cv_sizeof_short" = "$unicode_size"
6656 then
6657 PY_UNICODE_TYPE="unsigned short"
6658 cat >> confdefs.h <<\EOF
6659#define PY_UNICODE_TYPE unsigned short
6660EOF
6661
6662 elif test "$ac_cv_sizeof_long" = "$unicode_size"
6663 then
6664 PY_UNICODE_TYPE="unsigned long"
6665 cat >> confdefs.h <<\EOF
6666#define PY_UNICODE_TYPE unsigned long
6667EOF
6668
6669 else
6670 PY_UNICODE_TYPE="no type found"
6671 fi
6672 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
6673fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006674
6675# check for endianness
6676echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006677echo "configure:6678: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006678if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006679 echo $ac_n "(cached) $ac_c" 1>&6
6680else
6681 ac_cv_c_bigendian=unknown
6682# See if sys/param.h defines the BYTE_ORDER macro.
6683cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006684#line 6685 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006685#include "confdefs.h"
6686#include <sys/types.h>
6687#include <sys/param.h>
6688int main() {
6689
6690#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6691 bogus endian macros
6692#endif
6693; return 0; }
6694EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006695if { (eval echo configure:6696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006696 rm -rf conftest*
6697 # It does; now see whether it defined to BIG_ENDIAN or not.
6698cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006699#line 6700 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006700#include "confdefs.h"
6701#include <sys/types.h>
6702#include <sys/param.h>
6703int main() {
6704
6705#if BYTE_ORDER != BIG_ENDIAN
6706 not big endian
6707#endif
6708; return 0; }
6709EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006710if { (eval echo configure:6711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006711 rm -rf conftest*
6712 ac_cv_c_bigendian=yes
6713else
6714 echo "configure: failed program was:" >&5
6715 cat conftest.$ac_ext >&5
6716 rm -rf conftest*
6717 ac_cv_c_bigendian=no
6718fi
6719rm -f conftest*
6720else
6721 echo "configure: failed program was:" >&5
6722 cat conftest.$ac_ext >&5
6723fi
6724rm -f conftest*
6725if test $ac_cv_c_bigendian = unknown; then
6726if test "$cross_compiling" = yes; then
6727 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6728else
6729 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006730#line 6731 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006731#include "confdefs.h"
6732main () {
6733 /* Are we little or big endian? From Harbison&Steele. */
6734 union
6735 {
6736 long l;
6737 char c[sizeof (long)];
6738 } u;
6739 u.l = 1;
6740 exit (u.c[sizeof (long) - 1] == 1);
6741}
6742EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006743if { (eval echo configure:6744: \"$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 +00006744then
6745 ac_cv_c_bigendian=no
6746else
6747 echo "configure: failed program was:" >&5
6748 cat conftest.$ac_ext >&5
6749 rm -fr conftest*
6750 ac_cv_c_bigendian=yes
6751fi
6752rm -fr conftest*
6753fi
6754
6755fi
6756fi
6757
6758echo "$ac_t""$ac_cv_c_bigendian" 1>&6
6759if test $ac_cv_c_bigendian = yes; then
6760 cat >> confdefs.h <<\EOF
6761#define WORDS_BIGENDIAN 1
6762EOF
6763
6764fi
6765
6766
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006767# Check whether right shifting a negative integer extends the sign bit
6768# or fills with zeros (like the Cray J90, according to Tim Peters).
6769echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006770echo "configure:6771: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006771if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00006772 echo $ac_n "(cached) $ac_c" 1>&6
6773else
6774
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006775if test "$cross_compiling" = yes; then
6776 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6777else
6778 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006779#line 6780 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006780#include "confdefs.h"
6781
6782int main()
6783{
Vladimir Marangozova6180282000-07-12 05:05:06 +00006784 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006785}
6786
6787EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006788if { (eval echo configure:6789: \"$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 +00006789then
6790 ac_cv_rshift_extends_sign=yes
6791else
6792 echo "configure: failed program was:" >&5
6793 cat conftest.$ac_ext >&5
6794 rm -fr conftest*
6795 ac_cv_rshift_extends_sign=no
6796fi
6797rm -fr conftest*
6798fi
6799
6800fi
6801
6802echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
6803if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006804then
6805 cat >> confdefs.h <<\EOF
6806#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
6807EOF
6808
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006809fi
6810
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006811# check for getc_unlocked and related locking functions
6812echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006813echo "configure:6814: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006814if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
6815 echo $ac_n "(cached) $ac_c" 1>&6
6816else
6817
6818cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006819#line 6820 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006820#include "confdefs.h"
6821#include <stdio.h>
6822int main() {
6823
6824 FILE *f = fopen("/dev/null", "r");
6825 flockfile(f);
6826 getc_unlocked(f);
6827 funlockfile(f);
6828
6829; return 0; }
6830EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006831if { (eval echo configure:6832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006832 rm -rf conftest*
6833 ac_cv_have_getc_unlocked=yes
6834else
6835 echo "configure: failed program was:" >&5
6836 cat conftest.$ac_ext >&5
6837 rm -rf conftest*
6838 ac_cv_have_getc_unlocked=no
6839fi
6840rm -f conftest*
6841fi
6842
6843echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
6844if test "$ac_cv_have_getc_unlocked" = yes
6845then
6846 cat >> confdefs.h <<\EOF
6847#define HAVE_GETC_UNLOCKED 1
6848EOF
6849
6850fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006851
Guido van Rossum353ae582001-07-10 16:45:32 +00006852# check for readline 4.2
6853echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006854echo "configure:6855: checking for rl_completion_matches in -lreadline" >&5
Guido van Rossum353ae582001-07-10 16:45:32 +00006855ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
6856if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6857 echo $ac_n "(cached) $ac_c" 1>&6
6858else
6859 ac_save_LIBS="$LIBS"
6860LIBS="-lreadline -ltermcap $LIBS"
6861cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006862#line 6863 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00006863#include "confdefs.h"
6864/* Override any gcc2 internal prototype to avoid an error. */
6865/* We use char because int might match the return type of a gcc2
6866 builtin and then its argument prototype would still apply. */
6867char rl_completion_matches();
6868
6869int main() {
6870rl_completion_matches()
6871; return 0; }
6872EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006873if { (eval echo configure:6874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum353ae582001-07-10 16:45:32 +00006874 rm -rf conftest*
6875 eval "ac_cv_lib_$ac_lib_var=yes"
6876else
6877 echo "configure: failed program was:" >&5
6878 cat conftest.$ac_ext >&5
6879 rm -rf conftest*
6880 eval "ac_cv_lib_$ac_lib_var=no"
6881fi
6882rm -f conftest*
6883LIBS="$ac_save_LIBS"
6884
6885fi
6886if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6887 echo "$ac_t""yes" 1>&6
6888 cat >> confdefs.h <<\EOF
6889#define HAVE_RL_COMPLETION_MATCHES 1
6890EOF
6891
6892else
6893 echo "$ac_t""no" 1>&6
6894fi
6895
6896
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006897echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006898echo "configure:6899: checking for broken nice()" >&5
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006899if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
6900 echo $ac_n "(cached) $ac_c" 1>&6
6901else
6902
6903if test "$cross_compiling" = yes; then
6904 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6905else
6906 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006907#line 6908 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006908#include "confdefs.h"
6909
6910int main()
6911{
6912 int val1 = nice(1);
6913 if (val1 != -1 && val1 == nice(2))
6914 exit(0);
6915 exit(1);
6916}
6917
6918EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006919if { (eval echo configure:6920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006920then
6921 ac_cv_broken_nice=yes
6922else
6923 echo "configure: failed program was:" >&5
6924 cat conftest.$ac_ext >&5
6925 rm -fr conftest*
6926 ac_cv_broken_nice=no
6927fi
6928rm -fr conftest*
6929fi
6930
6931fi
6932
6933echo "$ac_t""$ac_cv_broken_nice" 1>&6
6934if test "$ac_cv_broken_nice" = yes
6935then
6936 cat >> confdefs.h <<\EOF
6937#define HAVE_BROKEN_NICE 1
6938EOF
6939
6940fi
6941
Guido van Rossum95713eb2000-05-18 20:53:31 +00006942# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
6943# Add sys/socket.h to confdefs.h
6944cat >> confdefs.h <<\EOF
6945#ifdef HAVE_SYS_SOCKET_H
6946#include <sys/socket.h>
6947#endif
6948EOF
6949echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006950echo "configure:6951: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006951if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00006952 echo $ac_n "(cached) $ac_c" 1>&6
6953else
6954 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00006955#line 6956 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00006956#include "confdefs.h"
6957#include <sys/types.h>
6958#if STDC_HEADERS
6959#include <stdlib.h>
6960#include <stddef.h>
6961#endif
6962EOF
6963if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6964 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6965 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006966 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00006967else
6968 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006969 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00006970fi
6971rm -f conftest*
6972
6973fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006974echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
6975if test $ac_cv_type_socklen_t = no; then
6976 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00006977#define socklen_t int
6978EOF
6979
6980fi
6981
6982
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00006983# Add Python/ prefix to LIBOBJS
6984libobjs=$LIBOBJS
6985LIBOBJS=
6986for obj in $libobjs; do
6987 LIBOBJS="$LIBOBJS Python/$obj"
6988done
6989
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006990#AC_MSG_CHECKING(for Modules/Setup)
6991#if test ! -f Modules/Setup ; then
6992# if test ! -d Modules ; then
6993# mkdir Modules
6994# fi
6995# cp "$srcdir/Modules/Setup.dist" Modules/Setup
6996# AC_MSG_RESULT(creating)
6997#else
6998# AC_MSG_RESULT(already exists)
6999#fi
7000
7001
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007002SRCDIRS="Parser Grammar Objects Python Modules"
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007003echo $ac_n "checking for build directories""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00007004echo "configure:7005: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007005for dir in $SRCDIRS; do
7006 if test ! -d $dir; then
7007 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007008 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007009done
7010echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007011
Guido van Rossum627b2d71993-12-24 10:39:16 +00007012# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007013trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007014cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007015# This file is a shell script that caches the results of configure
7016# tests run on this system so they can be shared between configure
7017# scripts and configure runs. It is not useful on other systems.
7018# If it contains results you don't want to keep, you may remove or edit it.
7019#
7020# By default, configure uses ./config.cache as the cache file,
7021# creating it if it does not exist already. You can give configure
7022# the --cache-file=FILE option to use a different cache file; that is
7023# what configure does when it calls configure scripts in
7024# subdirectories, so they share the cache.
7025# Giving --cache-file=/dev/null disables caching, for debugging configure.
7026# config.status only pays attention to the cache file if you give it the
7027# --recheck option to rerun configure.
7028#
7029EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007030# The following way of writing the cache mishandles newlines in values,
7031# but we know of no workaround that is simple, portable, and efficient.
7032# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007033# Ultrix sh set writes to stderr and can't be redirected directly,
7034# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007035(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007036 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007037 *ac_space=\ *)
7038 # `set' does not quote correctly, so add quotes (double-quote substitution
7039 # turns \\\\ into \\, and sed turns \\ into \).
7040 sed -n \
7041 -e "s/'/'\\\\''/g" \
7042 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7043 ;;
7044 *)
7045 # `set' quotes correctly as required by POSIX, so do not add quotes.
7046 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7047 ;;
7048 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007049if cmp -s $cache_file confcache; then
7050 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007051else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007052 if test -w $cache_file; then
7053 echo "updating cache $cache_file"
7054 cat confcache > $cache_file
7055 else
7056 echo "not updating unwritable cache $cache_file"
7057 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007058fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007059rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007060
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007061trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007062
7063test "x$prefix" = xNONE && prefix=$ac_default_prefix
7064# Let make expand exec_prefix.
7065test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007066
Guido van Rossum7f43da71994-08-01 12:15:30 +00007067# Any assignment to VPATH causes Sun make to only execute
7068# the first set of double-colon rules, so remove it if not needed.
7069# If there is a colon in the path, we need to keep it.
7070if test "x$srcdir" = x.; then
7071 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7072fi
7073
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007074trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00007075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007076DEFS=-DHAVE_CONFIG_H
7077
7078# Without the "./", some shells look in PATH for config.status.
7079: ${CONFIG_STATUS=./config.status}
7080
7081echo creating $CONFIG_STATUS
7082rm -f $CONFIG_STATUS
7083cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007084#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007085# Generated automatically by configure.
7086# Run this file to recreate the current configuration.
7087# This directory was configured as follows,
7088# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7089#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007090# $0 $ac_configure_args
7091#
7092# Compiler output produced by configure, useful for debugging
7093# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007094
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007095ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007096for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00007097do
Guido van Rossum7f43da71994-08-01 12:15:30 +00007098 case "\$ac_option" in
7099 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007100 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7101 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00007102 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007103 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007104 exit 0 ;;
7105 -help | --help | --hel | --he | --h)
7106 echo "\$ac_cs_usage"; exit 0 ;;
7107 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00007108 esac
7109done
7110
Guido van Rossum7f43da71994-08-01 12:15:30 +00007111ac_given_srcdir=$srcdir
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007112ac_given_INSTALL="$INSTALL"
Guido van Rossum627b2d71993-12-24 10:39:16 +00007113
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007114trap '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 +00007115EOF
7116cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007118# Protect against being on the right side of a sed subst in config.status.
7119sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7120 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007121$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00007122$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007123s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007124s%@CFLAGS@%$CFLAGS%g
7125s%@CPPFLAGS@%$CPPFLAGS%g
7126s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007127s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007128s%@DEFS@%$DEFS%g
7129s%@LDFLAGS@%$LDFLAGS%g
7130s%@LIBS@%$LIBS%g
7131s%@exec_prefix@%$exec_prefix%g
7132s%@prefix@%$prefix%g
7133s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007134s%@bindir@%$bindir%g
7135s%@sbindir@%$sbindir%g
7136s%@libexecdir@%$libexecdir%g
7137s%@datadir@%$datadir%g
7138s%@sysconfdir@%$sysconfdir%g
7139s%@sharedstatedir@%$sharedstatedir%g
7140s%@localstatedir@%$localstatedir%g
7141s%@libdir@%$libdir%g
7142s%@includedir@%$includedir%g
7143s%@oldincludedir@%$oldincludedir%g
7144s%@infodir@%$infodir%g
7145s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00007146s%@VERSION@%$VERSION%g
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00007147s%@CONFIG_ARGS@%$CONFIG_ARGS%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00007148s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00007149s%@SGI_ABI@%$SGI_ABI%g
Martin v. Löwis22352952000-12-13 17:37:02 +00007150s%@CXX@%$CXX%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007151s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007152s%@CC@%$CC%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007153s%@EXEEXT@%$EXEEXT%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007154s%@LIBRARY@%$LIBRARY%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007155s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007156s%@DLLLIBRARY@%$DLLLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00007157s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007158s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007159s%@AR@%$AR%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007160s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007161s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007162s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007163s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00007164s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007165s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007166s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007167s%@SO@%$SO%g
7168s%@LDSHARED@%$LDSHARED%g
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007169s%@BLDSHARED@%$BLDSHARED%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007170s%@CCSHARED@%$CCSHARED%g
7171s%@LINKFORSHARED@%$LINKFORSHARED%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007172s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007173s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7174s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
Guido van Rossum009f7871997-12-04 00:51:42 +00007175s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00007176s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00007177s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007178s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00007179s%@DYNLOADFILE@%$DYNLOADFILE%g
Neil Schemenauer4e425612001-06-19 15:44:15 +00007180s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007181s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007182s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7183s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7184s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00007185s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007186s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007187s%@LIBM@%$LIBM%g
7188s%@LIBC@%$LIBC%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007189s%@SRCDIRS@%$SRCDIRS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007190
7191CEOF
7192EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007193
7194cat >> $CONFIG_STATUS <<\EOF
7195
7196# Split the substitutions into bite-sized pieces for seds with
7197# small command number limits, like on Digital OSF/1 and HP-UX.
7198ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7199ac_file=1 # Number of current file.
7200ac_beg=1 # First line for current file.
7201ac_end=$ac_max_sed_cmds # Line after last line for current file.
7202ac_more_lines=:
7203ac_sed_cmds=""
7204while $ac_more_lines; do
7205 if test $ac_beg -gt 1; then
7206 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7207 else
7208 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7209 fi
7210 if test ! -s conftest.s$ac_file; then
7211 ac_more_lines=false
7212 rm -f conftest.s$ac_file
7213 else
7214 if test -z "$ac_sed_cmds"; then
7215 ac_sed_cmds="sed -f conftest.s$ac_file"
7216 else
7217 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7218 fi
7219 ac_file=`expr $ac_file + 1`
7220 ac_beg=$ac_end
7221 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7222 fi
7223done
7224if test -z "$ac_sed_cmds"; then
7225 ac_sed_cmds=cat
7226fi
7227EOF
7228
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007229cat >> $CONFIG_STATUS <<EOF
7230
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007231CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007232EOF
7233cat >> $CONFIG_STATUS <<\EOF
7234for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007235 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007236 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007237 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007238 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7239 *) ac_file_in="${ac_file}.in" ;;
7240 esac
7241
Guido van Rossumf78abae1997-01-21 22:02:36 +00007242 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007243
7244 # Remove last slash and all that follows it. Not all systems have dirname.
7245 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7246 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7247 # The file is in a subdirectory.
7248 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007249 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007250 # A "../" for each directory in $ac_dir_suffix.
7251 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7252 else
7253 ac_dir_suffix= ac_dots=
7254 fi
7255
7256 case "$ac_given_srcdir" in
7257 .) srcdir=.
7258 if test -z "$ac_dots"; then top_srcdir=.
7259 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7260 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7261 *) # Relative path.
7262 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7263 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7264 esac
7265
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007266 case "$ac_given_INSTALL" in
7267 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7268 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7269 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007270
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007271 echo creating "$ac_file"
7272 rm -f "$ac_file"
7273 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7274 case "$ac_file" in
7275 *Makefile*) ac_comsub="1i\\
7276# $configure_input" ;;
7277 *) ac_comsub= ;;
7278 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007279
7280 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 +00007281 sed -e "$ac_comsub
7282s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007283s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007284s%@top_srcdir@%$top_srcdir%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007285s%@INSTALL@%$INSTALL%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00007286" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00007287fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00007288rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007289
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007290# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7291# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007292#
7293# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007294ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7295ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007296ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007297ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007298# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007299ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7300ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007301ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007302ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007303# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007304ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7305ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007306ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007307ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007308
Guido van Rossumf78abae1997-01-21 22:02:36 +00007309if test "${CONFIG_HEADERS+set}" != set; then
7310EOF
7311cat >> $CONFIG_STATUS <<EOF
7312 CONFIG_HEADERS="config.h"
7313EOF
7314cat >> $CONFIG_STATUS <<\EOF
7315fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007316for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007317 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007318 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007319 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007320 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7321 *) ac_file_in="${ac_file}.in" ;;
7322 esac
7323
Guido van Rossum7f43da71994-08-01 12:15:30 +00007324 echo creating $ac_file
7325
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007326 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00007327 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7328 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007329
7330EOF
7331
7332# Transform confdefs.h into a sed script conftest.vals that substitutes
7333# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007334# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007335# Protect against being in an unquoted here document in config.status.
7336rm -f conftest.vals
7337cat > conftest.hdr <<\EOF
7338s/[\\&%]/\\&/g
7339s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007340s%#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 +00007341s%ac_d%ac_u%gp
7342s%ac_u%ac_e%gp
7343EOF
7344sed -n -f conftest.hdr confdefs.h > conftest.vals
7345rm -f conftest.hdr
7346
7347# This sed command replaces #undef with comments. This is necessary, for
7348# example, in the case of _POSIX_SOURCE, which is predefined and required
7349# on some systems where configure will not decide to define it.
7350cat >> conftest.vals <<\EOF
7351s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7352EOF
7353
7354# Break up conftest.vals because some shells have a limit on
7355# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007356
7357rm -f conftest.tail
7358while :
7359do
7360 ac_lines=`grep -c . conftest.vals`
7361 # grep -c gives empty output for an empty file on some AIX systems.
7362 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7363 # Write a limited-size here document to conftest.frag.
7364 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7365 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7366 echo 'CEOF
7367 sed -f conftest.frag conftest.in > conftest.out
7368 rm -f conftest.in
7369 mv conftest.out conftest.in
7370' >> $CONFIG_STATUS
7371 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7372 rm -f conftest.vals
7373 mv conftest.tail conftest.vals
7374done
7375rm -f conftest.vals
7376
7377cat >> $CONFIG_STATUS <<\EOF
7378 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00007379 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007380 cat conftest.in >> conftest.h
7381 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00007382 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00007383 echo "$ac_file is unchanged"
7384 rm -f conftest.h
7385 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007386 # Remove last slash and all that follows it. Not all systems have dirname.
7387 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7388 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7389 # The file is in a subdirectory.
7390 test ! -d "$ac_dir" && mkdir "$ac_dir"
7391 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00007392 rm -f $ac_file
7393 mv conftest.h $ac_file
7394 fi
7395fi; done
7396
Guido van Rossumf78abae1997-01-21 22:02:36 +00007397EOF
7398cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007399
Guido van Rossumf78abae1997-01-21 22:02:36 +00007400EOF
7401cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007402
7403exit 0
7404EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007405chmod +x $CONFIG_STATUS
7406rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007407test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00007408
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007409
7410echo "creating Setup"
7411if test ! -f Modules/Setup
7412then
7413 cp $srcdir/Modules/Setup.dist Modules/Setup
7414fi
7415
7416echo "creating Setup.local"
7417if test ! -f Modules/Setup.local
7418then
7419 echo "# Edit this file for local setup changes" >Modules/Setup.local
7420fi
7421
7422echo "creating Makefile"
7423$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
7424 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00007425 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007426mv config.c Modules