blob: ac8610699faf8608ba90bf3a5e042e6b3c52da35 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00003# From configure.in Revision: 1.235
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
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000692 AIX*) CC=cc_r
693 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000694 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000695 case $BE_HOST_CPU in
696 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000697 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000698 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000699 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 +0000700 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000701 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000702 ;;
703 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000704 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000705 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000706 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000707 ;;
708 *)
Fred Drake5790be12000-10-09 17:06:13 +0000709 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000710 ;;
711 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000712 AR="\$(srcdir)/Modules/ar_beos"
713 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000714 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000715 Monterey*)
716 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +0000717 without_gcc=;;
718 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000719 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000720fi
721
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000722echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000723
Guido van Rossum95012191999-12-16 17:50:52 +0000724
725
Fred Drakea1a84e72001-03-06 05:52:16 +0000726MAINOBJ=python.o
Guido van Rossum95012191999-12-16 17:50:52 +0000727echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000728echo "configure:729: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000729# Check whether --with-cxx or --without-cxx was given.
730if test "${with_cxx+set}" = set; then
731 withval="$with_cxx"
732
Martin v. Löwis22352952000-12-13 17:37:02 +0000733 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000734 case $withval in
735 no) CXX=
736 with_cxx=no;;
737 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +0000738 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +0000739 with_cxx=$withval;;
740 esac
741else
742
743 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000744 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000745
746fi
747
748echo "$ac_t""$with_cxx" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000749
750
751if test "$check_cxx" = "yes"
752then
753 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
754do
755# Extract the first word of "$ac_prog", so it can be a program name with args.
756set dummy $ac_prog; ac_word=$2
757echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000758echo "configure:759: checking for $ac_word" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000759if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
760 echo $ac_n "(cached) $ac_c" 1>&6
761else
762 if test -n "$CXX"; then
763 ac_cv_prog_CXX="$CXX" # Let the user override the test.
764else
765 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
766 ac_dummy="$PATH"
767 for ac_dir in $ac_dummy; do
768 test -z "$ac_dir" && ac_dir=.
769 if test -f $ac_dir/$ac_word; then
770 ac_cv_prog_CXX="$ac_prog"
771 break
772 fi
773 done
774 IFS="$ac_save_ifs"
775fi
776fi
777CXX="$ac_cv_prog_CXX"
778if test -n "$CXX"; then
779 echo "$ac_t""$CXX" 1>&6
780else
781 echo "$ac_t""no" 1>&6
782fi
783
784test -n "$CXX" && break
785done
786test -n "$CXX" || CXX="notfound"
787
788 if test "$CXX" = "notfound"
789 then
790 CXX=
791 else
792 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000793echo "configure:794: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000794
795ac_ext=C
796# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
797ac_cpp='$CXXCPP $CPPFLAGS'
798ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
799ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
800cross_compiling=$ac_cv_prog_cxx_cross
801
802cat > conftest.$ac_ext << EOF
803
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000804#line 805 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000805#include "confdefs.h"
806
807int main(){return(0);}
808EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000809if { (eval echo configure:810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis22352952000-12-13 17:37:02 +0000810 ac_cv_prog_cxx_works=yes
811 # If we can't run a trivial program, we are probably using a cross compiler.
812 if (./conftest; exit) 2>/dev/null; then
813 ac_cv_prog_cxx_cross=no
814 else
815 ac_cv_prog_cxx_cross=yes
816 fi
817else
818 echo "configure: failed program was:" >&5
819 cat conftest.$ac_ext >&5
820 ac_cv_prog_cxx_works=no
821fi
822rm -fr conftest*
823ac_ext=c
824# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
825ac_cpp='$CPP $CPPFLAGS'
826ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
827ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
828cross_compiling=$ac_cv_prog_cc_cross
829
830echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
831if test $ac_cv_prog_cxx_works = no; then
832 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
833fi
834echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000835echo "configure:836: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000836echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
837cross_compiling=$ac_cv_prog_cxx_cross
838
839 fi
840fi
841
Guido van Rossum8b131c51995-03-09 14:10:13 +0000842# If the user switches compilers, we can't believe the cache
843if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
844then
845 { echo "configure: error: cached CC is different -- throw away $cache_file
846(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
847fi
848
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849# Extract the first word of "gcc", so it can be a program name with args.
850set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000851echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000852echo "configure:853: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000853if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000854 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855else
856 if test -n "$CC"; then
857 ac_cv_prog_CC="$CC" # Let the user override the test.
858else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000859 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
860 ac_dummy="$PATH"
861 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862 test -z "$ac_dir" && ac_dir=.
863 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000865 break
866 fi
867 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000869fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870fi
871CC="$ac_cv_prog_CC"
872if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000873 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000875 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000877
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878if test -z "$CC"; then
879 # Extract the first word of "cc", so it can be a program name with args.
880set dummy cc; ac_word=$2
881echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000882echo "configure:883: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000883if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000884 echo $ac_n "(cached) $ac_c" 1>&6
885else
886 if test -n "$CC"; then
887 ac_cv_prog_CC="$CC" # Let the user override the test.
888else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000889 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000891 ac_dummy="$PATH"
892 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893 test -z "$ac_dir" && ac_dir=.
894 if test -f $ac_dir/$ac_word; then
895 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
896 ac_prog_rejected=yes
897 continue
898 fi
899 ac_cv_prog_CC="cc"
900 break
901 fi
902 done
903 IFS="$ac_save_ifs"
904if test $ac_prog_rejected = yes; then
905 # We found a bogon in the path, so make sure we never use it.
906 set dummy $ac_cv_prog_CC
907 shift
908 if test $# -gt 0; then
909 # We chose a different compiler from the bogus one.
910 # However, it has the same basename, so the bogon will be chosen
911 # first if we set CC to just the basename; use the full file name.
912 shift
913 set dummy "$ac_dir/$ac_word" "$@"
914 shift
915 ac_cv_prog_CC="$@"
916 fi
917fi
918fi
919fi
920CC="$ac_cv_prog_CC"
921if test -n "$CC"; then
922 echo "$ac_t""$CC" 1>&6
923else
924 echo "$ac_t""no" 1>&6
925fi
926
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000927 if test -z "$CC"; then
928 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000929 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000930 # Extract the first word of "cl", so it can be a program name with args.
931set dummy cl; ac_word=$2
932echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000933echo "configure:934: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000934if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000935 echo $ac_n "(cached) $ac_c" 1>&6
936else
937 if test -n "$CC"; then
938 ac_cv_prog_CC="$CC" # Let the user override the test.
939else
940 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
941 ac_dummy="$PATH"
942 for ac_dir in $ac_dummy; do
943 test -z "$ac_dir" && ac_dir=.
944 if test -f $ac_dir/$ac_word; then
945 ac_cv_prog_CC="cl"
946 break
947 fi
948 done
949 IFS="$ac_save_ifs"
950fi
951fi
952CC="$ac_cv_prog_CC"
953if test -n "$CC"; then
954 echo "$ac_t""$CC" 1>&6
955else
956 echo "$ac_t""no" 1>&6
957fi
958 ;;
959 esac
960 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
962fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000964echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000965echo "configure:966: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000966
967ac_ext=c
968# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
969ac_cpp='$CPP $CPPFLAGS'
970ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000971ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000972cross_compiling=$ac_cv_prog_cc_cross
973
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000974cat > conftest.$ac_ext << EOF
975
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000976#line 977 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000977#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000978
Guido van Rossumf78abae1997-01-21 22:02:36 +0000979main(){return(0);}
980EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000981if { (eval echo configure:982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000982 ac_cv_prog_cc_works=yes
983 # If we can't run a trivial program, we are probably using a cross compiler.
984 if (./conftest; exit) 2>/dev/null; then
985 ac_cv_prog_cc_cross=no
986 else
987 ac_cv_prog_cc_cross=yes
988 fi
989else
990 echo "configure: failed program was:" >&5
991 cat conftest.$ac_ext >&5
992 ac_cv_prog_cc_works=no
993fi
994rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000995ac_ext=c
996# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
997ac_cpp='$CPP $CPPFLAGS'
998ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
999ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1000cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +00001001
1002echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1003if test $ac_cv_prog_cc_works = no; then
1004 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1005fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001006echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001007echo "configure:1008: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001008echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1009cross_compiling=$ac_cv_prog_cc_cross
1010
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001011echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001012echo "configure:1013: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001013if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001014 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001015else
1016 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001017#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001018 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001019#endif
1020EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001021if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001022 ac_cv_prog_gcc=yes
1023else
1024 ac_cv_prog_gcc=no
1025fi
1026fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001028echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001029
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001030if test $ac_cv_prog_gcc = yes; then
1031 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001032else
1033 GCC=
1034fi
1035
1036ac_test_CFLAGS="${CFLAGS+set}"
1037ac_save_CFLAGS="$CFLAGS"
1038CFLAGS=
1039echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001040echo "configure:1041: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001041if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001042 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001043else
1044 echo 'void f(){}' > conftest.c
1045if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001046 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001048 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001049fi
1050rm -f conftest*
1051
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001052fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Guido van Rossumf78abae1997-01-21 22:02:36 +00001054echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001055if test "$ac_test_CFLAGS" = set; then
1056 CFLAGS="$ac_save_CFLAGS"
1057elif test $ac_cv_prog_cc_g = yes; then
1058 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001059 CFLAGS="-g -O2"
1060 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001061 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001062 fi
1063else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001064 if test "$GCC" = yes; then
1065 CFLAGS="-O2"
1066 else
1067 CFLAGS=
1068 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001069fi
1070
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001071echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001072echo "configure:1073: checking for Cygwin environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001073if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1074 echo $ac_n "(cached) $ac_c" 1>&6
1075else
1076 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001077#line 1078 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001078#include "confdefs.h"
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001079
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001080int main() {
1081
1082#ifndef __CYGWIN__
1083#define __CYGWIN__ __CYGWIN32__
1084#endif
1085return __CYGWIN__;
1086; return 0; }
1087EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001088if { (eval echo configure:1089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001089 rm -rf conftest*
1090 ac_cv_cygwin=yes
1091else
1092 echo "configure: failed program was:" >&5
1093 cat conftest.$ac_ext >&5
1094 rm -rf conftest*
1095 ac_cv_cygwin=no
1096fi
1097rm -f conftest*
1098rm -f conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001099fi
1100
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001101echo "$ac_t""$ac_cv_cygwin" 1>&6
1102CYGWIN=
1103test "$ac_cv_cygwin" = yes && CYGWIN=yes
1104echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001105echo "configure:1106: checking for mingw32 environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001106if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1107 echo $ac_n "(cached) $ac_c" 1>&6
1108else
1109 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001110#line 1111 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001111#include "confdefs.h"
1112
1113int main() {
1114return __MINGW32__;
1115; return 0; }
1116EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001117if { (eval echo configure:1118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001118 rm -rf conftest*
1119 ac_cv_mingw32=yes
1120else
1121 echo "configure: failed program was:" >&5
1122 cat conftest.$ac_ext >&5
1123 rm -rf conftest*
1124 ac_cv_mingw32=no
1125fi
1126rm -f conftest*
1127rm -f conftest*
1128fi
1129
1130echo "$ac_t""$ac_cv_mingw32" 1>&6
1131MINGW32=
1132test "$ac_cv_mingw32" = yes && MINGW32=yes
1133
1134
1135echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001136echo "configure:1137: checking for executable suffix" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001137if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1138 echo $ac_n "(cached) $ac_c" 1>&6
1139else
1140 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1141 ac_cv_exeext=.exe
1142else
1143 rm -f conftest*
1144 echo 'int main () { return 0; }' > conftest.$ac_ext
1145 ac_cv_exeext=
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001146 if { (eval echo configure:1147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001147 for file in conftest.*; do
1148 case $file in
1149 *.c | *.o | *.obj) ;;
1150 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1151 esac
1152 done
1153 else
1154 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1155 fi
1156 rm -f conftest*
1157 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1158fi
1159fi
1160
1161EXEEXT=""
1162test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1163echo "$ac_t""${ac_cv_exeext}" 1>&6
1164ac_exeext=$EXEEXT
1165
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001166echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001167echo "configure:1168: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001168# Check whether --with-suffix or --without-suffix was given.
1169if test "${with_suffix+set}" = set; then
1170 withval="$with_suffix"
1171
1172 case $withval in
1173 no) EXEEXT=;;
1174 yes) EXEEXT=.exe;;
1175 *) EXEEXT=$withval;;
1176 esac
1177fi
1178
1179echo "$ac_t""$EXEEXT" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001180
Guido van Rossumdd997f71998-10-07 19:58:26 +00001181case $MACHDEP in
1182bsdos*)
1183 case $CC in
1184 gcc) CC="$CC -D_HAVE_BSDI";;
1185 esac;;
1186esac
1187
Guido van Rossum24b1e751997-08-21 02:29:16 +00001188case $ac_sys_system in
1189hp*|HP*)
1190 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001191 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001192 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001193Monterey*)
1194 case $CC in
1195 cc) CC="$CC -Wl,-Bexport";;
1196 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001197SunOS*)
1198 # Some functions have a prototype only with that define, e.g. confstr
1199 cat >> confdefs.h <<\EOF
1200#define __EXTENSIONS__ 1
1201EOF
1202
1203 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001204esac
1205
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001206
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001207
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001208echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001209echo "configure:1210: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001210if test -z "$LIBRARY"
1211then
1212 LIBRARY='libpython$(VERSION).a'
1213fi
1214echo "$ac_t""$LIBRARY" 1>&6
1215
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001216# LDLIBRARY is the name of the library to link against (as opposed to the
1217# name of the library into which to insert object files). On systems
1218# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
Guido van Rossumaef734b2001-01-10 21:09:12 +00001219# the Makefiles). On Cygwin LDLIBRARY is the import library, DLLLIBRARY is the
1220# shared (i.e., DLL) library.
1221
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001222
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001223LDLIBRARY="$LIBRARY"
Guido van Rossumca563f22001-01-23 01:52:44 +00001224DLLLIBRARY=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001225
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001226# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001227# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001228# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001229
1230echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001231echo "configure:1232: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001232if test -z "$LINKCC"
1233then
1234 case $ac_sys_system in
1235 AIX*)
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001236 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001237 dgux*)
1238 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001239 Monterey64*)
1240 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001241 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001242 esac
1243fi
1244echo "$ac_t""$LINKCC" 1>&6
1245
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001246echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001247echo "configure:1248: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001248
1249# NeXT framework builds require that the 'ar' library be converted into
1250# a bundle using libtool.
1251if test "$with_next_framework"
1252then
1253 LDLIBRARY='libpython$(VERSION).dylib'
1254fi
1255
1256# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001257case $MACHDEP in
1258dguxR4)
1259 LDLIBRARY='libpython$(VERSION).so'
1260 OPT="$OPT -pic"
1261 ;;
1262beos*)
1263 LDLIBRARY='libpython$(VERSION).so'
1264 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001265cygwin*)
1266 LDLIBRARY='libpython$(VERSION).dll.a'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001267 DLLLIBRARY='libpython$(VERSION).dll'
Guido van Rossumaef734b2001-01-10 21:09:12 +00001268 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001269esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001270echo "$ac_t""$LDLIBRARY" 1>&6
1271
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272# Extract the first word of "ranlib", so it can be a program name with args.
1273set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001274echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001275echo "configure:1276: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001276if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001277 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001278else
1279 if test -n "$RANLIB"; then
1280 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1281else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001282 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1283 ac_dummy="$PATH"
1284 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285 test -z "$ac_dir" && ac_dir=.
1286 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001287 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001288 break
1289 fi
1290 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001291 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001292 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001293fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001294fi
1295RANLIB="$ac_cv_prog_RANLIB"
1296if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001297 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001298else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001299 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001300fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301
1302
Guido van Rossum7f43da71994-08-01 12:15:30 +00001303for ac_prog in ar aal
1304do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305# Extract the first word of "$ac_prog", so it can be a program name with args.
1306set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001307echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001308echo "configure:1309: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001309if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001310 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001311else
1312 if test -n "$AR"; then
1313 ac_cv_prog_AR="$AR" # Let the user override the test.
1314else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001315 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1316 ac_dummy="$PATH"
1317 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001318 test -z "$ac_dir" && ac_dir=.
1319 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001320 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001321 break
1322 fi
1323 done
1324 IFS="$ac_save_ifs"
1325fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001326fi
1327AR="$ac_cv_prog_AR"
1328if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001329 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001330else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001331 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001332fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001333
1334test -n "$AR" && break
1335done
1336test -n "$AR" || AR="ar"
1337
Neil Schemenauera42c8272001-03-31 00:01:55 +00001338
1339case $MACHDEP in
1340bsdos*)
1341 # install -d does not work on BSDI
1342 if test -z "$INSTALL"
1343 then
1344 INSTALL="${srcdir}/install-sh -c"
1345 fi
1346esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001347ac_aux_dir=
1348for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1349 if test -f $ac_dir/install-sh; then
1350 ac_aux_dir=$ac_dir
1351 ac_install_sh="$ac_aux_dir/install-sh -c"
1352 break
1353 elif test -f $ac_dir/install.sh; then
1354 ac_aux_dir=$ac_dir
1355 ac_install_sh="$ac_aux_dir/install.sh -c"
1356 break
1357 fi
1358done
1359if test -z "$ac_aux_dir"; then
1360 { 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 +00001361fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001362ac_config_guess=$ac_aux_dir/config.guess
1363ac_config_sub=$ac_aux_dir/config.sub
1364ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1365
1366# Find a good install program. We prefer a C program (faster),
1367# so one script is as good as another. But avoid the broken or
1368# incompatible versions:
1369# SysV /etc/install, /usr/sbin/install
1370# SunOS /usr/etc/install
1371# IRIX /sbin/install
1372# AIX /bin/install
1373# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1374# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1375# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1376# ./install, which can be erroneously created by make from ./install.sh.
1377echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001378echo "configure:1379: checking for a BSD compatible install" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001379if test -z "$INSTALL"; then
1380if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1381 echo $ac_n "(cached) $ac_c" 1>&6
1382else
1383 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1384 for ac_dir in $PATH; do
1385 # Account for people who put trailing slashes in PATH elements.
1386 case "$ac_dir/" in
1387 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1388 *)
1389 # OSF1 and SCO ODT 3.0 have their own names for install.
1390 # Don't use installbsd from OSF since it installs stuff as root
1391 # by default.
1392 for ac_prog in ginstall scoinst install; do
1393 if test -f $ac_dir/$ac_prog; then
1394 if test $ac_prog = install &&
1395 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1396 # AIX install. It has an incompatible calling convention.
1397 :
1398 else
1399 ac_cv_path_install="$ac_dir/$ac_prog -c"
1400 break 2
1401 fi
1402 fi
1403 done
1404 ;;
1405 esac
1406 done
1407 IFS="$ac_save_IFS"
1408
1409fi
1410 if test "${ac_cv_path_install+set}" = set; then
1411 INSTALL="$ac_cv_path_install"
1412 else
1413 # As a last resort, use the slow shell script. We don't cache a
1414 # path for INSTALL within a source directory, because that will
1415 # break other packages using the cache if that directory is
1416 # removed, or if the path is relative.
1417 INSTALL="$ac_install_sh"
1418 fi
1419fi
1420echo "$ac_t""$INSTALL" 1>&6
1421
1422# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1423# It thinks the first close brace ends the variable substitution.
1424test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1425
1426test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1427
1428test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1429
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001430
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001431# Not every filesystem supports hard links
1432
1433if test -z "$LN" ; then
1434 case $ac_sys_system in
1435 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001436 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001437 *) LN=ln;;
1438 esac
1439fi
1440
Fred Drake109d9862001-07-11 06:27:56 +00001441# Check for --with-pydebug
1442echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001443echo "configure:1444: checking for --with-pydebug" >&5
Fred Drake109d9862001-07-11 06:27:56 +00001444# Check whether --with-pydebug or --without-pydebug was given.
1445if test "${with_pydebug+set}" = set; then
1446 withval="$with_pydebug"
1447
1448if test "$withval" != no
1449then cat >> confdefs.h <<\EOF
1450#define Py_DEBUG 1
1451EOF
1452 echo "$ac_t""yes" 1>&6; Py_DEBUG='true'
1453else echo "$ac_t""no" 1>&6; Py_DEBUG='false'
1454fi
1455else
1456 echo "$ac_t""no" 1>&6
1457fi
1458
1459
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001460# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001461
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001462if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001463then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001464 case $GCC in
1465 yes)
1466 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001467 yes)
Fred Drake109d9862001-07-11 06:27:56 +00001468 if test "$Py_DEBUG" = 'true' ; then
1469 # Optimization messes up debuggers, so turn it off for
1470 # debug builds.
1471 OPT="-g -Wall -Wstrict-prototypes"
1472 else
1473 OPT="-g -O3 -Wall -Wstrict-prototypes"
1474 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001475 *)
Fred Drake109d9862001-07-11 06:27:56 +00001476 OPT="-O3 -Wall -Wstrict-prototypes";;
1477 esac
1478 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001479 *)
1480 case $ac_sys_system in
1481 UnixWare*)
1482 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1483 *)
1484 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001485 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001486 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001487fi
1488
Trent Mick635f6fb2000-08-23 21:33:05 +00001489# The current (beta) Monterey compiler dies with optimizations
1490case $ac_sys_system in
1491Monterey*) OPT="";;
1492esac
1493
Guido van Rossum563e7081996-09-10 18:20:48 +00001494if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001495then
1496 OPT="$OPT $ac_arch_flags"
1497fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001498# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001499echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001500echo "configure:1501: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001501# On Suns, sometimes $CPP names a directory.
1502if test -n "$CPP" && test -d "$CPP"; then
1503 CPP=
1504fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001505if test -z "$CPP"; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001506if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001507 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001508else
1509 # This must be in double quotes, not single quotes, because CPP may get
1510 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001511 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001512 # On the NeXT, cc -E runs the code through the compiler's parser,
1513 # not just through cpp.
1514 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001515#line 1516 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001516#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001517#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001518Syntax Error
1519EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001520ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001521{ (eval echo configure:1522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001522ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1523if test -z "$ac_err"; then
1524 :
1525else
1526 echo "$ac_err" >&5
1527 echo "configure: failed program was:" >&5
1528 cat conftest.$ac_ext >&5
1529 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001530 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001531 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001532#line 1533 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001533#include "confdefs.h"
1534#include <assert.h>
1535Syntax Error
1536EOF
1537ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001538{ (eval echo configure:1539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001539ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001540if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001541 :
1542else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001543 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001544 echo "configure: failed program was:" >&5
1545 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001546 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001547 CPP="${CC-cc} -nologo -E"
1548 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001549#line 1550 "configure"
Guido van Rossumff555e32000-09-22 15:38:21 +00001550#include "confdefs.h"
1551#include <assert.h>
1552Syntax Error
1553EOF
1554ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001555{ (eval echo configure:1556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumff555e32000-09-22 15:38:21 +00001556ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1557if test -z "$ac_err"; then
1558 :
1559else
1560 echo "$ac_err" >&5
1561 echo "configure: failed program was:" >&5
1562 cat conftest.$ac_ext >&5
1563 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001564 CPP=/lib/cpp
1565fi
1566rm -f conftest*
1567fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001568rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001569fi
1570rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001571 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001572fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001573 CPP="$ac_cv_prog_CPP"
1574else
1575 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001576fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001577echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001578
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001579echo $ac_n "checking for AIX""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001580echo "configure:1581: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001581cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001582#line 1583 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001583#include "confdefs.h"
1584#ifdef _AIX
1585 yes
1586#endif
1587
1588EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001589if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1590 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001591 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001592 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001593#define _ALL_SOURCE 1
1594EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001595
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001596else
1597 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001598 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001599fi
1600rm -f conftest*
1601
1602
Guido van Rossumf78abae1997-01-21 22:02:36 +00001603ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001604echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001605echo "configure:1606: checking for minix/config.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001606if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001607 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001608else
1609 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001610#line 1611 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001611#include "confdefs.h"
1612#include <minix/config.h>
1613EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001614ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001615{ (eval echo configure:1616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001616ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001617if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001618 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001619 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001620else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001621 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001622 echo "configure: failed program was:" >&5
1623 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001624 rm -rf conftest*
1625 eval "ac_cv_header_$ac_safe=no"
1626fi
1627rm -f conftest*
1628fi
1629if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001630 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001631 MINIX=yes
1632else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001633 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001634MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001635fi
1636
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001637if test "$MINIX" = yes; then
1638 cat >> confdefs.h <<\EOF
1639#define _POSIX_SOURCE 1
1640EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001641
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001642 cat >> confdefs.h <<\EOF
1643#define _POSIX_1_SOURCE 2
1644EOF
1645
1646 cat >> confdefs.h <<\EOF
1647#define _MINIX 1
1648EOF
1649
1650fi
1651
Guido van Rossumda88dad1995-01-26 00:46:29 +00001652
Guido van Rossum91922671997-10-09 20:24:13 +00001653echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001654echo "configure:1655: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001655if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001656 echo $ac_n "(cached) $ac_c" 1>&6
1657else
1658 ac_save_cc="$CC"
1659CC="$CC -OPT:Olimit=0"
1660if test "$cross_compiling" = yes; then
1661 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1662else
1663 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001664#line 1665 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001665#include "confdefs.h"
1666int main() { return 0; }
1667EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001668if { (eval echo configure:1669: \"$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 +00001669then
1670 ac_cv_opt_olimit_ok=yes
1671else
1672 echo "configure: failed program was:" >&5
1673 cat conftest.$ac_ext >&5
1674 rm -fr conftest*
1675 ac_cv_opt_olimit_ok=no
1676fi
1677rm -fr conftest*
1678fi
1679
1680CC="$ac_save_cc"
1681fi
1682
1683echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001684if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001685 case $ac_sys_system in
1686 Darwin*) OPT="$OPT" ;;
1687 *) OPT="$OPT -OPT:Olimit=0";;
1688 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001689else
1690 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001691echo "configure:1692: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001692 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001693 echo $ac_n "(cached) $ac_c" 1>&6
1694else
1695 ac_save_cc="$CC"
1696 CC="$CC -Olimit 1500"
1697 if test "$cross_compiling" = yes; then
1698 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1699else
1700 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001701#line 1702 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001702#include "confdefs.h"
1703int main() { return 0; }
1704EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001705if { (eval echo configure:1706: \"$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 +00001706then
1707 ac_cv_olimit_ok=yes
1708else
1709 echo "configure: failed program was:" >&5
1710 cat conftest.$ac_ext >&5
1711 rm -fr conftest*
1712 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001713fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001714rm -fr conftest*
1715fi
1716
1717 CC="$ac_save_cc"
1718fi
1719
1720 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1721 if test $ac_cv_olimit_ok = yes; then
1722 OPT="$OPT -Olimit 1500"
1723 fi
1724fi
1725
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001726# Check for enable-ipv6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001727echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001728echo "configure:1729: checking whether to enable ipv6" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001729# Check whether --enable-ipv6 or --disable-ipv6 was given.
1730if test "${enable_ipv6+set}" = set; then
1731 enableval="$enable_ipv6"
1732 case "$enableval" in
1733 no)
1734 echo "$ac_t""no" 1>&6
1735 ipv6=no
1736 ;;
1737 *) echo "$ac_t""yes" 1>&6
1738 cat >> confdefs.h <<\EOF
1739#define ENABLE_IPV6 1
1740EOF
1741
1742 ipv6=yes
1743 ;;
1744 esac
1745else
1746 if test "$cross_compiling" = yes; then
1747 echo "$ac_t""no" 1>&6
1748 ipv6=no
1749
1750else
1751 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001752#line 1753 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001753#include "confdefs.h"
Fred Drake109d9862001-07-11 06:27:56 +00001754 /* AF_INET6 available check */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001755#include <sys/types.h>
1756#include <sys/socket.h>
1757main()
1758{
1759 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
1760 exit(1);
1761 else
1762 exit(0);
1763}
1764
1765EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001766if { (eval echo configure:1767: \"$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 +00001767then
1768 echo "$ac_t""yes" 1>&6
1769 cat >> confdefs.h <<\EOF
1770#define ENABLE_IPV6 1
1771EOF
1772
1773 ipv6=yes
1774else
1775 echo "configure: failed program was:" >&5
1776 cat conftest.$ac_ext >&5
1777 rm -fr conftest*
1778 echo "$ac_t""no" 1>&6
1779 ipv6=no
1780fi
1781rm -fr conftest*
1782fi
1783
1784fi
1785
1786
1787ipv6type=unknown
1788ipv6lib=none
1789ipv6trylibc=no
1790
1791if test "$ipv6" = "yes"; then
1792 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001793echo "configure:1794: checking ipv6 stack type" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001794 for i in inria kame linux-glibc linux-inet6 toshiba v6d zeta; do
1795 case $i in
1796 inria)
1797 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001798#line 1799 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001799#include "confdefs.h"
1800dnl
1801#include <netinet/in.h>
1802#ifdef IPV6_INRIA_VERSION
1803yes
1804#endif
1805EOF
1806if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1807 egrep "yes" >/dev/null 2>&1; then
1808 rm -rf conftest*
1809 ipv6type=$i;
1810 OPT="-DINET6 $OPT"
1811fi
1812rm -f conftest*
1813
1814 ;;
1815 kame)
1816 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001817#line 1818 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001818#include "confdefs.h"
1819dnl
1820#include <netinet/in.h>
1821#ifdef __KAME__
1822yes
1823#endif
1824EOF
1825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1826 egrep "yes" >/dev/null 2>&1; then
1827 rm -rf conftest*
1828 ipv6type=$i;
1829 ipv6lib=inet6
1830 ipv6libdir=/usr/local/v6/lib
1831 ipv6trylibc=yes
1832 OPT="-DINET6 $OPT"
1833fi
1834rm -f conftest*
1835
1836 ;;
1837 linux-glibc)
1838 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001839#line 1840 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001840#include "confdefs.h"
1841dnl
1842#include <features.h>
1843#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
1844yes
1845#endif
1846EOF
1847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1848 egrep "yes" >/dev/null 2>&1; then
1849 rm -rf conftest*
1850 ipv6type=$i;
1851 ipv6trylibc=yes
1852 OPT="-DINET6 $OPT"
1853fi
1854rm -f conftest*
1855
1856 ;;
1857 linux-inet6)
1858 if test -d /usr/inet6; then
1859 ipv6type=$i
1860 ipv6lib=inet6
1861 ipv6libdir=/usr/inet6/lib
1862 OPT="-DINET6 -I/usr/inet6/include $OPT"
1863 fi
1864 ;;
1865 toshiba)
1866 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001867#line 1868 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001868#include "confdefs.h"
1869dnl
1870#include <sys/param.h>
1871#ifdef _TOSHIBA_INET6
1872yes
1873#endif
1874EOF
1875if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1876 egrep "yes" >/dev/null 2>&1; then
1877 rm -rf conftest*
1878 ipv6type=$i;
1879 ipv6lib=inet6;
1880 ipv6libdir=/usr/local/v6/lib;
1881 OPT="-DINET6 $OPT"
1882fi
1883rm -f conftest*
1884
1885 ;;
1886 v6d)
1887 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001888#line 1889 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001889#include "confdefs.h"
1890dnl
1891#include </usr/local/v6/include/sys/v6config.h>
1892#ifdef __V6D__
1893yes
1894#endif
1895EOF
1896if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1897 egrep "yes" >/dev/null 2>&1; then
1898 rm -rf conftest*
1899 ipv6type=$i;
1900 ipv6lib=v6;
1901 ipv6libdir=/usr/local/v6/lib;
1902 OPT="-I/usr/local/v6/include $OPT"
1903fi
1904rm -f conftest*
1905
1906 ;;
1907 zeta)
1908 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001909#line 1910 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001910#include "confdefs.h"
1911dnl
1912#include <sys/param.h>
1913#ifdef _ZETA_MINAMI_INET6
1914yes
1915#endif
1916EOF
1917if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1918 egrep "yes" >/dev/null 2>&1; then
1919 rm -rf conftest*
1920 ipv6type=$i;
1921 ipv6lib=inet6;
1922 ipv6libdir=/usr/local/v6/lib;
1923 OPT="-DINET6 $OPT"
1924fi
1925rm -f conftest*
1926
1927 ;;
1928 esac
1929 if test "$ipv6type" != "unknown"; then
1930 break
1931 fi
1932 done
1933 echo "$ac_t""$ipv6type" 1>&6
1934fi
1935
1936if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
1937 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
1938 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
1939 echo "using lib$ipv6lib"
1940 else
1941 if test $ipv6trylibc = "yes"; then
1942 echo "using libc"
1943 else
1944 echo 'Fatal: no $ipv6lib library found. cannot continue.'
1945 echo "You need to fetch lib$ipv6lib.a from appropriate"
1946 echo 'ipv6 kit and compile beforehand.'
1947 exit 1
1948 fi
1949 fi
1950fi
1951
Martin v. Löwis130fb172001-07-19 11:00:41 +00001952# -Kpthread, if available, provides the right #defines
1953# and linker options to make pthread_create available
1954echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001955echo "configure:1956: checking whether $CC accepts -Kpthread" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00001956if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then
1957 echo $ac_n "(cached) $ac_c" 1>&6
1958else
1959 ac_save_cc="$CC"
1960CC="$CC -Kpthread"
1961cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001962#line 1963 "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00001963#include "confdefs.h"
1964#include <pthread.h>
1965int main() {
1966pthread_create(0,0,0,0)
1967; return 0; }
1968EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001969if { (eval echo configure:1970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00001970 rm -rf conftest*
1971 ac_cv_kpthread=yes
1972else
1973 echo "configure: failed program was:" >&5
1974 cat conftest.$ac_ext >&5
1975 rm -rf conftest*
1976 ac_cv_kpthread=no
1977fi
1978rm -f conftest*
1979CC="$ac_save_cc"
1980fi
1981
1982
1983# GCC does not reject -Kpthread as an illegal option, it merely complains that
1984# it is unrecognized
1985if test "$GCC" = "yes"
1986then ac_cv_kpthread="no, we have gcc"
1987fi
1988echo "$ac_t""$ac_cv_kpthread" 1>&6
1989
Guido van Rossum84e7b241996-08-19 21:59:00 +00001990
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001991# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001992echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001993echo "configure:1994: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001994if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001995 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001996else
1997 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001998#line 1999 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001999#include "confdefs.h"
2000#include <stdlib.h>
2001#include <stdarg.h>
2002#include <string.h>
2003#include <float.h>
2004EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002005ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002006{ (eval echo configure:2007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002007ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00002008if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002009 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002010 ac_cv_header_stdc=yes
2011else
2012 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002013 echo "configure: failed program was:" >&5
2014 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002015 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002016 ac_cv_header_stdc=no
2017fi
2018rm -f conftest*
2019
2020if test $ac_cv_header_stdc = yes; then
2021 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2022cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002023#line 2024 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002024#include "confdefs.h"
2025#include <string.h>
2026EOF
2027if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2028 egrep "memchr" >/dev/null 2>&1; then
2029 :
2030else
2031 rm -rf conftest*
2032 ac_cv_header_stdc=no
2033fi
2034rm -f conftest*
2035
2036fi
2037
2038if test $ac_cv_header_stdc = yes; then
2039 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2040cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002041#line 2042 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002042#include "confdefs.h"
2043#include <stdlib.h>
2044EOF
2045if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2046 egrep "free" >/dev/null 2>&1; then
2047 :
2048else
2049 rm -rf conftest*
2050 ac_cv_header_stdc=no
2051fi
2052rm -f conftest*
2053
2054fi
2055
2056if test $ac_cv_header_stdc = yes; then
2057 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2058if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002059 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002060else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002061 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002062#line 2063 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002063#include "confdefs.h"
2064#include <ctype.h>
2065#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2066#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002067#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00002068int main () { int i; for (i = 0; i < 256; i++)
2069if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2070exit (0); }
2071
2072EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002073if { (eval echo configure:2074: \"$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 +00002074then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002075 :
2076else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002077 echo "configure: failed program was:" >&5
2078 cat conftest.$ac_ext >&5
2079 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002080 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002081fi
2082rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002083fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002084
2085fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002086fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002087
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002088echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002089if test $ac_cv_header_stdc = yes; then
2090 cat >> confdefs.h <<\EOF
2091#define STDC_HEADERS 1
2092EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002093
2094fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002095
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00002096for 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 +00002097signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00002098sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002099sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00002100sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Thomas Wouterse38b2f12001-07-11 22:35:31 +00002101ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00002102do
Guido van Rossumf78abae1997-01-21 22:02:36 +00002103ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002104echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002105echo "configure:2106: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002106if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002107 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002108else
2109 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002110#line 2111 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002111#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002112#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00002113EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002114ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002115{ (eval echo configure:2116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002116ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00002117if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002118 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002119 eval "ac_cv_header_$ac_safe=yes"
2120else
2121 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002122 echo "configure: failed program was:" >&5
2123 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002124 rm -rf conftest*
2125 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002126fi
2127rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002128fi
2129if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002130 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002131 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002132 cat >> confdefs.h <<EOF
2133#define $ac_tr_hdr 1
2134EOF
2135
2136else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002137 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002138fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002139done
2140
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002141ac_header_dirent=no
2142for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2143do
Guido van Rossumf78abae1997-01-21 22:02:36 +00002144ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002145echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002146echo "configure:2147: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002147if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002148 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002149else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002150 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002151#line 2152 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002152#include "confdefs.h"
2153#include <sys/types.h>
2154#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002155int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002156DIR *dirp = 0;
2157; return 0; }
2158EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002159if { (eval echo configure:2160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002160 rm -rf conftest*
2161 eval "ac_cv_header_dirent_$ac_safe=yes"
2162else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002163 echo "configure: failed program was:" >&5
2164 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002165 rm -rf conftest*
2166 eval "ac_cv_header_dirent_$ac_safe=no"
2167fi
2168rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002169fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002170if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002171 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002172 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002173 cat >> confdefs.h <<EOF
2174#define $ac_tr_hdr 1
2175EOF
2176 ac_header_dirent=$ac_hdr; break
2177else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002178 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002179fi
2180done
2181# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2182if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002183echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002184echo "configure:2185: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002185ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002186if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002187 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002188else
2189 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002190LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002191cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002192#line 2193 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002193#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002194/* Override any gcc2 internal prototype to avoid an error. */
2195/* We use char because int might match the return type of a gcc2
2196 builtin and then its argument prototype would still apply. */
2197char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002198
Guido van Rossumf78abae1997-01-21 22:02:36 +00002199int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002200opendir()
2201; return 0; }
2202EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002203if { (eval echo configure:2204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002204 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002205 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002206else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002207 echo "configure: failed program was:" >&5
2208 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002209 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002210 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002211fi
2212rm -f conftest*
2213LIBS="$ac_save_LIBS"
2214
2215fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002216if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002217 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002218 LIBS="$LIBS -ldir"
2219else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002220 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002221fi
2222
2223else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002224echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002225echo "configure:2226: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002226ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002227if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002228 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002229else
2230 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002231LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002232cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002233#line 2234 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002234#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002235/* Override any gcc2 internal prototype to avoid an error. */
2236/* We use char because int might match the return type of a gcc2
2237 builtin and then its argument prototype would still apply. */
2238char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002239
Guido van Rossumf78abae1997-01-21 22:02:36 +00002240int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002241opendir()
2242; return 0; }
2243EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002244if { (eval echo configure:2245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002245 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002246 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002247else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002248 echo "configure: failed program was:" >&5
2249 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002250 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002251 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002252fi
2253rm -f conftest*
2254LIBS="$ac_save_LIBS"
2255
2256fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002257if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002258 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002259 LIBS="$LIBS -lx"
2260else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002261 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002262fi
2263
2264fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002265
2266
2267# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00002268was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002269echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002270echo "configure:2271: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002271cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002272#line 2273 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002273#include "confdefs.h"
2274#include <time.h>
2275EOF
2276if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2277 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002278 rm -rf conftest*
2279 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002280else
2281 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002282 cat >> confdefs.h <<\EOF
2283#define clock_t long
2284EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002285
2286fi
2287rm -f conftest*
2288
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002289echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002290
Guido van Rossum84e7b241996-08-19 21:59:00 +00002291# Add some code to confdefs.h so that the test for off_t works on SCO
2292cat >> confdefs.h <<\EOF
2293#if defined(SCO_DS)
2294#undef _OFF_T
2295#endif
2296EOF
2297
Guido van Rossumef2255b2000-03-10 22:30:29 +00002298# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002299echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002300echo "configure:2301: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002301if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002302 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002303else
2304 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002305#line 2306 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002306#include "confdefs.h"
2307#include <sys/types.h>
2308#if STDC_HEADERS
2309#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002310#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002311#endif
2312EOF
2313if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002314 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 +00002315 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002316 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002317else
2318 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002319 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002320fi
2321rm -f conftest*
2322
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002323fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002324echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2325if test $ac_cv_type_mode_t = no; then
2326 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002327#define mode_t int
2328EOF
2329
2330fi
2331
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002332echo $ac_n "checking for off_t""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002333echo "configure:2334: checking for off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002334if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002335 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002336else
2337 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002338#line 2339 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002339#include "confdefs.h"
2340#include <sys/types.h>
2341#if STDC_HEADERS
2342#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002343#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002344#endif
2345EOF
2346if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002347 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 +00002348 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002349 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002350else
2351 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002352 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002353fi
2354rm -f conftest*
2355
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002356fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002357echo "$ac_t""$ac_cv_type_off_t" 1>&6
2358if test $ac_cv_type_off_t = no; then
2359 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002360#define off_t long
2361EOF
2362
2363fi
2364
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002365echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002366echo "configure:2367: checking for pid_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002367if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002368 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002369else
2370 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002371#line 2372 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002372#include "confdefs.h"
2373#include <sys/types.h>
2374#if STDC_HEADERS
2375#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002376#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002377#endif
2378EOF
2379if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002380 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 +00002381 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002382 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002383else
2384 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002385 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002386fi
2387rm -f conftest*
2388
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002389fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002390echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2391if test $ac_cv_type_pid_t = no; then
2392 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002393#define pid_t int
2394EOF
2395
2396fi
2397
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002398echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002399echo "configure:2400: checking return type of signal handlers" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002400if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002401 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002402else
2403 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002404#line 2405 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002405#include "confdefs.h"
2406#include <sys/types.h>
2407#include <signal.h>
2408#ifdef signal
2409#undef signal
2410#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002411#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002412extern "C" void (*signal (int, void (*)(int)))(int);
2413#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002414void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002415#endif
2416
Guido van Rossumf78abae1997-01-21 22:02:36 +00002417int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002418int i;
2419; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002420EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002421if { (eval echo configure:2422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002422 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002423 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002424else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002425 echo "configure: failed program was:" >&5
2426 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002427 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002428 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002429fi
2430rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002431fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002432
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002433echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002434cat >> confdefs.h <<EOF
2435#define RETSIGTYPE $ac_cv_type_signal
2436EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002437
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002438
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002439echo $ac_n "checking for size_t""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002440echo "configure:2441: checking for size_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002441if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002442 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002443else
2444 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002445#line 2446 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002446#include "confdefs.h"
2447#include <sys/types.h>
2448#if STDC_HEADERS
2449#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002450#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002451#endif
2452EOF
2453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002454 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 +00002455 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002456 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002457else
2458 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002459 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002460fi
2461rm -f conftest*
2462
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002463fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002464echo "$ac_t""$ac_cv_type_size_t" 1>&6
2465if test $ac_cv_type_size_t = no; then
2466 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002467#define size_t unsigned
2468EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002469
2470fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002471
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002472echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002473echo "configure:2474: checking for uid_t in sys/types.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002474if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002475 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002476else
2477 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002478#line 2479 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002479#include "confdefs.h"
2480#include <sys/types.h>
2481EOF
2482if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2483 egrep "uid_t" >/dev/null 2>&1; then
2484 rm -rf conftest*
2485 ac_cv_type_uid_t=yes
2486else
2487 rm -rf conftest*
2488 ac_cv_type_uid_t=no
2489fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002490rm -f conftest*
2491
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002492fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002493
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002494echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002495if test $ac_cv_type_uid_t = no; then
2496 cat >> confdefs.h <<\EOF
2497#define uid_t int
2498EOF
2499
2500 cat >> confdefs.h <<\EOF
2501#define gid_t int
2502EOF
2503
2504fi
2505
Guido van Rossum627b2d71993-12-24 10:39:16 +00002506
Guido van Rossumef2255b2000-03-10 22:30:29 +00002507# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002508echo $ac_n "checking size of int""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002509echo "configure:2510: checking size of int" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002510if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002511 echo $ac_n "(cached) $ac_c" 1>&6
2512else
2513 if test "$cross_compiling" = yes; then
2514 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2515else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002516 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002517#line 2518 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002518#include "confdefs.h"
2519#include <stdio.h>
2520main()
2521{
2522 FILE *f=fopen("conftestval", "w");
2523 if (!f) exit(1);
2524 fprintf(f, "%d\n", sizeof(int));
2525 exit(0);
2526}
2527EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002528if { (eval echo configure:2529: \"$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 +00002529then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002530 ac_cv_sizeof_int=`cat conftestval`
2531else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002532 echo "configure: failed program was:" >&5
2533 cat conftest.$ac_ext >&5
2534 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002535 ac_cv_sizeof_int=0
2536fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002537rm -fr conftest*
2538fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002539
2540fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002541echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2542cat >> confdefs.h <<EOF
2543#define SIZEOF_INT $ac_cv_sizeof_int
2544EOF
2545
2546
2547echo $ac_n "checking size of long""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002548echo "configure:2549: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002549if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002550 echo $ac_n "(cached) $ac_c" 1>&6
2551else
2552 if test "$cross_compiling" = yes; then
2553 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2554else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002555 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002556#line 2557 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002557#include "confdefs.h"
2558#include <stdio.h>
2559main()
2560{
2561 FILE *f=fopen("conftestval", "w");
2562 if (!f) exit(1);
2563 fprintf(f, "%d\n", sizeof(long));
2564 exit(0);
2565}
2566EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002567if { (eval echo configure:2568: \"$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 +00002568then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002569 ac_cv_sizeof_long=`cat conftestval`
2570else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002571 echo "configure: failed program was:" >&5
2572 cat conftest.$ac_ext >&5
2573 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002574 ac_cv_sizeof_long=0
2575fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002576rm -fr conftest*
2577fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002578
2579fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002580echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2581cat >> confdefs.h <<EOF
2582#define SIZEOF_LONG $ac_cv_sizeof_long
2583EOF
2584
2585
Guido van Rossumad678af1998-10-02 14:42:15 +00002586echo $ac_n "checking size of void *""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002587echo "configure:2588: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002588if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002589 echo $ac_n "(cached) $ac_c" 1>&6
2590else
2591 if test "$cross_compiling" = yes; then
2592 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2593else
2594 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002595#line 2596 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002596#include "confdefs.h"
2597#include <stdio.h>
2598main()
2599{
2600 FILE *f=fopen("conftestval", "w");
2601 if (!f) exit(1);
2602 fprintf(f, "%d\n", sizeof(void *));
2603 exit(0);
2604}
2605EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002606if { (eval echo configure:2607: \"$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 +00002607then
2608 ac_cv_sizeof_void_p=`cat conftestval`
2609else
2610 echo "configure: failed program was:" >&5
2611 cat conftest.$ac_ext >&5
2612 rm -fr conftest*
2613 ac_cv_sizeof_void_p=0
2614fi
2615rm -fr conftest*
2616fi
2617
2618fi
2619echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2620cat >> confdefs.h <<EOF
2621#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2622EOF
2623
2624
Guido van Rossumef2255b2000-03-10 22:30:29 +00002625echo $ac_n "checking size of char""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002626echo "configure:2627: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002627if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002628 echo $ac_n "(cached) $ac_c" 1>&6
2629else
2630 if test "$cross_compiling" = yes; then
2631 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2632else
2633 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002634#line 2635 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002635#include "confdefs.h"
2636#include <stdio.h>
2637main()
2638{
2639 FILE *f=fopen("conftestval", "w");
2640 if (!f) exit(1);
2641 fprintf(f, "%d\n", sizeof(char));
2642 exit(0);
2643}
2644EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002645if { (eval echo configure:2646: \"$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 +00002646then
2647 ac_cv_sizeof_char=`cat conftestval`
2648else
2649 echo "configure: failed program was:" >&5
2650 cat conftest.$ac_ext >&5
2651 rm -fr conftest*
2652 ac_cv_sizeof_char=0
2653fi
2654rm -fr conftest*
2655fi
2656
2657fi
2658echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2659cat >> confdefs.h <<EOF
2660#define SIZEOF_CHAR $ac_cv_sizeof_char
2661EOF
2662
2663
2664echo $ac_n "checking size of short""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002665echo "configure:2666: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002666if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002667 echo $ac_n "(cached) $ac_c" 1>&6
2668else
2669 if test "$cross_compiling" = yes; then
2670 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2671else
2672 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002673#line 2674 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002674#include "confdefs.h"
2675#include <stdio.h>
2676main()
2677{
2678 FILE *f=fopen("conftestval", "w");
2679 if (!f) exit(1);
2680 fprintf(f, "%d\n", sizeof(short));
2681 exit(0);
2682}
2683EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002684if { (eval echo configure:2685: \"$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 +00002685then
2686 ac_cv_sizeof_short=`cat conftestval`
2687else
2688 echo "configure: failed program was:" >&5
2689 cat conftest.$ac_ext >&5
2690 rm -fr conftest*
2691 ac_cv_sizeof_short=0
2692fi
2693rm -fr conftest*
2694fi
2695
2696fi
2697echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2698cat >> confdefs.h <<EOF
2699#define SIZEOF_SHORT $ac_cv_sizeof_short
2700EOF
2701
2702
2703echo $ac_n "checking size of float""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002704echo "configure:2705: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002705if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002706 echo $ac_n "(cached) $ac_c" 1>&6
2707else
2708 if test "$cross_compiling" = yes; then
2709 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2710else
2711 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002712#line 2713 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002713#include "confdefs.h"
2714#include <stdio.h>
2715main()
2716{
2717 FILE *f=fopen("conftestval", "w");
2718 if (!f) exit(1);
2719 fprintf(f, "%d\n", sizeof(float));
2720 exit(0);
2721}
2722EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002723if { (eval echo configure:2724: \"$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 +00002724then
2725 ac_cv_sizeof_float=`cat conftestval`
2726else
2727 echo "configure: failed program was:" >&5
2728 cat conftest.$ac_ext >&5
2729 rm -fr conftest*
2730 ac_cv_sizeof_float=0
2731fi
2732rm -fr conftest*
2733fi
2734
2735fi
2736echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2737cat >> confdefs.h <<EOF
2738#define SIZEOF_FLOAT $ac_cv_sizeof_float
2739EOF
2740
2741
2742echo $ac_n "checking size of double""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002743echo "configure:2744: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002744if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002745 echo $ac_n "(cached) $ac_c" 1>&6
2746else
2747 if test "$cross_compiling" = yes; then
2748 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2749else
2750 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002751#line 2752 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002752#include "confdefs.h"
2753#include <stdio.h>
2754main()
2755{
2756 FILE *f=fopen("conftestval", "w");
2757 if (!f) exit(1);
2758 fprintf(f, "%d\n", sizeof(double));
2759 exit(0);
2760}
2761EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002762if { (eval echo configure:2763: \"$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 +00002763then
2764 ac_cv_sizeof_double=`cat conftestval`
2765else
2766 echo "configure: failed program was:" >&5
2767 cat conftest.$ac_ext >&5
2768 rm -fr conftest*
2769 ac_cv_sizeof_double=0
2770fi
2771rm -fr conftest*
2772fi
2773
2774fi
2775echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2776cat >> confdefs.h <<EOF
2777#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2778EOF
2779
2780
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002781echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002782echo "configure:2783: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002783if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002784 echo $ac_n "(cached) $ac_c" 1>&6
2785else
2786 if test "$cross_compiling" = yes; then
2787 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2788else
2789 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002790#line 2791 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002791#include "confdefs.h"
2792#include <stdio.h>
2793main()
2794{
2795 FILE *f=fopen("conftestval", "w");
2796 if (!f) exit(1);
2797 fprintf(f, "%d\n", sizeof(fpos_t));
2798 exit(0);
2799}
2800EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002801if { (eval echo configure:2802: \"$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 +00002802then
2803 ac_cv_sizeof_fpos_t=`cat conftestval`
2804else
2805 echo "configure: failed program was:" >&5
2806 cat conftest.$ac_ext >&5
2807 rm -fr conftest*
2808 ac_cv_sizeof_fpos_t=0
2809fi
2810rm -fr conftest*
2811fi
2812
2813fi
2814echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2815cat >> confdefs.h <<EOF
2816#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2817EOF
2818
2819
Guido van Rossum0a516c91994-09-12 10:58:40 +00002820
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002821echo $ac_n "checking for long long support""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002822echo "configure:2823: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002823have_long_long=no
2824cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002825#line 2826 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002826#include "confdefs.h"
2827
2828int main() {
2829long long x; x = (long long)0;
2830; return 0; }
2831EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002832if { (eval echo configure:2833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002833 rm -rf conftest*
2834 cat >> confdefs.h <<\EOF
2835#define HAVE_LONG_LONG 1
2836EOF
2837 have_long_long=yes
2838else
2839 echo "configure: failed program was:" >&5
2840 cat conftest.$ac_ext >&5
2841fi
2842rm -f conftest*
2843echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002844if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002845echo $ac_n "checking size of long long""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002846echo "configure:2847: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002847if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002848 echo $ac_n "(cached) $ac_c" 1>&6
2849else
2850 if test "$cross_compiling" = yes; then
2851 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2852else
2853 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002854#line 2855 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002855#include "confdefs.h"
2856#include <stdio.h>
2857main()
2858{
2859 FILE *f=fopen("conftestval", "w");
2860 if (!f) exit(1);
2861 fprintf(f, "%d\n", sizeof(long long));
2862 exit(0);
2863}
2864EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002865if { (eval echo configure:2866: \"$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 +00002866then
2867 ac_cv_sizeof_long_long=`cat conftestval`
2868else
2869 echo "configure: failed program was:" >&5
2870 cat conftest.$ac_ext >&5
2871 rm -fr conftest*
2872 ac_cv_sizeof_long_long=0
2873fi
2874rm -fr conftest*
2875fi
2876
2877fi
2878echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2879cat >> confdefs.h <<EOF
2880#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2881EOF
2882
2883
2884fi
2885
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002886echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002887echo "configure:2888: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002888have_uintptr_t=no
2889cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002890#line 2891 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002891#include "confdefs.h"
2892
2893int main() {
2894uintptr_t x; x = (uintptr_t)0;
2895; return 0; }
2896EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002897if { (eval echo configure:2898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002898 rm -rf conftest*
2899 cat >> confdefs.h <<\EOF
2900#define HAVE_UINTPTR_T 1
2901EOF
2902 have_uintptr_t=yes
2903else
2904 echo "configure: failed program was:" >&5
2905 cat conftest.$ac_ext >&5
2906fi
2907rm -f conftest*
2908echo "$ac_t""$have_uintptr_t" 1>&6
2909if test "$have_uintptr_t" = yes ; then
2910echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002911echo "configure:2912: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002912if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002913 echo $ac_n "(cached) $ac_c" 1>&6
2914else
2915 if test "$cross_compiling" = yes; then
2916 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2917else
2918 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002919#line 2920 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002920#include "confdefs.h"
2921#include <stdio.h>
2922main()
2923{
2924 FILE *f=fopen("conftestval", "w");
2925 if (!f) exit(1);
2926 fprintf(f, "%d\n", sizeof(uintptr_t));
2927 exit(0);
2928}
2929EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002930if { (eval echo configure:2931: \"$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 +00002931then
2932 ac_cv_sizeof_uintptr_t=`cat conftestval`
2933else
2934 echo "configure: failed program was:" >&5
2935 cat conftest.$ac_ext >&5
2936 rm -fr conftest*
2937 ac_cv_sizeof_uintptr_t=0
2938fi
2939rm -fr conftest*
2940fi
2941
2942fi
2943echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2944cat >> confdefs.h <<EOF
2945#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2946EOF
2947
2948
2949fi
2950
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002951# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2952echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002953echo "configure:2954: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002954if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002955 echo $ac_n "(cached) $ac_c" 1>&6
2956else
2957 if test "$cross_compiling" = yes; then
2958 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2959else
2960 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002961#line 2962 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002962#include "confdefs.h"
2963#include <stdio.h>
2964#include <sys/types.h>
2965main()
2966{
2967 FILE *f=fopen("conftestval", "w");
2968 if (!f) exit(1);
2969 fprintf(f, "%d\n", sizeof(off_t));
2970 exit(0);
2971}
2972EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002973if { (eval echo configure:2974: \"$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 +00002974then
2975 ac_cv_sizeof_off_t=`cat conftestval`
2976else
2977 echo "configure: failed program was:" >&5
2978 cat conftest.$ac_ext >&5
2979 rm -fr conftest*
2980 ac_cv_sizeof_off_t=0
2981fi
2982rm -fr conftest*
2983fi
2984
2985
2986fi
2987
2988echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2989cat >> confdefs.h <<EOF
2990#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2991EOF
2992
2993
2994echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00002995echo "configure:2996: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002996if test "$have_long_long" = yes -a \
2997 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2998 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002999 cat >> confdefs.h <<\EOF
3000#define HAVE_LARGEFILE_SUPPORT 1
3001EOF
3002
3003 echo "$ac_t""yes" 1>&6
3004else
3005 echo "$ac_t""no" 1>&6
3006fi
3007
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003008# AC_CHECK_SIZEOF() doesn't include <time.h>.
3009echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003010echo "configure:3011: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003011if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003012 echo $ac_n "(cached) $ac_c" 1>&6
3013else
3014 if test "$cross_compiling" = yes; then
3015 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3016else
3017 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003018#line 3019 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003019#include "confdefs.h"
3020#include <stdio.h>
3021#include <time.h>
3022main()
3023{
3024 FILE *f=fopen("conftestval", "w");
3025 if (!f) exit(1);
3026 fprintf(f, "%d\n", sizeof(time_t));
3027 exit(0);
3028}
3029EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003030if { (eval echo configure:3031: \"$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 +00003031then
3032 ac_cv_sizeof_time_t=`cat conftestval`
3033else
3034 echo "configure: failed program was:" >&5
3035 cat conftest.$ac_ext >&5
3036 rm -fr conftest*
3037 ac_cv_sizeof_time_t=0
3038fi
3039rm -fr conftest*
3040fi
3041
3042
3043fi
3044
3045echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
3046cat >> confdefs.h <<EOF
3047#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
3048EOF
3049
3050
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003051
Trent Mick635f6fb2000-08-23 21:33:05 +00003052# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00003053ac_save_cc="$CC"
3054if test "$ac_cv_kpthread" = "yes"
3055then CC="$CC -Kpthread"
3056fi
Trent Mick635f6fb2000-08-23 21:33:05 +00003057echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003058echo "configure:3059: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00003059have_pthread_t=no
3060cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003061#line 3062 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00003062#include "confdefs.h"
3063#include <pthread.h>
3064int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00003065pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00003066; return 0; }
3067EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003068if { (eval echo configure:3069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00003069 rm -rf conftest*
3070 have_pthread_t=yes
3071else
3072 echo "configure: failed program was:" >&5
3073 cat conftest.$ac_ext >&5
3074fi
3075rm -f conftest*
3076echo "$ac_t""$have_pthread_t" 1>&6
3077if test "$have_pthread_t" = yes ; then
3078 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
3079 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003080echo "configure:3081: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003081 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00003082 echo $ac_n "(cached) $ac_c" 1>&6
3083else
3084 if test "$cross_compiling" = yes; then
3085 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3086else
3087 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003088#line 3089 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00003089#include "confdefs.h"
3090#include <stdio.h>
3091 #include <pthread.h>
3092 main()
3093 {
3094 FILE *f=fopen("conftestval", "w");
3095 if (!f) exit(1);
3096 fprintf(f, "%d\n", sizeof(pthread_t));
3097 exit(0);
3098 }
3099EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003100if { (eval echo configure:3101: \"$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 +00003101then
3102 ac_cv_sizeof_pthread_t=`cat conftestval`
3103else
3104 echo "configure: failed program was:" >&5
3105 cat conftest.$ac_ext >&5
3106 rm -fr conftest*
3107 ac_cv_sizeof_pthread_t=0
3108fi
3109rm -fr conftest*
3110fi
3111
3112
3113fi
3114
3115 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
3116 cat >> confdefs.h <<EOF
3117#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
3118EOF
3119
3120fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00003121CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00003122
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003123# Minor variations in building a framework between NextStep versions 4 and 5
3124
3125case $ac_sys_system/$ac_sys_release in
Guido van Rossum5839e582000-10-09 19:52:35 +00003126 Darwin/*)
3127 ns_undef_sym='_environ'
3128 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003129 next/4*)
3130 ns_undef_sym='__environ'
3131 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
3132 next/5*)
3133 ns_undef_sym='_environ'
3134 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
3135esac
3136
3137echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003138echo "configure:3139: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003139if test "$with_next_framework"
3140then
3141 OPT="$OPT -fno-common"
3142 # -U __environ is needed since bundles don't have access
3143 # to crt0 when built but will always be linked against it
3144 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
3145 cat >> confdefs.h <<\EOF
3146#define WITH_NEXT_FRAMEWORK 1
3147EOF
3148
3149 echo "$ac_t""yes" 1>&6
3150else
3151 echo "$ac_t""no" 1>&6
3152fi
3153
3154echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003155echo "configure:3156: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003156if test "$with_next_framework" -o "$with_dyld"
3157then
3158 if test "$with_dyld"
3159 then
3160 echo "$ac_t""yes" 1>&6
3161 else
3162 echo "$ac_t""required for framework build" 1>&6
3163 fi
3164 cat >> confdefs.h <<\EOF
3165#define WITH_DYLD 1
3166EOF
3167
3168 ns_dyld='set'
3169else
3170 echo "$ac_t""no" 1>&6
3171fi
3172
Guido van Rossum0a516c91994-09-12 10:58:40 +00003173# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00003174
3175
3176
3177
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003178
Guido van Rossum0a516c91994-09-12 10:58:40 +00003179# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00003180# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003181echo $ac_n "checking SO""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003182echo "configure:3183: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003183if test -z "$SO"
3184then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003185 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003186 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003187 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003188 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003189 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003190fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003191echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003192# LDSHARED is the ld *command* used to create shared library
3193# -- "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 +00003194# (Shared libraries in this instance are shared modules to be loaded into
3195# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003196echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003197echo "configure:3198: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003198if test -z "$LDSHARED"
3199then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003200 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003201 AIX*)
3202 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
3203 LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp"
3204 ;;
3205 BeOS*)
3206 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
3207 LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
3208 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003209 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003210 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003211 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00003212 SunOS/5*)
3213 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003214 then LDSHARED='$(CC) -shared'
Greg Ward57c9a6632000-05-26 12:22:54 +00003215 else LDSHARED="ld -G";
3216 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003217 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003218 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3219 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum3dc0a512000-10-05 18:00:06 +00003220 Darwin/*|next/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003221 if test "$ns_dyld"
Guido van Rossumacb14c72001-01-10 21:41:16 +00003222 then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003223 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
3224 fi
Guido van Rossum3dc0a512000-10-05 18:00:06 +00003225 if test "$with_next_framework" ; then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003226 LDSHARED="$LDSHARED \$(LDLIBRARY)"
3227 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00003228 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003229 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003230 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003231 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00003232 NetBSD*)
3233 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3234 then
3235 LDSHARED="cc -shared"
3236 else
3237 LDSHARED="ld -Bshareable"
3238 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003239 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003240 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003241 then
3242 LDSHARED="cc -shared ${LDFLAGS}"
3243 else
3244 LDSHARED="ld -Bshareable ${LDFLAGS}"
3245 fi;;
Martin v. Löwisbec19582001-03-21 15:57:54 +00003246 UnixWare*)
3247 if test "$GCC" = "yes"
3248 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003249 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003250 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003251 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003252 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003253 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003254 *) LDSHARED="ld";;
3255 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003256fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003257echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003258BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003259# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003260# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003261echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003262echo "configure:3263: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003263if test -z "$CCSHARED"
3264then
Guido van Rossum07397971997-04-29 21:49:50 +00003265 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003266 SunOS*) if test "$GCC" = yes;
3267 then CCSHARED="-fPIC";
3268 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003269 hp*|HP*) if test "$GCC" = yes;
3270 then CCSHARED="-fpic";
3271 else CCSHARED="+z";
3272 fi;;
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003273 Linux*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003274 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003275 OpenBSD*) CCSHARED="-fpic";;
3276 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Martin v. Löwisbec19582001-03-21 15:57:54 +00003277 UnixWare*)
3278 if test "$GCC" = "yes"
3279 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003280 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003281 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003282 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003283 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003284 IRIX*/6*) case $CC in
3285 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003286 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003287 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003288 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003289 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003290fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003291echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003292# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003293# the python executable -- this is only needed for a few systems
3294echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003295echo "configure:3296: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003296if test -z "$LINKFORSHARED"
3297then
Guido van Rossum07397971997-04-29 21:49:50 +00003298 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003299 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003300 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00003301 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003302 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00003303 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003304 # -u libsys_s pulls in all symbols in libsys
3305 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
3306 # -u __dummy makes the linker aware of the objc runtime
3307 # in System.framework; otherwise, __objcInit (referenced in
3308 # crt1.o) gets erroneously defined as common, which breaks dynamic
3309 # loading of any modules which reference it in System.framework
3310 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Neil Schemenauer4e425612001-06-19 15:44:15 +00003311 Darwin/*) LINKFORSHARED="-u __dummy -u _PyMac_Error -framework System -framework Foundation -framework Carbon" ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003312 UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003313 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003314 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003315 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003316 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3317 then
3318 LINKFORSHARED="-Wl,--export-dynamic"
3319 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003320 SunOS/5*) case $CC in
3321 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003322 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003323 then
3324 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003325 fi;;
3326 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003327 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003328fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003329echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003330
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003331
3332echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003333echo "configure:3334: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003334if test ! "$LIBRARY" = "$LDLIBRARY"
3335then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003336 case $ac_sys_system in
3337 CYGWIN*)
3338 # Cygwin needs CCSHARED when building extension DLLs
3339 # but not when building the interpreter DLL.
3340 CFLAGSFORSHARED='';;
3341 *)
3342 CFLAGSFORSHARED='$(CCSHARED)'
3343 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003344fi
3345echo "$ac_t""$CFLAGSFORSHARED" 1>&6
3346
Guido van Rossum627b2d71993-12-24 10:39:16 +00003347# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00003348echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003349echo "configure:3350: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003350ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003351if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003352 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003353else
3354 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003355LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003356cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003357#line 3358 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003358#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003359/* Override any gcc2 internal prototype to avoid an error. */
3360/* We use char because int might match the return type of a gcc2
3361 builtin and then its argument prototype would still apply. */
3362char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003363
Guido van Rossumf78abae1997-01-21 22:02:36 +00003364int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003365dlopen()
3366; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003367EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003368if { (eval echo configure:3369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003369 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003370 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003371else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003372 echo "configure: failed program was:" >&5
3373 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003374 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003375 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003376fi
3377rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003378LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003379
Guido van Rossum627b2d71993-12-24 10:39:16 +00003380fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003381if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003382 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003383 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3384 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003385 cat >> confdefs.h <<EOF
3386#define $ac_tr_lib 1
3387EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003388
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003389 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003390
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003391else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003392 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003393fi
3394 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00003395echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003396echo "configure:3397: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003397ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003398if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003399 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003400else
3401 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003402LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003403cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003404#line 3405 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003405#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003406/* Override any gcc2 internal prototype to avoid an error. */
3407/* We use char because int might match the return type of a gcc2
3408 builtin and then its argument prototype would still apply. */
3409char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003410
Guido van Rossumf78abae1997-01-21 22:02:36 +00003411int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003412shl_load()
3413; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003414EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003415if { (eval echo configure:3416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003416 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003417 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003418else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003419 echo "configure: failed program was:" >&5
3420 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003421 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003422 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003423fi
3424rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003425LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003426
Guido van Rossum627b2d71993-12-24 10:39:16 +00003427fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003428if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003429 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003430 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3431 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003432 cat >> confdefs.h <<EOF
3433#define $ac_tr_lib 1
3434EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003435
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003436 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003437
3438else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003439 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003440fi
3441 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003442
3443# checks for system dependent C++ extensions support
3444case "$ac_sys_system" in
3445 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003446echo "configure:3447: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003447 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003448#line 3449 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003449#include "confdefs.h"
3450#include "/usr/lpp/xlC/include/load.h"
3451int main() {
3452loadAndInit("", 0, "")
3453; return 0; }
3454EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003455if { (eval echo configure:3456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003456 rm -rf conftest*
3457 cat >> confdefs.h <<\EOF
3458#define AIX_GENUINE_CPLUSPLUS 1
3459EOF
3460
3461 echo "$ac_t""yes" 1>&6
3462else
3463 echo "configure: failed program was:" >&5
3464 cat conftest.$ac_ext >&5
3465 rm -rf conftest*
3466 echo "$ac_t""no" 1>&6
3467fi
3468rm -f conftest*;;
3469 *) ;;
3470esac
3471
Guido van Rossum70c7f481998-03-26 18:44:10 +00003472# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3473# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003474# BeOS' sockets are stashed in libnet.
3475case "$ac_sys_system" in
3476IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003477*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003478echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003479echo "configure:3480: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003480ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003481if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003482 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003483else
3484 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003485LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003486cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003487#line 3488 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003488#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003489/* Override any gcc2 internal prototype to avoid an error. */
3490/* We use char because int might match the return type of a gcc2
3491 builtin and then its argument prototype would still apply. */
3492char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003493
Guido van Rossumf78abae1997-01-21 22:02:36 +00003494int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003495t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003496; return 0; }
3497EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003498if { (eval echo configure:3499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003499 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003500 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003501else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003502 echo "configure: failed program was:" >&5
3503 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003504 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003505 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003506fi
3507rm -f conftest*
3508LIBS="$ac_save_LIBS"
3509
3510fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003511if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003512 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003513 LIBS="-lnsl $LIBS"
3514else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003515 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003516fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003517 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003518echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003519echo "configure:3520: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003520ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003521if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003522 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003523else
3524 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003525LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003526cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003527#line 3528 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003528#include "confdefs.h"
3529/* Override any gcc2 internal prototype to avoid an error. */
3530/* We use char because int might match the return type of a gcc2
3531 builtin and then its argument prototype would still apply. */
3532char socket();
3533
3534int main() {
3535socket()
3536; return 0; }
3537EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003538if { (eval echo configure:3539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003539 rm -rf conftest*
3540 eval "ac_cv_lib_$ac_lib_var=yes"
3541else
3542 echo "configure: failed program was:" >&5
3543 cat conftest.$ac_ext >&5
3544 rm -rf conftest*
3545 eval "ac_cv_lib_$ac_lib_var=no"
3546fi
3547rm -f conftest*
3548LIBS="$ac_save_LIBS"
3549
3550fi
3551if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3552 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003553 LIBS="-lsocket $LIBS"
3554else
3555 echo "$ac_t""no" 1>&6
3556fi
3557 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003558;;
3559esac
3560case "$ac_sys_system" in
3561BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003562echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003563echo "configure:3564: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003564ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003565if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003566 echo $ac_n "(cached) $ac_c" 1>&6
3567else
3568 ac_save_LIBS="$LIBS"
3569LIBS="-lnet $LIBS $LIBS"
3570cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003571#line 3572 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003572#include "confdefs.h"
3573/* Override any gcc2 internal prototype to avoid an error. */
3574/* We use char because int might match the return type of a gcc2
3575 builtin and then its argument prototype would still apply. */
3576char socket();
3577
3578int main() {
3579socket()
3580; return 0; }
3581EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003582if { (eval echo configure:3583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003583 rm -rf conftest*
3584 eval "ac_cv_lib_$ac_lib_var=yes"
3585else
3586 echo "configure: failed program was:" >&5
3587 cat conftest.$ac_ext >&5
3588 rm -rf conftest*
3589 eval "ac_cv_lib_$ac_lib_var=no"
3590fi
3591rm -f conftest*
3592LIBS="$ac_save_LIBS"
3593
3594fi
3595if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3596 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003597 LIBS="-lnet $LIBS"
3598else
3599 echo "$ac_t""no" 1>&6
3600fi
3601 # BeOS
3602;;
3603esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003604
Guido van Rossuma68acba1996-07-31 17:36:39 +00003605echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003606echo "configure:3607: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003607# Check whether --with-libs or --without-libs was given.
3608if test "${with_libs+set}" = set; then
3609 withval="$with_libs"
3610
3611echo "$ac_t""$withval" 1>&6
3612LIBS="$withval $LIBS"
3613
3614else
3615 echo "$ac_t""no" 1>&6
3616fi
3617
Guido van Rossum7f43da71994-08-01 12:15:30 +00003618
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003619# Determine if signalmodule should be used.
3620
3621
3622echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003623echo "configure:3624: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003624# Check whether --with-signal-module or --without-signal-module was given.
3625if test "${with_signal_module+set}" = set; then
3626 withval="$with_signal_module"
3627 :
3628fi
3629
3630
3631if test -z "$with_signal_module"
3632then with_signal_module="yes"
3633fi
3634echo "$ac_t""$with_signal_module" 1>&6
3635
3636if test "${with_signal_module}" = "yes"; then
3637 USE_SIGNAL_MODULE=""
3638 SIGNAL_OBJS=""
3639else
3640 USE_SIGNAL_MODULE="#"
3641 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3642fi
3643
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003644# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003645
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003646USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003647
Guido van Rossumec2f0731997-01-22 20:54:01 +00003648echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003649echo "configure:3650: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003650
3651# Check whether --with-dec-threads or --without-dec-threads was given.
3652if test "${with_dec_threads+set}" = set; then
3653 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003654
3655echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003656LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003657if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003658 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003659fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003660else
3661 echo "$ac_t""no" 1>&6
3662fi
3663
3664
3665echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003666echo "configure:3667: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003667# Check whether --with-threads or --without-threads was given.
3668if test "${with_threads+set}" = set; then
3669 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003670 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003671fi
3672
3673
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003674# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003675# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003676if test "${with_thread+set}" = set; then
3677 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003678
3679with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003680fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003681
3682
3683if test -z "$with_threads"
3684then with_threads="yes"
3685fi
3686echo "$ac_t""$with_threads" 1>&6
3687
3688if test "$with_threads" = "no"
3689then
3690 USE_THREAD_MODULE="#"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003691elif test "$ac_cv_kpthread" = "yes"
3692then
3693 CC="$CC -Kpthread"
3694 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003695#define WITH_THREAD 1
3696EOF
3697
Martin v. Löwis130fb172001-07-19 11:00:41 +00003698 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003699#define _POSIX_THREADS 1
3700EOF
3701
Martin v. Löwis130fb172001-07-19 11:00:41 +00003702 LIBOBJS="$LIBOBJS thread.o"
3703else
3704 if test ! -z "$with_threads" -a -d "$with_threads"
3705 then LDFLAGS="$LDFLAGS -L$with_threads"
3706 fi
3707 if test ! -z "$withval" -a -d "$withval"
3708 then LDFLAGS="$LDFLAGS -L$withval"
3709 fi
3710 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003711#define _REENTRANT 1
3712EOF
3713
Martin v. Löwis130fb172001-07-19 11:00:41 +00003714 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003715echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003716echo "configure:3717: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003717if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003718 echo $ac_n "(cached) $ac_c" 1>&6
3719else
3720 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003721#line 3722 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003722#include "confdefs.h"
3723#include <mach/cthreads.h>
3724EOF
3725ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003726{ (eval echo configure:3727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003727ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003728if test -z "$ac_err"; then
3729 rm -rf conftest*
3730 eval "ac_cv_header_$ac_safe=yes"
3731else
3732 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003733 echo "configure: failed program was:" >&5
3734 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003735 rm -rf conftest*
3736 eval "ac_cv_header_$ac_safe=no"
3737fi
3738rm -f conftest*
3739fi
3740if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3741 echo "$ac_t""yes" 1>&6
3742 cat >> confdefs.h <<\EOF
3743#define WITH_THREAD 1
3744EOF
3745
Martin v. Löwis130fb172001-07-19 11:00:41 +00003746 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003747#define C_THREADS 1
3748EOF
3749
Martin v. Löwis130fb172001-07-19 11:00:41 +00003750 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003751else
3752 echo "$ac_t""no" 1>&6
3753
Martin v. Löwis130fb172001-07-19 11:00:41 +00003754 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003755echo "configure:3756: checking for --with-pth" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00003756 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003757if test "${with_pth+set}" = set; then
3758 withval="$with_pth"
3759
Martin v. Löwis130fb172001-07-19 11:00:41 +00003760 echo "$ac_t""$withval" 1>&6
3761 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003762#define WITH_THREAD 1
3763EOF
3764
Martin v. Löwis130fb172001-07-19 11:00:41 +00003765 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003766#define HAVE_PTH 1
3767EOF
3768
Martin v. Löwis130fb172001-07-19 11:00:41 +00003769 LIBS="-lpth $LIBS"
3770 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003771else
3772
Martin v. Löwis130fb172001-07-19 11:00:41 +00003773 echo "$ac_t""no" 1>&6
3774 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003775echo "configure:3776: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003776ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003777if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003778 echo $ac_n "(cached) $ac_c" 1>&6
3779else
3780 ac_save_LIBS="$LIBS"
3781LIBS="-lpthread $LIBS"
3782cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003783#line 3784 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003784#include "confdefs.h"
3785/* Override any gcc2 internal prototype to avoid an error. */
3786/* We use char because int might match the return type of a gcc2
3787 builtin and then its argument prototype would still apply. */
3788char pthread_create();
3789
3790int main() {
3791pthread_create()
3792; return 0; }
3793EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003794if { (eval echo configure:3795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003795 rm -rf conftest*
3796 eval "ac_cv_lib_$ac_lib_var=yes"
3797else
3798 echo "configure: failed program was:" >&5
3799 cat conftest.$ac_ext >&5
3800 rm -rf conftest*
3801 eval "ac_cv_lib_$ac_lib_var=no"
3802fi
3803rm -f conftest*
3804LIBS="$ac_save_LIBS"
3805
3806fi
3807if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3808 echo "$ac_t""yes" 1>&6
3809 cat >> confdefs.h <<\EOF
3810#define WITH_THREAD 1
3811EOF
3812
Martin v. Löwis130fb172001-07-19 11:00:41 +00003813 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003814#define _POSIX_THREADS 1
3815EOF
3816
Martin v. Löwis130fb172001-07-19 11:00:41 +00003817 LIBS="-lpthread $LIBS"
3818 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003819else
3820 echo "$ac_t""no" 1>&6
3821
Martin v. Löwis130fb172001-07-19 11:00:41 +00003822 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003823echo "configure:3824: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003824if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003825 echo $ac_n "(cached) $ac_c" 1>&6
3826else
3827 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003828#line 3829 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003829#include "confdefs.h"
3830/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003831 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003832#include <assert.h>
3833/* Override any gcc2 internal prototype to avoid an error. */
3834/* We use char because int might match the return type of a gcc2
3835 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003836char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003837
3838int main() {
3839
3840/* The GNU C library defines this for functions which it implements
3841 to always fail with ENOSYS. Some functions are actually named
3842 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003843#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003844choke me
3845#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003846pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003847#endif
3848
3849; return 0; }
3850EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003851if { (eval echo configure:3852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003852 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003853 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003854else
3855 echo "configure: failed program was:" >&5
3856 cat conftest.$ac_ext >&5
3857 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003858 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003859fi
3860rm -f conftest*
3861fi
3862
Guido van Rossumea516321998-12-17 18:08:55 +00003863if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003864 echo "$ac_t""yes" 1>&6
3865 cat >> confdefs.h <<\EOF
3866#define WITH_THREAD 1
3867EOF
3868
Martin v. Löwis130fb172001-07-19 11:00:41 +00003869 case $ac_sys_system in
3870 Darwin*) ;;
3871 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003872#define _POSIX_THREADS 1
3873EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003874;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003875 esac
3876 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003877else
3878 echo "$ac_t""no" 1>&6
3879
Martin v. Löwis130fb172001-07-19 11:00:41 +00003880 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003881echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003882echo "configure:3883: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003883if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003884 echo $ac_n "(cached) $ac_c" 1>&6
3885else
3886 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003887#line 3888 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003888#include "confdefs.h"
3889#include <kernel/OS.h>
3890EOF
3891ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003892{ (eval echo configure:3893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003893ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003894if test -z "$ac_err"; then
3895 rm -rf conftest*
3896 eval "ac_cv_header_$ac_safe=yes"
3897else
3898 echo "$ac_err" >&5
3899 echo "configure: failed program was:" >&5
3900 cat conftest.$ac_ext >&5
3901 rm -rf conftest*
3902 eval "ac_cv_header_$ac_safe=no"
3903fi
3904rm -f conftest*
3905fi
3906if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3907 echo "$ac_t""yes" 1>&6
3908 cat >> confdefs.h <<\EOF
3909#define WITH_THREAD 1
3910EOF
3911
Martin v. Löwis130fb172001-07-19 11:00:41 +00003912 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003913#define BEOS_THREADS 1
3914EOF
3915
Martin v. Löwis130fb172001-07-19 11:00:41 +00003916 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003917else
3918 echo "$ac_t""no" 1>&6
3919
Martin v. Löwis130fb172001-07-19 11:00:41 +00003920 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003921echo "configure:3922: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003922ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003923if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003924 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003925else
3926 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003927LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003928cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003929#line 3930 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003930#include "confdefs.h"
3931/* Override any gcc2 internal prototype to avoid an error. */
3932/* We use char because int might match the return type of a gcc2
3933 builtin and then its argument prototype would still apply. */
3934char pthread_create();
3935
3936int main() {
3937pthread_create()
3938; return 0; }
3939EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003940if { (eval echo configure:3941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003941 rm -rf conftest*
3942 eval "ac_cv_lib_$ac_lib_var=yes"
3943else
3944 echo "configure: failed program was:" >&5
3945 cat conftest.$ac_ext >&5
3946 rm -rf conftest*
3947 eval "ac_cv_lib_$ac_lib_var=no"
3948fi
3949rm -f conftest*
3950LIBS="$ac_save_LIBS"
3951
3952fi
3953if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3954 echo "$ac_t""yes" 1>&6
3955 cat >> confdefs.h <<\EOF
3956#define WITH_THREAD 1
3957EOF
3958
Martin v. Löwis130fb172001-07-19 11:00:41 +00003959 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003960#define _POSIX_THREADS 1
3961EOF
3962
Martin v. Löwis130fb172001-07-19 11:00:41 +00003963 LIBS="$LIBS -lpthreads"
3964 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003965else
3966 echo "$ac_t""no" 1>&6
3967
Martin v. Löwis130fb172001-07-19 11:00:41 +00003968 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003969echo "configure:3970: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003970ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003971if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003972 echo $ac_n "(cached) $ac_c" 1>&6
3973else
3974 ac_save_LIBS="$LIBS"
3975LIBS="-lc_r $LIBS"
3976cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003977#line 3978 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003978#include "confdefs.h"
3979/* Override any gcc2 internal prototype to avoid an error. */
3980/* We use char because int might match the return type of a gcc2
3981 builtin and then its argument prototype would still apply. */
3982char pthread_create();
3983
3984int main() {
3985pthread_create()
3986; return 0; }
3987EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00003988if { (eval echo configure:3989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003989 rm -rf conftest*
3990 eval "ac_cv_lib_$ac_lib_var=yes"
3991else
3992 echo "configure: failed program was:" >&5
3993 cat conftest.$ac_ext >&5
3994 rm -rf conftest*
3995 eval "ac_cv_lib_$ac_lib_var=no"
3996fi
3997rm -f conftest*
3998LIBS="$ac_save_LIBS"
3999
4000fi
4001if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4002 echo "$ac_t""yes" 1>&6
4003 cat >> confdefs.h <<\EOF
4004#define WITH_THREAD 1
4005EOF
4006
Martin v. Löwis130fb172001-07-19 11:00:41 +00004007 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00004008#define _POSIX_THREADS 1
4009EOF
4010
Martin v. Löwis130fb172001-07-19 11:00:41 +00004011 LIBS="$LIBS -lc_r"
4012 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004013else
4014 echo "$ac_t""no" 1>&6
4015
Martin v. Löwis130fb172001-07-19 11:00:41 +00004016 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004017echo "configure:4018: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00004018ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004019if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004020 echo $ac_n "(cached) $ac_c" 1>&6
4021else
4022 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00004023LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004024cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004025#line 4026 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004026#include "confdefs.h"
4027/* Override any gcc2 internal prototype to avoid an error. */
4028/* We use char because int might match the return type of a gcc2
4029 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00004030char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004031
4032int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00004033__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004034; return 0; }
4035EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004036if { (eval echo configure:4037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004037 rm -rf conftest*
4038 eval "ac_cv_lib_$ac_lib_var=yes"
4039else
4040 echo "configure: failed program was:" >&5
4041 cat conftest.$ac_ext >&5
4042 rm -rf conftest*
4043 eval "ac_cv_lib_$ac_lib_var=no"
4044fi
4045rm -f conftest*
4046LIBS="$ac_save_LIBS"
4047
4048fi
4049if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4050 echo "$ac_t""yes" 1>&6
4051 cat >> confdefs.h <<\EOF
4052#define WITH_THREAD 1
4053EOF
4054
Martin v. Löwis130fb172001-07-19 11:00:41 +00004055 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004056#define _POSIX_THREADS 1
4057EOF
4058
Martin v. Löwis130fb172001-07-19 11:00:41 +00004059 LIBS="$LIBS -lthread"
4060 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00004061else
4062 echo "$ac_t""no" 1>&6
4063
Martin v. Löwis130fb172001-07-19 11:00:41 +00004064 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004065echo "configure:4066: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004066ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
4067if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4068 echo $ac_n "(cached) $ac_c" 1>&6
4069else
4070 ac_save_LIBS="$LIBS"
4071LIBS="-lpthread $LIBS"
4072cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004073#line 4074 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004074#include "confdefs.h"
4075/* Override any gcc2 internal prototype to avoid an error. */
4076/* We use char because int might match the return type of a gcc2
4077 builtin and then its argument prototype would still apply. */
4078char __pthread_create_system();
4079
4080int main() {
4081__pthread_create_system()
4082; return 0; }
4083EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004084if { (eval echo configure:4085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004085 rm -rf conftest*
4086 eval "ac_cv_lib_$ac_lib_var=yes"
4087else
4088 echo "configure: failed program was:" >&5
4089 cat conftest.$ac_ext >&5
4090 rm -rf conftest*
4091 eval "ac_cv_lib_$ac_lib_var=no"
4092fi
4093rm -f conftest*
4094LIBS="$ac_save_LIBS"
4095
4096fi
4097if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4098 echo "$ac_t""yes" 1>&6
4099 cat >> confdefs.h <<\EOF
4100#define WITH_THREAD 1
4101EOF
4102
Martin v. Löwis130fb172001-07-19 11:00:41 +00004103 cat >> confdefs.h <<\EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004104#define _POSIX_THREADS 1
4105EOF
4106
Martin v. Löwis130fb172001-07-19 11:00:41 +00004107 LIBS="$LIBS -lpthread"
4108 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004109else
4110 echo "$ac_t""no" 1>&6
4111
Martin v. Löwis130fb172001-07-19 11:00:41 +00004112 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004113echo "configure:4114: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00004114ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004115if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00004116 echo $ac_n "(cached) $ac_c" 1>&6
4117else
4118 ac_save_LIBS="$LIBS"
4119LIBS="-lcma $LIBS"
4120cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004121#line 4122 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004122#include "confdefs.h"
4123/* Override any gcc2 internal prototype to avoid an error. */
4124/* We use char because int might match the return type of a gcc2
4125 builtin and then its argument prototype would still apply. */
4126char pthread_create();
4127
4128int main() {
4129pthread_create()
4130; return 0; }
4131EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004132if { (eval echo configure:4133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00004133 rm -rf conftest*
4134 eval "ac_cv_lib_$ac_lib_var=yes"
4135else
4136 echo "configure: failed program was:" >&5
4137 cat conftest.$ac_ext >&5
4138 rm -rf conftest*
4139 eval "ac_cv_lib_$ac_lib_var=no"
4140fi
4141rm -f conftest*
4142LIBS="$ac_save_LIBS"
4143
4144fi
4145if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4146 echo "$ac_t""yes" 1>&6
4147 cat >> confdefs.h <<\EOF
4148#define WITH_THREAD 1
4149EOF
4150
Martin v. Löwis130fb172001-07-19 11:00:41 +00004151 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00004152#define _POSIX_THREADS 1
4153EOF
4154
Martin v. Löwis130fb172001-07-19 11:00:41 +00004155 LIBS="$LIBS -lcma"
4156 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004157else
4158 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00004159
Martin v. Löwis130fb172001-07-19 11:00:41 +00004160 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00004161fi
4162
Martin v. Löwis130fb172001-07-19 11:00:41 +00004163
Guido van Rossum627b2d71993-12-24 10:39:16 +00004164fi
4165
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004166fi
4167
Guido van Rossum0be3e491997-05-22 20:33:33 +00004168fi
4169
Guido van Rossum49545951997-12-02 19:28:29 +00004170fi
4171
Guido van Rossumb93a8621998-05-07 13:27:32 +00004172fi
4173
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004174fi
4175
Guido van Rossumad678af1998-10-02 14:42:15 +00004176fi
4177
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004178fi
4179
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004180fi
4181
Guido van Rossum0be3e491997-05-22 20:33:33 +00004182
Martin v. Löwis130fb172001-07-19 11:00:41 +00004183 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004184echo "configure:4185: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004185ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004186if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004187 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004188else
4189 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004190LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004191cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004192#line 4193 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004193#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004194/* Override any gcc2 internal prototype to avoid an error. */
4195/* We use char because int might match the return type of a gcc2
4196 builtin and then its argument prototype would still apply. */
4197char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004198
Guido van Rossumf78abae1997-01-21 22:02:36 +00004199int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004200usconfig()
4201; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004202EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004203if { (eval echo configure:4204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004204 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004205 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004206else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004207 echo "configure: failed program was:" >&5
4208 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004209 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004210 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004211fi
4212rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004213LIBS="$ac_save_LIBS"
4214
4215fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004216if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004217 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004218 cat >> confdefs.h <<\EOF
4219#define WITH_THREAD 1
4220EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004221
Martin v. Löwis130fb172001-07-19 11:00:41 +00004222 LIBS="$LIBS -lmpc"
4223 LIBOBJS="$LIBOBJS thread.o"
4224 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004225else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004226 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004227fi
4228
Martin v. Löwis130fb172001-07-19 11:00:41 +00004229 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004230echo "configure:4231: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004231ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004232if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004233 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004234else
4235 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004236LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004237cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004238#line 4239 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004239#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004240/* Override any gcc2 internal prototype to avoid an error. */
4241/* We use char because int might match the return type of a gcc2
4242 builtin and then its argument prototype would still apply. */
4243char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004244
Guido van Rossumf78abae1997-01-21 22:02:36 +00004245int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004246thr_create()
4247; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004248EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004249if { (eval echo configure:4250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004250 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004251 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004252else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004253 echo "configure: failed program was:" >&5
4254 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004255 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004256 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004257fi
4258rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004259LIBS="$ac_save_LIBS"
4260
4261fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004262if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004263 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004264 cat >> confdefs.h <<\EOF
4265#define WITH_THREAD 1
4266EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004267
Martin v. Löwis130fb172001-07-19 11:00:41 +00004268 LIBS="$LIBS -lthread"
4269 LIBOBJS="$LIBOBJS thread.o"
4270 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004271else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004272 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004273fi
4274
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004275
Martin v. Löwis130fb172001-07-19 11:00:41 +00004276 if test "$USE_THREAD_MODULE" != "#"
4277 then
4278 # If the above checks didn't disable threads, (at least) OSF1
4279 # needs this '-threads' argument during linking.
4280 case $ac_sys_system in
4281 OSF1) LDLAST=-threads;;
4282 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004283 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004284fi
4285
Barry Warsawef82cd72000-06-30 16:21:01 +00004286# Check for GC support
4287
4288USE_GC_MODULE=""
4289echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004290echo "configure:4291: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004291# Check whether --with-cycle-gc or --without-cycle-gc was given.
4292if test "${with_cycle_gc+set}" = set; then
4293 withval="$with_cycle_gc"
4294 :
4295fi
4296
4297
4298if test -z "$with_cycle_gc"
4299then with_cycle_gc="yes"
4300fi
4301if test "$with_cycle_gc" = "no"
4302then
4303 USE_GC_MODULE="#"
4304else
4305 cat >> confdefs.h <<\EOF
4306#define WITH_CYCLE_GC 1
4307EOF
4308
4309fi
4310echo "$ac_t""$with_cycle_gc" 1>&6
4311
Neil Schemenauera35c6882001-02-27 04:45:05 +00004312# Check for Python-specific malloc support
4313echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004314echo "configure:4315: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004315# Check whether --with-pymalloc or --without-pymalloc was given.
4316if test "${with_pymalloc+set}" = set; then
4317 withval="$with_pymalloc"
4318
4319if test "$withval" != no
4320then cat >> confdefs.h <<\EOF
4321#define WITH_PYMALLOC 1
4322EOF
4323 echo "$ac_t""yes" 1>&6
4324else echo "$ac_t""no" 1>&6
4325fi
4326else
4327 echo "$ac_t""no" 1>&6
4328fi
4329
4330
Barry Warsawef82cd72000-06-30 16:21:01 +00004331# Check for --with-wctype-functions
4332echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004333echo "configure:4334: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004334# Check whether --with-wctype-functions or --without-wctype-functions was given.
4335if test "${with_wctype_functions+set}" = set; then
4336 withval="$with_wctype_functions"
4337
4338if test "$withval" != no
4339then cat >> confdefs.h <<\EOF
4340#define WANT_WCTYPE_FUNCTIONS 1
4341EOF
4342 echo "$ac_t""yes" 1>&6
4343else echo "$ac_t""no" 1>&6
4344fi
4345else
4346 echo "$ac_t""no" 1>&6
4347fi
4348
4349
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004350# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004351
4352DLINCLDIR=/
4353
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004354echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004355echo "configure:4356: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004356# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004357if test "${with_sgi_dl+set}" = set; then
4358 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004359
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004360echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004361cat >> confdefs.h <<\EOF
4362#define WITH_SGI_DL 1
4363EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004364
Guido van Rossume97ee181999-12-20 21:27:22 +00004365DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004366dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004367if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004368then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004369else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004370fi
4371DLINCLDIR=${dldir}
4372LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004373else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004374 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004375fi
4376
4377
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004378echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004379echo "configure:4380: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004380# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004381if test "${with_dl_dld+set}" = set; then
4382 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004383
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004384echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004385cat >> confdefs.h <<\EOF
4386#define WITH_DL_DLD 1
4387EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004388
Guido van Rossume97ee181999-12-20 21:27:22 +00004389DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004390dldir=`echo "$withval" | sed 's/,.*//'`
4391dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004392if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004393then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004394else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004395fi
4396DLINCLDIR=${dldir}
4397LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004398else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004399 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004400fi
4401
4402
Guido van Rossume97ee181999-12-20 21:27:22 +00004403# the dlopen() function means we might want to use dynload_shlib.o. some
4404# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004405for ac_func in dlopen
4406do
4407echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004408echo "configure:4409: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004409if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004410 echo $ac_n "(cached) $ac_c" 1>&6
4411else
4412 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004413#line 4414 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004414#include "confdefs.h"
4415/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004416 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004417#include <assert.h>
4418/* Override any gcc2 internal prototype to avoid an error. */
4419/* We use char because int might match the return type of a gcc2
4420 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004421char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004422
4423int main() {
4424
4425/* The GNU C library defines this for functions which it implements
4426 to always fail with ENOSYS. Some functions are actually named
4427 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004428#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004429choke me
4430#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004431$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004432#endif
4433
4434; return 0; }
4435EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004436if { (eval echo configure:4437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004437 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004438 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004439else
4440 echo "configure: failed program was:" >&5
4441 cat conftest.$ac_ext >&5
4442 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004443 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004444fi
4445rm -f conftest*
4446fi
4447
Thomas Wouters3a584202000-08-05 23:28:51 +00004448if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004449 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004450 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4451 cat >> confdefs.h <<EOF
4452#define $ac_tr_func 1
4453EOF
4454
Guido van Rossume97ee181999-12-20 21:27:22 +00004455else
4456 echo "$ac_t""no" 1>&6
4457fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004458done
Guido van Rossume97ee181999-12-20 21:27:22 +00004459
4460
4461# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4462# loading of modules.
4463
4464echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004465echo "configure:4466: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004466if test -z "$DYNLOADFILE"
4467then
4468 case $ac_sys_system/$ac_sys_release in
4469 AIX*) DYNLOADFILE="dynload_aix.o";;
4470 BeOS*) DYNLOADFILE="dynload_beos.o";;
4471 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossum5839e582000-10-09 19:52:35 +00004472 Darwin/*|next/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004473 *)
4474 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4475 # out any dynamic loading
4476 if test "$ac_cv_func_dlopen" = yes
4477 then DYNLOADFILE="dynload_shlib.o"
4478 else DYNLOADFILE="dynload_stub.o"
4479 fi
4480 ;;
4481 esac
4482fi
4483echo "$ac_t""$DYNLOADFILE" 1>&6
4484if test "$DYNLOADFILE" != "dynload_stub.o"
4485then
4486 cat >> confdefs.h <<\EOF
4487#define HAVE_DYNAMIC_LOADING 1
4488EOF
4489
4490fi
4491
Neil Schemenauer4e425612001-06-19 15:44:15 +00004492# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4493
4494
4495echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004496echo "configure:4497: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004497if test -z "$MACHDEP_OBJS"
4498then
4499 case $ac_sys_system/$ac_sys_release in
4500 Darwin/*)
4501 MACHDEP_OBJS="Mac/Python/macglue.o"
4502 cat >> confdefs.h <<\EOF
4503#define USE_TOOLBOX_OBJECT_GLUE 1
4504EOF
4505
4506 ;;
4507 *) MACHDEP_OBJS="";;
4508 esac
4509fi
4510echo "$ac_t""$DYNLOADFILE" 1>&6
4511
Guido van Rossum627b2d71993-12-24 10:39:16 +00004512# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00004513for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004514 flock fork fsync fdatasync fpathconf ftime ftruncate \
Andrew M. Kuchlinga9586c72001-01-08 17:58:56 +00004515 getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwisb9ab1592001-06-24 21:18:26 +00004516 inet_pton kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004517 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004518 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004519 select setegid seteuid setgid \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00004520 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00004521 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004522 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Woutersc2c12dc2001-07-11 14:45:34 +00004523 truncate uname waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00004524do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004525echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004526echo "configure:4527: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004527if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004528 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004529else
4530 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004531#line 4532 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004532#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004533/* System header to define __stub macros and hopefully few prototypes,
4534 which can conflict with char $ac_func(); below. */
4535#include <assert.h>
4536/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004537/* We use char because int might match the return type of a gcc2
4538 builtin and then its argument prototype would still apply. */
4539char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004540
Guido van Rossumf78abae1997-01-21 22:02:36 +00004541int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004542
Guido van Rossum627b2d71993-12-24 10:39:16 +00004543/* The GNU C library defines this for functions which it implements
4544 to always fail with ENOSYS. Some functions are actually named
4545 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004546#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004547choke me
4548#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004549$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004550#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004551
Guido van Rossum7f43da71994-08-01 12:15:30 +00004552; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004553EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004554if { (eval echo configure:4555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004555 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004556 eval "ac_cv_func_$ac_func=yes"
4557else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004558 echo "configure: failed program was:" >&5
4559 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004560 rm -rf conftest*
4561 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004562fi
4563rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004564fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004565
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004566if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004567 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004568 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004569 cat >> confdefs.h <<EOF
4570#define $ac_tr_func 1
4571EOF
4572
4573else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004574 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004575fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004576done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004577
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004578
Fred Drake8cef4cf2000-06-28 16:40:38 +00004579# check for openpty and forkpty
4580
4581for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004582do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004583echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004584echo "configure:4585: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004585if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004586 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004587else
4588 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004589#line 4590 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004590#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004591/* System header to define __stub macros and hopefully few prototypes,
4592 which can conflict with char $ac_func(); below. */
4593#include <assert.h>
4594/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004595/* We use char because int might match the return type of a gcc2
4596 builtin and then its argument prototype would still apply. */
4597char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004598
Guido van Rossumf78abae1997-01-21 22:02:36 +00004599int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004600
Guido van Rossum627b2d71993-12-24 10:39:16 +00004601/* The GNU C library defines this for functions which it implements
4602 to always fail with ENOSYS. Some functions are actually named
4603 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004604#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004605choke me
4606#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004607$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004608#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004609
Guido van Rossum7f43da71994-08-01 12:15:30 +00004610; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004611EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004612if { (eval echo configure:4613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004613 rm -rf conftest*
4614 eval "ac_cv_func_$ac_func=yes"
4615else
4616 echo "configure: failed program was:" >&5
4617 cat conftest.$ac_ext >&5
4618 rm -rf conftest*
4619 eval "ac_cv_func_$ac_func=no"
4620fi
4621rm -f conftest*
4622fi
4623
4624if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4625 echo "$ac_t""yes" 1>&6
4626 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4627 cat >> confdefs.h <<EOF
4628#define $ac_tr_func 1
4629EOF
4630
4631else
4632 echo "$ac_t""no" 1>&6
4633echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004634echo "configure:4635: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004635ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004636if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004637 echo $ac_n "(cached) $ac_c" 1>&6
4638else
4639 ac_save_LIBS="$LIBS"
4640LIBS="-lutil $LIBS"
4641cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004642#line 4643 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004643#include "confdefs.h"
4644/* Override any gcc2 internal prototype to avoid an error. */
4645/* We use char because int might match the return type of a gcc2
4646 builtin and then its argument prototype would still apply. */
4647char openpty();
4648
4649int main() {
4650openpty()
4651; return 0; }
4652EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004653if { (eval echo configure:4654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004654 rm -rf conftest*
4655 eval "ac_cv_lib_$ac_lib_var=yes"
4656else
4657 echo "configure: failed program was:" >&5
4658 cat conftest.$ac_ext >&5
4659 rm -rf conftest*
4660 eval "ac_cv_lib_$ac_lib_var=no"
4661fi
4662rm -f conftest*
4663LIBS="$ac_save_LIBS"
4664
4665fi
4666if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4667 echo "$ac_t""yes" 1>&6
4668 cat >> confdefs.h <<\EOF
4669#define HAVE_OPENPTY 1
4670EOF
4671 LIBS="$LIBS -lutil"
4672else
4673 echo "$ac_t""no" 1>&6
4674fi
4675
4676fi
4677done
4678
4679for ac_func in forkpty
4680do
4681echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004682echo "configure:4683: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004683if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004684 echo $ac_n "(cached) $ac_c" 1>&6
4685else
4686 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004687#line 4688 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004688#include "confdefs.h"
4689/* System header to define __stub macros and hopefully few prototypes,
4690 which can conflict with char $ac_func(); below. */
4691#include <assert.h>
4692/* Override any gcc2 internal prototype to avoid an error. */
4693/* We use char because int might match the return type of a gcc2
4694 builtin and then its argument prototype would still apply. */
4695char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004696
4697int main() {
4698
4699/* The GNU C library defines this for functions which it implements
4700 to always fail with ENOSYS. Some functions are actually named
4701 something starting with __ and the normal name is an alias. */
4702#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4703choke me
4704#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004705$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004706#endif
4707
4708; return 0; }
4709EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004710if { (eval echo configure:4711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004711 rm -rf conftest*
4712 eval "ac_cv_func_$ac_func=yes"
4713else
4714 echo "configure: failed program was:" >&5
4715 cat conftest.$ac_ext >&5
4716 rm -rf conftest*
4717 eval "ac_cv_func_$ac_func=no"
4718fi
4719rm -f conftest*
4720fi
4721
4722if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4723 echo "$ac_t""yes" 1>&6
4724 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4725 cat >> confdefs.h <<EOF
4726#define $ac_tr_func 1
4727EOF
4728
4729else
4730 echo "$ac_t""no" 1>&6
4731echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004732echo "configure:4733: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004733ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004734if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004735 echo $ac_n "(cached) $ac_c" 1>&6
4736else
4737 ac_save_LIBS="$LIBS"
4738LIBS="-lutil $LIBS"
4739cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004740#line 4741 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004741#include "confdefs.h"
4742/* Override any gcc2 internal prototype to avoid an error. */
4743/* We use char because int might match the return type of a gcc2
4744 builtin and then its argument prototype would still apply. */
4745char forkpty();
4746
4747int main() {
4748forkpty()
4749; return 0; }
4750EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004751if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004752 rm -rf conftest*
4753 eval "ac_cv_lib_$ac_lib_var=yes"
4754else
4755 echo "configure: failed program was:" >&5
4756 cat conftest.$ac_ext >&5
4757 rm -rf conftest*
4758 eval "ac_cv_lib_$ac_lib_var=no"
4759fi
4760rm -f conftest*
4761LIBS="$ac_save_LIBS"
4762
4763fi
4764if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4765 echo "$ac_t""yes" 1>&6
4766 cat >> confdefs.h <<\EOF
4767#define HAVE_FORKPTY 1
4768EOF
4769 LIBS="$LIBS -lutil"
4770else
4771 echo "$ac_t""no" 1>&6
4772fi
4773
4774fi
4775done
4776
4777
4778# check for long file support functions
4779for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4780do
4781echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004782echo "configure:4783: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004783if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004784 echo $ac_n "(cached) $ac_c" 1>&6
4785else
4786 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004787#line 4788 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004788#include "confdefs.h"
4789/* System header to define __stub macros and hopefully few prototypes,
4790 which can conflict with char $ac_func(); below. */
4791#include <assert.h>
4792/* Override any gcc2 internal prototype to avoid an error. */
4793/* We use char because int might match the return type of a gcc2
4794 builtin and then its argument prototype would still apply. */
4795char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004796
4797int main() {
4798
4799/* The GNU C library defines this for functions which it implements
4800 to always fail with ENOSYS. Some functions are actually named
4801 something starting with __ and the normal name is an alias. */
4802#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4803choke me
4804#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004805$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004806#endif
4807
4808; return 0; }
4809EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004810if { (eval echo configure:4811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004811 rm -rf conftest*
4812 eval "ac_cv_func_$ac_func=yes"
4813else
4814 echo "configure: failed program was:" >&5
4815 cat conftest.$ac_ext >&5
4816 rm -rf conftest*
4817 eval "ac_cv_func_$ac_func=no"
4818fi
4819rm -f conftest*
4820fi
4821
4822if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4823 echo "$ac_t""yes" 1>&6
4824 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4825 cat >> confdefs.h <<EOF
4826#define $ac_tr_func 1
4827EOF
4828
4829else
4830 echo "$ac_t""no" 1>&6
4831fi
4832done
4833
4834
4835for ac_func in dup2 getcwd strdup strerror memmove
4836do
4837echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004838echo "configure:4839: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004839if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004840 echo $ac_n "(cached) $ac_c" 1>&6
4841else
4842 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004843#line 4844 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004844#include "confdefs.h"
4845/* System header to define __stub macros and hopefully few prototypes,
4846 which can conflict with char $ac_func(); below. */
4847#include <assert.h>
4848/* Override any gcc2 internal prototype to avoid an error. */
4849/* We use char because int might match the return type of a gcc2
4850 builtin and then its argument prototype would still apply. */
4851char $ac_func();
4852
4853int main() {
4854
4855/* The GNU C library defines this for functions which it implements
4856 to always fail with ENOSYS. Some functions are actually named
4857 something starting with __ and the normal name is an alias. */
4858#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4859choke me
4860#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004861$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004862#endif
4863
4864; return 0; }
4865EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004866if { (eval echo configure:4867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004867 rm -rf conftest*
4868 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004869else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004870 echo "configure: failed program was:" >&5
4871 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004872 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004873 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004874fi
4875rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004876fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004877
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004878if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004879 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004880 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4881 cat >> confdefs.h <<EOF
4882#define $ac_tr_func 1
4883EOF
4884
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004885else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004886 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004887LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004888fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004889done
4890
Guido van Rossumf78abae1997-01-21 22:02:36 +00004891
Thomas Wouters3a584202000-08-05 23:28:51 +00004892for ac_func in getpgrp
4893do
4894echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004895echo "configure:4896: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004896if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004897 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004898else
4899 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004900#line 4901 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004901#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004902/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004903 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004904#include <assert.h>
4905/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004906/* We use char because int might match the return type of a gcc2
4907 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004908char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004909
Guido van Rossumf78abae1997-01-21 22:02:36 +00004910int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004911
Guido van Rossum627b2d71993-12-24 10:39:16 +00004912/* The GNU C library defines this for functions which it implements
4913 to always fail with ENOSYS. Some functions are actually named
4914 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004915#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004916choke me
4917#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004918$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004919#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004920
4921; return 0; }
4922EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004923if { (eval echo configure:4924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004924 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004925 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004926else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004927 echo "configure: failed program was:" >&5
4928 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004929 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004930 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004931fi
4932rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004933fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004934
Thomas Wouters3a584202000-08-05 23:28:51 +00004935if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004936 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004937 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4938 cat >> confdefs.h <<EOF
4939#define $ac_tr_func 1
4940EOF
4941 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004942#line 4943 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004943#include "confdefs.h"
4944#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004945int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004946getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004947; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004948EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004949if { (eval echo configure:4950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004950 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004951 cat >> confdefs.h <<\EOF
4952#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004953EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004954
Guido van Rossumf78abae1997-01-21 22:02:36 +00004955else
4956 echo "configure: failed program was:" >&5
4957 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004958fi
4959rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004960else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004961 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004962fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004963done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004964
Thomas Wouters3a584202000-08-05 23:28:51 +00004965for ac_func in setpgrp
4966do
4967echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004968echo "configure:4969: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004969if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004970 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004971else
4972 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004973#line 4974 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004974#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004975/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004976 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004977#include <assert.h>
4978/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004979/* We use char because int might match the return type of a gcc2
4980 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004981char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004982
Guido van Rossumf78abae1997-01-21 22:02:36 +00004983int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004984
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004985/* The GNU C library defines this for functions which it implements
4986 to always fail with ENOSYS. Some functions are actually named
4987 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004988#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004989choke me
4990#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004991$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004992#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004993
4994; return 0; }
4995EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00004996if { (eval echo configure:4997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004997 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004998 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004999else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005000 echo "configure: failed program was:" >&5
5001 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005002 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005003 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005004fi
5005rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005006fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005007
Thomas Wouters3a584202000-08-05 23:28:51 +00005008if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005009 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005010 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5011 cat >> confdefs.h <<EOF
5012#define $ac_tr_func 1
5013EOF
5014 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005015#line 5016 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005016#include "confdefs.h"
5017#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005018int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005019setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005020; return 0; }
5021EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005022if { (eval echo configure:5023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005023 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005024 cat >> confdefs.h <<\EOF
5025#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005026EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005027
Guido van Rossumf78abae1997-01-21 22:02:36 +00005028else
5029 echo "configure: failed program was:" >&5
5030 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005031fi
5032rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005033else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005034 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005035fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005036done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005037
Thomas Wouters3a584202000-08-05 23:28:51 +00005038for ac_func in gettimeofday
5039do
5040echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005041echo "configure:5042: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005042if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005043 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005044else
5045 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005046#line 5047 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005047#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005048/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005049 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005050#include <assert.h>
5051/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005052/* We use char because int might match the return type of a gcc2
5053 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005054char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005055
Guido van Rossumf78abae1997-01-21 22:02:36 +00005056int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005057
5058/* The GNU C library defines this for functions which it implements
5059 to always fail with ENOSYS. Some functions are actually named
5060 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005061#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005062choke me
5063#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005064$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005065#endif
5066
5067; return 0; }
5068EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005069if { (eval echo configure:5070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005070 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005071 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005072else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005073 echo "configure: failed program was:" >&5
5074 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005075 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005076 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005077fi
5078rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005079fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005080
Thomas Wouters3a584202000-08-05 23:28:51 +00005081if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005082 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005083 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5084 cat >> confdefs.h <<EOF
5085#define $ac_tr_func 1
5086EOF
5087 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005088#line 5089 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005089#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005090#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005091int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005092gettimeofday((struct timeval*)0,(struct timezone*)0);
5093; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005094EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005095if { (eval echo configure:5096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005096 :
5097else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005098 echo "configure: failed program was:" >&5
5099 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005100 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005101 cat >> confdefs.h <<\EOF
5102#define GETTIMEOFDAY_NO_TZ 1
5103EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005104
5105fi
5106rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005107else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005108 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005109fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005110done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005111
5112
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005113for ac_func in getaddrinfo
5114do
5115echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005116echo "configure:5117: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005117if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5118 echo $ac_n "(cached) $ac_c" 1>&6
5119else
5120 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005121#line 5122 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005122#include "confdefs.h"
5123/* System header to define __stub macros and hopefully few prototypes,
5124 which can conflict with char $ac_func(); below. */
5125#include <assert.h>
5126/* Override any gcc2 internal prototype to avoid an error. */
5127/* We use char because int might match the return type of a gcc2
5128 builtin and then its argument prototype would still apply. */
5129char $ac_func();
5130
5131int main() {
5132
5133/* The GNU C library defines this for functions which it implements
5134 to always fail with ENOSYS. Some functions are actually named
5135 something starting with __ and the normal name is an alias. */
5136#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5137choke me
5138#else
5139$ac_func();
5140#endif
5141
5142; return 0; }
5143EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005144if { (eval echo configure:5145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005145 rm -rf conftest*
5146 eval "ac_cv_func_$ac_func=yes"
5147else
5148 echo "configure: failed program was:" >&5
5149 cat conftest.$ac_ext >&5
5150 rm -rf conftest*
5151 eval "ac_cv_func_$ac_func=no"
5152fi
5153rm -f conftest*
5154fi
5155
5156if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5157 echo "$ac_t""yes" 1>&6
5158 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5159 cat >> confdefs.h <<EOF
5160#define $ac_tr_func 1
5161EOF
5162 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005163echo "configure:5164: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005164if test "$cross_compiling" = yes; then
5165 echo "$ac_t""buggy" 1>&6
5166buggygetaddrinfo=yes
5167else
5168 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005169#line 5170 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005170#include "confdefs.h"
5171
5172#include <sys/types.h>
5173#include <netdb.h>
5174#include <string.h>
5175#include <sys/socket.h>
5176#include <netinet/in.h>
5177
5178main()
5179{
5180 int passive, gaierr, inet4 = 0, inet6 = 0;
5181 struct addrinfo hints, *ai, *aitop;
5182 char straddr[INET6_ADDRSTRLEN], strport[16];
5183
5184 for (passive = 0; passive <= 1; passive++) {
5185 memset(&hints, 0, sizeof(hints));
5186 hints.ai_family = AF_UNSPEC;
5187 hints.ai_flags = passive ? AI_PASSIVE : 0;
5188 hints.ai_socktype = SOCK_STREAM;
5189 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5190 (void)gai_strerror(gaierr);
5191 goto bad;
5192 }
5193 for (ai = aitop; ai; ai = ai->ai_next) {
5194 if (ai->ai_addr == NULL ||
5195 ai->ai_addrlen == 0 ||
5196 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5197 straddr, sizeof(straddr), strport, sizeof(strport),
5198 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5199 goto bad;
5200 }
5201 switch (ai->ai_family) {
5202 case AF_INET:
5203 if (strcmp(strport, "54321") != 0) {
5204 goto bad;
5205 }
5206 if (passive) {
5207 if (strcmp(straddr, "0.0.0.0") != 0) {
5208 goto bad;
5209 }
5210 } else {
5211 if (strcmp(straddr, "127.0.0.1") != 0) {
5212 goto bad;
5213 }
5214 }
5215 inet4++;
5216 break;
5217 case AF_INET6:
5218 if (strcmp(strport, "54321") != 0) {
5219 goto bad;
5220 }
5221 if (passive) {
5222 if (strcmp(straddr, "::") != 0) {
5223 goto bad;
5224 }
5225 } else {
5226 if (strcmp(straddr, "::1") != 0) {
5227 goto bad;
5228 }
5229 }
5230 inet6++;
5231 break;
5232 case AF_UNSPEC:
5233 goto bad;
5234 break;
5235 default:
5236 /* another family support? */
5237 break;
5238 }
5239 }
5240 }
5241
5242 if (!(inet4 == 0 || inet4 == 2))
5243 goto bad;
5244 if (!(inet6 == 0 || inet6 == 2))
5245 goto bad;
5246
5247 if (aitop)
5248 freeaddrinfo(aitop);
5249 exit(0);
5250
5251 bad:
5252 if (aitop)
5253 freeaddrinfo(aitop);
5254 exit(1);
5255}
5256
5257EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005258if { (eval echo configure:5259: \"$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 +00005259then
5260 echo "$ac_t""good" 1>&6
5261buggygetaddrinfo=no
5262else
5263 echo "configure: failed program was:" >&5
5264 cat conftest.$ac_ext >&5
5265 rm -fr conftest*
5266 echo "$ac_t""buggy" 1>&6
5267buggygetaddrinfo=yes
5268fi
5269rm -fr conftest*
5270fi
5271
5272else
5273 echo "$ac_t""no" 1>&6
5274buggygetaddrinfo=yes
5275fi
5276done
5277
5278
5279if test "$buggygetaddrinfo" = "yes"; then
5280 if test "$ipv6" = "yes"; then
5281 echo 'Fatal: You must get working getaddrinfo() function.'
5282 echo ' or you can specify "--disable-ipv6"'.
5283 exit 1
5284 fi
5285fi
5286for ac_func in getaddrinfo getnameinfo
5287do
5288echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005289echo "configure:5290: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005290if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5291 echo $ac_n "(cached) $ac_c" 1>&6
5292else
5293 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005294#line 5295 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005295#include "confdefs.h"
5296/* System header to define __stub macros and hopefully few prototypes,
5297 which can conflict with char $ac_func(); below. */
5298#include <assert.h>
5299/* Override any gcc2 internal prototype to avoid an error. */
5300/* We use char because int might match the return type of a gcc2
5301 builtin and then its argument prototype would still apply. */
5302char $ac_func();
5303
5304int main() {
5305
5306/* The GNU C library defines this for functions which it implements
5307 to always fail with ENOSYS. Some functions are actually named
5308 something starting with __ and the normal name is an alias. */
5309#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5310choke me
5311#else
5312$ac_func();
5313#endif
5314
5315; return 0; }
5316EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005317if { (eval echo configure:5318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005318 rm -rf conftest*
5319 eval "ac_cv_func_$ac_func=yes"
5320else
5321 echo "configure: failed program was:" >&5
5322 cat conftest.$ac_ext >&5
5323 rm -rf conftest*
5324 eval "ac_cv_func_$ac_func=no"
5325fi
5326rm -f conftest*
5327fi
5328
5329if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5330 echo "$ac_t""yes" 1>&6
5331 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5332 cat >> confdefs.h <<EOF
5333#define $ac_tr_func 1
5334EOF
5335
5336else
5337 echo "$ac_t""no" 1>&6
5338fi
5339done
5340
5341
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005342# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005343echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005344echo "configure:5345: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005345if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005346 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005347else
5348 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005349#line 5350 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005350#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005351#include <sys/types.h>
5352#include <sys/time.h>
5353#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005354int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005355struct tm *tp;
5356; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005357EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005358if { (eval echo configure:5359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005359 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005360 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005361else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005362 echo "configure: failed program was:" >&5
5363 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005364 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005365 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005366fi
5367rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005368fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005369
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005370echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005371if test $ac_cv_header_time = yes; then
5372 cat >> confdefs.h <<\EOF
5373#define TIME_WITH_SYS_TIME 1
5374EOF
5375
5376fi
5377
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005378echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005379echo "configure:5380: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005380if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005381 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005382else
5383 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005384#line 5385 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005385#include "confdefs.h"
5386#include <sys/types.h>
5387#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005388int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005389struct tm *tp; tp->tm_sec;
5390; return 0; }
5391EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005392if { (eval echo configure:5393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005393 rm -rf conftest*
5394 ac_cv_struct_tm=time.h
5395else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005396 echo "configure: failed program was:" >&5
5397 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005398 rm -rf conftest*
5399 ac_cv_struct_tm=sys/time.h
5400fi
5401rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005402fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005403
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005404echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005405if test $ac_cv_struct_tm = sys/time.h; then
5406 cat >> confdefs.h <<\EOF
5407#define TM_IN_SYS_TIME 1
5408EOF
5409
5410fi
5411
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005412echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005413echo "configure:5414: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005414if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005415 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005416else
5417 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005418#line 5419 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005419#include "confdefs.h"
5420#include <sys/types.h>
5421#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005422int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005423struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005424; return 0; }
5425EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005426if { (eval echo configure:5427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005427 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005428 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005429else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005430 echo "configure: failed program was:" >&5
5431 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005432 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005433 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005434fi
5435rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005436fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005437
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005438echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5439if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005440 cat >> confdefs.h <<\EOF
5441#define HAVE_TM_ZONE 1
5442EOF
5443
5444else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005445 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005446echo "configure:5447: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005447if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005448 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005449else
5450 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005451#line 5452 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005452#include "confdefs.h"
5453#include <time.h>
5454#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005455extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005456#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00005457int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005458atoi(*tzname);
5459; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005460EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005461if { (eval echo configure:5462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005462 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005463 ac_cv_var_tzname=yes
5464else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005465 echo "configure: failed program was:" >&5
5466 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005467 rm -rf conftest*
5468 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005469fi
5470rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005471fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005472
5473echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005474 if test $ac_cv_var_tzname = yes; then
5475 cat >> confdefs.h <<\EOF
5476#define HAVE_TZNAME 1
5477EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005478
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005479 fi
5480fi
5481
5482
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005483echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005484echo "configure:5485: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005485if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005486 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005487else
5488 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005489#line 5490 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005490#include "confdefs.h"
5491#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005492int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005493return altzone;
5494; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005495EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005496if { (eval echo configure:5497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005497 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005498 ac_cv_header_time_altzone=yes
5499else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005500 echo "configure: failed program was:" >&5
5501 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005502 rm -rf conftest*
5503 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005504fi
5505rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005506fi
5507
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005508echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005509if test $ac_cv_header_time_altzone = yes; then
5510 cat >> confdefs.h <<\EOF
5511#define HAVE_ALTZONE 1
5512EOF
5513
5514fi
5515
Guido van Rossumda88dad1995-01-26 00:46:29 +00005516was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005517echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005518echo "configure:5519: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005519cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005520#line 5521 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005521#include "confdefs.h"
5522
5523#include <sys/types.h>
5524#include <sys/select.h>
5525#include <sys/time.h>
5526
Guido van Rossumf78abae1997-01-21 22:02:36 +00005527int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005528;
5529; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005530EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005531if { (eval echo configure:5532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005532 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005533 cat >> confdefs.h <<\EOF
5534#define SYS_SELECT_WITH_SYS_TIME 1
5535EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005536 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005537else
5538 echo "configure: failed program was:" >&5
5539 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005540fi
5541rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005542echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005543
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005544echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005545echo "configure:5546: checking for addrinfo" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005546if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
5547 echo $ac_n "(cached) $ac_c" 1>&6
5548else
5549 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005550#line 5551 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005551#include "confdefs.h"
5552
5553# include <netdb.h>
5554int main() {
5555struct addrinfo a
5556; return 0; }
5557EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005558if { (eval echo configure:5559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005559 rm -rf conftest*
5560 ac_cv_struct_addrinfo=yes
5561else
5562 echo "configure: failed program was:" >&5
5563 cat conftest.$ac_ext >&5
5564 rm -rf conftest*
5565 ac_cv_struct_addrinfo=no
5566fi
5567rm -f conftest*
5568fi
5569
5570echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
5571if test $ac_cv_struct_addrinfo = yes; then
5572 cat >> confdefs.h <<\EOF
5573#define HAVE_ADDRINFO 1
5574EOF
5575
5576fi
5577
5578echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005579echo "configure:5580: checking for sockaddr_storage" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005580if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
5581 echo $ac_n "(cached) $ac_c" 1>&6
5582else
5583 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005584#line 5585 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005585#include "confdefs.h"
5586
5587# include <sys/types.h>
5588# include <sys/socket.h>
5589int main() {
5590struct sockaddr_storage s
5591; return 0; }
5592EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005593if { (eval echo configure:5594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005594 rm -rf conftest*
5595 ac_cv_struct_sockaddr_storage=yes
5596else
5597 echo "configure: failed program was:" >&5
5598 cat conftest.$ac_ext >&5
5599 rm -rf conftest*
5600 ac_cv_struct_sockaddr_storage=no
5601fi
5602rm -f conftest*
5603fi
5604
5605echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
5606if test $ac_cv_struct_sockaddr_storage = yes; then
5607 cat >> confdefs.h <<\EOF
5608#define HAVE_SOCKADDR_STORAGE 1
5609EOF
5610
5611fi
5612
Guido van Rossum627b2d71993-12-24 10:39:16 +00005613# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00005614
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005615echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005616echo "configure:5617: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005617if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005618 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005619else
5620 if test "$GCC" = yes; then
5621 # GCC predefines this symbol on systems where it applies.
5622cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005623#line 5624 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005624#include "confdefs.h"
5625#ifdef __CHAR_UNSIGNED__
5626 yes
5627#endif
5628
5629EOF
5630if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5631 egrep "yes" >/dev/null 2>&1; then
5632 rm -rf conftest*
5633 ac_cv_c_char_unsigned=yes
5634else
5635 rm -rf conftest*
5636 ac_cv_c_char_unsigned=no
5637fi
5638rm -f conftest*
5639
5640else
5641if test "$cross_compiling" = yes; then
5642 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5643else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005644 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005645#line 5646 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005646#include "confdefs.h"
5647/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005648#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00005649#define volatile
5650#endif
5651main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00005652 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005653}
5654EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005655if { (eval echo configure:5656: \"$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 +00005656then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005657 ac_cv_c_char_unsigned=yes
5658else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005659 echo "configure: failed program was:" >&5
5660 cat conftest.$ac_ext >&5
5661 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005662 ac_cv_c_char_unsigned=no
5663fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005664rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005665fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005666
5667fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005668fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005669
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005670echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005671if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5672 cat >> confdefs.h <<\EOF
5673#define __CHAR_UNSIGNED__ 1
5674EOF
5675
5676fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005677
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005678echo $ac_n "checking for working const""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005679echo "configure:5680: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005680if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005681 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005682else
5683 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005684#line 5685 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005685#include "confdefs.h"
5686
Guido van Rossumf78abae1997-01-21 22:02:36 +00005687int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005688
5689/* Ultrix mips cc rejects this. */
Martin v. Löwis9db2f572001-07-23 01:30:10 +00005690typedef int charset[2]; const charset x;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005691/* SunOS 4.1.1 cc rejects this. */
5692char const *const *ccp;
5693char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005694/* NEC SVR4.0.2 mips cc rejects this. */
5695struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005696static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005697/* AIX XL C 1.02.0.0 rejects this.
5698 It does not let you subtract one const X* pointer from another in an arm
5699 of an if-expression whose if-part is not a constant expression */
5700const char *g = "string";
5701ccp = &g + (g ? g-g : 0);
5702/* HPUX 7.0 cc rejects these. */
5703++ccp;
5704p = (char**) ccp;
5705ccp = (char const *const *) p;
5706{ /* SCO 3.2v4 cc rejects this. */
5707 char *t;
5708 char const *s = 0 ? (char *) 0 : (char const *) 0;
5709
5710 *t++ = 0;
5711}
5712{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005713 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005714 const int *foo = &x[0];
5715 ++foo;
5716}
5717{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5718 typedef const int *iptr;
5719 iptr p = 0;
5720 ++p;
5721}
5722{ /* AIX XL C 1.02.0.0 rejects this saying
5723 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5724 struct s { int j; const int *ap[3]; };
5725 struct s *b; b->j = 5;
5726}
5727{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5728 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005729}
5730
5731; return 0; }
5732EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005733if { (eval echo configure:5734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005734 rm -rf conftest*
5735 ac_cv_c_const=yes
5736else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005737 echo "configure: failed program was:" >&5
5738 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005739 rm -rf conftest*
5740 ac_cv_c_const=no
5741fi
5742rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005743fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005744
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005745echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005746if test $ac_cv_c_const = no; then
5747 cat >> confdefs.h <<\EOF
5748#define const
5749EOF
5750
5751fi
5752
5753
Guido van Rossumda88dad1995-01-26 00:46:29 +00005754works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005755echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005756echo "configure:5757: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005757cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005758#line 5759 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005759#include "confdefs.h"
5760
Guido van Rossumf78abae1997-01-21 22:02:36 +00005761int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005762volatile int x; x = 0;
5763; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005764EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005765if { (eval echo configure:5766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005766 rm -rf conftest*
5767 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005768else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005769 echo "configure: failed program was:" >&5
5770 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005771 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005772 cat >> confdefs.h <<\EOF
5773#define volatile
5774EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005775
5776fi
5777rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005778echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005779
Guido van Rossumda88dad1995-01-26 00:46:29 +00005780works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005781echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005782echo "configure:5783: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005783cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005784#line 5785 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005785#include "confdefs.h"
5786
Guido van Rossumf78abae1997-01-21 22:02:36 +00005787int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005788signed char c;
5789; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005790EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005791if { (eval echo configure:5792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005792 rm -rf conftest*
5793 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005794else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005795 echo "configure: failed program was:" >&5
5796 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005797 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005798 cat >> confdefs.h <<\EOF
5799#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00005800EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005801
5802fi
5803rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005804echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005805
Guido van Rossumda88dad1995-01-26 00:46:29 +00005806have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005807echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005808echo "configure:5809: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005809cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005810#line 5811 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005811#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005812int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005813int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005814return foo(10);
5815; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005816EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005817if { (eval echo configure:5818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005818 rm -rf conftest*
5819 cat >> confdefs.h <<\EOF
5820#define HAVE_PROTOTYPES 1
5821EOF
5822 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005823else
5824 echo "configure: failed program was:" >&5
5825 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005826fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005827rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005828echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005829
Guido van Rossumda88dad1995-01-26 00:46:29 +00005830works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005831echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005832echo "configure:5833: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005833cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005834#line 5835 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005835#include "confdefs.h"
5836
5837#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00005838int foo(int x, ...) {
5839 va_list va;
5840 va_start(va, x);
5841 va_arg(va, int);
5842 va_arg(va, char *);
5843 va_arg(va, double);
5844 return 0;
5845}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005846
Guido van Rossumf78abae1997-01-21 22:02:36 +00005847int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005848return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005849; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005850EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005851if { (eval echo configure:5852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005852 rm -rf conftest*
5853 cat >> confdefs.h <<\EOF
5854#define HAVE_STDARG_PROTOTYPES 1
5855EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005856 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005857else
5858 echo "configure: failed program was:" >&5
5859 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005860fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005861rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005862echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005863
Guido van Rossumda88dad1995-01-26 00:46:29 +00005864if test "$have_prototypes" = yes; then
5865bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005866echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005867echo "configure:5868: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005868cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005869#line 5870 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005870#include "confdefs.h"
5871#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005872int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005873char **t;execve("@",t,t);
5874; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005875EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005876if { (eval echo configure:5877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005877 :
5878else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005879 echo "configure: failed program was:" >&5
5880 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005881 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005882 cat >> confdefs.h <<\EOF
5883#define BAD_EXEC_PROTOTYPES 1
5884EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005885 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005886fi
5887rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005888echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005889fi
5890
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005891# check if sockaddr has sa_len member
5892echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005893echo "configure:5894: checking if sockaddr has sa_len member" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005894cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005895#line 5896 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005896#include "confdefs.h"
5897#include <sys/types.h>
5898#include <sys/socket.h>
5899int main() {
5900struct sockaddr x;
5901x.sa_len = 0;
5902; return 0; }
5903EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005904if { (eval echo configure:5905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005905 rm -rf conftest*
5906 echo "$ac_t""yes" 1>&6
5907 cat >> confdefs.h <<\EOF
5908#define HAVE_SOCKADDR_SA_LEN 1
5909EOF
5910
5911else
5912 echo "configure: failed program was:" >&5
5913 cat conftest.$ac_ext >&5
5914 rm -rf conftest*
5915 echo "$ac_t""no" 1>&6
5916fi
5917rm -f conftest*
5918
Guido van Rossumda88dad1995-01-26 00:46:29 +00005919bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005920echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005921echo "configure:5922: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005922if test "$cross_compiling" = yes; then
5923 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5924else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005925 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005926#line 5927 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005927#include "confdefs.h"
5928
5929struct s { int a; int b; };
5930static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005931int foobar() {
5932 static int random;
5933 random = (int) &foo;
5934 return random;
5935}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005936static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005937main() {
5938 exit(!((int)&foo == foobar()));
5939}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005940
5941EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005942if { (eval echo configure:5943: \"$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 +00005943then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005944 :
5945else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005946 echo "configure: failed program was:" >&5
5947 cat conftest.$ac_ext >&5
5948 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005949 cat >> confdefs.h <<\EOF
5950#define BAD_STATIC_FORWARD 1
5951EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005952 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005953fi
5954rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005955fi
5956
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005957echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005958
Guido van Rossumda88dad1995-01-26 00:46:29 +00005959va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005960echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005961echo "configure:5962: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005962cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005963#line 5964 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005964#include "confdefs.h"
5965
5966#ifdef HAVE_STDARG_PROTOTYPES
5967#include <stdarg.h>
5968#else
5969#include <varargs.h>
5970#endif
5971
Guido van Rossumf78abae1997-01-21 22:02:36 +00005972int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005973va_list list1, list2; list1 = list2;
5974; return 0; }
5975EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005976if { (eval echo configure:5977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005977 :
5978else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005979 echo "configure: failed program was:" >&5
5980 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005981 rm -rf conftest*
5982 cat >> confdefs.h <<\EOF
5983#define VA_LIST_IS_ARRAY 1
5984EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005985 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005986fi
5987rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005988echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005989
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005990# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5991echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005992echo "configure:5993: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005993if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005994 echo $ac_n "(cached) $ac_c" 1>&6
5995else
5996 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00005997#line 5998 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005998#include "confdefs.h"
5999/* System header to define __stub macros and hopefully few prototypes,
6000 which can conflict with char gethostbyname_r(); below. */
6001#include <assert.h>
6002/* Override any gcc2 internal prototype to avoid an error. */
6003/* We use char because int might match the return type of a gcc2
6004 builtin and then its argument prototype would still apply. */
6005char gethostbyname_r();
6006
6007int main() {
6008
6009/* The GNU C library defines this for functions which it implements
6010 to always fail with ENOSYS. Some functions are actually named
6011 something starting with __ and the normal name is an alias. */
6012#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6013choke me
6014#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006015gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006016#endif
6017
6018; return 0; }
6019EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006020if { (eval echo configure:6021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006021 rm -rf conftest*
6022 eval "ac_cv_func_gethostbyname_r=yes"
6023else
6024 echo "configure: failed program was:" >&5
6025 cat conftest.$ac_ext >&5
6026 rm -rf conftest*
6027 eval "ac_cv_func_gethostbyname_r=no"
6028fi
6029rm -f conftest*
6030fi
6031
6032if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6033 echo "$ac_t""yes" 1>&6
6034
6035 cat >> confdefs.h <<\EOF
6036#define HAVE_GETHOSTBYNAME_R 1
6037EOF
6038
6039 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006040echo "configure:6041: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006041 OLD_CFLAGS=$CFLAGS
6042 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
6043 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006044#line 6045 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006045#include "confdefs.h"
6046
6047# include <netdb.h>
6048
6049int main() {
6050
6051 char *name;
6052 struct hostent *he, *res;
6053 char buffer[2048];
6054 int buflen = 2048;
6055 int h_errnop;
6056
6057 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
6058
6059; return 0; }
6060EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006061if { (eval echo configure:6062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006062 rm -rf conftest*
6063
6064 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006065#define HAVE_GETHOSTBYNAME_R 1
6066EOF
6067
6068 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006069#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6070EOF
6071
6072 echo "$ac_t""yes" 1>&6
6073
6074else
6075 echo "configure: failed program was:" >&5
6076 cat conftest.$ac_ext >&5
6077 rm -rf conftest*
6078
6079 echo "$ac_t""no" 1>&6
6080 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006081echo "configure:6082: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006082 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006083#line 6084 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006084#include "confdefs.h"
6085
6086# include <netdb.h>
6087
6088int main() {
6089
6090 char *name;
6091 struct hostent *he;
6092 char buffer[2048];
6093 int buflen = 2048;
6094 int h_errnop;
6095
6096 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
6097
6098; return 0; }
6099EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006100if { (eval echo configure:6101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006101 rm -rf conftest*
6102
6103 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006104#define HAVE_GETHOSTBYNAME_R 1
6105EOF
6106
6107 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006108#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6109EOF
6110
6111 echo "$ac_t""yes" 1>&6
6112
6113else
6114 echo "configure: failed program was:" >&5
6115 cat conftest.$ac_ext >&5
6116 rm -rf conftest*
6117
6118 echo "$ac_t""no" 1>&6
6119 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006120echo "configure:6121: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006121 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006122#line 6123 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006123#include "confdefs.h"
6124
6125# include <netdb.h>
6126
6127int main() {
6128
6129 char *name;
6130 struct hostent *he;
6131 struct hostent_data data;
6132
6133 (void) gethostbyname_r(name, he, &data);
6134
6135; return 0; }
6136EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006137if { (eval echo configure:6138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006138 rm -rf conftest*
6139
6140 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006141#define HAVE_GETHOSTBYNAME_R 1
6142EOF
6143
6144 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006145#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6146EOF
6147
6148 echo "$ac_t""yes" 1>&6
6149
6150else
6151 echo "configure: failed program was:" >&5
6152 cat conftest.$ac_ext >&5
6153 rm -rf conftest*
6154
6155 echo "$ac_t""no" 1>&6
6156
6157fi
6158rm -f conftest*
6159
6160fi
6161rm -f conftest*
6162
6163fi
6164rm -f conftest*
6165 CFLAGS=$OLD_CFLAGS
6166
6167else
6168 echo "$ac_t""no" 1>&6
6169
Thomas Wouters3a584202000-08-05 23:28:51 +00006170 for ac_func in gethostbyname
6171do
6172echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006173echo "configure:6174: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006174if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006175 echo $ac_n "(cached) $ac_c" 1>&6
6176else
6177 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006178#line 6179 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006179#include "confdefs.h"
6180/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00006181 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006182#include <assert.h>
6183/* Override any gcc2 internal prototype to avoid an error. */
6184/* We use char because int might match the return type of a gcc2
6185 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006186char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006187
6188int main() {
6189
6190/* The GNU C library defines this for functions which it implements
6191 to always fail with ENOSYS. Some functions are actually named
6192 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006193#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006194choke me
6195#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006196$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006197#endif
6198
6199; return 0; }
6200EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006201if { (eval echo configure:6202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006202 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006203 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006204else
6205 echo "configure: failed program was:" >&5
6206 cat conftest.$ac_ext >&5
6207 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006208 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006209fi
6210rm -f conftest*
6211fi
6212
Thomas Wouters3a584202000-08-05 23:28:51 +00006213if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006214 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00006215 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6216 cat >> confdefs.h <<EOF
6217#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006218EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00006219
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006220else
6221 echo "$ac_t""no" 1>&6
6222fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006223done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006224
6225
6226fi
6227
6228
6229
6230
6231
6232
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006233
Guido van Rossum627b2d71993-12-24 10:39:16 +00006234# checks for system services
6235# (none yet)
6236
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006237# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006238echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006239echo "configure:6240: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006240if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006241 echo $ac_n "(cached) $ac_c" 1>&6
6242else
6243 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006244#line 6245 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006245#include "confdefs.h"
6246/* System header to define __stub macros and hopefully few prototypes,
6247 which can conflict with char __fpu_control(); below. */
6248#include <assert.h>
6249/* Override any gcc2 internal prototype to avoid an error. */
6250/* We use char because int might match the return type of a gcc2
6251 builtin and then its argument prototype would still apply. */
6252char __fpu_control();
6253
6254int main() {
6255
6256/* The GNU C library defines this for functions which it implements
6257 to always fail with ENOSYS. Some functions are actually named
6258 something starting with __ and the normal name is an alias. */
6259#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6260choke me
6261#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006262__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006263#endif
6264
6265; return 0; }
6266EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006267if { (eval echo configure:6268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006268 rm -rf conftest*
6269 eval "ac_cv_func___fpu_control=yes"
6270else
6271 echo "configure: failed program was:" >&5
6272 cat conftest.$ac_ext >&5
6273 rm -rf conftest*
6274 eval "ac_cv_func___fpu_control=no"
6275fi
6276rm -f conftest*
6277fi
6278
6279if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6280 echo "$ac_t""yes" 1>&6
6281 :
6282else
6283 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006284echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006285echo "configure:6286: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00006286ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006287if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006288 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006289else
6290 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006291LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006292cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006293#line 6294 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006294#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006295/* Override any gcc2 internal prototype to avoid an error. */
6296/* We use char because int might match the return type of a gcc2
6297 builtin and then its argument prototype would still apply. */
6298char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00006299
Guido van Rossumf78abae1997-01-21 22:02:36 +00006300int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006301__fpu_control()
6302; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006303EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006304if { (eval echo configure:6305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006305 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006306 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006307else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006308 echo "configure: failed program was:" >&5
6309 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006310 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006311 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006312fi
6313rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006314LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006315
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006316fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006317if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006318 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006319 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6320 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006321 cat >> confdefs.h <<EOF
6322#define $ac_tr_lib 1
6323EOF
6324
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006325 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006326
6327else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006328 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006329fi
6330
6331
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006332fi
6333
6334
Guido van Rossum7f253911997-05-09 02:42:48 +00006335# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00006336echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006337echo "configure:6338: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006338# Check whether --with-fpectl or --without-fpectl was given.
6339if test "${with_fpectl+set}" = set; then
6340 withval="$with_fpectl"
6341
6342if test "$withval" != no
6343then cat >> confdefs.h <<\EOF
6344#define WANT_SIGFPE_HANDLER 1
6345EOF
6346 echo "$ac_t""yes" 1>&6
6347else echo "$ac_t""no" 1>&6
6348fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006349else
6350 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006351fi
6352
6353
Guido van Rossum7f43da71994-08-01 12:15:30 +00006354# check for --with-libm=...
6355
Guido van Rossum563e7081996-09-10 18:20:48 +00006356case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006357Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006358next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006359BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006360*) LIBM=-lm
6361esac
Guido van Rossum7f253911997-05-09 02:42:48 +00006362echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006363echo "configure:6364: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006364# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006365if test "${with_libm+set}" = set; then
6366 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006367
Guido van Rossum7f253911997-05-09 02:42:48 +00006368if test "$withval" = no
6369then LIBM=
6370 echo "$ac_t""force LIBM empty" 1>&6
6371elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006372then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006373 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006374else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006375fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006376else
6377 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006378fi
6379
6380
6381# check for --with-libc=...
6382
Guido van Rossum7f253911997-05-09 02:42:48 +00006383echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006384echo "configure:6385: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006385# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006386if test "${with_libc+set}" = set; then
6387 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006388
Guido van Rossum7f253911997-05-09 02:42:48 +00006389if test "$withval" = no
6390then LIBC=
6391 echo "$ac_t""force LIBC empty" 1>&6
6392elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006393then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006394 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006395else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006396fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006397else
6398 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006399fi
6400
6401
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006402# check for hypot() in math library
6403LIBS_SAVE=$LIBS
6404LIBS="$LIBS $LIBM"
6405for ac_func in hypot
6406do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006407echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006408echo "configure:6409: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006409if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006410 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006411else
6412 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006413#line 6414 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006414#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006415/* System header to define __stub macros and hopefully few prototypes,
6416 which can conflict with char $ac_func(); below. */
6417#include <assert.h>
6418/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006419/* We use char because int might match the return type of a gcc2
6420 builtin and then its argument prototype would still apply. */
6421char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006422
Guido van Rossumf78abae1997-01-21 22:02:36 +00006423int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006424
6425/* The GNU C library defines this for functions which it implements
6426 to always fail with ENOSYS. Some functions are actually named
6427 something starting with __ and the normal name is an alias. */
6428#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6429choke me
6430#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006431$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006432#endif
6433
6434; return 0; }
6435EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006436if { (eval echo configure:6437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006437 rm -rf conftest*
6438 eval "ac_cv_func_$ac_func=yes"
6439else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006440 echo "configure: failed program was:" >&5
6441 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006442 rm -rf conftest*
6443 eval "ac_cv_func_$ac_func=no"
6444fi
6445rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006446fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00006447
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006448if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6449 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006450 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6451 cat >> confdefs.h <<EOF
6452#define $ac_tr_func 1
6453EOF
6454
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006455else
6456 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006457LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006458fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006459done
6460
Guido van Rossumf78abae1997-01-21 22:02:36 +00006461
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006462LIBS=$LIBS_SAVE
6463
Guido van Rossumad713701997-07-10 22:42:38 +00006464# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00006465echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006466echo "configure:6467: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006467if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00006468 echo $ac_n "(cached) $ac_c" 1>&6
6469else
6470 if test "$cross_compiling" = yes; then
6471 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6472else
6473 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006474#line 6475 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006475#include "confdefs.h"
6476#include <stdio.h>
6477#ifdef HAVE_STDLIB
6478#include <stdlib.h>
6479#else
6480char *malloc(), *realloc();
6481int *free();
6482#endif
6483main() {
6484 char *p;
6485 p = malloc(0);
6486 if (p == NULL) exit(1);
6487 p = realloc(p, 0);
6488 if (p == NULL) exit(1);
6489 free(p);
6490 exit(0);
6491}
6492EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006493if { (eval echo configure:6494: \"$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 +00006494then
6495 ac_cv_malloc_zero=nonnull
6496else
6497 echo "configure: failed program was:" >&5
6498 cat conftest.$ac_ext >&5
6499 rm -fr conftest*
6500 ac_cv_malloc_zero=null
6501fi
6502rm -fr conftest*
6503fi
6504
6505fi
6506
6507echo "$ac_t""$ac_cv_malloc_zero" 1>&6
6508if test "$ac_cv_malloc_zero" = null
6509then
6510 cat >> confdefs.h <<\EOF
6511#define MALLOC_ZERO_RETURNS_NULL 1
6512EOF
6513
6514fi
6515
Guido van Rossumef2255b2000-03-10 22:30:29 +00006516# check for wchar.h
6517ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6518echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006519echo "configure:6520: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006520if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006521 echo $ac_n "(cached) $ac_c" 1>&6
6522else
6523 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006524#line 6525 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006525#include "confdefs.h"
6526#include <wchar.h>
6527EOF
6528ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006529{ (eval echo configure:6530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006530ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6531if test -z "$ac_err"; then
6532 rm -rf conftest*
6533 eval "ac_cv_header_$ac_safe=yes"
6534else
6535 echo "$ac_err" >&5
6536 echo "configure: failed program was:" >&5
6537 cat conftest.$ac_ext >&5
6538 rm -rf conftest*
6539 eval "ac_cv_header_$ac_safe=no"
6540fi
6541rm -f conftest*
6542fi
6543if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6544 echo "$ac_t""yes" 1>&6
6545 cat >> confdefs.h <<\EOF
6546#define HAVE_WCHAR_H 1
6547EOF
6548 wchar_h="yes"
6549else
6550 echo "$ac_t""no" 1>&6
6551wchar_h="no"
6552
6553fi
6554
6555
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006556# determine wchar_t size
6557if test "$wchar_h" = yes
6558then
6559 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006560echo "configure:6561: checking size of wchar_t" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006561if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
6562 echo $ac_n "(cached) $ac_c" 1>&6
6563else
6564 if test "$cross_compiling" = yes; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006565 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6566else
6567 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006568#line 6569 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006569#include "confdefs.h"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006570#include <stdio.h>
6571main()
6572{
6573 FILE *f=fopen("conftestval", "w");
6574 if (!f) exit(1);
6575 fprintf(f, "%d\n", sizeof(wchar_t));
Guido van Rossumef2255b2000-03-10 22:30:29 +00006576 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00006577}
Guido van Rossumef2255b2000-03-10 22:30:29 +00006578EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006579if { (eval echo configure:6580: \"$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 +00006580then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006581 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006582else
6583 echo "configure: failed program was:" >&5
6584 cat conftest.$ac_ext >&5
6585 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006586 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00006587fi
6588rm -fr conftest*
6589fi
6590
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006591fi
6592echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
6593cat >> confdefs.h <<EOF
6594#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
6595EOF
6596
6597
6598fi
6599
6600echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006601echo "configure:6602: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006602# Check whether --enable-unicode or --disable-unicode was given.
6603if test "${enable_unicode+set}" = set; then
6604 enableval="$enable_unicode"
6605 :
6606else
6607 enable_unicode=yes
6608fi
6609
6610
6611if test $enable_unicode = yes
6612then
Martin v. Löwisfd917792001-06-27 20:22:04 +00006613 # Without any arguments, Py_UNICODE defaults to two-byte mode
6614 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006615fi
6616
6617case "$enable_unicode" in
6618ucs2) unicode_size="2"
6619 cat >> confdefs.h <<\EOF
6620#define Py_UNICODE_SIZE 2
6621EOF
6622
6623 ;;
6624ucs4) unicode_size="4"
6625 cat >> confdefs.h <<\EOF
6626#define Py_UNICODE_SIZE 4
6627EOF
6628
6629 ;;
6630esac
6631
6632if test "$enable_unicode" = "no"
6633then
6634 echo "$ac_t""not used" 1>&6
6635else
6636 cat >> confdefs.h <<\EOF
6637#define Py_USING_UNICODE 1
6638EOF
6639
6640 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
6641 then
6642 PY_UNICODE_TYPE="wchar_t"
6643 cat >> confdefs.h <<\EOF
6644#define HAVE_USABLE_WCHAR_T 1
6645EOF
6646
6647 cat >> confdefs.h <<\EOF
6648#define PY_UNICODE_TYPE wchar_t
6649EOF
6650
6651 elif test "$ac_cv_sizeof_short" = "$unicode_size"
6652 then
6653 PY_UNICODE_TYPE="unsigned short"
6654 cat >> confdefs.h <<\EOF
6655#define PY_UNICODE_TYPE unsigned short
6656EOF
6657
6658 elif test "$ac_cv_sizeof_long" = "$unicode_size"
6659 then
6660 PY_UNICODE_TYPE="unsigned long"
6661 cat >> confdefs.h <<\EOF
6662#define PY_UNICODE_TYPE unsigned long
6663EOF
6664
6665 else
6666 PY_UNICODE_TYPE="no type found"
6667 fi
6668 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
6669fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006670
6671# check for endianness
6672echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006673echo "configure:6674: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006674if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006675 echo $ac_n "(cached) $ac_c" 1>&6
6676else
6677 ac_cv_c_bigendian=unknown
6678# See if sys/param.h defines the BYTE_ORDER macro.
6679cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006680#line 6681 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006681#include "confdefs.h"
6682#include <sys/types.h>
6683#include <sys/param.h>
6684int main() {
6685
6686#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6687 bogus endian macros
6688#endif
6689; return 0; }
6690EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006691if { (eval echo configure:6692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006692 rm -rf conftest*
6693 # It does; now see whether it defined to BIG_ENDIAN or not.
6694cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006695#line 6696 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006696#include "confdefs.h"
6697#include <sys/types.h>
6698#include <sys/param.h>
6699int main() {
6700
6701#if BYTE_ORDER != BIG_ENDIAN
6702 not big endian
6703#endif
6704; return 0; }
6705EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006706if { (eval echo configure:6707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006707 rm -rf conftest*
6708 ac_cv_c_bigendian=yes
6709else
6710 echo "configure: failed program was:" >&5
6711 cat conftest.$ac_ext >&5
6712 rm -rf conftest*
6713 ac_cv_c_bigendian=no
6714fi
6715rm -f conftest*
6716else
6717 echo "configure: failed program was:" >&5
6718 cat conftest.$ac_ext >&5
6719fi
6720rm -f conftest*
6721if test $ac_cv_c_bigendian = unknown; then
6722if test "$cross_compiling" = yes; then
6723 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6724else
6725 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006726#line 6727 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006727#include "confdefs.h"
6728main () {
6729 /* Are we little or big endian? From Harbison&Steele. */
6730 union
6731 {
6732 long l;
6733 char c[sizeof (long)];
6734 } u;
6735 u.l = 1;
6736 exit (u.c[sizeof (long) - 1] == 1);
6737}
6738EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006739if { (eval echo configure:6740: \"$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 +00006740then
6741 ac_cv_c_bigendian=no
6742else
6743 echo "configure: failed program was:" >&5
6744 cat conftest.$ac_ext >&5
6745 rm -fr conftest*
6746 ac_cv_c_bigendian=yes
6747fi
6748rm -fr conftest*
6749fi
6750
6751fi
6752fi
6753
6754echo "$ac_t""$ac_cv_c_bigendian" 1>&6
6755if test $ac_cv_c_bigendian = yes; then
6756 cat >> confdefs.h <<\EOF
6757#define WORDS_BIGENDIAN 1
6758EOF
6759
6760fi
6761
6762
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006763# Check whether right shifting a negative integer extends the sign bit
6764# or fills with zeros (like the Cray J90, according to Tim Peters).
6765echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006766echo "configure:6767: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006767if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00006768 echo $ac_n "(cached) $ac_c" 1>&6
6769else
6770
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006771if test "$cross_compiling" = yes; then
6772 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6773else
6774 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006775#line 6776 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006776#include "confdefs.h"
6777
6778int main()
6779{
Vladimir Marangozova6180282000-07-12 05:05:06 +00006780 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006781}
6782
6783EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006784if { (eval echo configure:6785: \"$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 +00006785then
6786 ac_cv_rshift_extends_sign=yes
6787else
6788 echo "configure: failed program was:" >&5
6789 cat conftest.$ac_ext >&5
6790 rm -fr conftest*
6791 ac_cv_rshift_extends_sign=no
6792fi
6793rm -fr conftest*
6794fi
6795
6796fi
6797
6798echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
6799if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006800then
6801 cat >> confdefs.h <<\EOF
6802#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
6803EOF
6804
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006805fi
6806
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006807# check for getc_unlocked and related locking functions
6808echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006809echo "configure:6810: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006810if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
6811 echo $ac_n "(cached) $ac_c" 1>&6
6812else
6813
6814cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006815#line 6816 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006816#include "confdefs.h"
6817#include <stdio.h>
6818int main() {
6819
6820 FILE *f = fopen("/dev/null", "r");
6821 flockfile(f);
6822 getc_unlocked(f);
6823 funlockfile(f);
6824
6825; return 0; }
6826EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006827if { (eval echo configure:6828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006828 rm -rf conftest*
6829 ac_cv_have_getc_unlocked=yes
6830else
6831 echo "configure: failed program was:" >&5
6832 cat conftest.$ac_ext >&5
6833 rm -rf conftest*
6834 ac_cv_have_getc_unlocked=no
6835fi
6836rm -f conftest*
6837fi
6838
6839echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
6840if test "$ac_cv_have_getc_unlocked" = yes
6841then
6842 cat >> confdefs.h <<\EOF
6843#define HAVE_GETC_UNLOCKED 1
6844EOF
6845
6846fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006847
Guido van Rossum353ae582001-07-10 16:45:32 +00006848# check for readline 4.2
6849echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006850echo "configure:6851: checking for rl_completion_matches in -lreadline" >&5
Guido van Rossum353ae582001-07-10 16:45:32 +00006851ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
6852if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6853 echo $ac_n "(cached) $ac_c" 1>&6
6854else
6855 ac_save_LIBS="$LIBS"
6856LIBS="-lreadline -ltermcap $LIBS"
6857cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006858#line 6859 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00006859#include "confdefs.h"
6860/* Override any gcc2 internal prototype to avoid an error. */
6861/* We use char because int might match the return type of a gcc2
6862 builtin and then its argument prototype would still apply. */
6863char rl_completion_matches();
6864
6865int main() {
6866rl_completion_matches()
6867; return 0; }
6868EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006869if { (eval echo configure:6870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum353ae582001-07-10 16:45:32 +00006870 rm -rf conftest*
6871 eval "ac_cv_lib_$ac_lib_var=yes"
6872else
6873 echo "configure: failed program was:" >&5
6874 cat conftest.$ac_ext >&5
6875 rm -rf conftest*
6876 eval "ac_cv_lib_$ac_lib_var=no"
6877fi
6878rm -f conftest*
6879LIBS="$ac_save_LIBS"
6880
6881fi
6882if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6883 echo "$ac_t""yes" 1>&6
6884 cat >> confdefs.h <<\EOF
6885#define HAVE_RL_COMPLETION_MATCHES 1
6886EOF
6887
6888else
6889 echo "$ac_t""no" 1>&6
6890fi
6891
6892
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006893echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006894echo "configure:6895: checking for broken nice()" >&5
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006895if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
6896 echo $ac_n "(cached) $ac_c" 1>&6
6897else
6898
6899if test "$cross_compiling" = yes; then
6900 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6901else
6902 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006903#line 6904 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006904#include "confdefs.h"
6905
6906int main()
6907{
6908 int val1 = nice(1);
6909 if (val1 != -1 && val1 == nice(2))
6910 exit(0);
6911 exit(1);
6912}
6913
6914EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006915if { (eval echo configure:6916: \"$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 +00006916then
6917 ac_cv_broken_nice=yes
6918else
6919 echo "configure: failed program was:" >&5
6920 cat conftest.$ac_ext >&5
6921 rm -fr conftest*
6922 ac_cv_broken_nice=no
6923fi
6924rm -fr conftest*
6925fi
6926
6927fi
6928
6929echo "$ac_t""$ac_cv_broken_nice" 1>&6
6930if test "$ac_cv_broken_nice" = yes
6931then
6932 cat >> confdefs.h <<\EOF
6933#define HAVE_BROKEN_NICE 1
6934EOF
6935
6936fi
6937
Guido van Rossum95713eb2000-05-18 20:53:31 +00006938# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
6939# Add sys/socket.h to confdefs.h
6940cat >> confdefs.h <<\EOF
6941#ifdef HAVE_SYS_SOCKET_H
6942#include <sys/socket.h>
6943#endif
6944EOF
6945echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006946echo "configure:6947: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006947if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00006948 echo $ac_n "(cached) $ac_c" 1>&6
6949else
6950 cat > conftest.$ac_ext <<EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00006951#line 6952 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00006952#include "confdefs.h"
6953#include <sys/types.h>
6954#if STDC_HEADERS
6955#include <stdlib.h>
6956#include <stddef.h>
6957#endif
6958EOF
6959if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6960 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6961 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006962 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00006963else
6964 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006965 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00006966fi
6967rm -f conftest*
6968
6969fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006970echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
6971if test $ac_cv_type_socklen_t = no; then
6972 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00006973#define socklen_t int
6974EOF
6975
6976fi
6977
6978
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00006979# Add Python/ prefix to LIBOBJS
6980libobjs=$LIBOBJS
6981LIBOBJS=
6982for obj in $libobjs; do
6983 LIBOBJS="$LIBOBJS Python/$obj"
6984done
6985
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006986#AC_MSG_CHECKING(for Modules/Setup)
6987#if test ! -f Modules/Setup ; then
6988# if test ! -d Modules ; then
6989# mkdir Modules
6990# fi
6991# cp "$srcdir/Modules/Setup.dist" Modules/Setup
6992# AC_MSG_RESULT(creating)
6993#else
6994# AC_MSG_RESULT(already exists)
6995#fi
6996
6997
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00006998SRCDIRS="Parser Grammar Objects Python Modules"
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00006999echo $ac_n "checking for build directories""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00007000echo "configure:7001: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007001for dir in $SRCDIRS; do
7002 if test ! -d $dir; then
7003 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007004 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007005done
7006echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007007
Guido van Rossum627b2d71993-12-24 10:39:16 +00007008# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007009trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007010cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007011# This file is a shell script that caches the results of configure
7012# tests run on this system so they can be shared between configure
7013# scripts and configure runs. It is not useful on other systems.
7014# If it contains results you don't want to keep, you may remove or edit it.
7015#
7016# By default, configure uses ./config.cache as the cache file,
7017# creating it if it does not exist already. You can give configure
7018# the --cache-file=FILE option to use a different cache file; that is
7019# what configure does when it calls configure scripts in
7020# subdirectories, so they share the cache.
7021# Giving --cache-file=/dev/null disables caching, for debugging configure.
7022# config.status only pays attention to the cache file if you give it the
7023# --recheck option to rerun configure.
7024#
7025EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007026# The following way of writing the cache mishandles newlines in values,
7027# but we know of no workaround that is simple, portable, and efficient.
7028# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007029# Ultrix sh set writes to stderr and can't be redirected directly,
7030# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007031(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007032 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007033 *ac_space=\ *)
7034 # `set' does not quote correctly, so add quotes (double-quote substitution
7035 # turns \\\\ into \\, and sed turns \\ into \).
7036 sed -n \
7037 -e "s/'/'\\\\''/g" \
7038 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7039 ;;
7040 *)
7041 # `set' quotes correctly as required by POSIX, so do not add quotes.
7042 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7043 ;;
7044 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007045if cmp -s $cache_file confcache; then
7046 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007047else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007048 if test -w $cache_file; then
7049 echo "updating cache $cache_file"
7050 cat confcache > $cache_file
7051 else
7052 echo "not updating unwritable cache $cache_file"
7053 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007054fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007055rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007056
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007057trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007058
7059test "x$prefix" = xNONE && prefix=$ac_default_prefix
7060# Let make expand exec_prefix.
7061test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007062
Guido van Rossum7f43da71994-08-01 12:15:30 +00007063# Any assignment to VPATH causes Sun make to only execute
7064# the first set of double-colon rules, so remove it if not needed.
7065# If there is a colon in the path, we need to keep it.
7066if test "x$srcdir" = x.; then
7067 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7068fi
7069
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007070trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00007071
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007072DEFS=-DHAVE_CONFIG_H
7073
7074# Without the "./", some shells look in PATH for config.status.
7075: ${CONFIG_STATUS=./config.status}
7076
7077echo creating $CONFIG_STATUS
7078rm -f $CONFIG_STATUS
7079cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007080#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007081# Generated automatically by configure.
7082# Run this file to recreate the current configuration.
7083# This directory was configured as follows,
7084# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7085#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007086# $0 $ac_configure_args
7087#
7088# Compiler output produced by configure, useful for debugging
7089# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007090
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007091ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007092for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00007093do
Guido van Rossum7f43da71994-08-01 12:15:30 +00007094 case "\$ac_option" in
7095 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007096 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7097 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00007098 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007099 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007100 exit 0 ;;
7101 -help | --help | --hel | --he | --h)
7102 echo "\$ac_cs_usage"; exit 0 ;;
7103 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00007104 esac
7105done
7106
Guido van Rossum7f43da71994-08-01 12:15:30 +00007107ac_given_srcdir=$srcdir
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007108ac_given_INSTALL="$INSTALL"
Guido van Rossum627b2d71993-12-24 10:39:16 +00007109
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007110trap 'rm -fr `echo "Makefile.pre Modules/Setup.config pyconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007111EOF
7112cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007113
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007114# Protect against being on the right side of a sed subst in config.status.
7115sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7116 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007117$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00007118$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007119s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007120s%@CFLAGS@%$CFLAGS%g
7121s%@CPPFLAGS@%$CPPFLAGS%g
7122s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007123s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007124s%@DEFS@%$DEFS%g
7125s%@LDFLAGS@%$LDFLAGS%g
7126s%@LIBS@%$LIBS%g
7127s%@exec_prefix@%$exec_prefix%g
7128s%@prefix@%$prefix%g
7129s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007130s%@bindir@%$bindir%g
7131s%@sbindir@%$sbindir%g
7132s%@libexecdir@%$libexecdir%g
7133s%@datadir@%$datadir%g
7134s%@sysconfdir@%$sysconfdir%g
7135s%@sharedstatedir@%$sharedstatedir%g
7136s%@localstatedir@%$localstatedir%g
7137s%@libdir@%$libdir%g
7138s%@includedir@%$includedir%g
7139s%@oldincludedir@%$oldincludedir%g
7140s%@infodir@%$infodir%g
7141s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00007142s%@VERSION@%$VERSION%g
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00007143s%@CONFIG_ARGS@%$CONFIG_ARGS%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00007144s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00007145s%@SGI_ABI@%$SGI_ABI%g
Martin v. Löwis22352952000-12-13 17:37:02 +00007146s%@CXX@%$CXX%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007147s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007148s%@CC@%$CC%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007149s%@EXEEXT@%$EXEEXT%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007150s%@LIBRARY@%$LIBRARY%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007151s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007152s%@DLLLIBRARY@%$DLLLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00007153s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007154s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007155s%@AR@%$AR%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007156s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007157s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007158s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007159s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00007160s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007161s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007162s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007163s%@SO@%$SO%g
7164s%@LDSHARED@%$LDSHARED%g
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007165s%@BLDSHARED@%$BLDSHARED%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007166s%@CCSHARED@%$CCSHARED%g
7167s%@LINKFORSHARED@%$LINKFORSHARED%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007168s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007169s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7170s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
Guido van Rossum009f7871997-12-04 00:51:42 +00007171s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00007172s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00007173s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007174s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00007175s%@DYNLOADFILE@%$DYNLOADFILE%g
Neil Schemenauer4e425612001-06-19 15:44:15 +00007176s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007177s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007178s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7179s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7180s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00007181s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007182s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007183s%@LIBM@%$LIBM%g
7184s%@LIBC@%$LIBC%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007185s%@SRCDIRS@%$SRCDIRS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007186
7187CEOF
7188EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007189
7190cat >> $CONFIG_STATUS <<\EOF
7191
7192# Split the substitutions into bite-sized pieces for seds with
7193# small command number limits, like on Digital OSF/1 and HP-UX.
7194ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7195ac_file=1 # Number of current file.
7196ac_beg=1 # First line for current file.
7197ac_end=$ac_max_sed_cmds # Line after last line for current file.
7198ac_more_lines=:
7199ac_sed_cmds=""
7200while $ac_more_lines; do
7201 if test $ac_beg -gt 1; then
7202 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7203 else
7204 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7205 fi
7206 if test ! -s conftest.s$ac_file; then
7207 ac_more_lines=false
7208 rm -f conftest.s$ac_file
7209 else
7210 if test -z "$ac_sed_cmds"; then
7211 ac_sed_cmds="sed -f conftest.s$ac_file"
7212 else
7213 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7214 fi
7215 ac_file=`expr $ac_file + 1`
7216 ac_beg=$ac_end
7217 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7218 fi
7219done
7220if test -z "$ac_sed_cmds"; then
7221 ac_sed_cmds=cat
7222fi
7223EOF
7224
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007225cat >> $CONFIG_STATUS <<EOF
7226
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007227CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007228EOF
7229cat >> $CONFIG_STATUS <<\EOF
7230for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007231 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007232 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007233 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007234 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7235 *) ac_file_in="${ac_file}.in" ;;
7236 esac
7237
Guido van Rossumf78abae1997-01-21 22:02:36 +00007238 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007239
7240 # Remove last slash and all that follows it. Not all systems have dirname.
7241 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7242 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7243 # The file is in a subdirectory.
7244 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007245 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007246 # A "../" for each directory in $ac_dir_suffix.
7247 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7248 else
7249 ac_dir_suffix= ac_dots=
7250 fi
7251
7252 case "$ac_given_srcdir" in
7253 .) srcdir=.
7254 if test -z "$ac_dots"; then top_srcdir=.
7255 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7256 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7257 *) # Relative path.
7258 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7259 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7260 esac
7261
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007262 case "$ac_given_INSTALL" in
7263 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7264 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7265 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007266
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007267 echo creating "$ac_file"
7268 rm -f "$ac_file"
7269 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7270 case "$ac_file" in
7271 *Makefile*) ac_comsub="1i\\
7272# $configure_input" ;;
7273 *) ac_comsub= ;;
7274 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007275
7276 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 +00007277 sed -e "$ac_comsub
7278s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007279s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007280s%@top_srcdir@%$top_srcdir%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007281s%@INSTALL@%$INSTALL%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00007282" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00007283fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00007284rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007285
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007286# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7287# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007288#
7289# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007290ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7291ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007292ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007293ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007294# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007295ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7296ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007297ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007298ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007299# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007300ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7301ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007302ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007303ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007304
Guido van Rossumf78abae1997-01-21 22:02:36 +00007305if test "${CONFIG_HEADERS+set}" != set; then
7306EOF
7307cat >> $CONFIG_STATUS <<EOF
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007308 CONFIG_HEADERS="pyconfig.h"
Guido van Rossumf78abae1997-01-21 22:02:36 +00007309EOF
7310cat >> $CONFIG_STATUS <<\EOF
7311fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007312for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007313 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007314 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007315 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007316 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7317 *) ac_file_in="${ac_file}.in" ;;
7318 esac
7319
Guido van Rossum7f43da71994-08-01 12:15:30 +00007320 echo creating $ac_file
7321
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007322 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00007323 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7324 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007325
7326EOF
7327
7328# Transform confdefs.h into a sed script conftest.vals that substitutes
7329# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007330# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007331# Protect against being in an unquoted here document in config.status.
7332rm -f conftest.vals
7333cat > conftest.hdr <<\EOF
7334s/[\\&%]/\\&/g
7335s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007336s%#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 +00007337s%ac_d%ac_u%gp
7338s%ac_u%ac_e%gp
7339EOF
7340sed -n -f conftest.hdr confdefs.h > conftest.vals
7341rm -f conftest.hdr
7342
7343# This sed command replaces #undef with comments. This is necessary, for
7344# example, in the case of _POSIX_SOURCE, which is predefined and required
7345# on some systems where configure will not decide to define it.
7346cat >> conftest.vals <<\EOF
7347s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7348EOF
7349
7350# Break up conftest.vals because some shells have a limit on
7351# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007352
7353rm -f conftest.tail
7354while :
7355do
7356 ac_lines=`grep -c . conftest.vals`
7357 # grep -c gives empty output for an empty file on some AIX systems.
7358 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7359 # Write a limited-size here document to conftest.frag.
7360 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7361 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7362 echo 'CEOF
7363 sed -f conftest.frag conftest.in > conftest.out
7364 rm -f conftest.in
7365 mv conftest.out conftest.in
7366' >> $CONFIG_STATUS
7367 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7368 rm -f conftest.vals
7369 mv conftest.tail conftest.vals
7370done
7371rm -f conftest.vals
7372
7373cat >> $CONFIG_STATUS <<\EOF
7374 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00007375 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007376 cat conftest.in >> conftest.h
7377 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00007378 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00007379 echo "$ac_file is unchanged"
7380 rm -f conftest.h
7381 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007382 # Remove last slash and all that follows it. Not all systems have dirname.
7383 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7384 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7385 # The file is in a subdirectory.
7386 test ! -d "$ac_dir" && mkdir "$ac_dir"
7387 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00007388 rm -f $ac_file
7389 mv conftest.h $ac_file
7390 fi
7391fi; done
7392
Guido van Rossumf78abae1997-01-21 22:02:36 +00007393EOF
7394cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007395
Guido van Rossumf78abae1997-01-21 22:02:36 +00007396EOF
7397cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007398
7399exit 0
7400EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007401chmod +x $CONFIG_STATUS
7402rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007403test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00007404
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007405
7406echo "creating Setup"
7407if test ! -f Modules/Setup
7408then
7409 cp $srcdir/Modules/Setup.dist Modules/Setup
7410fi
7411
7412echo "creating Setup.local"
7413if test ! -f Modules/Setup.local
7414then
7415 echo "# Edit this file for local setup changes" >Modules/Setup.local
7416fi
7417
7418echo "creating Makefile"
7419$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
7420 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00007421 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007422mv config.c Modules