blob: e5eca78c81bd728a87d2e4ccb0d423501bee9c81 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003# From configure.in Revision: 1.227
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`
Guido van Rossum2242f2f2001-04-11 20:58:20 +0000639 if test "$ac_sys_system" = "AIX" -o \
640 "$ac_sys_system" = "Monterey64" -o \
641 "$ac_sys_system" = "UnixWare"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000642 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000643 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000644 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000645 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000646 ac_md_system=`echo $ac_sys_system |
647 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
648 ac_md_release=`echo $ac_sys_release |
649 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000650 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000651
Guido van Rossum07397971997-04-29 21:49:50 +0000652 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000653 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000654 esac
655fi
Guido van Rossum91922671997-10-09 20:24:13 +0000656
657#
658# SGI compilers allow the specification of the both the ABI and the
659# ISA on the command line. Depending on the values of these switches,
660# different and often incompatable code will be generated.
661#
662# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
663# thus supply support for various ABI/ISA combinations. The MACHDEP
664# variable is also adjusted.
665#
666
667if test ! -z "$SGI_ABI"
668then
669 CC="cc $SGI_ABI"
670 LDFLAGS="$SGI_ABI $LDFLAGS"
671 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
672fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000673echo "$ac_t""$MACHDEP" 1>&6
674
Guido van Rossum627b2d71993-12-24 10:39:16 +0000675# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000676echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000677echo "configure:678: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000678# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000679if test "${with_gcc+set}" = set; then
680 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000681
682 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000683 no) CC=cc
684 without_gcc=yes;;
685 yes) CC=gcc
686 without_gcc=no;;
687 *) CC=$withval
688 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000689 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000690else
Guido van Rossume77438c1995-09-13 18:59:59 +0000691
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000692 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000693 OSF1) CC=cc
694 without_gcc=;;
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000695 AIX*) CC=cc_r
696 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000697 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000698 case $BE_HOST_CPU in
699 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000700 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000701 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000702 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 +0000703 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000704 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000705 ;;
706 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000707 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000708 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000709 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000710 ;;
711 *)
Fred Drake5790be12000-10-09 17:06:13 +0000712 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000713 ;;
714 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000715 AR="\$(srcdir)/Modules/ar_beos"
716 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000717 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000718 Monterey*)
719 RANLIB=:
Guido van Rossum2242f2f2001-04-11 20:58:20 +0000720 without_gcc=
721 ;;
722 UnixWare*)
723 RANLIB=:
724 without_gcc=
725 ;;
726 *)
727 without_gcc=no
728 ;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000729 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000730fi
731
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000732echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000733
Guido van Rossum95012191999-12-16 17:50:52 +0000734
735
Fred Drakea1a84e72001-03-06 05:52:16 +0000736MAINOBJ=python.o
Guido van Rossum95012191999-12-16 17:50:52 +0000737echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000738echo "configure:739: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000739# Check whether --with-cxx or --without-cxx was given.
740if test "${with_cxx+set}" = set; then
741 withval="$with_cxx"
742
Martin v. Löwis22352952000-12-13 17:37:02 +0000743 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000744 case $withval in
745 no) CXX=
746 with_cxx=no;;
747 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +0000748 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +0000749 with_cxx=$withval;;
750 esac
751else
752
753 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000754 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000755
756fi
757
758echo "$ac_t""$with_cxx" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000759
760
761if test "$check_cxx" = "yes"
762then
763 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
764do
765# Extract the first word of "$ac_prog", so it can be a program name with args.
766set dummy $ac_prog; ac_word=$2
767echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000768echo "configure:769: checking for $ac_word" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000769if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
770 echo $ac_n "(cached) $ac_c" 1>&6
771else
772 if test -n "$CXX"; then
773 ac_cv_prog_CXX="$CXX" # Let the user override the test.
774else
775 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
776 ac_dummy="$PATH"
777 for ac_dir in $ac_dummy; do
778 test -z "$ac_dir" && ac_dir=.
779 if test -f $ac_dir/$ac_word; then
780 ac_cv_prog_CXX="$ac_prog"
781 break
782 fi
783 done
784 IFS="$ac_save_ifs"
785fi
786fi
787CXX="$ac_cv_prog_CXX"
788if test -n "$CXX"; then
789 echo "$ac_t""$CXX" 1>&6
790else
791 echo "$ac_t""no" 1>&6
792fi
793
794test -n "$CXX" && break
795done
796test -n "$CXX" || CXX="notfound"
797
798 if test "$CXX" = "notfound"
799 then
800 CXX=
801 else
802 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000803echo "configure:804: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000804
805ac_ext=C
806# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
807ac_cpp='$CXXCPP $CPPFLAGS'
808ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
809ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
810cross_compiling=$ac_cv_prog_cxx_cross
811
812cat > conftest.$ac_ext << EOF
813
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000814#line 815 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000815#include "confdefs.h"
816
817int main(){return(0);}
818EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000819if { (eval echo configure:820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis22352952000-12-13 17:37:02 +0000820 ac_cv_prog_cxx_works=yes
821 # If we can't run a trivial program, we are probably using a cross compiler.
822 if (./conftest; exit) 2>/dev/null; then
823 ac_cv_prog_cxx_cross=no
824 else
825 ac_cv_prog_cxx_cross=yes
826 fi
827else
828 echo "configure: failed program was:" >&5
829 cat conftest.$ac_ext >&5
830 ac_cv_prog_cxx_works=no
831fi
832rm -fr conftest*
833ac_ext=c
834# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
835ac_cpp='$CPP $CPPFLAGS'
836ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
837ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
838cross_compiling=$ac_cv_prog_cc_cross
839
840echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
841if test $ac_cv_prog_cxx_works = no; then
842 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
843fi
844echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000845echo "configure:846: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000846echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
847cross_compiling=$ac_cv_prog_cxx_cross
848
849 fi
850fi
851
Guido van Rossum8b131c51995-03-09 14:10:13 +0000852# If the user switches compilers, we can't believe the cache
853if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
854then
855 { echo "configure: error: cached CC is different -- throw away $cache_file
856(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
857fi
858
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859# Extract the first word of "gcc", so it can be a program name with args.
860set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000861echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000862echo "configure:863: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000863if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000864 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865else
866 if test -n "$CC"; then
867 ac_cv_prog_CC="$CC" # Let the user override the test.
868else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000869 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
870 ac_dummy="$PATH"
871 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872 test -z "$ac_dir" && ac_dir=.
873 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000875 break
876 fi
877 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000879fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880fi
881CC="$ac_cv_prog_CC"
882if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000883 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000884else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000885 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000886fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000887
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888if test -z "$CC"; then
889 # Extract the first word of "cc", so it can be a program name with args.
890set dummy cc; ac_word=$2
891echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000892echo "configure:893: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000893if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894 echo $ac_n "(cached) $ac_c" 1>&6
895else
896 if test -n "$CC"; then
897 ac_cv_prog_CC="$CC" # Let the user override the test.
898else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000899 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000901 ac_dummy="$PATH"
902 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000903 test -z "$ac_dir" && ac_dir=.
904 if test -f $ac_dir/$ac_word; then
905 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
906 ac_prog_rejected=yes
907 continue
908 fi
909 ac_cv_prog_CC="cc"
910 break
911 fi
912 done
913 IFS="$ac_save_ifs"
914if test $ac_prog_rejected = yes; then
915 # We found a bogon in the path, so make sure we never use it.
916 set dummy $ac_cv_prog_CC
917 shift
918 if test $# -gt 0; then
919 # We chose a different compiler from the bogus one.
920 # However, it has the same basename, so the bogon will be chosen
921 # first if we set CC to just the basename; use the full file name.
922 shift
923 set dummy "$ac_dir/$ac_word" "$@"
924 shift
925 ac_cv_prog_CC="$@"
926 fi
927fi
928fi
929fi
930CC="$ac_cv_prog_CC"
931if test -n "$CC"; then
932 echo "$ac_t""$CC" 1>&6
933else
934 echo "$ac_t""no" 1>&6
935fi
936
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000937 if test -z "$CC"; then
938 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000939 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000940 # Extract the first word of "cl", so it can be a program name with args.
941set dummy cl; ac_word=$2
942echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000943echo "configure:944: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000944if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000945 echo $ac_n "(cached) $ac_c" 1>&6
946else
947 if test -n "$CC"; then
948 ac_cv_prog_CC="$CC" # Let the user override the test.
949else
950 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
951 ac_dummy="$PATH"
952 for ac_dir in $ac_dummy; do
953 test -z "$ac_dir" && ac_dir=.
954 if test -f $ac_dir/$ac_word; then
955 ac_cv_prog_CC="cl"
956 break
957 fi
958 done
959 IFS="$ac_save_ifs"
960fi
961fi
962CC="$ac_cv_prog_CC"
963if test -n "$CC"; then
964 echo "$ac_t""$CC" 1>&6
965else
966 echo "$ac_t""no" 1>&6
967fi
968 ;;
969 esac
970 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000971 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
972fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000973
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000974echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000975echo "configure:976: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000976
977ac_ext=c
978# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
979ac_cpp='$CPP $CPPFLAGS'
980ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000981ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000982cross_compiling=$ac_cv_prog_cc_cross
983
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000984cat > conftest.$ac_ext << EOF
985
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000986#line 987 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000987#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000988
Guido van Rossumf78abae1997-01-21 22:02:36 +0000989main(){return(0);}
990EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000991if { (eval echo configure:992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000992 ac_cv_prog_cc_works=yes
993 # If we can't run a trivial program, we are probably using a cross compiler.
994 if (./conftest; exit) 2>/dev/null; then
995 ac_cv_prog_cc_cross=no
996 else
997 ac_cv_prog_cc_cross=yes
998 fi
999else
1000 echo "configure: failed program was:" >&5
1001 cat conftest.$ac_ext >&5
1002 ac_cv_prog_cc_works=no
1003fi
1004rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001005ac_ext=c
1006# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1007ac_cpp='$CPP $CPPFLAGS'
1008ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1009ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1010cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +00001011
1012echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1013if test $ac_cv_prog_cc_works = no; then
1014 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1015fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001016echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001017echo "configure:1018: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001018echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1019cross_compiling=$ac_cv_prog_cc_cross
1020
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001021echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001022echo "configure:1023: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001023if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001024 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001025else
1026 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001027#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001028 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001029#endif
1030EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001031if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001032 ac_cv_prog_gcc=yes
1033else
1034 ac_cv_prog_gcc=no
1035fi
1036fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001038echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040if test $ac_cv_prog_gcc = yes; then
1041 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001042else
1043 GCC=
1044fi
1045
1046ac_test_CFLAGS="${CFLAGS+set}"
1047ac_save_CFLAGS="$CFLAGS"
1048CFLAGS=
1049echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001050echo "configure:1051: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001051if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001052 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001053else
1054 echo 'void f(){}' > conftest.c
1055if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001056 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001057else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001058 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001059fi
1060rm -f conftest*
1061
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001062fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
Guido van Rossumf78abae1997-01-21 22:02:36 +00001064echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001065if test "$ac_test_CFLAGS" = set; then
1066 CFLAGS="$ac_save_CFLAGS"
1067elif test $ac_cv_prog_cc_g = yes; then
1068 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001069 CFLAGS="-g -O2"
1070 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001071 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001072 fi
1073else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001074 if test "$GCC" = yes; then
1075 CFLAGS="-O2"
1076 else
1077 CFLAGS=
1078 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079fi
1080
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001081echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001082echo "configure:1083: checking for Cygwin environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001083if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1084 echo $ac_n "(cached) $ac_c" 1>&6
1085else
1086 cat > conftest.$ac_ext <<EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001087#line 1088 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001088#include "confdefs.h"
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001089
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001090int main() {
1091
1092#ifndef __CYGWIN__
1093#define __CYGWIN__ __CYGWIN32__
1094#endif
1095return __CYGWIN__;
1096; return 0; }
1097EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001098if { (eval echo configure:1099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001099 rm -rf conftest*
1100 ac_cv_cygwin=yes
1101else
1102 echo "configure: failed program was:" >&5
1103 cat conftest.$ac_ext >&5
1104 rm -rf conftest*
1105 ac_cv_cygwin=no
1106fi
1107rm -f conftest*
1108rm -f conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001109fi
1110
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001111echo "$ac_t""$ac_cv_cygwin" 1>&6
1112CYGWIN=
1113test "$ac_cv_cygwin" = yes && CYGWIN=yes
1114echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001115echo "configure:1116: checking for mingw32 environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001116if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1117 echo $ac_n "(cached) $ac_c" 1>&6
1118else
1119 cat > conftest.$ac_ext <<EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001120#line 1121 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001121#include "confdefs.h"
1122
1123int main() {
1124return __MINGW32__;
1125; return 0; }
1126EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001127if { (eval echo configure:1128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001128 rm -rf conftest*
1129 ac_cv_mingw32=yes
1130else
1131 echo "configure: failed program was:" >&5
1132 cat conftest.$ac_ext >&5
1133 rm -rf conftest*
1134 ac_cv_mingw32=no
1135fi
1136rm -f conftest*
1137rm -f conftest*
1138fi
1139
1140echo "$ac_t""$ac_cv_mingw32" 1>&6
1141MINGW32=
1142test "$ac_cv_mingw32" = yes && MINGW32=yes
1143
1144
1145echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001146echo "configure:1147: checking for executable suffix" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001147if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1148 echo $ac_n "(cached) $ac_c" 1>&6
1149else
1150 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1151 ac_cv_exeext=.exe
1152else
1153 rm -f conftest*
1154 echo 'int main () { return 0; }' > conftest.$ac_ext
1155 ac_cv_exeext=
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001156 if { (eval echo configure:1157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001157 for file in conftest.*; do
1158 case $file in
1159 *.c | *.o | *.obj) ;;
1160 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1161 esac
1162 done
1163 else
1164 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1165 fi
1166 rm -f conftest*
1167 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1168fi
1169fi
1170
1171EXEEXT=""
1172test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1173echo "$ac_t""${ac_cv_exeext}" 1>&6
1174ac_exeext=$EXEEXT
1175
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001176echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001177echo "configure:1178: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001178# Check whether --with-suffix or --without-suffix was given.
1179if test "${with_suffix+set}" = set; then
1180 withval="$with_suffix"
1181
1182 case $withval in
1183 no) EXEEXT=;;
1184 yes) EXEEXT=.exe;;
1185 *) EXEEXT=$withval;;
1186 esac
1187fi
1188
1189echo "$ac_t""$EXEEXT" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001190
Guido van Rossumdd997f71998-10-07 19:58:26 +00001191case $MACHDEP in
1192bsdos*)
1193 case $CC in
1194 gcc) CC="$CC -D_HAVE_BSDI";;
1195 esac;;
1196esac
1197
Guido van Rossum24b1e751997-08-21 02:29:16 +00001198case $ac_sys_system in
1199hp*|HP*)
1200 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001201 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001202 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001203Monterey*)
1204 case $CC in
1205 cc) CC="$CC -Wl,-Bexport";;
1206 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001207SunOS*)
1208 # Some functions have a prototype only with that define, e.g. confstr
1209 cat >> confdefs.h <<\EOF
1210#define __EXTENSIONS__ 1
1211EOF
1212
1213 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001214esac
1215
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001216
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001217
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001218echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001219echo "configure:1220: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001220if test -z "$LIBRARY"
1221then
1222 LIBRARY='libpython$(VERSION).a'
1223fi
1224echo "$ac_t""$LIBRARY" 1>&6
1225
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001226# LDLIBRARY is the name of the library to link against (as opposed to the
1227# name of the library into which to insert object files). On systems
1228# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
Guido van Rossumaef734b2001-01-10 21:09:12 +00001229# the Makefiles). On Cygwin LDLIBRARY is the import library, DLLLIBRARY is the
1230# shared (i.e., DLL) library.
1231
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001232
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001233LDLIBRARY="$LIBRARY"
Guido van Rossumca563f22001-01-23 01:52:44 +00001234DLLLIBRARY=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001235
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001236# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001237# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001238# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001239
1240echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001241echo "configure:1242: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001242if test -z "$LINKCC"
1243then
1244 case $ac_sys_system in
1245 AIX*)
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001246 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001247 dgux*)
1248 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001249 Monterey64*)
1250 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001251 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001252 esac
1253fi
1254echo "$ac_t""$LINKCC" 1>&6
1255
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001256echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001257echo "configure:1258: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001258
1259# NeXT framework builds require that the 'ar' library be converted into
1260# a bundle using libtool.
1261if test "$with_next_framework"
1262then
1263 LDLIBRARY='libpython$(VERSION).dylib'
1264fi
1265
1266# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001267case $MACHDEP in
1268dguxR4)
1269 LDLIBRARY='libpython$(VERSION).so'
1270 OPT="$OPT -pic"
1271 ;;
1272beos*)
1273 LDLIBRARY='libpython$(VERSION).so'
1274 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001275cygwin*)
1276 LDLIBRARY='libpython$(VERSION).dll.a'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001277 DLLLIBRARY='libpython$(VERSION).dll'
Guido van Rossumaef734b2001-01-10 21:09:12 +00001278 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001279unixware*)
1280 LDLIBRARY='libpython$(VERSION).so'
1281 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001282esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001283echo "$ac_t""$LDLIBRARY" 1>&6
1284
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001285# Extract the first word of "ranlib", so it can be a program name with args.
1286set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001287echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001288echo "configure:1289: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001289if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001290 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001291else
1292 if test -n "$RANLIB"; then
1293 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1294else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001295 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1296 ac_dummy="$PATH"
1297 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001298 test -z "$ac_dir" && ac_dir=.
1299 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001300 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301 break
1302 fi
1303 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001304 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001307fi
1308RANLIB="$ac_cv_prog_RANLIB"
1309if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001310 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001311else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001312 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001313fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314
1315
Guido van Rossum7f43da71994-08-01 12:15:30 +00001316for ac_prog in ar aal
1317do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001318# Extract the first word of "$ac_prog", so it can be a program name with args.
1319set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001320echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001321echo "configure:1322: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001322if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001323 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001324else
1325 if test -n "$AR"; then
1326 ac_cv_prog_AR="$AR" # Let the user override the test.
1327else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001328 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1329 ac_dummy="$PATH"
1330 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001331 test -z "$ac_dir" && ac_dir=.
1332 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001333 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001334 break
1335 fi
1336 done
1337 IFS="$ac_save_ifs"
1338fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001339fi
1340AR="$ac_cv_prog_AR"
1341if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001342 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001343else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001344 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001345fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001346
1347test -n "$AR" && break
1348done
1349test -n "$AR" || AR="ar"
1350
Neil Schemenauera42c8272001-03-31 00:01:55 +00001351
1352case $MACHDEP in
1353bsdos*)
1354 # install -d does not work on BSDI
1355 if test -z "$INSTALL"
1356 then
1357 INSTALL="${srcdir}/install-sh -c"
1358 fi
1359esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001360ac_aux_dir=
1361for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1362 if test -f $ac_dir/install-sh; then
1363 ac_aux_dir=$ac_dir
1364 ac_install_sh="$ac_aux_dir/install-sh -c"
1365 break
1366 elif test -f $ac_dir/install.sh; then
1367 ac_aux_dir=$ac_dir
1368 ac_install_sh="$ac_aux_dir/install.sh -c"
1369 break
1370 fi
1371done
1372if test -z "$ac_aux_dir"; then
1373 { 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 +00001374fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001375ac_config_guess=$ac_aux_dir/config.guess
1376ac_config_sub=$ac_aux_dir/config.sub
1377ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1378
1379# Find a good install program. We prefer a C program (faster),
1380# so one script is as good as another. But avoid the broken or
1381# incompatible versions:
1382# SysV /etc/install, /usr/sbin/install
1383# SunOS /usr/etc/install
1384# IRIX /sbin/install
1385# AIX /bin/install
1386# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1387# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1388# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1389# ./install, which can be erroneously created by make from ./install.sh.
1390echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00001391echo "configure:1392: checking for a BSD compatible install" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001392if test -z "$INSTALL"; then
1393if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1394 echo $ac_n "(cached) $ac_c" 1>&6
1395else
1396 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1397 for ac_dir in $PATH; do
1398 # Account for people who put trailing slashes in PATH elements.
1399 case "$ac_dir/" in
1400 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1401 *)
1402 # OSF1 and SCO ODT 3.0 have their own names for install.
1403 # Don't use installbsd from OSF since it installs stuff as root
1404 # by default.
1405 for ac_prog in ginstall scoinst install; do
1406 if test -f $ac_dir/$ac_prog; then
1407 if test $ac_prog = install &&
1408 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1409 # AIX install. It has an incompatible calling convention.
1410 :
1411 else
1412 ac_cv_path_install="$ac_dir/$ac_prog -c"
1413 break 2
1414 fi
1415 fi
1416 done
1417 ;;
1418 esac
1419 done
1420 IFS="$ac_save_IFS"
1421
1422fi
1423 if test "${ac_cv_path_install+set}" = set; then
1424 INSTALL="$ac_cv_path_install"
1425 else
1426 # As a last resort, use the slow shell script. We don't cache a
1427 # path for INSTALL within a source directory, because that will
1428 # break other packages using the cache if that directory is
1429 # removed, or if the path is relative.
1430 INSTALL="$ac_install_sh"
1431 fi
1432fi
1433echo "$ac_t""$INSTALL" 1>&6
1434
1435# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1436# It thinks the first close brace ends the variable substitution.
1437test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1438
1439test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1440
1441test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1442
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001443
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001444# Not every filesystem supports hard links
1445
1446if test -z "$LN" ; then
1447 case $ac_sys_system in
1448 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001449 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001450 *) LN=ln;;
1451 esac
1452fi
1453
Fred Drake109d9862001-07-11 06:27:56 +00001454# Check for --with-pydebug
1455echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
1456echo "configure:1457: checking for --with-pydebug" >&5
1457# Check whether --with-pydebug or --without-pydebug was given.
1458if test "${with_pydebug+set}" = set; then
1459 withval="$with_pydebug"
1460
1461if test "$withval" != no
1462then cat >> confdefs.h <<\EOF
1463#define Py_DEBUG 1
1464EOF
1465 echo "$ac_t""yes" 1>&6; Py_DEBUG='true'
1466else echo "$ac_t""no" 1>&6; Py_DEBUG='false'
1467fi
1468else
1469 echo "$ac_t""no" 1>&6
1470fi
1471
1472
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001473# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001474
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001475if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001476then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001477 case $GCC in
1478 yes)
1479 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001480 yes)
Fred Drake109d9862001-07-11 06:27:56 +00001481 if test "$Py_DEBUG" = 'true' ; then
1482 # Optimization messes up debuggers, so turn it off for
1483 # debug builds.
1484 OPT="-g -Wall -Wstrict-prototypes"
1485 else
1486 OPT="-g -O3 -Wall -Wstrict-prototypes"
1487 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001488 *)
Fred Drake109d9862001-07-11 06:27:56 +00001489 OPT="-O3 -Wall -Wstrict-prototypes";;
1490 esac
1491 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001492 *)
1493 case $ac_sys_system in
1494 UnixWare*)
1495 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1496 *)
1497 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001498 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001499 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001500fi
1501
Trent Mick635f6fb2000-08-23 21:33:05 +00001502# The current (beta) Monterey compiler dies with optimizations
1503case $ac_sys_system in
1504Monterey*) OPT="";;
1505esac
1506
Guido van Rossum563e7081996-09-10 18:20:48 +00001507if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001508then
1509 OPT="$OPT $ac_arch_flags"
1510fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001511# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001512echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00001513echo "configure:1514: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001514# On Suns, sometimes $CPP names a directory.
1515if test -n "$CPP" && test -d "$CPP"; then
1516 CPP=
1517fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001518if test -z "$CPP"; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001519if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001520 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001521else
1522 # This must be in double quotes, not single quotes, because CPP may get
1523 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001524 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001525 # On the NeXT, cc -E runs the code through the compiler's parser,
1526 # not just through cpp.
1527 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00001528#line 1529 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001529#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001530#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001531Syntax Error
1532EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001533ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake109d9862001-07-11 06:27:56 +00001534{ (eval echo configure:1535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001535ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1536if test -z "$ac_err"; then
1537 :
1538else
1539 echo "$ac_err" >&5
1540 echo "configure: failed program was:" >&5
1541 cat conftest.$ac_ext >&5
1542 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001543 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001544 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00001545#line 1546 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001546#include "confdefs.h"
1547#include <assert.h>
1548Syntax Error
1549EOF
1550ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake109d9862001-07-11 06:27:56 +00001551{ (eval echo configure:1552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001552ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001553if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001554 :
1555else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001556 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001557 echo "configure: failed program was:" >&5
1558 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001559 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001560 CPP="${CC-cc} -nologo -E"
1561 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00001562#line 1563 "configure"
Guido van Rossumff555e32000-09-22 15:38:21 +00001563#include "confdefs.h"
1564#include <assert.h>
1565Syntax Error
1566EOF
1567ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake109d9862001-07-11 06:27:56 +00001568{ (eval echo configure:1569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumff555e32000-09-22 15:38:21 +00001569ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1570if test -z "$ac_err"; then
1571 :
1572else
1573 echo "$ac_err" >&5
1574 echo "configure: failed program was:" >&5
1575 cat conftest.$ac_ext >&5
1576 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001577 CPP=/lib/cpp
1578fi
1579rm -f conftest*
1580fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001581rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001582fi
1583rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001584 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001585fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001586 CPP="$ac_cv_prog_CPP"
1587else
1588 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001589fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001590echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001591
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001592echo $ac_n "checking for AIX""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00001593echo "configure:1594: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001594cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00001595#line 1596 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001596#include "confdefs.h"
1597#ifdef _AIX
1598 yes
1599#endif
1600
1601EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001602if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1603 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001604 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001605 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001606#define _ALL_SOURCE 1
1607EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001608
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001609else
1610 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001611 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001612fi
1613rm -f conftest*
1614
1615
Guido van Rossumf78abae1997-01-21 22:02:36 +00001616ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001617echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00001618echo "configure:1619: checking for minix/config.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001619if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001620 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001621else
1622 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00001623#line 1624 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001624#include "confdefs.h"
1625#include <minix/config.h>
1626EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001627ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake109d9862001-07-11 06:27:56 +00001628{ (eval echo configure:1629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001629ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001630if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001631 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001632 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001633else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001634 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001635 echo "configure: failed program was:" >&5
1636 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001637 rm -rf conftest*
1638 eval "ac_cv_header_$ac_safe=no"
1639fi
1640rm -f conftest*
1641fi
1642if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001643 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001644 MINIX=yes
1645else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001646 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001647MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001648fi
1649
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001650if test "$MINIX" = yes; then
1651 cat >> confdefs.h <<\EOF
1652#define _POSIX_SOURCE 1
1653EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001654
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001655 cat >> confdefs.h <<\EOF
1656#define _POSIX_1_SOURCE 2
1657EOF
1658
1659 cat >> confdefs.h <<\EOF
1660#define _MINIX 1
1661EOF
1662
1663fi
1664
Guido van Rossumda88dad1995-01-26 00:46:29 +00001665
Guido van Rossum91922671997-10-09 20:24:13 +00001666echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00001667echo "configure:1668: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001668if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001669 echo $ac_n "(cached) $ac_c" 1>&6
1670else
1671 ac_save_cc="$CC"
1672CC="$CC -OPT:Olimit=0"
1673if test "$cross_compiling" = yes; then
1674 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1675else
1676 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00001677#line 1678 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001678#include "confdefs.h"
1679int main() { return 0; }
1680EOF
Fred Drake109d9862001-07-11 06:27:56 +00001681if { (eval echo configure:1682: \"$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 +00001682then
1683 ac_cv_opt_olimit_ok=yes
1684else
1685 echo "configure: failed program was:" >&5
1686 cat conftest.$ac_ext >&5
1687 rm -fr conftest*
1688 ac_cv_opt_olimit_ok=no
1689fi
1690rm -fr conftest*
1691fi
1692
1693CC="$ac_save_cc"
1694fi
1695
1696echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001697if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001698 case $ac_sys_system in
1699 Darwin*) OPT="$OPT" ;;
1700 *) OPT="$OPT -OPT:Olimit=0";;
1701 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001702else
1703 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00001704echo "configure:1705: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001705 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001706 echo $ac_n "(cached) $ac_c" 1>&6
1707else
1708 ac_save_cc="$CC"
1709 CC="$CC -Olimit 1500"
1710 if test "$cross_compiling" = yes; then
1711 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1712else
1713 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00001714#line 1715 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001715#include "confdefs.h"
1716int main() { return 0; }
1717EOF
Fred Drake109d9862001-07-11 06:27:56 +00001718if { (eval echo configure:1719: \"$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 +00001719then
1720 ac_cv_olimit_ok=yes
1721else
1722 echo "configure: failed program was:" >&5
1723 cat conftest.$ac_ext >&5
1724 rm -fr conftest*
1725 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001726fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001727rm -fr conftest*
1728fi
1729
1730 CC="$ac_save_cc"
1731fi
1732
1733 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1734 if test $ac_cv_olimit_ok = yes; then
1735 OPT="$OPT -Olimit 1500"
1736 fi
1737fi
1738
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001739# Check for enable-ipv6
1740OPT="$OPT -Dss_family=__ss_family -Dss_len=__ss_len"
1741echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00001742echo "configure:1743: checking whether to enable ipv6" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001743# Check whether --enable-ipv6 or --disable-ipv6 was given.
1744if test "${enable_ipv6+set}" = set; then
1745 enableval="$enable_ipv6"
1746 case "$enableval" in
1747 no)
1748 echo "$ac_t""no" 1>&6
1749 ipv6=no
1750 ;;
1751 *) echo "$ac_t""yes" 1>&6
1752 cat >> confdefs.h <<\EOF
1753#define ENABLE_IPV6 1
1754EOF
1755
1756 ipv6=yes
1757 ;;
1758 esac
1759else
1760 if test "$cross_compiling" = yes; then
1761 echo "$ac_t""no" 1>&6
1762 ipv6=no
1763
1764else
1765 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00001766#line 1767 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001767#include "confdefs.h"
Fred Drake109d9862001-07-11 06:27:56 +00001768 /* AF_INET6 available check */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001769#include <sys/types.h>
1770#include <sys/socket.h>
1771main()
1772{
1773 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
1774 exit(1);
1775 else
1776 exit(0);
1777}
1778
1779EOF
Fred Drake109d9862001-07-11 06:27:56 +00001780if { (eval echo configure:1781: \"$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 +00001781then
1782 echo "$ac_t""yes" 1>&6
1783 cat >> confdefs.h <<\EOF
1784#define ENABLE_IPV6 1
1785EOF
1786
1787 ipv6=yes
1788else
1789 echo "configure: failed program was:" >&5
1790 cat conftest.$ac_ext >&5
1791 rm -fr conftest*
1792 echo "$ac_t""no" 1>&6
1793 ipv6=no
1794fi
1795rm -fr conftest*
1796fi
1797
1798fi
1799
1800
1801ipv6type=unknown
1802ipv6lib=none
1803ipv6trylibc=no
1804
1805if test "$ipv6" = "yes"; then
1806 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00001807echo "configure:1808: checking ipv6 stack type" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001808 for i in inria kame linux-glibc linux-inet6 toshiba v6d zeta; do
1809 case $i in
1810 inria)
1811 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00001812#line 1813 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001813#include "confdefs.h"
1814dnl
1815#include <netinet/in.h>
1816#ifdef IPV6_INRIA_VERSION
1817yes
1818#endif
1819EOF
1820if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1821 egrep "yes" >/dev/null 2>&1; then
1822 rm -rf conftest*
1823 ipv6type=$i;
1824 OPT="-DINET6 $OPT"
1825fi
1826rm -f conftest*
1827
1828 ;;
1829 kame)
1830 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00001831#line 1832 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001832#include "confdefs.h"
1833dnl
1834#include <netinet/in.h>
1835#ifdef __KAME__
1836yes
1837#endif
1838EOF
1839if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1840 egrep "yes" >/dev/null 2>&1; then
1841 rm -rf conftest*
1842 ipv6type=$i;
1843 ipv6lib=inet6
1844 ipv6libdir=/usr/local/v6/lib
1845 ipv6trylibc=yes
1846 OPT="-DINET6 $OPT"
1847fi
1848rm -f conftest*
1849
1850 ;;
1851 linux-glibc)
1852 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00001853#line 1854 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001854#include "confdefs.h"
1855dnl
1856#include <features.h>
1857#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
1858yes
1859#endif
1860EOF
1861if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1862 egrep "yes" >/dev/null 2>&1; then
1863 rm -rf conftest*
1864 ipv6type=$i;
1865 ipv6trylibc=yes
1866 OPT="-DINET6 $OPT"
1867fi
1868rm -f conftest*
1869
1870 ;;
1871 linux-inet6)
1872 if test -d /usr/inet6; then
1873 ipv6type=$i
1874 ipv6lib=inet6
1875 ipv6libdir=/usr/inet6/lib
1876 OPT="-DINET6 -I/usr/inet6/include $OPT"
1877 fi
1878 ;;
1879 toshiba)
1880 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00001881#line 1882 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001882#include "confdefs.h"
1883dnl
1884#include <sys/param.h>
1885#ifdef _TOSHIBA_INET6
1886yes
1887#endif
1888EOF
1889if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1890 egrep "yes" >/dev/null 2>&1; then
1891 rm -rf conftest*
1892 ipv6type=$i;
1893 ipv6lib=inet6;
1894 ipv6libdir=/usr/local/v6/lib;
1895 OPT="-DINET6 $OPT"
1896fi
1897rm -f conftest*
1898
1899 ;;
1900 v6d)
1901 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00001902#line 1903 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001903#include "confdefs.h"
1904dnl
1905#include </usr/local/v6/include/sys/v6config.h>
1906#ifdef __V6D__
1907yes
1908#endif
1909EOF
1910if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1911 egrep "yes" >/dev/null 2>&1; then
1912 rm -rf conftest*
1913 ipv6type=$i;
1914 ipv6lib=v6;
1915 ipv6libdir=/usr/local/v6/lib;
1916 OPT="-I/usr/local/v6/include $OPT"
1917fi
1918rm -f conftest*
1919
1920 ;;
1921 zeta)
1922 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00001923#line 1924 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00001924#include "confdefs.h"
1925dnl
1926#include <sys/param.h>
1927#ifdef _ZETA_MINAMI_INET6
1928yes
1929#endif
1930EOF
1931if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1932 egrep "yes" >/dev/null 2>&1; then
1933 rm -rf conftest*
1934 ipv6type=$i;
1935 ipv6lib=inet6;
1936 ipv6libdir=/usr/local/v6/lib;
1937 OPT="-DINET6 $OPT"
1938fi
1939rm -f conftest*
1940
1941 ;;
1942 esac
1943 if test "$ipv6type" != "unknown"; then
1944 break
1945 fi
1946 done
1947 echo "$ac_t""$ipv6type" 1>&6
1948fi
1949
1950if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
1951 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
1952 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
1953 echo "using lib$ipv6lib"
1954 else
1955 if test $ipv6trylibc = "yes"; then
1956 echo "using libc"
1957 else
1958 echo 'Fatal: no $ipv6lib library found. cannot continue.'
1959 echo "You need to fetch lib$ipv6lib.a from appropriate"
1960 echo 'ipv6 kit and compile beforehand.'
1961 exit 1
1962 fi
1963 fi
1964fi
1965
Guido van Rossum84e7b241996-08-19 21:59:00 +00001966
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001967# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001968echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00001969echo "configure:1970: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001970if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001971 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001972else
1973 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00001974#line 1975 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001975#include "confdefs.h"
1976#include <stdlib.h>
1977#include <stdarg.h>
1978#include <string.h>
1979#include <float.h>
1980EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001981ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake109d9862001-07-11 06:27:56 +00001982{ (eval echo configure:1983: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001983ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001984if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001985 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001986 ac_cv_header_stdc=yes
1987else
1988 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001989 echo "configure: failed program was:" >&5
1990 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001991 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001992 ac_cv_header_stdc=no
1993fi
1994rm -f conftest*
1995
1996if test $ac_cv_header_stdc = yes; then
1997 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1998cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00001999#line 2000 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002000#include "confdefs.h"
2001#include <string.h>
2002EOF
2003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2004 egrep "memchr" >/dev/null 2>&1; then
2005 :
2006else
2007 rm -rf conftest*
2008 ac_cv_header_stdc=no
2009fi
2010rm -f conftest*
2011
2012fi
2013
2014if test $ac_cv_header_stdc = yes; then
2015 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2016cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00002017#line 2018 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002018#include "confdefs.h"
2019#include <stdlib.h>
2020EOF
2021if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2022 egrep "free" >/dev/null 2>&1; then
2023 :
2024else
2025 rm -rf conftest*
2026 ac_cv_header_stdc=no
2027fi
2028rm -f conftest*
2029
2030fi
2031
2032if test $ac_cv_header_stdc = yes; then
2033 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2034if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002035 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002036else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002037 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00002038#line 2039 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002039#include "confdefs.h"
2040#include <ctype.h>
2041#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2042#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002043#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00002044int main () { int i; for (i = 0; i < 256; i++)
2045if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2046exit (0); }
2047
2048EOF
Fred Drake109d9862001-07-11 06:27:56 +00002049if { (eval echo configure:2050: \"$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 +00002050then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002051 :
2052else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002053 echo "configure: failed program was:" >&5
2054 cat conftest.$ac_ext >&5
2055 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002056 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002057fi
2058rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002059fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002060
2061fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002062fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002063
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002064echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002065if test $ac_cv_header_stdc = yes; then
2066 cat >> confdefs.h <<\EOF
2067#define STDC_HEADERS 1
2068EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002069
2070fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002071
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00002072for 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 +00002073signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00002074sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002075sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00002076sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Thomas Wouterse38b2f12001-07-11 22:35:31 +00002077ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00002078do
Guido van Rossumf78abae1997-01-21 22:02:36 +00002079ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002080echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00002081echo "configure:2082: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002082if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002083 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002084else
2085 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00002086#line 2087 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002087#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002088#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00002089EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002090ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Fred Drake109d9862001-07-11 06:27:56 +00002091{ (eval echo configure:2092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002092ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00002093if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002094 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002095 eval "ac_cv_header_$ac_safe=yes"
2096else
2097 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002098 echo "configure: failed program was:" >&5
2099 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002100 rm -rf conftest*
2101 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002102fi
2103rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002104fi
2105if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002106 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002107 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002108 cat >> confdefs.h <<EOF
2109#define $ac_tr_hdr 1
2110EOF
2111
2112else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002113 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002114fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002115done
2116
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002117ac_header_dirent=no
2118for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2119do
Guido van Rossumf78abae1997-01-21 22:02:36 +00002120ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002121echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00002122echo "configure:2123: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002123if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002124 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002125else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002126 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00002127#line 2128 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002128#include "confdefs.h"
2129#include <sys/types.h>
2130#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002131int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002132DIR *dirp = 0;
2133; return 0; }
2134EOF
Fred Drake109d9862001-07-11 06:27:56 +00002135if { (eval echo configure:2136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002136 rm -rf conftest*
2137 eval "ac_cv_header_dirent_$ac_safe=yes"
2138else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002139 echo "configure: failed program was:" >&5
2140 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002141 rm -rf conftest*
2142 eval "ac_cv_header_dirent_$ac_safe=no"
2143fi
2144rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002145fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002146if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002147 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002148 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002149 cat >> confdefs.h <<EOF
2150#define $ac_tr_hdr 1
2151EOF
2152 ac_header_dirent=$ac_hdr; break
2153else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002154 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002155fi
2156done
2157# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2158if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002159echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00002160echo "configure:2161: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002161ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002162if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002163 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002164else
2165 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002166LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002167cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00002168#line 2169 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002169#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002170/* Override any gcc2 internal prototype to avoid an error. */
2171/* We use char because int might match the return type of a gcc2
2172 builtin and then its argument prototype would still apply. */
2173char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002174
Guido van Rossumf78abae1997-01-21 22:02:36 +00002175int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002176opendir()
2177; return 0; }
2178EOF
Fred Drake109d9862001-07-11 06:27:56 +00002179if { (eval echo configure:2180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002180 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002181 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002182else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002183 echo "configure: failed program was:" >&5
2184 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002185 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002186 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002187fi
2188rm -f conftest*
2189LIBS="$ac_save_LIBS"
2190
2191fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002192if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002193 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002194 LIBS="$LIBS -ldir"
2195else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002196 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002197fi
2198
2199else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002200echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00002201echo "configure:2202: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002202ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002203if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002204 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002205else
2206 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002207LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002208cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00002209#line 2210 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002210#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002211/* Override any gcc2 internal prototype to avoid an error. */
2212/* We use char because int might match the return type of a gcc2
2213 builtin and then its argument prototype would still apply. */
2214char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002215
Guido van Rossumf78abae1997-01-21 22:02:36 +00002216int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002217opendir()
2218; return 0; }
2219EOF
Fred Drake109d9862001-07-11 06:27:56 +00002220if { (eval echo configure:2221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002221 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002222 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002223else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002224 echo "configure: failed program was:" >&5
2225 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002226 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002227 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002228fi
2229rm -f conftest*
2230LIBS="$ac_save_LIBS"
2231
2232fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002233if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002234 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002235 LIBS="$LIBS -lx"
2236else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002237 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002238fi
2239
2240fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002241
2242
2243# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00002244was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002245echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00002246echo "configure:2247: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002247cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00002248#line 2249 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002249#include "confdefs.h"
2250#include <time.h>
2251EOF
2252if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2253 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002254 rm -rf conftest*
2255 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002256else
2257 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002258 cat >> confdefs.h <<\EOF
2259#define clock_t long
2260EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002261
2262fi
2263rm -f conftest*
2264
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002265echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002266
Guido van Rossum84e7b241996-08-19 21:59:00 +00002267# Add some code to confdefs.h so that the test for off_t works on SCO
2268cat >> confdefs.h <<\EOF
2269#if defined(SCO_DS)
2270#undef _OFF_T
2271#endif
2272EOF
2273
Guido van Rossumef2255b2000-03-10 22:30:29 +00002274# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002275echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00002276echo "configure:2277: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002277if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002278 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002279else
2280 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00002281#line 2282 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002282#include "confdefs.h"
2283#include <sys/types.h>
2284#if STDC_HEADERS
2285#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002286#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002287#endif
2288EOF
2289if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002290 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 +00002291 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002292 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002293else
2294 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002295 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002296fi
2297rm -f conftest*
2298
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002299fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002300echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2301if test $ac_cv_type_mode_t = no; then
2302 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002303#define mode_t int
2304EOF
2305
2306fi
2307
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002308echo $ac_n "checking for off_t""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00002309echo "configure:2310: checking for off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002310if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002311 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002312else
2313 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00002314#line 2315 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002315#include "confdefs.h"
2316#include <sys/types.h>
2317#if STDC_HEADERS
2318#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002319#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002320#endif
2321EOF
2322if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002323 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 +00002324 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002325 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002326else
2327 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002328 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002329fi
2330rm -f conftest*
2331
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002332fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002333echo "$ac_t""$ac_cv_type_off_t" 1>&6
2334if test $ac_cv_type_off_t = no; then
2335 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002336#define off_t long
2337EOF
2338
2339fi
2340
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002341echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00002342echo "configure:2343: checking for pid_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002343if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002344 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002345else
2346 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00002347#line 2348 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002348#include "confdefs.h"
2349#include <sys/types.h>
2350#if STDC_HEADERS
2351#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002352#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002353#endif
2354EOF
2355if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002356 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 +00002357 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002358 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002359else
2360 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002361 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002362fi
2363rm -f conftest*
2364
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002365fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002366echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2367if test $ac_cv_type_pid_t = no; then
2368 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002369#define pid_t int
2370EOF
2371
2372fi
2373
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002374echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00002375echo "configure:2376: checking return type of signal handlers" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002376if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002377 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002378else
2379 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00002380#line 2381 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002381#include "confdefs.h"
2382#include <sys/types.h>
2383#include <signal.h>
2384#ifdef signal
2385#undef signal
2386#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002387#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002388extern "C" void (*signal (int, void (*)(int)))(int);
2389#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002390void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002391#endif
2392
Guido van Rossumf78abae1997-01-21 22:02:36 +00002393int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002394int i;
2395; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002396EOF
Fred Drake109d9862001-07-11 06:27:56 +00002397if { (eval echo configure:2398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002398 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002399 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002400else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002401 echo "configure: failed program was:" >&5
2402 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002403 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002404 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002405fi
2406rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002407fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002408
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002409echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002410cat >> confdefs.h <<EOF
2411#define RETSIGTYPE $ac_cv_type_signal
2412EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002413
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002414
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002415echo $ac_n "checking for size_t""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00002416echo "configure:2417: checking for size_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002417if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002418 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002419else
2420 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00002421#line 2422 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002422#include "confdefs.h"
2423#include <sys/types.h>
2424#if STDC_HEADERS
2425#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002426#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002427#endif
2428EOF
2429if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002430 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 +00002431 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002432 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002433else
2434 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002435 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002436fi
2437rm -f conftest*
2438
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002439fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002440echo "$ac_t""$ac_cv_type_size_t" 1>&6
2441if test $ac_cv_type_size_t = no; then
2442 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002443#define size_t unsigned
2444EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002445
2446fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002447
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002448echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00002449echo "configure:2450: checking for uid_t in sys/types.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002450if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002451 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002452else
2453 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00002454#line 2455 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002455#include "confdefs.h"
2456#include <sys/types.h>
2457EOF
2458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2459 egrep "uid_t" >/dev/null 2>&1; then
2460 rm -rf conftest*
2461 ac_cv_type_uid_t=yes
2462else
2463 rm -rf conftest*
2464 ac_cv_type_uid_t=no
2465fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002466rm -f conftest*
2467
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002468fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002469
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002470echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002471if test $ac_cv_type_uid_t = no; then
2472 cat >> confdefs.h <<\EOF
2473#define uid_t int
2474EOF
2475
2476 cat >> confdefs.h <<\EOF
2477#define gid_t int
2478EOF
2479
2480fi
2481
Guido van Rossum627b2d71993-12-24 10:39:16 +00002482
Guido van Rossumef2255b2000-03-10 22:30:29 +00002483# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002484echo $ac_n "checking size of int""... $ac_c" 1>&6
Fred Drake109d9862001-07-11 06:27:56 +00002485echo "configure:2486: checking size of int" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002486if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002487 echo $ac_n "(cached) $ac_c" 1>&6
2488else
2489 if test "$cross_compiling" = yes; then
2490 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2491else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002492 cat > conftest.$ac_ext <<EOF
Fred Drake109d9862001-07-11 06:27:56 +00002493#line 2494 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002494#include "confdefs.h"
2495#include <stdio.h>
2496main()
2497{
2498 FILE *f=fopen("conftestval", "w");
2499 if (!f) exit(1);
2500 fprintf(f, "%d\n", sizeof(int));
2501 exit(0);
2502}
2503EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002504if { (eval echo configure:2505: \"$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 +00002505then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002506 ac_cv_sizeof_int=`cat conftestval`
2507else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002508 echo "configure: failed program was:" >&5
2509 cat conftest.$ac_ext >&5
2510 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002511 ac_cv_sizeof_int=0
2512fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002513rm -fr conftest*
2514fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002515
2516fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002517echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2518cat >> confdefs.h <<EOF
2519#define SIZEOF_INT $ac_cv_sizeof_int
2520EOF
2521
2522
2523echo $ac_n "checking size of long""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002524echo "configure:2525: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002525if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002526 echo $ac_n "(cached) $ac_c" 1>&6
2527else
2528 if test "$cross_compiling" = yes; then
2529 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2530else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002531 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002532#line 2533 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002533#include "confdefs.h"
2534#include <stdio.h>
2535main()
2536{
2537 FILE *f=fopen("conftestval", "w");
2538 if (!f) exit(1);
2539 fprintf(f, "%d\n", sizeof(long));
2540 exit(0);
2541}
2542EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002543if { (eval echo configure:2544: \"$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 +00002544then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002545 ac_cv_sizeof_long=`cat conftestval`
2546else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002547 echo "configure: failed program was:" >&5
2548 cat conftest.$ac_ext >&5
2549 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002550 ac_cv_sizeof_long=0
2551fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002552rm -fr conftest*
2553fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002554
2555fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002556echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2557cat >> confdefs.h <<EOF
2558#define SIZEOF_LONG $ac_cv_sizeof_long
2559EOF
2560
2561
Guido van Rossumad678af1998-10-02 14:42:15 +00002562echo $ac_n "checking size of void *""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002563echo "configure:2564: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002564if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002565 echo $ac_n "(cached) $ac_c" 1>&6
2566else
2567 if test "$cross_compiling" = yes; then
2568 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2569else
2570 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002571#line 2572 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002572#include "confdefs.h"
2573#include <stdio.h>
2574main()
2575{
2576 FILE *f=fopen("conftestval", "w");
2577 if (!f) exit(1);
2578 fprintf(f, "%d\n", sizeof(void *));
2579 exit(0);
2580}
2581EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002582if { (eval echo configure:2583: \"$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 +00002583then
2584 ac_cv_sizeof_void_p=`cat conftestval`
2585else
2586 echo "configure: failed program was:" >&5
2587 cat conftest.$ac_ext >&5
2588 rm -fr conftest*
2589 ac_cv_sizeof_void_p=0
2590fi
2591rm -fr conftest*
2592fi
2593
2594fi
2595echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2596cat >> confdefs.h <<EOF
2597#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2598EOF
2599
2600
Guido van Rossumef2255b2000-03-10 22:30:29 +00002601echo $ac_n "checking size of char""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002602echo "configure:2603: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002603if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002604 echo $ac_n "(cached) $ac_c" 1>&6
2605else
2606 if test "$cross_compiling" = yes; then
2607 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2608else
2609 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002610#line 2611 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002611#include "confdefs.h"
2612#include <stdio.h>
2613main()
2614{
2615 FILE *f=fopen("conftestval", "w");
2616 if (!f) exit(1);
2617 fprintf(f, "%d\n", sizeof(char));
2618 exit(0);
2619}
2620EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002621if { (eval echo configure:2622: \"$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 +00002622then
2623 ac_cv_sizeof_char=`cat conftestval`
2624else
2625 echo "configure: failed program was:" >&5
2626 cat conftest.$ac_ext >&5
2627 rm -fr conftest*
2628 ac_cv_sizeof_char=0
2629fi
2630rm -fr conftest*
2631fi
2632
2633fi
2634echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2635cat >> confdefs.h <<EOF
2636#define SIZEOF_CHAR $ac_cv_sizeof_char
2637EOF
2638
2639
2640echo $ac_n "checking size of short""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002641echo "configure:2642: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002642if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002643 echo $ac_n "(cached) $ac_c" 1>&6
2644else
2645 if test "$cross_compiling" = yes; then
2646 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2647else
2648 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002649#line 2650 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002650#include "confdefs.h"
2651#include <stdio.h>
2652main()
2653{
2654 FILE *f=fopen("conftestval", "w");
2655 if (!f) exit(1);
2656 fprintf(f, "%d\n", sizeof(short));
2657 exit(0);
2658}
2659EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002660if { (eval echo configure:2661: \"$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 +00002661then
2662 ac_cv_sizeof_short=`cat conftestval`
2663else
2664 echo "configure: failed program was:" >&5
2665 cat conftest.$ac_ext >&5
2666 rm -fr conftest*
2667 ac_cv_sizeof_short=0
2668fi
2669rm -fr conftest*
2670fi
2671
2672fi
2673echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2674cat >> confdefs.h <<EOF
2675#define SIZEOF_SHORT $ac_cv_sizeof_short
2676EOF
2677
2678
2679echo $ac_n "checking size of float""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002680echo "configure:2681: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002681if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002682 echo $ac_n "(cached) $ac_c" 1>&6
2683else
2684 if test "$cross_compiling" = yes; then
2685 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2686else
2687 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002688#line 2689 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002689#include "confdefs.h"
2690#include <stdio.h>
2691main()
2692{
2693 FILE *f=fopen("conftestval", "w");
2694 if (!f) exit(1);
2695 fprintf(f, "%d\n", sizeof(float));
2696 exit(0);
2697}
2698EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002699if { (eval echo configure:2700: \"$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 +00002700then
2701 ac_cv_sizeof_float=`cat conftestval`
2702else
2703 echo "configure: failed program was:" >&5
2704 cat conftest.$ac_ext >&5
2705 rm -fr conftest*
2706 ac_cv_sizeof_float=0
2707fi
2708rm -fr conftest*
2709fi
2710
2711fi
2712echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2713cat >> confdefs.h <<EOF
2714#define SIZEOF_FLOAT $ac_cv_sizeof_float
2715EOF
2716
2717
2718echo $ac_n "checking size of double""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002719echo "configure:2720: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002720if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002721 echo $ac_n "(cached) $ac_c" 1>&6
2722else
2723 if test "$cross_compiling" = yes; then
2724 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2725else
2726 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002727#line 2728 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002728#include "confdefs.h"
2729#include <stdio.h>
2730main()
2731{
2732 FILE *f=fopen("conftestval", "w");
2733 if (!f) exit(1);
2734 fprintf(f, "%d\n", sizeof(double));
2735 exit(0);
2736}
2737EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002738if { (eval echo configure:2739: \"$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 +00002739then
2740 ac_cv_sizeof_double=`cat conftestval`
2741else
2742 echo "configure: failed program was:" >&5
2743 cat conftest.$ac_ext >&5
2744 rm -fr conftest*
2745 ac_cv_sizeof_double=0
2746fi
2747rm -fr conftest*
2748fi
2749
2750fi
2751echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2752cat >> confdefs.h <<EOF
2753#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2754EOF
2755
2756
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002757echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002758echo "configure:2759: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002759if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002760 echo $ac_n "(cached) $ac_c" 1>&6
2761else
2762 if test "$cross_compiling" = yes; then
2763 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2764else
2765 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002766#line 2767 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002767#include "confdefs.h"
2768#include <stdio.h>
2769main()
2770{
2771 FILE *f=fopen("conftestval", "w");
2772 if (!f) exit(1);
2773 fprintf(f, "%d\n", sizeof(fpos_t));
2774 exit(0);
2775}
2776EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002777if { (eval echo configure:2778: \"$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 +00002778then
2779 ac_cv_sizeof_fpos_t=`cat conftestval`
2780else
2781 echo "configure: failed program was:" >&5
2782 cat conftest.$ac_ext >&5
2783 rm -fr conftest*
2784 ac_cv_sizeof_fpos_t=0
2785fi
2786rm -fr conftest*
2787fi
2788
2789fi
2790echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2791cat >> confdefs.h <<EOF
2792#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2793EOF
2794
2795
Guido van Rossum0a516c91994-09-12 10:58:40 +00002796
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002797echo $ac_n "checking for long long support""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002798echo "configure:2799: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002799have_long_long=no
2800cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002801#line 2802 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002802#include "confdefs.h"
2803
2804int main() {
2805long long x; x = (long long)0;
2806; return 0; }
2807EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002808if { (eval echo configure:2809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002809 rm -rf conftest*
2810 cat >> confdefs.h <<\EOF
2811#define HAVE_LONG_LONG 1
2812EOF
2813 have_long_long=yes
2814else
2815 echo "configure: failed program was:" >&5
2816 cat conftest.$ac_ext >&5
2817fi
2818rm -f conftest*
2819echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002820if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002821echo $ac_n "checking size of long long""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002822echo "configure:2823: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002823if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002824 echo $ac_n "(cached) $ac_c" 1>&6
2825else
2826 if test "$cross_compiling" = yes; then
2827 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2828else
2829 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002830#line 2831 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002831#include "confdefs.h"
2832#include <stdio.h>
2833main()
2834{
2835 FILE *f=fopen("conftestval", "w");
2836 if (!f) exit(1);
2837 fprintf(f, "%d\n", sizeof(long long));
2838 exit(0);
2839}
2840EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002841if { (eval echo configure:2842: \"$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 +00002842then
2843 ac_cv_sizeof_long_long=`cat conftestval`
2844else
2845 echo "configure: failed program was:" >&5
2846 cat conftest.$ac_ext >&5
2847 rm -fr conftest*
2848 ac_cv_sizeof_long_long=0
2849fi
2850rm -fr conftest*
2851fi
2852
2853fi
2854echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2855cat >> confdefs.h <<EOF
2856#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2857EOF
2858
2859
2860fi
2861
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002862echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002863echo "configure:2864: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002864have_uintptr_t=no
2865cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002866#line 2867 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002867#include "confdefs.h"
2868
2869int main() {
2870uintptr_t x; x = (uintptr_t)0;
2871; return 0; }
2872EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002873if { (eval echo configure:2874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002874 rm -rf conftest*
2875 cat >> confdefs.h <<\EOF
2876#define HAVE_UINTPTR_T 1
2877EOF
2878 have_uintptr_t=yes
2879else
2880 echo "configure: failed program was:" >&5
2881 cat conftest.$ac_ext >&5
2882fi
2883rm -f conftest*
2884echo "$ac_t""$have_uintptr_t" 1>&6
2885if test "$have_uintptr_t" = yes ; then
2886echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002887echo "configure:2888: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002888if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002889 echo $ac_n "(cached) $ac_c" 1>&6
2890else
2891 if test "$cross_compiling" = yes; then
2892 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2893else
2894 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002895#line 2896 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002896#include "confdefs.h"
2897#include <stdio.h>
2898main()
2899{
2900 FILE *f=fopen("conftestval", "w");
2901 if (!f) exit(1);
2902 fprintf(f, "%d\n", sizeof(uintptr_t));
2903 exit(0);
2904}
2905EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002906if { (eval echo configure:2907: \"$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 +00002907then
2908 ac_cv_sizeof_uintptr_t=`cat conftestval`
2909else
2910 echo "configure: failed program was:" >&5
2911 cat conftest.$ac_ext >&5
2912 rm -fr conftest*
2913 ac_cv_sizeof_uintptr_t=0
2914fi
2915rm -fr conftest*
2916fi
2917
2918fi
2919echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2920cat >> confdefs.h <<EOF
2921#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2922EOF
2923
2924
2925fi
2926
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002927# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2928echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002929echo "configure:2930: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002930if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002931 echo $ac_n "(cached) $ac_c" 1>&6
2932else
2933 if test "$cross_compiling" = yes; then
2934 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2935else
2936 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002937#line 2938 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002938#include "confdefs.h"
2939#include <stdio.h>
2940#include <sys/types.h>
2941main()
2942{
2943 FILE *f=fopen("conftestval", "w");
2944 if (!f) exit(1);
2945 fprintf(f, "%d\n", sizeof(off_t));
2946 exit(0);
2947}
2948EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002949if { (eval echo configure:2950: \"$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 +00002950then
2951 ac_cv_sizeof_off_t=`cat conftestval`
2952else
2953 echo "configure: failed program was:" >&5
2954 cat conftest.$ac_ext >&5
2955 rm -fr conftest*
2956 ac_cv_sizeof_off_t=0
2957fi
2958rm -fr conftest*
2959fi
2960
2961
2962fi
2963
2964echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2965cat >> confdefs.h <<EOF
2966#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2967EOF
2968
2969
2970echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002971echo "configure:2972: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002972if test "$have_long_long" = yes -a \
2973 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2974 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002975 cat >> confdefs.h <<\EOF
2976#define HAVE_LARGEFILE_SUPPORT 1
2977EOF
2978
2979 echo "$ac_t""yes" 1>&6
2980else
2981 echo "$ac_t""no" 1>&6
2982fi
2983
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002984# AC_CHECK_SIZEOF() doesn't include <time.h>.
2985echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002986echo "configure:2987: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002987if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002988 echo $ac_n "(cached) $ac_c" 1>&6
2989else
2990 if test "$cross_compiling" = yes; then
2991 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2992else
2993 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002994#line 2995 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002995#include "confdefs.h"
2996#include <stdio.h>
2997#include <time.h>
2998main()
2999{
3000 FILE *f=fopen("conftestval", "w");
3001 if (!f) exit(1);
3002 fprintf(f, "%d\n", sizeof(time_t));
3003 exit(0);
3004}
3005EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003006if { (eval echo configure:3007: \"$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 +00003007then
3008 ac_cv_sizeof_time_t=`cat conftestval`
3009else
3010 echo "configure: failed program was:" >&5
3011 cat conftest.$ac_ext >&5
3012 rm -fr conftest*
3013 ac_cv_sizeof_time_t=0
3014fi
3015rm -fr conftest*
3016fi
3017
3018
3019fi
3020
3021echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
3022cat >> confdefs.h <<EOF
3023#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
3024EOF
3025
3026
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003027
Trent Mick635f6fb2000-08-23 21:33:05 +00003028# if have pthread_t then define SIZEOF_PTHREAD_T
3029echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003030echo "configure:3031: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00003031have_pthread_t=no
3032cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003033#line 3034 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00003034#include "confdefs.h"
3035#include <pthread.h>
3036int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00003037pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00003038; return 0; }
3039EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003040if { (eval echo configure:3041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00003041 rm -rf conftest*
3042 have_pthread_t=yes
3043else
3044 echo "configure: failed program was:" >&5
3045 cat conftest.$ac_ext >&5
3046fi
3047rm -f conftest*
3048echo "$ac_t""$have_pthread_t" 1>&6
3049if test "$have_pthread_t" = yes ; then
3050 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
3051 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003052echo "configure:3053: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003053 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00003054 echo $ac_n "(cached) $ac_c" 1>&6
3055else
3056 if test "$cross_compiling" = yes; then
3057 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3058else
3059 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003060#line 3061 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00003061#include "confdefs.h"
3062#include <stdio.h>
3063 #include <pthread.h>
3064 main()
3065 {
3066 FILE *f=fopen("conftestval", "w");
3067 if (!f) exit(1);
3068 fprintf(f, "%d\n", sizeof(pthread_t));
3069 exit(0);
3070 }
3071EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003072if { (eval echo configure:3073: \"$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 +00003073then
3074 ac_cv_sizeof_pthread_t=`cat conftestval`
3075else
3076 echo "configure: failed program was:" >&5
3077 cat conftest.$ac_ext >&5
3078 rm -fr conftest*
3079 ac_cv_sizeof_pthread_t=0
3080fi
3081rm -fr conftest*
3082fi
3083
3084
3085fi
3086
3087 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
3088 cat >> confdefs.h <<EOF
3089#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
3090EOF
3091
3092fi
3093
3094
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003095# Minor variations in building a framework between NextStep versions 4 and 5
3096
3097case $ac_sys_system/$ac_sys_release in
Guido van Rossum5839e582000-10-09 19:52:35 +00003098 Darwin/*)
3099 ns_undef_sym='_environ'
3100 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003101 next/4*)
3102 ns_undef_sym='__environ'
3103 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
3104 next/5*)
3105 ns_undef_sym='_environ'
3106 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
3107esac
3108
3109echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003110echo "configure:3111: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003111if test "$with_next_framework"
3112then
3113 OPT="$OPT -fno-common"
3114 # -U __environ is needed since bundles don't have access
3115 # to crt0 when built but will always be linked against it
3116 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
3117 cat >> confdefs.h <<\EOF
3118#define WITH_NEXT_FRAMEWORK 1
3119EOF
3120
3121 echo "$ac_t""yes" 1>&6
3122else
3123 echo "$ac_t""no" 1>&6
3124fi
3125
3126echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003127echo "configure:3128: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003128if test "$with_next_framework" -o "$with_dyld"
3129then
3130 if test "$with_dyld"
3131 then
3132 echo "$ac_t""yes" 1>&6
3133 else
3134 echo "$ac_t""required for framework build" 1>&6
3135 fi
3136 cat >> confdefs.h <<\EOF
3137#define WITH_DYLD 1
3138EOF
3139
3140 ns_dyld='set'
3141else
3142 echo "$ac_t""no" 1>&6
3143fi
3144
Guido van Rossum0a516c91994-09-12 10:58:40 +00003145# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00003146
3147
3148
3149
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003150
Guido van Rossum0a516c91994-09-12 10:58:40 +00003151# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00003152# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003153echo $ac_n "checking SO""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003154echo "configure:3155: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003155if test -z "$SO"
3156then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003157 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003158 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003159 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003160 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003161 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003162fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003163echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003164# LDSHARED is the ld *command* used to create shared library
3165# -- "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 +00003166# (Shared libraries in this instance are shared modules to be loaded into
3167# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003168echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003169echo "configure:3170: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003170if test -z "$LDSHARED"
3171then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003172 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003173 AIX*)
3174 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
3175 LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp"
3176 ;;
3177 BeOS*)
3178 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
3179 LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
3180 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003181 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003182 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003183 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00003184 SunOS/5*)
3185 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003186 then LDSHARED='$(CC) -shared'
Greg Ward57c9a6632000-05-26 12:22:54 +00003187 else LDSHARED="ld -G";
3188 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003189 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003190 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3191 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum3dc0a512000-10-05 18:00:06 +00003192 Darwin/*|next/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003193 if test "$ns_dyld"
Guido van Rossumacb14c72001-01-10 21:41:16 +00003194 then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003195 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
3196 fi
Guido van Rossum3dc0a512000-10-05 18:00:06 +00003197 if test "$with_next_framework" ; then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003198 LDSHARED="$LDSHARED \$(LDLIBRARY)"
3199 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00003200 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003201 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003202 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003203 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00003204 NetBSD*)
3205 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3206 then
3207 LDSHARED="cc -shared"
3208 else
3209 LDSHARED="ld -Bshareable"
3210 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003211 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003212 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003213 then
3214 LDSHARED="cc -shared ${LDFLAGS}"
3215 else
3216 LDSHARED="ld -Bshareable ${LDFLAGS}"
3217 fi;;
Martin v. Löwisbec19582001-03-21 15:57:54 +00003218 UnixWare*)
3219 if test "$GCC" = "yes"
3220 then LDSHARED="$(CC) -shared"
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003221 else LDSHARED="ld -G -dy -Bdynamic"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003222 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003223 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003224 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003225 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003226 *) LDSHARED="ld";;
3227 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003228fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003229echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003230BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003231# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003232# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003233echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003234echo "configure:3235: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003235if test -z "$CCSHARED"
3236then
Guido van Rossum07397971997-04-29 21:49:50 +00003237 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003238 SunOS*) if test "$GCC" = yes;
3239 then CCSHARED="-fPIC";
3240 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003241 hp*|HP*) if test "$GCC" = yes;
3242 then CCSHARED="-fpic";
3243 else CCSHARED="+z";
3244 fi;;
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003245 Linux*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003246 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003247 OpenBSD*) CCSHARED="-fpic";;
3248 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Martin v. Löwisbec19582001-03-21 15:57:54 +00003249 UnixWare*)
3250 if test "$GCC" = "yes"
3251 then CCSHARED="-fPIC"
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003252 else CCSHARED="-KPIC -G -dy -Bdynamic"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003253 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003254 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003255 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003256 IRIX*/6*) case $CC in
3257 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003258 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003259 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003260 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003261 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003262fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003263echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003264# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003265# the python executable -- this is only needed for a few systems
3266echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003267echo "configure:3268: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003268if test -z "$LINKFORSHARED"
3269then
Guido van Rossum07397971997-04-29 21:49:50 +00003270 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003271 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003272 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00003273 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003274 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00003275 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003276 # -u libsys_s pulls in all symbols in libsys
3277 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
3278 # -u __dummy makes the linker aware of the objc runtime
3279 # in System.framework; otherwise, __objcInit (referenced in
3280 # crt1.o) gets erroneously defined as common, which breaks dynamic
3281 # loading of any modules which reference it in System.framework
3282 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Neil Schemenauer4e425612001-06-19 15:44:15 +00003283 Darwin/*) LINKFORSHARED="-u __dummy -u _PyMac_Error -framework System -framework Foundation -framework Carbon" ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003284 UnixWare*) LINKFORSHARED="-dy -Bdynamic -Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003285 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003286 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003287 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003288 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3289 then
3290 LINKFORSHARED="-Wl,--export-dynamic"
3291 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003292 SunOS/5*) case $CC in
3293 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003294 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003295 then
3296 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003297 fi;;
3298 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003299 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003300fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003301echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003302
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003303
3304echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003305echo "configure:3306: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003306if test ! "$LIBRARY" = "$LDLIBRARY"
3307then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003308 case $ac_sys_system in
3309 CYGWIN*)
3310 # Cygwin needs CCSHARED when building extension DLLs
3311 # but not when building the interpreter DLL.
3312 CFLAGSFORSHARED='';;
3313 *)
3314 CFLAGSFORSHARED='$(CCSHARED)'
3315 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003316fi
3317echo "$ac_t""$CFLAGSFORSHARED" 1>&6
3318
Guido van Rossum627b2d71993-12-24 10:39:16 +00003319# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00003320echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003321echo "configure:3322: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003322ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003323if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003324 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003325else
3326 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003327LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003328cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003329#line 3330 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003330#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003331/* Override any gcc2 internal prototype to avoid an error. */
3332/* We use char because int might match the return type of a gcc2
3333 builtin and then its argument prototype would still apply. */
3334char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003335
Guido van Rossumf78abae1997-01-21 22:02:36 +00003336int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003337dlopen()
3338; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003339EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003340if { (eval echo configure:3341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003341 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003342 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003343else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003344 echo "configure: failed program was:" >&5
3345 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003346 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003347 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003348fi
3349rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003350LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003351
Guido van Rossum627b2d71993-12-24 10:39:16 +00003352fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003353if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003354 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003355 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3356 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003357 cat >> confdefs.h <<EOF
3358#define $ac_tr_lib 1
3359EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003360
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003361 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003362
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003363else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003364 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003365fi
3366 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00003367echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003368echo "configure:3369: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003369ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003370if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003371 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003372else
3373 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003374LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003375cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003376#line 3377 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003377#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003378/* Override any gcc2 internal prototype to avoid an error. */
3379/* We use char because int might match the return type of a gcc2
3380 builtin and then its argument prototype would still apply. */
3381char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003382
Guido van Rossumf78abae1997-01-21 22:02:36 +00003383int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003384shl_load()
3385; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003386EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003387if { (eval echo configure:3388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003388 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003389 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003390else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003391 echo "configure: failed program was:" >&5
3392 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003393 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003394 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003395fi
3396rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003397LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003398
Guido van Rossum627b2d71993-12-24 10:39:16 +00003399fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003400if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003401 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003402 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3403 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003404 cat >> confdefs.h <<EOF
3405#define $ac_tr_lib 1
3406EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003407
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003408 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003409
3410else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003411 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003412fi
3413 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003414
3415# checks for system dependent C++ extensions support
3416case "$ac_sys_system" in
3417 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003418echo "configure:3419: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003419 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003420#line 3421 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003421#include "confdefs.h"
3422#include "/usr/lpp/xlC/include/load.h"
3423int main() {
3424loadAndInit("", 0, "")
3425; return 0; }
3426EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003427if { (eval echo configure:3428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003428 rm -rf conftest*
3429 cat >> confdefs.h <<\EOF
3430#define AIX_GENUINE_CPLUSPLUS 1
3431EOF
3432
3433 echo "$ac_t""yes" 1>&6
3434else
3435 echo "configure: failed program was:" >&5
3436 cat conftest.$ac_ext >&5
3437 rm -rf conftest*
3438 echo "$ac_t""no" 1>&6
3439fi
3440rm -f conftest*;;
3441 *) ;;
3442esac
3443
Guido van Rossum70c7f481998-03-26 18:44:10 +00003444# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3445# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003446# BeOS' sockets are stashed in libnet.
3447case "$ac_sys_system" in
3448IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003449*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003450echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003451echo "configure:3452: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003452ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003453if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003454 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003455else
3456 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003457LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003458cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003459#line 3460 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003460#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003461/* Override any gcc2 internal prototype to avoid an error. */
3462/* We use char because int might match the return type of a gcc2
3463 builtin and then its argument prototype would still apply. */
3464char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003465
Guido van Rossumf78abae1997-01-21 22:02:36 +00003466int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003467t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003468; return 0; }
3469EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003470if { (eval echo configure:3471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003471 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003472 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003473else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003474 echo "configure: failed program was:" >&5
3475 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003476 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003477 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003478fi
3479rm -f conftest*
3480LIBS="$ac_save_LIBS"
3481
3482fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003483if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003484 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003485 LIBS="-lnsl $LIBS"
3486else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003487 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003488fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003489 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003490echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003491echo "configure:3492: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003492ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003493if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003494 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003495else
3496 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003497LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003498cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003499#line 3500 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003500#include "confdefs.h"
3501/* Override any gcc2 internal prototype to avoid an error. */
3502/* We use char because int might match the return type of a gcc2
3503 builtin and then its argument prototype would still apply. */
3504char socket();
3505
3506int main() {
3507socket()
3508; return 0; }
3509EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003510if { (eval echo configure:3511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003511 rm -rf conftest*
3512 eval "ac_cv_lib_$ac_lib_var=yes"
3513else
3514 echo "configure: failed program was:" >&5
3515 cat conftest.$ac_ext >&5
3516 rm -rf conftest*
3517 eval "ac_cv_lib_$ac_lib_var=no"
3518fi
3519rm -f conftest*
3520LIBS="$ac_save_LIBS"
3521
3522fi
3523if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3524 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003525 LIBS="-lsocket $LIBS"
3526else
3527 echo "$ac_t""no" 1>&6
3528fi
3529 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003530;;
3531esac
3532case "$ac_sys_system" in
3533BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003534echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003535echo "configure:3536: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003536ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003537if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003538 echo $ac_n "(cached) $ac_c" 1>&6
3539else
3540 ac_save_LIBS="$LIBS"
3541LIBS="-lnet $LIBS $LIBS"
3542cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003543#line 3544 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003544#include "confdefs.h"
3545/* Override any gcc2 internal prototype to avoid an error. */
3546/* We use char because int might match the return type of a gcc2
3547 builtin and then its argument prototype would still apply. */
3548char socket();
3549
3550int main() {
3551socket()
3552; return 0; }
3553EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003554if { (eval echo configure:3555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003555 rm -rf conftest*
3556 eval "ac_cv_lib_$ac_lib_var=yes"
3557else
3558 echo "configure: failed program was:" >&5
3559 cat conftest.$ac_ext >&5
3560 rm -rf conftest*
3561 eval "ac_cv_lib_$ac_lib_var=no"
3562fi
3563rm -f conftest*
3564LIBS="$ac_save_LIBS"
3565
3566fi
3567if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3568 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003569 LIBS="-lnet $LIBS"
3570else
3571 echo "$ac_t""no" 1>&6
3572fi
3573 # BeOS
3574;;
3575esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003576
Guido van Rossuma68acba1996-07-31 17:36:39 +00003577echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003578echo "configure:3579: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003579# Check whether --with-libs or --without-libs was given.
3580if test "${with_libs+set}" = set; then
3581 withval="$with_libs"
3582
3583echo "$ac_t""$withval" 1>&6
3584LIBS="$withval $LIBS"
3585
3586else
3587 echo "$ac_t""no" 1>&6
3588fi
3589
Guido van Rossum7f43da71994-08-01 12:15:30 +00003590
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003591# Determine if signalmodule should be used.
3592
3593
3594echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003595echo "configure:3596: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003596# Check whether --with-signal-module or --without-signal-module was given.
3597if test "${with_signal_module+set}" = set; then
3598 withval="$with_signal_module"
3599 :
3600fi
3601
3602
3603if test -z "$with_signal_module"
3604then with_signal_module="yes"
3605fi
3606echo "$ac_t""$with_signal_module" 1>&6
3607
3608if test "${with_signal_module}" = "yes"; then
3609 USE_SIGNAL_MODULE=""
3610 SIGNAL_OBJS=""
3611else
3612 USE_SIGNAL_MODULE="#"
3613 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3614fi
3615
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003616# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003617
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003618USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003619
Guido van Rossumec2f0731997-01-22 20:54:01 +00003620echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003621echo "configure:3622: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003622
3623# Check whether --with-dec-threads or --without-dec-threads was given.
3624if test "${with_dec_threads+set}" = set; then
3625 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003626
3627echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003628LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003629if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003630 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003631fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003632else
3633 echo "$ac_t""no" 1>&6
3634fi
3635
3636
3637echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003638echo "configure:3639: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003639# Check whether --with-threads or --without-threads was given.
3640if test "${with_threads+set}" = set; then
3641 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003642 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003643fi
3644
3645
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003646# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003647# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003648if test "${with_thread+set}" = set; then
3649 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003650
3651with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003652fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003653
3654
3655if test -z "$with_threads"
3656then with_threads="yes"
3657fi
3658echo "$ac_t""$with_threads" 1>&6
3659
3660if test "$with_threads" = "no"
3661then
3662 USE_THREAD_MODULE="#"
3663else
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003664 if test "$ac_sys_system" = "UnixWare"
3665 then
3666 CC="${CC} -Kthread"
3667 LIBOBJS="$LIBOBJS thread.o"
3668 cat >> confdefs.h <<\EOF
3669#define WITH_THREAD 1
3670EOF
3671
3672 cat >> confdefs.h <<\EOF
3673#define _POSIX_THREADS 1
3674EOF
3675
3676 USE_THREAD_MODULE=""
3677 else
3678 if test ! -z "$with_threads" -a -d "$with_threads"
3679 then LDFLAGS="$LDFLAGS -L$with_threads"
3680 fi
3681 if test ! -z "$withval" -a -d "$withval"
3682 then LDFLAGS="$LDFLAGS -L$withval"
3683 fi
3684 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003685#define _REENTRANT 1
3686EOF
3687
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003688 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003689echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003690echo "configure:3691: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003691if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003692 echo $ac_n "(cached) $ac_c" 1>&6
3693else
3694 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003695#line 3696 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003696#include "confdefs.h"
3697#include <mach/cthreads.h>
3698EOF
3699ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003700{ (eval echo configure:3701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003701ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003702if test -z "$ac_err"; then
3703 rm -rf conftest*
3704 eval "ac_cv_header_$ac_safe=yes"
3705else
3706 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003707 echo "configure: failed program was:" >&5
3708 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003709 rm -rf conftest*
3710 eval "ac_cv_header_$ac_safe=no"
3711fi
3712rm -f conftest*
3713fi
3714if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3715 echo "$ac_t""yes" 1>&6
3716 cat >> confdefs.h <<\EOF
3717#define WITH_THREAD 1
3718EOF
3719
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003720 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003721#define C_THREADS 1
3722EOF
3723
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003724 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003725else
3726 echo "$ac_t""no" 1>&6
3727
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003728 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003729echo "configure:3730: checking for --with-pth" >&5
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003730 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003731if test "${with_pth+set}" = set; then
3732 withval="$with_pth"
3733
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003734 echo "$ac_t""$withval" 1>&6
3735 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003736#define WITH_THREAD 1
3737EOF
3738
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003739 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003740#define HAVE_PTH 1
3741EOF
3742
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003743 LIBS="-lpth $LIBS"
3744 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003745else
3746
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003747 echo "$ac_t""no" 1>&6
3748 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003749echo "configure:3750: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003750ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003751if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003752 echo $ac_n "(cached) $ac_c" 1>&6
3753else
3754 ac_save_LIBS="$LIBS"
3755LIBS="-lpthread $LIBS"
3756cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003757#line 3758 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003758#include "confdefs.h"
3759/* Override any gcc2 internal prototype to avoid an error. */
3760/* We use char because int might match the return type of a gcc2
3761 builtin and then its argument prototype would still apply. */
3762char pthread_create();
3763
3764int main() {
3765pthread_create()
3766; return 0; }
3767EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003768if { (eval echo configure:3769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003769 rm -rf conftest*
3770 eval "ac_cv_lib_$ac_lib_var=yes"
3771else
3772 echo "configure: failed program was:" >&5
3773 cat conftest.$ac_ext >&5
3774 rm -rf conftest*
3775 eval "ac_cv_lib_$ac_lib_var=no"
3776fi
3777rm -f conftest*
3778LIBS="$ac_save_LIBS"
3779
3780fi
3781if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3782 echo "$ac_t""yes" 1>&6
3783 cat >> confdefs.h <<\EOF
3784#define WITH_THREAD 1
3785EOF
3786
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003787 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003788#define _POSIX_THREADS 1
3789EOF
3790
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003791 LIBS="-lpthread $LIBS"
3792 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003793else
3794 echo "$ac_t""no" 1>&6
3795
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003796 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003797echo "configure:3798: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003798if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003799 echo $ac_n "(cached) $ac_c" 1>&6
3800else
3801 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003802#line 3803 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003803#include "confdefs.h"
3804/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003805 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003806#include <assert.h>
3807/* Override any gcc2 internal prototype to avoid an error. */
3808/* We use char because int might match the return type of a gcc2
3809 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003810char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003811
3812int main() {
3813
3814/* The GNU C library defines this for functions which it implements
3815 to always fail with ENOSYS. Some functions are actually named
3816 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003817#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003818choke me
3819#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003820pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003821#endif
3822
3823; return 0; }
3824EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003825if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003826 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003827 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003828else
3829 echo "configure: failed program was:" >&5
3830 cat conftest.$ac_ext >&5
3831 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003832 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003833fi
3834rm -f conftest*
3835fi
3836
Guido van Rossumea516321998-12-17 18:08:55 +00003837if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003838 echo "$ac_t""yes" 1>&6
3839 cat >> confdefs.h <<\EOF
3840#define WITH_THREAD 1
3841EOF
3842
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003843 case $ac_sys_system in
3844 Darwin*) ;;
3845 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003846#define _POSIX_THREADS 1
3847EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003848;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003849 esac
3850 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003851else
3852 echo "$ac_t""no" 1>&6
3853
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003854 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003855echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003856echo "configure:3857: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003857if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003858 echo $ac_n "(cached) $ac_c" 1>&6
3859else
3860 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003861#line 3862 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003862#include "confdefs.h"
3863#include <kernel/OS.h>
3864EOF
3865ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003866{ (eval echo configure:3867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003867ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003868if test -z "$ac_err"; then
3869 rm -rf conftest*
3870 eval "ac_cv_header_$ac_safe=yes"
3871else
3872 echo "$ac_err" >&5
3873 echo "configure: failed program was:" >&5
3874 cat conftest.$ac_ext >&5
3875 rm -rf conftest*
3876 eval "ac_cv_header_$ac_safe=no"
3877fi
3878rm -f conftest*
3879fi
3880if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3881 echo "$ac_t""yes" 1>&6
3882 cat >> confdefs.h <<\EOF
3883#define WITH_THREAD 1
3884EOF
3885
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003886 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003887#define BEOS_THREADS 1
3888EOF
3889
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003890 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003891else
3892 echo "$ac_t""no" 1>&6
3893
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003894 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003895echo "configure:3896: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003896ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003897if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003898 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003899else
3900 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003901LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003902cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003903#line 3904 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003904#include "confdefs.h"
3905/* Override any gcc2 internal prototype to avoid an error. */
3906/* We use char because int might match the return type of a gcc2
3907 builtin and then its argument prototype would still apply. */
3908char pthread_create();
3909
3910int main() {
3911pthread_create()
3912; return 0; }
3913EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003914if { (eval echo configure:3915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003915 rm -rf conftest*
3916 eval "ac_cv_lib_$ac_lib_var=yes"
3917else
3918 echo "configure: failed program was:" >&5
3919 cat conftest.$ac_ext >&5
3920 rm -rf conftest*
3921 eval "ac_cv_lib_$ac_lib_var=no"
3922fi
3923rm -f conftest*
3924LIBS="$ac_save_LIBS"
3925
3926fi
3927if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3928 echo "$ac_t""yes" 1>&6
3929 cat >> confdefs.h <<\EOF
3930#define WITH_THREAD 1
3931EOF
3932
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003933 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003934#define _POSIX_THREADS 1
3935EOF
3936
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003937 LIBS="$LIBS -lpthreads"
3938 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003939else
3940 echo "$ac_t""no" 1>&6
3941
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003942 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003943echo "configure:3944: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003944ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003945if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003946 echo $ac_n "(cached) $ac_c" 1>&6
3947else
3948 ac_save_LIBS="$LIBS"
3949LIBS="-lc_r $LIBS"
3950cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003951#line 3952 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003952#include "confdefs.h"
3953/* Override any gcc2 internal prototype to avoid an error. */
3954/* We use char because int might match the return type of a gcc2
3955 builtin and then its argument prototype would still apply. */
3956char pthread_create();
3957
3958int main() {
3959pthread_create()
3960; return 0; }
3961EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003962if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003963 rm -rf conftest*
3964 eval "ac_cv_lib_$ac_lib_var=yes"
3965else
3966 echo "configure: failed program was:" >&5
3967 cat conftest.$ac_ext >&5
3968 rm -rf conftest*
3969 eval "ac_cv_lib_$ac_lib_var=no"
3970fi
3971rm -f conftest*
3972LIBS="$ac_save_LIBS"
3973
3974fi
3975if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3976 echo "$ac_t""yes" 1>&6
3977 cat >> confdefs.h <<\EOF
3978#define WITH_THREAD 1
3979EOF
3980
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003981 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003982#define _POSIX_THREADS 1
3983EOF
3984
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003985 LIBS="$LIBS -lc_r"
3986 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003987else
3988 echo "$ac_t""no" 1>&6
3989
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003990 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003991echo "configure:3992: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003992ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003993if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003994 echo $ac_n "(cached) $ac_c" 1>&6
3995else
3996 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003997LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003998cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00003999#line 4000 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004000#include "confdefs.h"
4001/* Override any gcc2 internal prototype to avoid an error. */
4002/* We use char because int might match the return type of a gcc2
4003 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00004004char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004005
4006int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00004007__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004008; return 0; }
4009EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004010if { (eval echo configure:4011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004011 rm -rf conftest*
4012 eval "ac_cv_lib_$ac_lib_var=yes"
4013else
4014 echo "configure: failed program was:" >&5
4015 cat conftest.$ac_ext >&5
4016 rm -rf conftest*
4017 eval "ac_cv_lib_$ac_lib_var=no"
4018fi
4019rm -f conftest*
4020LIBS="$ac_save_LIBS"
4021
4022fi
4023if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4024 echo "$ac_t""yes" 1>&6
4025 cat >> confdefs.h <<\EOF
4026#define WITH_THREAD 1
4027EOF
4028
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004029 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004030#define _POSIX_THREADS 1
4031EOF
4032
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004033 LIBS="$LIBS -lthread"
4034 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00004035else
4036 echo "$ac_t""no" 1>&6
4037
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004038 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004039echo "configure:4040: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004040ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
4041if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4042 echo $ac_n "(cached) $ac_c" 1>&6
4043else
4044 ac_save_LIBS="$LIBS"
4045LIBS="-lpthread $LIBS"
4046cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004047#line 4048 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004048#include "confdefs.h"
4049/* Override any gcc2 internal prototype to avoid an error. */
4050/* We use char because int might match the return type of a gcc2
4051 builtin and then its argument prototype would still apply. */
4052char __pthread_create_system();
4053
4054int main() {
4055__pthread_create_system()
4056; return 0; }
4057EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004058if { (eval echo configure:4059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004059 rm -rf conftest*
4060 eval "ac_cv_lib_$ac_lib_var=yes"
4061else
4062 echo "configure: failed program was:" >&5
4063 cat conftest.$ac_ext >&5
4064 rm -rf conftest*
4065 eval "ac_cv_lib_$ac_lib_var=no"
4066fi
4067rm -f conftest*
4068LIBS="$ac_save_LIBS"
4069
4070fi
4071if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4072 echo "$ac_t""yes" 1>&6
4073 cat >> confdefs.h <<\EOF
4074#define WITH_THREAD 1
4075EOF
4076
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004077 cat >> confdefs.h <<\EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004078#define _POSIX_THREADS 1
4079EOF
4080
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004081 LIBS="$LIBS -lpthread"
4082 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004083else
4084 echo "$ac_t""no" 1>&6
4085
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004086 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004087echo "configure:4088: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00004088ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004089if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00004090 echo $ac_n "(cached) $ac_c" 1>&6
4091else
4092 ac_save_LIBS="$LIBS"
4093LIBS="-lcma $LIBS"
4094cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004095#line 4096 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004096#include "confdefs.h"
4097/* Override any gcc2 internal prototype to avoid an error. */
4098/* We use char because int might match the return type of a gcc2
4099 builtin and then its argument prototype would still apply. */
4100char pthread_create();
4101
4102int main() {
4103pthread_create()
4104; return 0; }
4105EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004106if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00004107 rm -rf conftest*
4108 eval "ac_cv_lib_$ac_lib_var=yes"
4109else
4110 echo "configure: failed program was:" >&5
4111 cat conftest.$ac_ext >&5
4112 rm -rf conftest*
4113 eval "ac_cv_lib_$ac_lib_var=no"
4114fi
4115rm -f conftest*
4116LIBS="$ac_save_LIBS"
4117
4118fi
4119if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4120 echo "$ac_t""yes" 1>&6
4121 cat >> confdefs.h <<\EOF
4122#define WITH_THREAD 1
4123EOF
4124
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004125 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00004126#define _POSIX_THREADS 1
4127EOF
4128
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004129 LIBS="$LIBS -lcma"
4130 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004131else
4132 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00004133
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004134 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00004135fi
4136
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004137
Guido van Rossum627b2d71993-12-24 10:39:16 +00004138fi
4139
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004140fi
4141
Guido van Rossum0be3e491997-05-22 20:33:33 +00004142fi
4143
Guido van Rossum49545951997-12-02 19:28:29 +00004144fi
4145
Guido van Rossumb93a8621998-05-07 13:27:32 +00004146fi
4147
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004148fi
4149
Guido van Rossumad678af1998-10-02 14:42:15 +00004150fi
4151
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004152fi
4153
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004154fi
4155
Guido van Rossum0be3e491997-05-22 20:33:33 +00004156
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004157 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004158echo "configure:4159: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004159ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004160if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004161 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004162else
4163 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004164LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004165cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004166#line 4167 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004167#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004168/* Override any gcc2 internal prototype to avoid an error. */
4169/* We use char because int might match the return type of a gcc2
4170 builtin and then its argument prototype would still apply. */
4171char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004172
Guido van Rossumf78abae1997-01-21 22:02:36 +00004173int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004174usconfig()
4175; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004176EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004177if { (eval echo configure:4178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004178 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004179 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004180else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004181 echo "configure: failed program was:" >&5
4182 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004183 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004184 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004185fi
4186rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004187LIBS="$ac_save_LIBS"
4188
4189fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004190if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004191 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192 cat >> confdefs.h <<\EOF
4193#define WITH_THREAD 1
4194EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004195
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004196 LIBS="$LIBS -lmpc"
4197 LIBOBJS="$LIBOBJS thread.o"
4198 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004199else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004200 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004201fi
4202
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004203 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004204echo "configure:4205: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004205ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004206if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004207 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004208else
4209 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004210LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004211cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004212#line 4213 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004213#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004214/* Override any gcc2 internal prototype to avoid an error. */
4215/* We use char because int might match the return type of a gcc2
4216 builtin and then its argument prototype would still apply. */
4217char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004218
Guido van Rossumf78abae1997-01-21 22:02:36 +00004219int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004220thr_create()
4221; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004222EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004223if { (eval echo configure:4224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004224 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004225 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004226else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004227 echo "configure: failed program was:" >&5
4228 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004229 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004230 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004231fi
4232rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004233LIBS="$ac_save_LIBS"
4234
4235fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004236if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004237 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004238 cat >> confdefs.h <<\EOF
4239#define WITH_THREAD 1
4240EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004241
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004242 LIBS="$LIBS -lthread"
4243 LIBOBJS="$LIBOBJS thread.o"
4244 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004245else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004246 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004247fi
4248
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004249
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004250 if test "$USE_THREAD_MODULE" != "#"
4251 then
4252 # If the above checks didn't disable threads, (at least) OSF1
4253 # needs this '-threads' argument during linking.
4254 case $ac_sys_system in
4255 OSF1) LDLAST=-threads;;
4256 esac
4257 fi
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004258 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004259fi
4260
Barry Warsawef82cd72000-06-30 16:21:01 +00004261# Check for GC support
4262
4263USE_GC_MODULE=""
4264echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004265echo "configure:4266: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004266# Check whether --with-cycle-gc or --without-cycle-gc was given.
4267if test "${with_cycle_gc+set}" = set; then
4268 withval="$with_cycle_gc"
4269 :
4270fi
4271
4272
4273if test -z "$with_cycle_gc"
4274then with_cycle_gc="yes"
4275fi
4276if test "$with_cycle_gc" = "no"
4277then
4278 USE_GC_MODULE="#"
4279else
4280 cat >> confdefs.h <<\EOF
4281#define WITH_CYCLE_GC 1
4282EOF
4283
4284fi
4285echo "$ac_t""$with_cycle_gc" 1>&6
4286
Neil Schemenauera35c6882001-02-27 04:45:05 +00004287# Check for Python-specific malloc support
4288echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004289echo "configure:4290: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004290# Check whether --with-pymalloc or --without-pymalloc was given.
4291if test "${with_pymalloc+set}" = set; then
4292 withval="$with_pymalloc"
4293
4294if test "$withval" != no
4295then cat >> confdefs.h <<\EOF
4296#define WITH_PYMALLOC 1
4297EOF
4298 echo "$ac_t""yes" 1>&6
4299else echo "$ac_t""no" 1>&6
4300fi
4301else
4302 echo "$ac_t""no" 1>&6
4303fi
4304
4305
Barry Warsawef82cd72000-06-30 16:21:01 +00004306# Check for --with-wctype-functions
4307echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004308echo "configure:4309: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004309# Check whether --with-wctype-functions or --without-wctype-functions was given.
4310if test "${with_wctype_functions+set}" = set; then
4311 withval="$with_wctype_functions"
4312
4313if test "$withval" != no
4314then cat >> confdefs.h <<\EOF
4315#define WANT_WCTYPE_FUNCTIONS 1
4316EOF
4317 echo "$ac_t""yes" 1>&6
4318else echo "$ac_t""no" 1>&6
4319fi
4320else
4321 echo "$ac_t""no" 1>&6
4322fi
4323
4324
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004325# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004326
4327DLINCLDIR=/
4328
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004329echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004330echo "configure:4331: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004331# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004332if test "${with_sgi_dl+set}" = set; then
4333 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004334
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004335echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004336cat >> confdefs.h <<\EOF
4337#define WITH_SGI_DL 1
4338EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004339
Guido van Rossume97ee181999-12-20 21:27:22 +00004340DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004341dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004342if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004343then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004344else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004345fi
4346DLINCLDIR=${dldir}
4347LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004348else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004349 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004350fi
4351
4352
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004353echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004354echo "configure:4355: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004355# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004356if test "${with_dl_dld+set}" = set; then
4357 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004358
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004359echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004360cat >> confdefs.h <<\EOF
4361#define WITH_DL_DLD 1
4362EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004363
Guido van Rossume97ee181999-12-20 21:27:22 +00004364DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004365dldir=`echo "$withval" | sed 's/,.*//'`
4366dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004367if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004368then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004369else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004370fi
4371DLINCLDIR=${dldir}
4372LIBS="$LIBS -ldl -ldld"
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 Rossume97ee181999-12-20 21:27:22 +00004378# the dlopen() function means we might want to use dynload_shlib.o. some
4379# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004380for ac_func in dlopen
4381do
4382echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004383echo "configure:4384: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004384if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004385 echo $ac_n "(cached) $ac_c" 1>&6
4386else
4387 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004388#line 4389 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004389#include "confdefs.h"
4390/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004391 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004392#include <assert.h>
4393/* Override any gcc2 internal prototype to avoid an error. */
4394/* We use char because int might match the return type of a gcc2
4395 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004396char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004397
4398int main() {
4399
4400/* The GNU C library defines this for functions which it implements
4401 to always fail with ENOSYS. Some functions are actually named
4402 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004403#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004404choke me
4405#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004406$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004407#endif
4408
4409; return 0; }
4410EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004411if { (eval echo configure:4412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004412 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004413 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004414else
4415 echo "configure: failed program was:" >&5
4416 cat conftest.$ac_ext >&5
4417 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004418 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004419fi
4420rm -f conftest*
4421fi
4422
Thomas Wouters3a584202000-08-05 23:28:51 +00004423if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004424 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004425 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4426 cat >> confdefs.h <<EOF
4427#define $ac_tr_func 1
4428EOF
4429
Guido van Rossume97ee181999-12-20 21:27:22 +00004430else
4431 echo "$ac_t""no" 1>&6
4432fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004433done
Guido van Rossume97ee181999-12-20 21:27:22 +00004434
4435
4436# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4437# loading of modules.
4438
4439echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004440echo "configure:4441: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004441if test -z "$DYNLOADFILE"
4442then
4443 case $ac_sys_system/$ac_sys_release in
4444 AIX*) DYNLOADFILE="dynload_aix.o";;
4445 BeOS*) DYNLOADFILE="dynload_beos.o";;
4446 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossum5839e582000-10-09 19:52:35 +00004447 Darwin/*|next/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004448 *)
4449 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4450 # out any dynamic loading
4451 if test "$ac_cv_func_dlopen" = yes
4452 then DYNLOADFILE="dynload_shlib.o"
4453 else DYNLOADFILE="dynload_stub.o"
4454 fi
4455 ;;
4456 esac
4457fi
4458echo "$ac_t""$DYNLOADFILE" 1>&6
4459if test "$DYNLOADFILE" != "dynload_stub.o"
4460then
4461 cat >> confdefs.h <<\EOF
4462#define HAVE_DYNAMIC_LOADING 1
4463EOF
4464
4465fi
4466
Neil Schemenauer4e425612001-06-19 15:44:15 +00004467# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4468
4469
4470echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004471echo "configure:4472: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004472if test -z "$MACHDEP_OBJS"
4473then
4474 case $ac_sys_system/$ac_sys_release in
4475 Darwin/*)
4476 MACHDEP_OBJS="Mac/Python/macglue.o"
4477 cat >> confdefs.h <<\EOF
4478#define USE_TOOLBOX_OBJECT_GLUE 1
4479EOF
4480
4481 ;;
4482 *) MACHDEP_OBJS="";;
4483 esac
4484fi
4485echo "$ac_t""$DYNLOADFILE" 1>&6
4486
Guido van Rossum627b2d71993-12-24 10:39:16 +00004487# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00004488for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004489 flock fork fsync fdatasync fpathconf ftime ftruncate \
Andrew M. Kuchlinga9586c72001-01-08 17:58:56 +00004490 getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwisb9ab1592001-06-24 21:18:26 +00004491 inet_pton kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004492 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004493 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004494 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00004495 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00004496 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004497 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Woutersc2c12dc2001-07-11 14:45:34 +00004498 truncate uname waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00004499do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004500echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004501echo "configure:4502: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004502if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004503 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004504else
4505 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004506#line 4507 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004507#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004508/* System header to define __stub macros and hopefully few prototypes,
4509 which can conflict with char $ac_func(); below. */
4510#include <assert.h>
4511/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004512/* We use char because int might match the return type of a gcc2
4513 builtin and then its argument prototype would still apply. */
4514char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004515
Guido van Rossumf78abae1997-01-21 22:02:36 +00004516int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004517
Guido van Rossum627b2d71993-12-24 10:39:16 +00004518/* The GNU C library defines this for functions which it implements
4519 to always fail with ENOSYS. Some functions are actually named
4520 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004521#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004522choke me
4523#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004524$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004525#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004526
Guido van Rossum7f43da71994-08-01 12:15:30 +00004527; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004528EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004529if { (eval echo configure:4530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004530 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004531 eval "ac_cv_func_$ac_func=yes"
4532else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004533 echo "configure: failed program was:" >&5
4534 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004535 rm -rf conftest*
4536 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004537fi
4538rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004539fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004540
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004541if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004542 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004543 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004544 cat >> confdefs.h <<EOF
4545#define $ac_tr_func 1
4546EOF
4547
4548else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004549 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004550fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004551done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004552
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004553
Fred Drake8cef4cf2000-06-28 16:40:38 +00004554# check for openpty and forkpty
4555
4556for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004557do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004558echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004559echo "configure:4560: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004560if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004561 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004562else
4563 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004564#line 4565 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004565#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004566/* System header to define __stub macros and hopefully few prototypes,
4567 which can conflict with char $ac_func(); below. */
4568#include <assert.h>
4569/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004570/* We use char because int might match the return type of a gcc2
4571 builtin and then its argument prototype would still apply. */
4572char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004573
Guido van Rossumf78abae1997-01-21 22:02:36 +00004574int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004575
Guido van Rossum627b2d71993-12-24 10:39:16 +00004576/* The GNU C library defines this for functions which it implements
4577 to always fail with ENOSYS. Some functions are actually named
4578 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004579#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004580choke me
4581#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004582$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004583#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004584
Guido van Rossum7f43da71994-08-01 12:15:30 +00004585; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004586EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004587if { (eval echo configure:4588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004588 rm -rf conftest*
4589 eval "ac_cv_func_$ac_func=yes"
4590else
4591 echo "configure: failed program was:" >&5
4592 cat conftest.$ac_ext >&5
4593 rm -rf conftest*
4594 eval "ac_cv_func_$ac_func=no"
4595fi
4596rm -f conftest*
4597fi
4598
4599if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4600 echo "$ac_t""yes" 1>&6
4601 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4602 cat >> confdefs.h <<EOF
4603#define $ac_tr_func 1
4604EOF
4605
4606else
4607 echo "$ac_t""no" 1>&6
4608echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004609echo "configure:4610: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004610ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004611if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004612 echo $ac_n "(cached) $ac_c" 1>&6
4613else
4614 ac_save_LIBS="$LIBS"
4615LIBS="-lutil $LIBS"
4616cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004617#line 4618 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004618#include "confdefs.h"
4619/* Override any gcc2 internal prototype to avoid an error. */
4620/* We use char because int might match the return type of a gcc2
4621 builtin and then its argument prototype would still apply. */
4622char openpty();
4623
4624int main() {
4625openpty()
4626; return 0; }
4627EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004628if { (eval echo configure:4629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004629 rm -rf conftest*
4630 eval "ac_cv_lib_$ac_lib_var=yes"
4631else
4632 echo "configure: failed program was:" >&5
4633 cat conftest.$ac_ext >&5
4634 rm -rf conftest*
4635 eval "ac_cv_lib_$ac_lib_var=no"
4636fi
4637rm -f conftest*
4638LIBS="$ac_save_LIBS"
4639
4640fi
4641if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4642 echo "$ac_t""yes" 1>&6
4643 cat >> confdefs.h <<\EOF
4644#define HAVE_OPENPTY 1
4645EOF
4646 LIBS="$LIBS -lutil"
4647else
4648 echo "$ac_t""no" 1>&6
4649fi
4650
4651fi
4652done
4653
4654for ac_func in forkpty
4655do
4656echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004657echo "configure:4658: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004658if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004659 echo $ac_n "(cached) $ac_c" 1>&6
4660else
4661 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004662#line 4663 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004663#include "confdefs.h"
4664/* System header to define __stub macros and hopefully few prototypes,
4665 which can conflict with char $ac_func(); below. */
4666#include <assert.h>
4667/* Override any gcc2 internal prototype to avoid an error. */
4668/* We use char because int might match the return type of a gcc2
4669 builtin and then its argument prototype would still apply. */
4670char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004671
4672int main() {
4673
4674/* The GNU C library defines this for functions which it implements
4675 to always fail with ENOSYS. Some functions are actually named
4676 something starting with __ and the normal name is an alias. */
4677#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4678choke me
4679#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004680$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004681#endif
4682
4683; return 0; }
4684EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004685if { (eval echo configure:4686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004686 rm -rf conftest*
4687 eval "ac_cv_func_$ac_func=yes"
4688else
4689 echo "configure: failed program was:" >&5
4690 cat conftest.$ac_ext >&5
4691 rm -rf conftest*
4692 eval "ac_cv_func_$ac_func=no"
4693fi
4694rm -f conftest*
4695fi
4696
4697if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4698 echo "$ac_t""yes" 1>&6
4699 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4700 cat >> confdefs.h <<EOF
4701#define $ac_tr_func 1
4702EOF
4703
4704else
4705 echo "$ac_t""no" 1>&6
4706echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004707echo "configure:4708: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004708ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004709if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004710 echo $ac_n "(cached) $ac_c" 1>&6
4711else
4712 ac_save_LIBS="$LIBS"
4713LIBS="-lutil $LIBS"
4714cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004715#line 4716 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004716#include "confdefs.h"
4717/* Override any gcc2 internal prototype to avoid an error. */
4718/* We use char because int might match the return type of a gcc2
4719 builtin and then its argument prototype would still apply. */
4720char forkpty();
4721
4722int main() {
4723forkpty()
4724; return 0; }
4725EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004726if { (eval echo configure:4727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004727 rm -rf conftest*
4728 eval "ac_cv_lib_$ac_lib_var=yes"
4729else
4730 echo "configure: failed program was:" >&5
4731 cat conftest.$ac_ext >&5
4732 rm -rf conftest*
4733 eval "ac_cv_lib_$ac_lib_var=no"
4734fi
4735rm -f conftest*
4736LIBS="$ac_save_LIBS"
4737
4738fi
4739if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4740 echo "$ac_t""yes" 1>&6
4741 cat >> confdefs.h <<\EOF
4742#define HAVE_FORKPTY 1
4743EOF
4744 LIBS="$LIBS -lutil"
4745else
4746 echo "$ac_t""no" 1>&6
4747fi
4748
4749fi
4750done
4751
4752
4753# check for long file support functions
4754for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4755do
4756echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004757echo "configure:4758: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004758if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004759 echo $ac_n "(cached) $ac_c" 1>&6
4760else
4761 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004762#line 4763 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004763#include "confdefs.h"
4764/* System header to define __stub macros and hopefully few prototypes,
4765 which can conflict with char $ac_func(); below. */
4766#include <assert.h>
4767/* Override any gcc2 internal prototype to avoid an error. */
4768/* We use char because int might match the return type of a gcc2
4769 builtin and then its argument prototype would still apply. */
4770char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004771
4772int main() {
4773
4774/* The GNU C library defines this for functions which it implements
4775 to always fail with ENOSYS. Some functions are actually named
4776 something starting with __ and the normal name is an alias. */
4777#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4778choke me
4779#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004780$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004781#endif
4782
4783; return 0; }
4784EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004785if { (eval echo configure:4786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004786 rm -rf conftest*
4787 eval "ac_cv_func_$ac_func=yes"
4788else
4789 echo "configure: failed program was:" >&5
4790 cat conftest.$ac_ext >&5
4791 rm -rf conftest*
4792 eval "ac_cv_func_$ac_func=no"
4793fi
4794rm -f conftest*
4795fi
4796
4797if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4798 echo "$ac_t""yes" 1>&6
4799 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4800 cat >> confdefs.h <<EOF
4801#define $ac_tr_func 1
4802EOF
4803
4804else
4805 echo "$ac_t""no" 1>&6
4806fi
4807done
4808
4809
4810for ac_func in dup2 getcwd strdup strerror memmove
4811do
4812echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004813echo "configure:4814: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004814if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004815 echo $ac_n "(cached) $ac_c" 1>&6
4816else
4817 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004818#line 4819 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004819#include "confdefs.h"
4820/* System header to define __stub macros and hopefully few prototypes,
4821 which can conflict with char $ac_func(); below. */
4822#include <assert.h>
4823/* Override any gcc2 internal prototype to avoid an error. */
4824/* We use char because int might match the return type of a gcc2
4825 builtin and then its argument prototype would still apply. */
4826char $ac_func();
4827
4828int main() {
4829
4830/* The GNU C library defines this for functions which it implements
4831 to always fail with ENOSYS. Some functions are actually named
4832 something starting with __ and the normal name is an alias. */
4833#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4834choke me
4835#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004836$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004837#endif
4838
4839; return 0; }
4840EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004841if { (eval echo configure:4842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004842 rm -rf conftest*
4843 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004844else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004845 echo "configure: failed program was:" >&5
4846 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004847 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004848 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004849fi
4850rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004851fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004852
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004853if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004854 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004855 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4856 cat >> confdefs.h <<EOF
4857#define $ac_tr_func 1
4858EOF
4859
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004860else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004861 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004862LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004863fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004864done
4865
Guido van Rossumf78abae1997-01-21 22:02:36 +00004866
Thomas Wouters3a584202000-08-05 23:28:51 +00004867for ac_func in getpgrp
4868do
4869echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004870echo "configure:4871: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004871if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004872 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004873else
4874 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004875#line 4876 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004876#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004877/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004878 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004879#include <assert.h>
4880/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004881/* We use char because int might match the return type of a gcc2
4882 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004883char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004884
Guido van Rossumf78abae1997-01-21 22:02:36 +00004885int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004886
Guido van Rossum627b2d71993-12-24 10:39:16 +00004887/* The GNU C library defines this for functions which it implements
4888 to always fail with ENOSYS. Some functions are actually named
4889 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004890#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004891choke me
4892#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004893$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004894#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004895
4896; return 0; }
4897EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004898if { (eval echo configure:4899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004899 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004900 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004901else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004902 echo "configure: failed program was:" >&5
4903 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004904 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004905 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004906fi
4907rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004908fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004909
Thomas Wouters3a584202000-08-05 23:28:51 +00004910if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004911 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004912 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4913 cat >> confdefs.h <<EOF
4914#define $ac_tr_func 1
4915EOF
4916 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004917#line 4918 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004918#include "confdefs.h"
4919#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004920int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004921getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004922; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004923EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004924if { (eval echo configure:4925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004925 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004926 cat >> confdefs.h <<\EOF
4927#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004928EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004929
Guido van Rossumf78abae1997-01-21 22:02:36 +00004930else
4931 echo "configure: failed program was:" >&5
4932 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004933fi
4934rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004935else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004936 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004937fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004938done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004939
Thomas Wouters3a584202000-08-05 23:28:51 +00004940for ac_func in setpgrp
4941do
4942echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004943echo "configure:4944: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004944if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004945 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004946else
4947 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004948#line 4949 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004949#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004950/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004951 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004952#include <assert.h>
4953/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004954/* We use char because int might match the return type of a gcc2
4955 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004956char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004957
Guido van Rossumf78abae1997-01-21 22:02:36 +00004958int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004959
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004960/* The GNU C library defines this for functions which it implements
4961 to always fail with ENOSYS. Some functions are actually named
4962 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004963#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004964choke me
4965#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004966$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004967#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004968
4969; return 0; }
4970EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004971if { (eval echo configure:4972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004972 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004973 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004974else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004975 echo "configure: failed program was:" >&5
4976 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004977 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004978 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004979fi
4980rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004981fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004982
Thomas Wouters3a584202000-08-05 23:28:51 +00004983if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004984 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004985 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4986 cat >> confdefs.h <<EOF
4987#define $ac_tr_func 1
4988EOF
4989 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004990#line 4991 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004991#include "confdefs.h"
4992#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004993int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004994setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004995; return 0; }
4996EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004997if { (eval echo configure:4998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004998 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004999 cat >> confdefs.h <<\EOF
5000#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005001EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005002
Guido van Rossumf78abae1997-01-21 22:02:36 +00005003else
5004 echo "configure: failed program was:" >&5
5005 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005006fi
5007rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005008else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005009 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005010fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005011done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005012
Thomas Wouters3a584202000-08-05 23:28:51 +00005013for ac_func in gettimeofday
5014do
5015echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005016echo "configure:5017: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005017if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005018 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005019else
5020 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005021#line 5022 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005022#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005023/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005024 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005025#include <assert.h>
5026/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005027/* We use char because int might match the return type of a gcc2
5028 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005029char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005030
Guido van Rossumf78abae1997-01-21 22:02:36 +00005031int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005032
5033/* The GNU C library defines this for functions which it implements
5034 to always fail with ENOSYS. Some functions are actually named
5035 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005036#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005037choke me
5038#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005039$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005040#endif
5041
5042; return 0; }
5043EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005044if { (eval echo configure:5045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005045 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005046 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005047else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005048 echo "configure: failed program was:" >&5
5049 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005050 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005051 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005052fi
5053rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005054fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005055
Thomas Wouters3a584202000-08-05 23:28:51 +00005056if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005057 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005058 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5059 cat >> confdefs.h <<EOF
5060#define $ac_tr_func 1
5061EOF
5062 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005063#line 5064 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005064#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005065#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005066int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005067gettimeofday((struct timeval*)0,(struct timezone*)0);
5068; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005069EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005070if { (eval echo configure:5071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005071 :
5072else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005073 echo "configure: failed program was:" >&5
5074 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005075 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005076 cat >> confdefs.h <<\EOF
5077#define GETTIMEOFDAY_NO_TZ 1
5078EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005079
5080fi
5081rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005082else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005083 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005084fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005085done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005086
5087
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005088for ac_func in getaddrinfo
5089do
5090echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005091echo "configure:5092: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005092if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5093 echo $ac_n "(cached) $ac_c" 1>&6
5094else
5095 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005096#line 5097 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005097#include "confdefs.h"
5098/* System header to define __stub macros and hopefully few prototypes,
5099 which can conflict with char $ac_func(); below. */
5100#include <assert.h>
5101/* Override any gcc2 internal prototype to avoid an error. */
5102/* We use char because int might match the return type of a gcc2
5103 builtin and then its argument prototype would still apply. */
5104char $ac_func();
5105
5106int main() {
5107
5108/* The GNU C library defines this for functions which it implements
5109 to always fail with ENOSYS. Some functions are actually named
5110 something starting with __ and the normal name is an alias. */
5111#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5112choke me
5113#else
5114$ac_func();
5115#endif
5116
5117; return 0; }
5118EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005119if { (eval echo configure:5120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005120 rm -rf conftest*
5121 eval "ac_cv_func_$ac_func=yes"
5122else
5123 echo "configure: failed program was:" >&5
5124 cat conftest.$ac_ext >&5
5125 rm -rf conftest*
5126 eval "ac_cv_func_$ac_func=no"
5127fi
5128rm -f conftest*
5129fi
5130
5131if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5132 echo "$ac_t""yes" 1>&6
5133 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5134 cat >> confdefs.h <<EOF
5135#define $ac_tr_func 1
5136EOF
5137 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005138echo "configure:5139: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005139if test "$cross_compiling" = yes; then
5140 echo "$ac_t""buggy" 1>&6
5141buggygetaddrinfo=yes
5142else
5143 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005144#line 5145 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005145#include "confdefs.h"
5146
5147#include <sys/types.h>
5148#include <netdb.h>
5149#include <string.h>
5150#include <sys/socket.h>
5151#include <netinet/in.h>
5152
5153main()
5154{
5155 int passive, gaierr, inet4 = 0, inet6 = 0;
5156 struct addrinfo hints, *ai, *aitop;
5157 char straddr[INET6_ADDRSTRLEN], strport[16];
5158
5159 for (passive = 0; passive <= 1; passive++) {
5160 memset(&hints, 0, sizeof(hints));
5161 hints.ai_family = AF_UNSPEC;
5162 hints.ai_flags = passive ? AI_PASSIVE : 0;
5163 hints.ai_socktype = SOCK_STREAM;
5164 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5165 (void)gai_strerror(gaierr);
5166 goto bad;
5167 }
5168 for (ai = aitop; ai; ai = ai->ai_next) {
5169 if (ai->ai_addr == NULL ||
5170 ai->ai_addrlen == 0 ||
5171 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5172 straddr, sizeof(straddr), strport, sizeof(strport),
5173 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5174 goto bad;
5175 }
5176 switch (ai->ai_family) {
5177 case AF_INET:
5178 if (strcmp(strport, "54321") != 0) {
5179 goto bad;
5180 }
5181 if (passive) {
5182 if (strcmp(straddr, "0.0.0.0") != 0) {
5183 goto bad;
5184 }
5185 } else {
5186 if (strcmp(straddr, "127.0.0.1") != 0) {
5187 goto bad;
5188 }
5189 }
5190 inet4++;
5191 break;
5192 case AF_INET6:
5193 if (strcmp(strport, "54321") != 0) {
5194 goto bad;
5195 }
5196 if (passive) {
5197 if (strcmp(straddr, "::") != 0) {
5198 goto bad;
5199 }
5200 } else {
5201 if (strcmp(straddr, "::1") != 0) {
5202 goto bad;
5203 }
5204 }
5205 inet6++;
5206 break;
5207 case AF_UNSPEC:
5208 goto bad;
5209 break;
5210 default:
5211 /* another family support? */
5212 break;
5213 }
5214 }
5215 }
5216
5217 if (!(inet4 == 0 || inet4 == 2))
5218 goto bad;
5219 if (!(inet6 == 0 || inet6 == 2))
5220 goto bad;
5221
5222 if (aitop)
5223 freeaddrinfo(aitop);
5224 exit(0);
5225
5226 bad:
5227 if (aitop)
5228 freeaddrinfo(aitop);
5229 exit(1);
5230}
5231
5232EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005233if { (eval echo configure:5234: \"$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 +00005234then
5235 echo "$ac_t""good" 1>&6
5236buggygetaddrinfo=no
5237else
5238 echo "configure: failed program was:" >&5
5239 cat conftest.$ac_ext >&5
5240 rm -fr conftest*
5241 echo "$ac_t""buggy" 1>&6
5242buggygetaddrinfo=yes
5243fi
5244rm -fr conftest*
5245fi
5246
5247else
5248 echo "$ac_t""no" 1>&6
5249buggygetaddrinfo=yes
5250fi
5251done
5252
5253
5254if test "$buggygetaddrinfo" = "yes"; then
5255 if test "$ipv6" = "yes"; then
5256 echo 'Fatal: You must get working getaddrinfo() function.'
5257 echo ' or you can specify "--disable-ipv6"'.
5258 exit 1
5259 fi
5260fi
5261for ac_func in getaddrinfo getnameinfo
5262do
5263echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005264echo "configure:5265: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005265if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5266 echo $ac_n "(cached) $ac_c" 1>&6
5267else
5268 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005269#line 5270 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005270#include "confdefs.h"
5271/* System header to define __stub macros and hopefully few prototypes,
5272 which can conflict with char $ac_func(); below. */
5273#include <assert.h>
5274/* Override any gcc2 internal prototype to avoid an error. */
5275/* We use char because int might match the return type of a gcc2
5276 builtin and then its argument prototype would still apply. */
5277char $ac_func();
5278
5279int main() {
5280
5281/* The GNU C library defines this for functions which it implements
5282 to always fail with ENOSYS. Some functions are actually named
5283 something starting with __ and the normal name is an alias. */
5284#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5285choke me
5286#else
5287$ac_func();
5288#endif
5289
5290; return 0; }
5291EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005292if { (eval echo configure:5293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005293 rm -rf conftest*
5294 eval "ac_cv_func_$ac_func=yes"
5295else
5296 echo "configure: failed program was:" >&5
5297 cat conftest.$ac_ext >&5
5298 rm -rf conftest*
5299 eval "ac_cv_func_$ac_func=no"
5300fi
5301rm -f conftest*
5302fi
5303
5304if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5305 echo "$ac_t""yes" 1>&6
5306 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5307 cat >> confdefs.h <<EOF
5308#define $ac_tr_func 1
5309EOF
5310
5311else
5312 echo "$ac_t""no" 1>&6
5313fi
5314done
5315
5316
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005317# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005318echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005319echo "configure:5320: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005320if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005321 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005322else
5323 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005324#line 5325 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005325#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005326#include <sys/types.h>
5327#include <sys/time.h>
5328#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005329int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005330struct tm *tp;
5331; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005332EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005333if { (eval echo configure:5334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005334 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005335 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005336else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005337 echo "configure: failed program was:" >&5
5338 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005339 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005340 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005341fi
5342rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005343fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005344
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005345echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005346if test $ac_cv_header_time = yes; then
5347 cat >> confdefs.h <<\EOF
5348#define TIME_WITH_SYS_TIME 1
5349EOF
5350
5351fi
5352
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005353echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005354echo "configure:5355: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005355if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005356 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005357else
5358 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005359#line 5360 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005360#include "confdefs.h"
5361#include <sys/types.h>
5362#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005363int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005364struct tm *tp; tp->tm_sec;
5365; return 0; }
5366EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005367if { (eval echo configure:5368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005368 rm -rf conftest*
5369 ac_cv_struct_tm=time.h
5370else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005371 echo "configure: failed program was:" >&5
5372 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005373 rm -rf conftest*
5374 ac_cv_struct_tm=sys/time.h
5375fi
5376rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005377fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005378
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005379echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005380if test $ac_cv_struct_tm = sys/time.h; then
5381 cat >> confdefs.h <<\EOF
5382#define TM_IN_SYS_TIME 1
5383EOF
5384
5385fi
5386
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005387echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005388echo "configure:5389: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005389if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005390 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005391else
5392 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005393#line 5394 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005394#include "confdefs.h"
5395#include <sys/types.h>
5396#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005397int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005398struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005399; return 0; }
5400EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005401if { (eval echo configure:5402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005402 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005403 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005404else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005405 echo "configure: failed program was:" >&5
5406 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005407 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005408 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005409fi
5410rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005411fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005412
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005413echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5414if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005415 cat >> confdefs.h <<\EOF
5416#define HAVE_TM_ZONE 1
5417EOF
5418
5419else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005420 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005421echo "configure:5422: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005422if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005423 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005424else
5425 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005426#line 5427 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005427#include "confdefs.h"
5428#include <time.h>
5429#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005430extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005431#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00005432int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005433atoi(*tzname);
5434; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005435EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005436if { (eval echo configure:5437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005437 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005438 ac_cv_var_tzname=yes
5439else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005440 echo "configure: failed program was:" >&5
5441 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005442 rm -rf conftest*
5443 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005444fi
5445rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005446fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005447
5448echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005449 if test $ac_cv_var_tzname = yes; then
5450 cat >> confdefs.h <<\EOF
5451#define HAVE_TZNAME 1
5452EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005453
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005454 fi
5455fi
5456
5457
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005458echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005459echo "configure:5460: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005460if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005461 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005462else
5463 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005464#line 5465 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005465#include "confdefs.h"
5466#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005467int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005468return altzone;
5469; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005470EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005471if { (eval echo configure:5472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005472 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005473 ac_cv_header_time_altzone=yes
5474else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005475 echo "configure: failed program was:" >&5
5476 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005477 rm -rf conftest*
5478 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005479fi
5480rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005481fi
5482
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005483echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005484if test $ac_cv_header_time_altzone = yes; then
5485 cat >> confdefs.h <<\EOF
5486#define HAVE_ALTZONE 1
5487EOF
5488
5489fi
5490
Guido van Rossumda88dad1995-01-26 00:46:29 +00005491was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005492echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005493echo "configure:5494: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005494cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005495#line 5496 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005496#include "confdefs.h"
5497
5498#include <sys/types.h>
5499#include <sys/select.h>
5500#include <sys/time.h>
5501
Guido van Rossumf78abae1997-01-21 22:02:36 +00005502int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005503;
5504; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005505EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005506if { (eval echo configure:5507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005507 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005508 cat >> confdefs.h <<\EOF
5509#define SYS_SELECT_WITH_SYS_TIME 1
5510EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005511 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005512else
5513 echo "configure: failed program was:" >&5
5514 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005515fi
5516rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005517echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005518
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005519echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005520echo "configure:5521: checking for addrinfo" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005521if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
5522 echo $ac_n "(cached) $ac_c" 1>&6
5523else
5524 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005525#line 5526 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005526#include "confdefs.h"
5527
5528# include <netdb.h>
5529int main() {
5530struct addrinfo a
5531; return 0; }
5532EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005533if { (eval echo configure:5534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005534 rm -rf conftest*
5535 ac_cv_struct_addrinfo=yes
5536else
5537 echo "configure: failed program was:" >&5
5538 cat conftest.$ac_ext >&5
5539 rm -rf conftest*
5540 ac_cv_struct_addrinfo=no
5541fi
5542rm -f conftest*
5543fi
5544
5545echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
5546if test $ac_cv_struct_addrinfo = yes; then
5547 cat >> confdefs.h <<\EOF
5548#define HAVE_ADDRINFO 1
5549EOF
5550
5551fi
5552
5553echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005554echo "configure:5555: checking for sockaddr_storage" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005555if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
5556 echo $ac_n "(cached) $ac_c" 1>&6
5557else
5558 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005559#line 5560 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005560#include "confdefs.h"
5561
5562# include <sys/types.h>
5563# include <sys/socket.h>
5564int main() {
5565struct sockaddr_storage s
5566; return 0; }
5567EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005568if { (eval echo configure:5569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005569 rm -rf conftest*
5570 ac_cv_struct_sockaddr_storage=yes
5571else
5572 echo "configure: failed program was:" >&5
5573 cat conftest.$ac_ext >&5
5574 rm -rf conftest*
5575 ac_cv_struct_sockaddr_storage=no
5576fi
5577rm -f conftest*
5578fi
5579
5580echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
5581if test $ac_cv_struct_sockaddr_storage = yes; then
5582 cat >> confdefs.h <<\EOF
5583#define HAVE_SOCKADDR_STORAGE 1
5584EOF
5585
5586fi
5587
Guido van Rossum627b2d71993-12-24 10:39:16 +00005588# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00005589
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005590echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005591echo "configure:5592: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005592if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005593 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005594else
5595 if test "$GCC" = yes; then
5596 # GCC predefines this symbol on systems where it applies.
5597cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005598#line 5599 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005599#include "confdefs.h"
5600#ifdef __CHAR_UNSIGNED__
5601 yes
5602#endif
5603
5604EOF
5605if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5606 egrep "yes" >/dev/null 2>&1; then
5607 rm -rf conftest*
5608 ac_cv_c_char_unsigned=yes
5609else
5610 rm -rf conftest*
5611 ac_cv_c_char_unsigned=no
5612fi
5613rm -f conftest*
5614
5615else
5616if test "$cross_compiling" = yes; then
5617 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5618else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005619 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005620#line 5621 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005621#include "confdefs.h"
5622/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005623#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00005624#define volatile
5625#endif
5626main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00005627 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005628}
5629EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005630if { (eval echo configure:5631: \"$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 +00005631then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005632 ac_cv_c_char_unsigned=yes
5633else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005634 echo "configure: failed program was:" >&5
5635 cat conftest.$ac_ext >&5
5636 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005637 ac_cv_c_char_unsigned=no
5638fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005639rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005640fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005641
5642fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005643fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005644
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005645echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005646if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5647 cat >> confdefs.h <<\EOF
5648#define __CHAR_UNSIGNED__ 1
5649EOF
5650
5651fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005652
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005653echo $ac_n "checking for working const""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005654echo "configure:5655: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005655if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005656 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005657else
5658 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005659#line 5660 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005660#include "confdefs.h"
5661
Guido van Rossumf78abae1997-01-21 22:02:36 +00005662int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005663
5664/* Ultrix mips cc rejects this. */
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005665typedef int charset[2]; const charset x = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005666/* SunOS 4.1.1 cc rejects this. */
5667char const *const *ccp;
5668char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005669/* NEC SVR4.0.2 mips cc rejects this. */
5670struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005671static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005672/* AIX XL C 1.02.0.0 rejects this.
5673 It does not let you subtract one const X* pointer from another in an arm
5674 of an if-expression whose if-part is not a constant expression */
5675const char *g = "string";
5676ccp = &g + (g ? g-g : 0);
5677/* HPUX 7.0 cc rejects these. */
5678++ccp;
5679p = (char**) ccp;
5680ccp = (char const *const *) p;
5681{ /* SCO 3.2v4 cc rejects this. */
5682 char *t;
5683 char const *s = 0 ? (char *) 0 : (char const *) 0;
5684
5685 *t++ = 0;
5686}
5687{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005688 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005689 const int *foo = &x[0];
5690 ++foo;
5691}
5692{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5693 typedef const int *iptr;
5694 iptr p = 0;
5695 ++p;
5696}
5697{ /* AIX XL C 1.02.0.0 rejects this saying
5698 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5699 struct s { int j; const int *ap[3]; };
5700 struct s *b; b->j = 5;
5701}
5702{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5703 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005704}
5705
5706; return 0; }
5707EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005708if { (eval echo configure:5709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005709 rm -rf conftest*
5710 ac_cv_c_const=yes
5711else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005712 echo "configure: failed program was:" >&5
5713 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005714 rm -rf conftest*
5715 ac_cv_c_const=no
5716fi
5717rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005718fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005719
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005720echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005721if test $ac_cv_c_const = no; then
5722 cat >> confdefs.h <<\EOF
5723#define const
5724EOF
5725
5726fi
5727
5728
Guido van Rossumda88dad1995-01-26 00:46:29 +00005729works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005730echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005731echo "configure:5732: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005732cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005733#line 5734 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005734#include "confdefs.h"
5735
Guido van Rossumf78abae1997-01-21 22:02:36 +00005736int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005737volatile int x; x = 0;
5738; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005739EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005740if { (eval echo configure:5741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005741 rm -rf conftest*
5742 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005743else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005744 echo "configure: failed program was:" >&5
5745 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005746 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005747 cat >> confdefs.h <<\EOF
5748#define volatile
5749EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005750
5751fi
5752rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005753echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005754
Guido van Rossumda88dad1995-01-26 00:46:29 +00005755works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005756echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005757echo "configure:5758: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005758cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005759#line 5760 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005760#include "confdefs.h"
5761
Guido van Rossumf78abae1997-01-21 22:02:36 +00005762int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005763signed char c;
5764; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005765EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005766if { (eval echo configure:5767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005767 rm -rf conftest*
5768 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005769else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005770 echo "configure: failed program was:" >&5
5771 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005772 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005773 cat >> confdefs.h <<\EOF
5774#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00005775EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005776
5777fi
5778rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005779echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005780
Guido van Rossumda88dad1995-01-26 00:46:29 +00005781have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005782echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005783echo "configure:5784: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005784cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005785#line 5786 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005786#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005787int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005788int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005789return foo(10);
5790; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005791EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005792if { (eval echo configure:5793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005793 rm -rf conftest*
5794 cat >> confdefs.h <<\EOF
5795#define HAVE_PROTOTYPES 1
5796EOF
5797 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005798else
5799 echo "configure: failed program was:" >&5
5800 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005801fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005802rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005803echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005804
Guido van Rossumda88dad1995-01-26 00:46:29 +00005805works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005806echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005807echo "configure:5808: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005808cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005809#line 5810 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005810#include "confdefs.h"
5811
5812#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00005813int foo(int x, ...) {
5814 va_list va;
5815 va_start(va, x);
5816 va_arg(va, int);
5817 va_arg(va, char *);
5818 va_arg(va, double);
5819 return 0;
5820}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005821
Guido van Rossumf78abae1997-01-21 22:02:36 +00005822int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005823return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005824; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005825EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005826if { (eval echo configure:5827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005827 rm -rf conftest*
5828 cat >> confdefs.h <<\EOF
5829#define HAVE_STDARG_PROTOTYPES 1
5830EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005831 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005832else
5833 echo "configure: failed program was:" >&5
5834 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005835fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005836rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005837echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005838
Guido van Rossumda88dad1995-01-26 00:46:29 +00005839if test "$have_prototypes" = yes; then
5840bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005841echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005842echo "configure:5843: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005843cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005844#line 5845 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005845#include "confdefs.h"
5846#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005847int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005848char **t;execve("@",t,t);
5849; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005850EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005851if { (eval echo configure:5852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005852 :
5853else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005854 echo "configure: failed program was:" >&5
5855 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005856 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005857 cat >> confdefs.h <<\EOF
5858#define BAD_EXEC_PROTOTYPES 1
5859EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005860 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005861fi
5862rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005863echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005864fi
5865
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005866# check if sockaddr has sa_len member
5867echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005868echo "configure:5869: checking if sockaddr has sa_len member" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005869cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005870#line 5871 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005871#include "confdefs.h"
5872#include <sys/types.h>
5873#include <sys/socket.h>
5874int main() {
5875struct sockaddr x;
5876x.sa_len = 0;
5877; return 0; }
5878EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005879if { (eval echo configure:5880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005880 rm -rf conftest*
5881 echo "$ac_t""yes" 1>&6
5882 cat >> confdefs.h <<\EOF
5883#define HAVE_SOCKADDR_SA_LEN 1
5884EOF
5885
5886else
5887 echo "configure: failed program was:" >&5
5888 cat conftest.$ac_ext >&5
5889 rm -rf conftest*
5890 echo "$ac_t""no" 1>&6
5891fi
5892rm -f conftest*
5893
Guido van Rossumda88dad1995-01-26 00:46:29 +00005894bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005895echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005896echo "configure:5897: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005897if test "$cross_compiling" = yes; then
5898 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5899else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005900 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005901#line 5902 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005902#include "confdefs.h"
5903
5904struct s { int a; int b; };
5905static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005906int foobar() {
5907 static int random;
5908 random = (int) &foo;
5909 return random;
5910}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005911static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005912main() {
5913 exit(!((int)&foo == foobar()));
5914}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005915
5916EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005917if { (eval echo configure:5918: \"$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 +00005918then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005919 :
5920else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005921 echo "configure: failed program was:" >&5
5922 cat conftest.$ac_ext >&5
5923 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005924 cat >> confdefs.h <<\EOF
5925#define BAD_STATIC_FORWARD 1
5926EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005927 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005928fi
5929rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005930fi
5931
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005932echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005933
Guido van Rossumda88dad1995-01-26 00:46:29 +00005934va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005935echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005936echo "configure:5937: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005937cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005938#line 5939 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005939#include "confdefs.h"
5940
5941#ifdef HAVE_STDARG_PROTOTYPES
5942#include <stdarg.h>
5943#else
5944#include <varargs.h>
5945#endif
5946
Guido van Rossumf78abae1997-01-21 22:02:36 +00005947int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005948va_list list1, list2; list1 = list2;
5949; return 0; }
5950EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005951if { (eval echo configure:5952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005952 :
5953else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005954 echo "configure: failed program was:" >&5
5955 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005956 rm -rf conftest*
5957 cat >> confdefs.h <<\EOF
5958#define VA_LIST_IS_ARRAY 1
5959EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005960 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005961fi
5962rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005963echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005964
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005965# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5966echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005967echo "configure:5968: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005968if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005969 echo $ac_n "(cached) $ac_c" 1>&6
5970else
5971 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005972#line 5973 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005973#include "confdefs.h"
5974/* System header to define __stub macros and hopefully few prototypes,
5975 which can conflict with char gethostbyname_r(); below. */
5976#include <assert.h>
5977/* Override any gcc2 internal prototype to avoid an error. */
5978/* We use char because int might match the return type of a gcc2
5979 builtin and then its argument prototype would still apply. */
5980char gethostbyname_r();
5981
5982int main() {
5983
5984/* The GNU C library defines this for functions which it implements
5985 to always fail with ENOSYS. Some functions are actually named
5986 something starting with __ and the normal name is an alias. */
5987#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5988choke me
5989#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005990gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005991#endif
5992
5993; return 0; }
5994EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00005995if { (eval echo configure:5996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005996 rm -rf conftest*
5997 eval "ac_cv_func_gethostbyname_r=yes"
5998else
5999 echo "configure: failed program was:" >&5
6000 cat conftest.$ac_ext >&5
6001 rm -rf conftest*
6002 eval "ac_cv_func_gethostbyname_r=no"
6003fi
6004rm -f conftest*
6005fi
6006
6007if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6008 echo "$ac_t""yes" 1>&6
6009
6010 cat >> confdefs.h <<\EOF
6011#define HAVE_GETHOSTBYNAME_R 1
6012EOF
6013
6014 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006015echo "configure:6016: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006016 OLD_CFLAGS=$CFLAGS
6017 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
6018 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006019#line 6020 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006020#include "confdefs.h"
6021
6022# include <netdb.h>
6023
6024int main() {
6025
6026 char *name;
6027 struct hostent *he, *res;
6028 char buffer[2048];
6029 int buflen = 2048;
6030 int h_errnop;
6031
6032 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
6033
6034; return 0; }
6035EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006036if { (eval echo configure:6037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006037 rm -rf conftest*
6038
6039 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006040#define HAVE_GETHOSTBYNAME_R 1
6041EOF
6042
6043 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006044#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6045EOF
6046
6047 echo "$ac_t""yes" 1>&6
6048
6049else
6050 echo "configure: failed program was:" >&5
6051 cat conftest.$ac_ext >&5
6052 rm -rf conftest*
6053
6054 echo "$ac_t""no" 1>&6
6055 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006056echo "configure:6057: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006057 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006058#line 6059 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006059#include "confdefs.h"
6060
6061# include <netdb.h>
6062
6063int main() {
6064
6065 char *name;
6066 struct hostent *he;
6067 char buffer[2048];
6068 int buflen = 2048;
6069 int h_errnop;
6070
6071 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
6072
6073; return 0; }
6074EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006075if { (eval echo configure:6076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006076 rm -rf conftest*
6077
6078 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006079#define HAVE_GETHOSTBYNAME_R 1
6080EOF
6081
6082 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006083#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6084EOF
6085
6086 echo "$ac_t""yes" 1>&6
6087
6088else
6089 echo "configure: failed program was:" >&5
6090 cat conftest.$ac_ext >&5
6091 rm -rf conftest*
6092
6093 echo "$ac_t""no" 1>&6
6094 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006095echo "configure:6096: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006096 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006097#line 6098 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006098#include "confdefs.h"
6099
6100# include <netdb.h>
6101
6102int main() {
6103
6104 char *name;
6105 struct hostent *he;
6106 struct hostent_data data;
6107
6108 (void) gethostbyname_r(name, he, &data);
6109
6110; return 0; }
6111EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006112if { (eval echo configure:6113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006113 rm -rf conftest*
6114
6115 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006116#define HAVE_GETHOSTBYNAME_R 1
6117EOF
6118
6119 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006120#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6121EOF
6122
6123 echo "$ac_t""yes" 1>&6
6124
6125else
6126 echo "configure: failed program was:" >&5
6127 cat conftest.$ac_ext >&5
6128 rm -rf conftest*
6129
6130 echo "$ac_t""no" 1>&6
6131
6132fi
6133rm -f conftest*
6134
6135fi
6136rm -f conftest*
6137
6138fi
6139rm -f conftest*
6140 CFLAGS=$OLD_CFLAGS
6141
6142else
6143 echo "$ac_t""no" 1>&6
6144
Thomas Wouters3a584202000-08-05 23:28:51 +00006145 for ac_func in gethostbyname
6146do
6147echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006148echo "configure:6149: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006149if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006150 echo $ac_n "(cached) $ac_c" 1>&6
6151else
6152 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006153#line 6154 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006154#include "confdefs.h"
6155/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00006156 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006157#include <assert.h>
6158/* Override any gcc2 internal prototype to avoid an error. */
6159/* We use char because int might match the return type of a gcc2
6160 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006161char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006162
6163int main() {
6164
6165/* The GNU C library defines this for functions which it implements
6166 to always fail with ENOSYS. Some functions are actually named
6167 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006168#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006169choke me
6170#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006171$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006172#endif
6173
6174; return 0; }
6175EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006176if { (eval echo configure:6177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006177 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006178 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006179else
6180 echo "configure: failed program was:" >&5
6181 cat conftest.$ac_ext >&5
6182 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006183 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006184fi
6185rm -f conftest*
6186fi
6187
Thomas Wouters3a584202000-08-05 23:28:51 +00006188if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006189 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00006190 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6191 cat >> confdefs.h <<EOF
6192#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006193EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00006194
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006195else
6196 echo "$ac_t""no" 1>&6
6197fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006198done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006199
6200
6201fi
6202
6203
6204
6205
6206
6207
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006208
Guido van Rossum627b2d71993-12-24 10:39:16 +00006209# checks for system services
6210# (none yet)
6211
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006212# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006213echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006214echo "configure:6215: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006215if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006216 echo $ac_n "(cached) $ac_c" 1>&6
6217else
6218 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006219#line 6220 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006220#include "confdefs.h"
6221/* System header to define __stub macros and hopefully few prototypes,
6222 which can conflict with char __fpu_control(); below. */
6223#include <assert.h>
6224/* Override any gcc2 internal prototype to avoid an error. */
6225/* We use char because int might match the return type of a gcc2
6226 builtin and then its argument prototype would still apply. */
6227char __fpu_control();
6228
6229int main() {
6230
6231/* The GNU C library defines this for functions which it implements
6232 to always fail with ENOSYS. Some functions are actually named
6233 something starting with __ and the normal name is an alias. */
6234#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6235choke me
6236#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006237__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006238#endif
6239
6240; return 0; }
6241EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006242if { (eval echo configure:6243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006243 rm -rf conftest*
6244 eval "ac_cv_func___fpu_control=yes"
6245else
6246 echo "configure: failed program was:" >&5
6247 cat conftest.$ac_ext >&5
6248 rm -rf conftest*
6249 eval "ac_cv_func___fpu_control=no"
6250fi
6251rm -f conftest*
6252fi
6253
6254if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6255 echo "$ac_t""yes" 1>&6
6256 :
6257else
6258 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006259echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006260echo "configure:6261: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00006261ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006262if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006263 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006264else
6265 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006266LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006267cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006268#line 6269 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006269#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006270/* Override any gcc2 internal prototype to avoid an error. */
6271/* We use char because int might match the return type of a gcc2
6272 builtin and then its argument prototype would still apply. */
6273char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00006274
Guido van Rossumf78abae1997-01-21 22:02:36 +00006275int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006276__fpu_control()
6277; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006278EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006279if { (eval echo configure:6280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006280 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006281 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006282else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006283 echo "configure: failed program was:" >&5
6284 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006285 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006286 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006287fi
6288rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006289LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006290
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006291fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006292if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006293 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006294 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6295 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006296 cat >> confdefs.h <<EOF
6297#define $ac_tr_lib 1
6298EOF
6299
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006300 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006301
6302else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006303 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006304fi
6305
6306
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006307fi
6308
6309
Guido van Rossum7f253911997-05-09 02:42:48 +00006310# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00006311echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006312echo "configure:6313: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006313# Check whether --with-fpectl or --without-fpectl was given.
6314if test "${with_fpectl+set}" = set; then
6315 withval="$with_fpectl"
6316
6317if test "$withval" != no
6318then cat >> confdefs.h <<\EOF
6319#define WANT_SIGFPE_HANDLER 1
6320EOF
6321 echo "$ac_t""yes" 1>&6
6322else echo "$ac_t""no" 1>&6
6323fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006324else
6325 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006326fi
6327
6328
Guido van Rossum7f43da71994-08-01 12:15:30 +00006329# check for --with-libm=...
6330
Guido van Rossum563e7081996-09-10 18:20:48 +00006331case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006332Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006333next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006334BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006335*) LIBM=-lm
6336esac
Guido van Rossum7f253911997-05-09 02:42:48 +00006337echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006338echo "configure:6339: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006339# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006340if test "${with_libm+set}" = set; then
6341 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006342
Guido van Rossum7f253911997-05-09 02:42:48 +00006343if test "$withval" = no
6344then LIBM=
6345 echo "$ac_t""force LIBM empty" 1>&6
6346elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006347then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006348 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006349else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006350fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006351else
6352 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006353fi
6354
6355
6356# check for --with-libc=...
6357
Guido van Rossum7f253911997-05-09 02:42:48 +00006358echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006359echo "configure:6360: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006360# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006361if test "${with_libc+set}" = set; then
6362 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006363
Guido van Rossum7f253911997-05-09 02:42:48 +00006364if test "$withval" = no
6365then LIBC=
6366 echo "$ac_t""force LIBC empty" 1>&6
6367elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006368then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006369 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006370else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006371fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006372else
6373 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006374fi
6375
6376
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006377# check for hypot() in math library
6378LIBS_SAVE=$LIBS
6379LIBS="$LIBS $LIBM"
6380for ac_func in hypot
6381do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006382echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006383echo "configure:6384: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006384if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006385 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006386else
6387 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006388#line 6389 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006389#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006390/* System header to define __stub macros and hopefully few prototypes,
6391 which can conflict with char $ac_func(); below. */
6392#include <assert.h>
6393/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006394/* We use char because int might match the return type of a gcc2
6395 builtin and then its argument prototype would still apply. */
6396char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006397
Guido van Rossumf78abae1997-01-21 22:02:36 +00006398int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006399
6400/* The GNU C library defines this for functions which it implements
6401 to always fail with ENOSYS. Some functions are actually named
6402 something starting with __ and the normal name is an alias. */
6403#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6404choke me
6405#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006406$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006407#endif
6408
6409; return 0; }
6410EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006411if { (eval echo configure:6412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006412 rm -rf conftest*
6413 eval "ac_cv_func_$ac_func=yes"
6414else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006415 echo "configure: failed program was:" >&5
6416 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006417 rm -rf conftest*
6418 eval "ac_cv_func_$ac_func=no"
6419fi
6420rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006421fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00006422
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006423if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6424 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006425 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6426 cat >> confdefs.h <<EOF
6427#define $ac_tr_func 1
6428EOF
6429
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006430else
6431 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006432LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006433fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006434done
6435
Guido van Rossumf78abae1997-01-21 22:02:36 +00006436
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006437LIBS=$LIBS_SAVE
6438
Guido van Rossumad713701997-07-10 22:42:38 +00006439# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00006440echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006441echo "configure:6442: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006442if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00006443 echo $ac_n "(cached) $ac_c" 1>&6
6444else
6445 if test "$cross_compiling" = yes; then
6446 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6447else
6448 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006449#line 6450 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006450#include "confdefs.h"
6451#include <stdio.h>
6452#ifdef HAVE_STDLIB
6453#include <stdlib.h>
6454#else
6455char *malloc(), *realloc();
6456int *free();
6457#endif
6458main() {
6459 char *p;
6460 p = malloc(0);
6461 if (p == NULL) exit(1);
6462 p = realloc(p, 0);
6463 if (p == NULL) exit(1);
6464 free(p);
6465 exit(0);
6466}
6467EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006468if { (eval echo configure:6469: \"$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 +00006469then
6470 ac_cv_malloc_zero=nonnull
6471else
6472 echo "configure: failed program was:" >&5
6473 cat conftest.$ac_ext >&5
6474 rm -fr conftest*
6475 ac_cv_malloc_zero=null
6476fi
6477rm -fr conftest*
6478fi
6479
6480fi
6481
6482echo "$ac_t""$ac_cv_malloc_zero" 1>&6
6483if test "$ac_cv_malloc_zero" = null
6484then
6485 cat >> confdefs.h <<\EOF
6486#define MALLOC_ZERO_RETURNS_NULL 1
6487EOF
6488
6489fi
6490
Guido van Rossumef2255b2000-03-10 22:30:29 +00006491# check for wchar.h
6492ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6493echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006494echo "configure:6495: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006495if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006496 echo $ac_n "(cached) $ac_c" 1>&6
6497else
6498 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006499#line 6500 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006500#include "confdefs.h"
6501#include <wchar.h>
6502EOF
6503ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006504{ (eval echo configure:6505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006505ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6506if test -z "$ac_err"; then
6507 rm -rf conftest*
6508 eval "ac_cv_header_$ac_safe=yes"
6509else
6510 echo "$ac_err" >&5
6511 echo "configure: failed program was:" >&5
6512 cat conftest.$ac_ext >&5
6513 rm -rf conftest*
6514 eval "ac_cv_header_$ac_safe=no"
6515fi
6516rm -f conftest*
6517fi
6518if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6519 echo "$ac_t""yes" 1>&6
6520 cat >> confdefs.h <<\EOF
6521#define HAVE_WCHAR_H 1
6522EOF
6523 wchar_h="yes"
6524else
6525 echo "$ac_t""no" 1>&6
6526wchar_h="no"
6527
6528fi
6529
6530
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006531# determine wchar_t size
6532if test "$wchar_h" = yes
6533then
6534 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006535echo "configure:6536: checking size of wchar_t" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006536if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
6537 echo $ac_n "(cached) $ac_c" 1>&6
6538else
6539 if test "$cross_compiling" = yes; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006540 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6541else
6542 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006543#line 6544 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006544#include "confdefs.h"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006545#include <stdio.h>
6546main()
6547{
6548 FILE *f=fopen("conftestval", "w");
6549 if (!f) exit(1);
6550 fprintf(f, "%d\n", sizeof(wchar_t));
Guido van Rossumef2255b2000-03-10 22:30:29 +00006551 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00006552}
Guido van Rossumef2255b2000-03-10 22:30:29 +00006553EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006554if { (eval echo configure:6555: \"$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 +00006555then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006556 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006557else
6558 echo "configure: failed program was:" >&5
6559 cat conftest.$ac_ext >&5
6560 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006561 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00006562fi
6563rm -fr conftest*
6564fi
6565
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006566fi
6567echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
6568cat >> confdefs.h <<EOF
6569#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
6570EOF
6571
6572
6573fi
6574
6575echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006576echo "configure:6577: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006577# Check whether --enable-unicode or --disable-unicode was given.
6578if test "${enable_unicode+set}" = set; then
6579 enableval="$enable_unicode"
6580 :
6581else
6582 enable_unicode=yes
6583fi
6584
6585
6586if test $enable_unicode = yes
6587then
Martin v. Löwisfd917792001-06-27 20:22:04 +00006588 # Without any arguments, Py_UNICODE defaults to two-byte mode
6589 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006590fi
6591
6592case "$enable_unicode" in
6593ucs2) unicode_size="2"
6594 cat >> confdefs.h <<\EOF
6595#define Py_UNICODE_SIZE 2
6596EOF
6597
6598 ;;
6599ucs4) unicode_size="4"
6600 cat >> confdefs.h <<\EOF
6601#define Py_UNICODE_SIZE 4
6602EOF
6603
6604 ;;
6605esac
6606
6607if test "$enable_unicode" = "no"
6608then
6609 echo "$ac_t""not used" 1>&6
6610else
6611 cat >> confdefs.h <<\EOF
6612#define Py_USING_UNICODE 1
6613EOF
6614
6615 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
6616 then
6617 PY_UNICODE_TYPE="wchar_t"
6618 cat >> confdefs.h <<\EOF
6619#define HAVE_USABLE_WCHAR_T 1
6620EOF
6621
6622 cat >> confdefs.h <<\EOF
6623#define PY_UNICODE_TYPE wchar_t
6624EOF
6625
6626 elif test "$ac_cv_sizeof_short" = "$unicode_size"
6627 then
6628 PY_UNICODE_TYPE="unsigned short"
6629 cat >> confdefs.h <<\EOF
6630#define PY_UNICODE_TYPE unsigned short
6631EOF
6632
6633 elif test "$ac_cv_sizeof_long" = "$unicode_size"
6634 then
6635 PY_UNICODE_TYPE="unsigned long"
6636 cat >> confdefs.h <<\EOF
6637#define PY_UNICODE_TYPE unsigned long
6638EOF
6639
6640 else
6641 PY_UNICODE_TYPE="no type found"
6642 fi
6643 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
6644fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006645
6646# check for endianness
6647echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006648echo "configure:6649: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006649if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006650 echo $ac_n "(cached) $ac_c" 1>&6
6651else
6652 ac_cv_c_bigendian=unknown
6653# See if sys/param.h defines the BYTE_ORDER macro.
6654cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006655#line 6656 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006656#include "confdefs.h"
6657#include <sys/types.h>
6658#include <sys/param.h>
6659int main() {
6660
6661#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6662 bogus endian macros
6663#endif
6664; return 0; }
6665EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006666if { (eval echo configure:6667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006667 rm -rf conftest*
6668 # It does; now see whether it defined to BIG_ENDIAN or not.
6669cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006670#line 6671 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006671#include "confdefs.h"
6672#include <sys/types.h>
6673#include <sys/param.h>
6674int main() {
6675
6676#if BYTE_ORDER != BIG_ENDIAN
6677 not big endian
6678#endif
6679; return 0; }
6680EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006681if { (eval echo configure:6682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006682 rm -rf conftest*
6683 ac_cv_c_bigendian=yes
6684else
6685 echo "configure: failed program was:" >&5
6686 cat conftest.$ac_ext >&5
6687 rm -rf conftest*
6688 ac_cv_c_bigendian=no
6689fi
6690rm -f conftest*
6691else
6692 echo "configure: failed program was:" >&5
6693 cat conftest.$ac_ext >&5
6694fi
6695rm -f conftest*
6696if test $ac_cv_c_bigendian = unknown; then
6697if test "$cross_compiling" = yes; then
6698 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6699else
6700 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006701#line 6702 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006702#include "confdefs.h"
6703main () {
6704 /* Are we little or big endian? From Harbison&Steele. */
6705 union
6706 {
6707 long l;
6708 char c[sizeof (long)];
6709 } u;
6710 u.l = 1;
6711 exit (u.c[sizeof (long) - 1] == 1);
6712}
6713EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006714if { (eval echo configure:6715: \"$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 +00006715then
6716 ac_cv_c_bigendian=no
6717else
6718 echo "configure: failed program was:" >&5
6719 cat conftest.$ac_ext >&5
6720 rm -fr conftest*
6721 ac_cv_c_bigendian=yes
6722fi
6723rm -fr conftest*
6724fi
6725
6726fi
6727fi
6728
6729echo "$ac_t""$ac_cv_c_bigendian" 1>&6
6730if test $ac_cv_c_bigendian = yes; then
6731 cat >> confdefs.h <<\EOF
6732#define WORDS_BIGENDIAN 1
6733EOF
6734
6735fi
6736
6737
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006738# Check whether right shifting a negative integer extends the sign bit
6739# or fills with zeros (like the Cray J90, according to Tim Peters).
6740echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006741echo "configure:6742: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006742if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00006743 echo $ac_n "(cached) $ac_c" 1>&6
6744else
6745
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006746if test "$cross_compiling" = yes; then
6747 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6748else
6749 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006750#line 6751 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006751#include "confdefs.h"
6752
6753int main()
6754{
Vladimir Marangozova6180282000-07-12 05:05:06 +00006755 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006756}
6757
6758EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006759if { (eval echo configure:6760: \"$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 +00006760then
6761 ac_cv_rshift_extends_sign=yes
6762else
6763 echo "configure: failed program was:" >&5
6764 cat conftest.$ac_ext >&5
6765 rm -fr conftest*
6766 ac_cv_rshift_extends_sign=no
6767fi
6768rm -fr conftest*
6769fi
6770
6771fi
6772
6773echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
6774if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006775then
6776 cat >> confdefs.h <<\EOF
6777#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
6778EOF
6779
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006780fi
6781
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006782# check for getc_unlocked and related locking functions
6783echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006784echo "configure:6785: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006785if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
6786 echo $ac_n "(cached) $ac_c" 1>&6
6787else
6788
6789cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006790#line 6791 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006791#include "confdefs.h"
6792#include <stdio.h>
6793int main() {
6794
6795 FILE *f = fopen("/dev/null", "r");
6796 flockfile(f);
6797 getc_unlocked(f);
6798 funlockfile(f);
6799
6800; return 0; }
6801EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006802if { (eval echo configure:6803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006803 rm -rf conftest*
6804 ac_cv_have_getc_unlocked=yes
6805else
6806 echo "configure: failed program was:" >&5
6807 cat conftest.$ac_ext >&5
6808 rm -rf conftest*
6809 ac_cv_have_getc_unlocked=no
6810fi
6811rm -f conftest*
6812fi
6813
6814echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
6815if test "$ac_cv_have_getc_unlocked" = yes
6816then
6817 cat >> confdefs.h <<\EOF
6818#define HAVE_GETC_UNLOCKED 1
6819EOF
6820
6821fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006822
Guido van Rossum353ae582001-07-10 16:45:32 +00006823# check for readline 4.2
6824echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006825echo "configure:6826: checking for rl_completion_matches in -lreadline" >&5
Guido van Rossum353ae582001-07-10 16:45:32 +00006826ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
6827if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6828 echo $ac_n "(cached) $ac_c" 1>&6
6829else
6830 ac_save_LIBS="$LIBS"
6831LIBS="-lreadline -ltermcap $LIBS"
6832cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006833#line 6834 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00006834#include "confdefs.h"
6835/* Override any gcc2 internal prototype to avoid an error. */
6836/* We use char because int might match the return type of a gcc2
6837 builtin and then its argument prototype would still apply. */
6838char rl_completion_matches();
6839
6840int main() {
6841rl_completion_matches()
6842; return 0; }
6843EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006844if { (eval echo configure:6845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum353ae582001-07-10 16:45:32 +00006845 rm -rf conftest*
6846 eval "ac_cv_lib_$ac_lib_var=yes"
6847else
6848 echo "configure: failed program was:" >&5
6849 cat conftest.$ac_ext >&5
6850 rm -rf conftest*
6851 eval "ac_cv_lib_$ac_lib_var=no"
6852fi
6853rm -f conftest*
6854LIBS="$ac_save_LIBS"
6855
6856fi
6857if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6858 echo "$ac_t""yes" 1>&6
6859 cat >> confdefs.h <<\EOF
6860#define HAVE_RL_COMPLETION_MATCHES 1
6861EOF
6862
6863else
6864 echo "$ac_t""no" 1>&6
6865fi
6866
6867
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006868echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006869echo "configure:6870: checking for broken nice()" >&5
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006870if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
6871 echo $ac_n "(cached) $ac_c" 1>&6
6872else
6873
6874if test "$cross_compiling" = yes; then
6875 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6876else
6877 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006878#line 6879 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006879#include "confdefs.h"
6880
6881int main()
6882{
6883 int val1 = nice(1);
6884 if (val1 != -1 && val1 == nice(2))
6885 exit(0);
6886 exit(1);
6887}
6888
6889EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006890if { (eval echo configure:6891: \"$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 +00006891then
6892 ac_cv_broken_nice=yes
6893else
6894 echo "configure: failed program was:" >&5
6895 cat conftest.$ac_ext >&5
6896 rm -fr conftest*
6897 ac_cv_broken_nice=no
6898fi
6899rm -fr conftest*
6900fi
6901
6902fi
6903
6904echo "$ac_t""$ac_cv_broken_nice" 1>&6
6905if test "$ac_cv_broken_nice" = yes
6906then
6907 cat >> confdefs.h <<\EOF
6908#define HAVE_BROKEN_NICE 1
6909EOF
6910
6911fi
6912
Guido van Rossum95713eb2000-05-18 20:53:31 +00006913# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
6914# Add sys/socket.h to confdefs.h
6915cat >> confdefs.h <<\EOF
6916#ifdef HAVE_SYS_SOCKET_H
6917#include <sys/socket.h>
6918#endif
6919EOF
6920echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006921echo "configure:6922: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006922if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00006923 echo $ac_n "(cached) $ac_c" 1>&6
6924else
6925 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006926#line 6927 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00006927#include "confdefs.h"
6928#include <sys/types.h>
6929#if STDC_HEADERS
6930#include <stdlib.h>
6931#include <stddef.h>
6932#endif
6933EOF
6934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6935 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6936 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006937 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00006938else
6939 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006940 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00006941fi
6942rm -f conftest*
6943
6944fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006945echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
6946if test $ac_cv_type_socklen_t = no; then
6947 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00006948#define socklen_t int
6949EOF
6950
6951fi
6952
6953
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00006954# Add Python/ prefix to LIBOBJS
6955libobjs=$LIBOBJS
6956LIBOBJS=
6957for obj in $libobjs; do
6958 LIBOBJS="$LIBOBJS Python/$obj"
6959done
6960
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006961#AC_MSG_CHECKING(for Modules/Setup)
6962#if test ! -f Modules/Setup ; then
6963# if test ! -d Modules ; then
6964# mkdir Modules
6965# fi
6966# cp "$srcdir/Modules/Setup.dist" Modules/Setup
6967# AC_MSG_RESULT(creating)
6968#else
6969# AC_MSG_RESULT(already exists)
6970#fi
6971
6972
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00006973SRCDIRS="Parser Grammar Objects Python Modules"
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00006974echo $ac_n "checking for build directories""... $ac_c" 1>&6
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00006975echo "configure:6976: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006976for dir in $SRCDIRS; do
6977 if test ! -d $dir; then
6978 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00006979 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006980done
6981echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00006982
Guido van Rossum627b2d71993-12-24 10:39:16 +00006983# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006984trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006985cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006986# This file is a shell script that caches the results of configure
6987# tests run on this system so they can be shared between configure
6988# scripts and configure runs. It is not useful on other systems.
6989# If it contains results you don't want to keep, you may remove or edit it.
6990#
6991# By default, configure uses ./config.cache as the cache file,
6992# creating it if it does not exist already. You can give configure
6993# the --cache-file=FILE option to use a different cache file; that is
6994# what configure does when it calls configure scripts in
6995# subdirectories, so they share the cache.
6996# Giving --cache-file=/dev/null disables caching, for debugging configure.
6997# config.status only pays attention to the cache file if you give it the
6998# --recheck option to rerun configure.
6999#
7000EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007001# The following way of writing the cache mishandles newlines in values,
7002# but we know of no workaround that is simple, portable, and efficient.
7003# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007004# Ultrix sh set writes to stderr and can't be redirected directly,
7005# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007006(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007007 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007008 *ac_space=\ *)
7009 # `set' does not quote correctly, so add quotes (double-quote substitution
7010 # turns \\\\ into \\, and sed turns \\ into \).
7011 sed -n \
7012 -e "s/'/'\\\\''/g" \
7013 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7014 ;;
7015 *)
7016 # `set' quotes correctly as required by POSIX, so do not add quotes.
7017 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7018 ;;
7019 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007020if cmp -s $cache_file confcache; then
7021 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007022else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007023 if test -w $cache_file; then
7024 echo "updating cache $cache_file"
7025 cat confcache > $cache_file
7026 else
7027 echo "not updating unwritable cache $cache_file"
7028 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007029fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007030rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007031
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007032trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007033
7034test "x$prefix" = xNONE && prefix=$ac_default_prefix
7035# Let make expand exec_prefix.
7036test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007037
Guido van Rossum7f43da71994-08-01 12:15:30 +00007038# Any assignment to VPATH causes Sun make to only execute
7039# the first set of double-colon rules, so remove it if not needed.
7040# If there is a colon in the path, we need to keep it.
7041if test "x$srcdir" = x.; then
7042 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7043fi
7044
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007045trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00007046
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007047DEFS=-DHAVE_CONFIG_H
7048
7049# Without the "./", some shells look in PATH for config.status.
7050: ${CONFIG_STATUS=./config.status}
7051
7052echo creating $CONFIG_STATUS
7053rm -f $CONFIG_STATUS
7054cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007055#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007056# Generated automatically by configure.
7057# Run this file to recreate the current configuration.
7058# This directory was configured as follows,
7059# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7060#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007061# $0 $ac_configure_args
7062#
7063# Compiler output produced by configure, useful for debugging
7064# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007065
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007066ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007067for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00007068do
Guido van Rossum7f43da71994-08-01 12:15:30 +00007069 case "\$ac_option" in
7070 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007071 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7072 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00007073 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007074 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007075 exit 0 ;;
7076 -help | --help | --hel | --he | --h)
7077 echo "\$ac_cs_usage"; exit 0 ;;
7078 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00007079 esac
7080done
7081
Guido van Rossum7f43da71994-08-01 12:15:30 +00007082ac_given_srcdir=$srcdir
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007083ac_given_INSTALL="$INSTALL"
Guido van Rossum627b2d71993-12-24 10:39:16 +00007084
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007085trap 'rm -fr `echo "Makefile.pre Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007086EOF
7087cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007088
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007089# Protect against being on the right side of a sed subst in config.status.
7090sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7091 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007092$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00007093$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007094s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007095s%@CFLAGS@%$CFLAGS%g
7096s%@CPPFLAGS@%$CPPFLAGS%g
7097s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007098s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007099s%@DEFS@%$DEFS%g
7100s%@LDFLAGS@%$LDFLAGS%g
7101s%@LIBS@%$LIBS%g
7102s%@exec_prefix@%$exec_prefix%g
7103s%@prefix@%$prefix%g
7104s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007105s%@bindir@%$bindir%g
7106s%@sbindir@%$sbindir%g
7107s%@libexecdir@%$libexecdir%g
7108s%@datadir@%$datadir%g
7109s%@sysconfdir@%$sysconfdir%g
7110s%@sharedstatedir@%$sharedstatedir%g
7111s%@localstatedir@%$localstatedir%g
7112s%@libdir@%$libdir%g
7113s%@includedir@%$includedir%g
7114s%@oldincludedir@%$oldincludedir%g
7115s%@infodir@%$infodir%g
7116s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00007117s%@VERSION@%$VERSION%g
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00007118s%@CONFIG_ARGS@%$CONFIG_ARGS%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00007119s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00007120s%@SGI_ABI@%$SGI_ABI%g
Martin v. Löwis22352952000-12-13 17:37:02 +00007121s%@CXX@%$CXX%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007122s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007123s%@CC@%$CC%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007124s%@EXEEXT@%$EXEEXT%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007125s%@LIBRARY@%$LIBRARY%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007126s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007127s%@DLLLIBRARY@%$DLLLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00007128s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007129s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007130s%@AR@%$AR%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007131s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007132s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007133s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007134s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00007135s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007136s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007137s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007138s%@SO@%$SO%g
7139s%@LDSHARED@%$LDSHARED%g
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007140s%@BLDSHARED@%$BLDSHARED%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007141s%@CCSHARED@%$CCSHARED%g
7142s%@LINKFORSHARED@%$LINKFORSHARED%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007143s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007144s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7145s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
Guido van Rossum009f7871997-12-04 00:51:42 +00007146s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00007147s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00007148s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007149s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00007150s%@DYNLOADFILE@%$DYNLOADFILE%g
Neil Schemenauer4e425612001-06-19 15:44:15 +00007151s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007152s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007153s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7154s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7155s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00007156s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007157s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007158s%@LIBM@%$LIBM%g
7159s%@LIBC@%$LIBC%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007160s%@SRCDIRS@%$SRCDIRS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007161
7162CEOF
7163EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007164
7165cat >> $CONFIG_STATUS <<\EOF
7166
7167# Split the substitutions into bite-sized pieces for seds with
7168# small command number limits, like on Digital OSF/1 and HP-UX.
7169ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7170ac_file=1 # Number of current file.
7171ac_beg=1 # First line for current file.
7172ac_end=$ac_max_sed_cmds # Line after last line for current file.
7173ac_more_lines=:
7174ac_sed_cmds=""
7175while $ac_more_lines; do
7176 if test $ac_beg -gt 1; then
7177 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7178 else
7179 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7180 fi
7181 if test ! -s conftest.s$ac_file; then
7182 ac_more_lines=false
7183 rm -f conftest.s$ac_file
7184 else
7185 if test -z "$ac_sed_cmds"; then
7186 ac_sed_cmds="sed -f conftest.s$ac_file"
7187 else
7188 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7189 fi
7190 ac_file=`expr $ac_file + 1`
7191 ac_beg=$ac_end
7192 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7193 fi
7194done
7195if test -z "$ac_sed_cmds"; then
7196 ac_sed_cmds=cat
7197fi
7198EOF
7199
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007200cat >> $CONFIG_STATUS <<EOF
7201
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007202CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007203EOF
7204cat >> $CONFIG_STATUS <<\EOF
7205for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007206 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007207 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007208 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007209 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7210 *) ac_file_in="${ac_file}.in" ;;
7211 esac
7212
Guido van Rossumf78abae1997-01-21 22:02:36 +00007213 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007214
7215 # Remove last slash and all that follows it. Not all systems have dirname.
7216 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7217 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7218 # The file is in a subdirectory.
7219 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007220 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007221 # A "../" for each directory in $ac_dir_suffix.
7222 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7223 else
7224 ac_dir_suffix= ac_dots=
7225 fi
7226
7227 case "$ac_given_srcdir" in
7228 .) srcdir=.
7229 if test -z "$ac_dots"; then top_srcdir=.
7230 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7231 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7232 *) # Relative path.
7233 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7234 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7235 esac
7236
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007237 case "$ac_given_INSTALL" in
7238 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7239 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7240 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007241
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007242 echo creating "$ac_file"
7243 rm -f "$ac_file"
7244 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7245 case "$ac_file" in
7246 *Makefile*) ac_comsub="1i\\
7247# $configure_input" ;;
7248 *) ac_comsub= ;;
7249 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007250
7251 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 +00007252 sed -e "$ac_comsub
7253s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007254s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007255s%@top_srcdir@%$top_srcdir%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007256s%@INSTALL@%$INSTALL%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00007257" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00007258fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00007259rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007260
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007261# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7262# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007263#
7264# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007265ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7266ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007267ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007268ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007269# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007270ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7271ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007272ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007273ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007274# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007275ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7276ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007277ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007278ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007279
Guido van Rossumf78abae1997-01-21 22:02:36 +00007280if test "${CONFIG_HEADERS+set}" != set; then
7281EOF
7282cat >> $CONFIG_STATUS <<EOF
7283 CONFIG_HEADERS="config.h"
7284EOF
7285cat >> $CONFIG_STATUS <<\EOF
7286fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007287for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007288 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007289 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007290 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007291 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7292 *) ac_file_in="${ac_file}.in" ;;
7293 esac
7294
Guido van Rossum7f43da71994-08-01 12:15:30 +00007295 echo creating $ac_file
7296
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007297 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00007298 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7299 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007300
7301EOF
7302
7303# Transform confdefs.h into a sed script conftest.vals that substitutes
7304# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007305# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007306# Protect against being in an unquoted here document in config.status.
7307rm -f conftest.vals
7308cat > conftest.hdr <<\EOF
7309s/[\\&%]/\\&/g
7310s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007311s%#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 +00007312s%ac_d%ac_u%gp
7313s%ac_u%ac_e%gp
7314EOF
7315sed -n -f conftest.hdr confdefs.h > conftest.vals
7316rm -f conftest.hdr
7317
7318# This sed command replaces #undef with comments. This is necessary, for
7319# example, in the case of _POSIX_SOURCE, which is predefined and required
7320# on some systems where configure will not decide to define it.
7321cat >> conftest.vals <<\EOF
7322s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7323EOF
7324
7325# Break up conftest.vals because some shells have a limit on
7326# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007327
7328rm -f conftest.tail
7329while :
7330do
7331 ac_lines=`grep -c . conftest.vals`
7332 # grep -c gives empty output for an empty file on some AIX systems.
7333 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7334 # Write a limited-size here document to conftest.frag.
7335 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7336 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7337 echo 'CEOF
7338 sed -f conftest.frag conftest.in > conftest.out
7339 rm -f conftest.in
7340 mv conftest.out conftest.in
7341' >> $CONFIG_STATUS
7342 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7343 rm -f conftest.vals
7344 mv conftest.tail conftest.vals
7345done
7346rm -f conftest.vals
7347
7348cat >> $CONFIG_STATUS <<\EOF
7349 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00007350 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007351 cat conftest.in >> conftest.h
7352 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00007353 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00007354 echo "$ac_file is unchanged"
7355 rm -f conftest.h
7356 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007357 # Remove last slash and all that follows it. Not all systems have dirname.
7358 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7359 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7360 # The file is in a subdirectory.
7361 test ! -d "$ac_dir" && mkdir "$ac_dir"
7362 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00007363 rm -f $ac_file
7364 mv conftest.h $ac_file
7365 fi
7366fi; done
7367
Guido van Rossumf78abae1997-01-21 22:02:36 +00007368EOF
7369cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007370
Guido van Rossumf78abae1997-01-21 22:02:36 +00007371EOF
7372cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007373
7374exit 0
7375EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007376chmod +x $CONFIG_STATUS
7377rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007378test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00007379
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007380
7381echo "creating Setup"
7382if test ! -f Modules/Setup
7383then
7384 cp $srcdir/Modules/Setup.dist Modules/Setup
7385fi
7386
7387echo "creating Setup.local"
7388if test ! -f Modules/Setup.local
7389then
7390 echo "# Edit this file for local setup changes" >Modules/Setup.local
7391fi
7392
7393echo "creating Makefile"
7394$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
7395 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00007396 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007397mv config.c Modules