blob: dda76594d5b8dcafd7837ce3e4bcb5f53e7088e3 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003# From configure.in Revision: 1.242
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
Jack Jansen9a66b6d2001-08-08 13:56:14 +000021 --with-dyld Use (OpenStep|Rhapsody) 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
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000031 --with-libs='lib1 ...' link against additional libs"
Guido van Rossuma68acba1996-07-31 17:36:39 +000032ac_help="$ac_help
Neil Schemenauerd32c2492001-01-24 17:25:28 +000033 --with-signal-module disable/enable signal module"
34ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000035 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000036ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000037 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000038ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000039 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000040ac_help="$ac_help
Guido van Rossum9e8181b2000-09-19 00:46:46 +000041 --with-pth use GNU pth threading libraries"
42ac_help="$ac_help
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000043 --enable-ipv6 Enable ipv6 (with ipv4) support
44 --disable-ipv6 Disable ipv6 support"
45ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000046 --with(out)-cycle-gc disable/enable garbage collection"
47ac_help="$ac_help
Neil Schemenauera35c6882001-02-27 04:45:05 +000048 --with(out)-pymalloc disable/enable specialized mallocs"
49ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000050 --with-wctype-functions use wctype.h functions"
51ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000052 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000053ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000054 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000055ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000056 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000057ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000058 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000059ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000060 --with-libc=STRING C library"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000061ac_help="$ac_help
62 --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)"
Guido van Rossum627b2d71993-12-24 10:39:16 +000063
Guido van Rossum7f43da71994-08-01 12:15:30 +000064# Initialize some variables set by options.
65# The variables have the same names as the options, with
66# dashes changed to underlines.
67build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000068cache_file=./config.cache
69exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000070host=NONE
71no_create=
72nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000073no_recursion=
74prefix=NONE
75program_prefix=NONE
76program_suffix=NONE
77program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000078silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000079site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000080srcdir=
81target=NONE
82verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000083x_includes=NONE
84x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000085bindir='${exec_prefix}/bin'
86sbindir='${exec_prefix}/sbin'
87libexecdir='${exec_prefix}/libexec'
88datadir='${prefix}/share'
89sysconfdir='${prefix}/etc'
90sharedstatedir='${prefix}/com'
91localstatedir='${prefix}/var'
92libdir='${exec_prefix}/lib'
93includedir='${prefix}/include'
94oldincludedir='/usr/include'
95infodir='${prefix}/info'
96mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000097
98# Initialize some other variables.
99subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000100MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000101SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +0000102# Maximum number of lines to put in a shell here document.
103ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +0000104
105ac_prev=
106for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000107do
Guido van Rossum627b2d71993-12-24 10:39:16 +0000108
Guido van Rossum7f43da71994-08-01 12:15:30 +0000109 # If the previous option needs an argument, assign it.
110 if test -n "$ac_prev"; then
111 eval "$ac_prev=\$ac_option"
112 ac_prev=
113 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000114 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000115
Guido van Rossum7f43da71994-08-01 12:15:30 +0000116 case "$ac_option" in
117 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
118 *) ac_optarg= ;;
119 esac
120
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000121 # Accept the important Cygnus configure options, so we can diagnose typos.
122
Guido van Rossum7f43da71994-08-01 12:15:30 +0000123 case "$ac_option" in
124
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000125 -bindir | --bindir | --bindi | --bind | --bin | --bi)
126 ac_prev=bindir ;;
127 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
128 bindir="$ac_optarg" ;;
129
130 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000131 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000132 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000133 build="$ac_optarg" ;;
134
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000135 -cache-file | --cache-file | --cache-fil | --cache-fi \
136 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
137 ac_prev=cache_file ;;
138 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
139 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
140 cache_file="$ac_optarg" ;;
141
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000142 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
143 ac_prev=datadir ;;
144 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
145 | --da=*)
146 datadir="$ac_optarg" ;;
147
Guido van Rossum7f43da71994-08-01 12:15:30 +0000148 -disable-* | --disable-*)
149 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000150 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000151 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000152 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000153 fi
154 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
155 eval "enable_${ac_feature}=no" ;;
156
157 -enable-* | --enable-*)
158 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000159 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000160 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000161 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000162 fi
163 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
164 case "$ac_option" in
165 *=*) ;;
166 *) ac_optarg=yes ;;
167 esac
168 eval "enable_${ac_feature}='$ac_optarg'" ;;
169
Guido van Rossum7f43da71994-08-01 12:15:30 +0000170 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
171 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
172 | --exec | --exe | --ex)
173 ac_prev=exec_prefix ;;
174 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
175 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
176 | --exec=* | --exe=* | --ex=*)
177 exec_prefix="$ac_optarg" ;;
178
179 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000180 # Obsolete; use --with-gas.
181 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000182
183 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000184 # Omit some internal or obsolete options to make the list less imposing.
185 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000186 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000187Usage: configure [options] [host]
188Options: [defaults in brackets after descriptions]
189Configuration:
190 --cache-file=FILE cache test results in FILE
191 --help print this message
192 --no-create do not create output files
193 --quiet, --silent do not print \`checking...' messages
194 --version print the version of autoconf that created configure
195Directory and file names:
196 --prefix=PREFIX install architecture-independent files in PREFIX
197 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000198 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000199 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000200 --bindir=DIR user executables in DIR [EPREFIX/bin]
201 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
202 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
203 --datadir=DIR read-only architecture-independent data in DIR
204 [PREFIX/share]
205 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
206 --sharedstatedir=DIR modifiable architecture-independent data in DIR
207 [PREFIX/com]
208 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
209 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
210 --includedir=DIR C header files in DIR [PREFIX/include]
211 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
212 --infodir=DIR info documentation in DIR [PREFIX/info]
213 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000214 --srcdir=DIR find the sources in DIR [configure dir or ..]
215 --program-prefix=PREFIX prepend PREFIX to installed program names
216 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000217 --program-transform-name=PROGRAM
218 run sed PROGRAM on installed program names
219EOF
220 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000221Host type:
222 --build=BUILD configure for building on BUILD [BUILD=HOST]
223 --host=HOST configure for HOST [guessed]
224 --target=TARGET configure for TARGET [TARGET=HOST]
225Features and packages:
226 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
227 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
228 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
229 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
230 --x-includes=DIR X include files are in DIR
231 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000232EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000233 if test -n "$ac_help"; then
234 echo "--enable and --with options recognized:$ac_help"
235 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000236 exit 0 ;;
237
238 -host | --host | --hos | --ho)
239 ac_prev=host ;;
240 -host=* | --host=* | --hos=* | --ho=*)
241 host="$ac_optarg" ;;
242
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000243 -includedir | --includedir | --includedi | --included | --include \
244 | --includ | --inclu | --incl | --inc)
245 ac_prev=includedir ;;
246 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
247 | --includ=* | --inclu=* | --incl=* | --inc=*)
248 includedir="$ac_optarg" ;;
249
250 -infodir | --infodir | --infodi | --infod | --info | --inf)
251 ac_prev=infodir ;;
252 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
253 infodir="$ac_optarg" ;;
254
255 -libdir | --libdir | --libdi | --libd)
256 ac_prev=libdir ;;
257 -libdir=* | --libdir=* | --libdi=* | --libd=*)
258 libdir="$ac_optarg" ;;
259
260 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
261 | --libexe | --libex | --libe)
262 ac_prev=libexecdir ;;
263 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
264 | --libexe=* | --libex=* | --libe=*)
265 libexecdir="$ac_optarg" ;;
266
267 -localstatedir | --localstatedir | --localstatedi | --localstated \
268 | --localstate | --localstat | --localsta | --localst \
269 | --locals | --local | --loca | --loc | --lo)
270 ac_prev=localstatedir ;;
271 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
272 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
273 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
274 localstatedir="$ac_optarg" ;;
275
276 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
277 ac_prev=mandir ;;
278 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
279 mandir="$ac_optarg" ;;
280
Guido van Rossum7f43da71994-08-01 12:15:30 +0000281 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000282 # Obsolete; use --without-fp.
283 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000284
285 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
286 | --no-cr | --no-c)
287 no_create=yes ;;
288
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000289 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
290 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
291 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000292
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000293 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
294 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
295 | --oldin | --oldi | --old | --ol | --o)
296 ac_prev=oldincludedir ;;
297 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
298 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
299 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
300 oldincludedir="$ac_optarg" ;;
301
Guido van Rossum7f43da71994-08-01 12:15:30 +0000302 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
303 ac_prev=prefix ;;
304 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
305 prefix="$ac_optarg" ;;
306
307 -program-prefix | --program-prefix | --program-prefi | --program-pref \
308 | --program-pre | --program-pr | --program-p)
309 ac_prev=program_prefix ;;
310 -program-prefix=* | --program-prefix=* | --program-prefi=* \
311 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
312 program_prefix="$ac_optarg" ;;
313
314 -program-suffix | --program-suffix | --program-suffi | --program-suff \
315 | --program-suf | --program-su | --program-s)
316 ac_prev=program_suffix ;;
317 -program-suffix=* | --program-suffix=* | --program-suffi=* \
318 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
319 program_suffix="$ac_optarg" ;;
320
321 -program-transform-name | --program-transform-name \
322 | --program-transform-nam | --program-transform-na \
323 | --program-transform-n | --program-transform- \
324 | --program-transform | --program-transfor \
325 | --program-transfo | --program-transf \
326 | --program-trans | --program-tran \
327 | --progr-tra | --program-tr | --program-t)
328 ac_prev=program_transform_name ;;
329 -program-transform-name=* | --program-transform-name=* \
330 | --program-transform-nam=* | --program-transform-na=* \
331 | --program-transform-n=* | --program-transform-=* \
332 | --program-transform=* | --program-transfor=* \
333 | --program-transfo=* | --program-transf=* \
334 | --program-trans=* | --program-tran=* \
335 | --progr-tra=* | --program-tr=* | --program-t=*)
336 program_transform_name="$ac_optarg" ;;
337
338 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
339 | -silent | --silent | --silen | --sile | --sil)
340 silent=yes ;;
341
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000342 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
343 ac_prev=sbindir ;;
344 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
345 | --sbi=* | --sb=*)
346 sbindir="$ac_optarg" ;;
347
348 -sharedstatedir | --sharedstatedir | --sharedstatedi \
349 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
350 | --sharedst | --shareds | --shared | --share | --shar \
351 | --sha | --sh)
352 ac_prev=sharedstatedir ;;
353 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
354 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
355 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
356 | --sha=* | --sh=*)
357 sharedstatedir="$ac_optarg" ;;
358
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000359 -site | --site | --sit)
360 ac_prev=site ;;
361 -site=* | --site=* | --sit=*)
362 site="$ac_optarg" ;;
363
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
365 ac_prev=srcdir ;;
366 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
367 srcdir="$ac_optarg" ;;
368
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000369 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
370 | --syscon | --sysco | --sysc | --sys | --sy)
371 ac_prev=sysconfdir ;;
372 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
373 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
374 sysconfdir="$ac_optarg" ;;
375
Guido van Rossum7f43da71994-08-01 12:15:30 +0000376 -target | --target | --targe | --targ | --tar | --ta | --t)
377 ac_prev=target ;;
378 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
379 target="$ac_optarg" ;;
380
381 -v | -verbose | --verbose | --verbos | --verbo | --verb)
382 verbose=yes ;;
383
384 -version | --version | --versio | --versi | --vers)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000385 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000386 exit 0 ;;
387
388 -with-* | --with-*)
389 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000390 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000391 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000393 fi
394 ac_package=`echo $ac_package| sed 's/-/_/g'`
395 case "$ac_option" in
396 *=*) ;;
397 *) ac_optarg=yes ;;
398 esac
399 eval "with_${ac_package}='$ac_optarg'" ;;
400
401 -without-* | --without-*)
402 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000403 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000404 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000405 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000406 fi
407 ac_package=`echo $ac_package| sed 's/-/_/g'`
408 eval "with_${ac_package}=no" ;;
409
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000410 --x)
411 # Obsolete; use --with-x.
412 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000413
414 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
415 | --x-incl | --x-inc | --x-in | --x-i)
416 ac_prev=x_includes ;;
417 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
418 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
419 x_includes="$ac_optarg" ;;
420
421 -x-libraries | --x-libraries | --x-librarie | --x-librari \
422 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
423 ac_prev=x_libraries ;;
424 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
425 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
426 x_libraries="$ac_optarg" ;;
427
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000428 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000429 ;;
430
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000431 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000432 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000433 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000434 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000435 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000436 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000437 fi
438 nonopt="$ac_option"
439 ;;
440
441 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000442done
443
Guido van Rossum7f43da71994-08-01 12:15:30 +0000444if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000445 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000446fi
447
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000448trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000449
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000450# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000451# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000452# 1 file creation
453# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000454# 3 some systems may open it to /dev/tty
455# 4 used on the Kubota Titan
456# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000457# 5 compiler messages saved in config.log
458if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000459 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000460else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000461 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000462fi
463exec 5>./config.log
464
465echo "\
466This file contains any messages produced by compilers while
467running configure, to aid debugging if configure makes a mistake.
468" 1>&5
469
470# Strip out --no-create and --no-recursion so they do not pile up.
471# Also quote any args containing shell metacharacters.
472ac_configure_args=
473for ac_arg
474do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000475 case "$ac_arg" in
476 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
477 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000478 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
479 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
480 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
481 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
482 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483 esac
484done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000485
486# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000487# Only set these to C if already set. These must not be set unconditionally
488# because not all systems understand e.g. LANG=C (notably SCO).
489# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
490# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000491if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000492if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
493if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
494if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000495
Guido van Rossum7f43da71994-08-01 12:15:30 +0000496# confdefs.h avoids OS command line length limits that DEFS can exceed.
497rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000498# AIX cpp loses on an empty file, so make sure it contains at least a newline.
499echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000500
501# A filename unique to this package, relative to the directory that
502# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000503ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000504
505# Find the source files, if location was not specified.
506if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000507 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000508 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000509 ac_prog=$0
510 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
511 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
512 srcdir=$ac_confdir
513 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000514 srcdir=..
515 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000516else
517 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000518fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000519if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000520 if test "$ac_srcdir_defaulted" = yes; then
521 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000522 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000523 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000524 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000525fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000526srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
527
528# Prefer explicitly selected file to automatically selected ones.
529if test -z "$CONFIG_SITE"; then
530 if test "x$prefix" != xNONE; then
531 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
532 else
533 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
534 fi
535fi
536for ac_site_file in $CONFIG_SITE; do
537 if test -r "$ac_site_file"; then
538 echo "loading site script $ac_site_file"
539 . "$ac_site_file"
540 fi
541done
542
543if test -r "$cache_file"; then
544 echo "loading cache $cache_file"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000545 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000546else
547 echo "creating cache $cache_file"
548 > $cache_file
549fi
550
Guido van Rossum7f43da71994-08-01 12:15:30 +0000551ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000552# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000553ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000554ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000555ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000556cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000557
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000558ac_exeext=
559ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000560if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
561 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
562 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
563 ac_n= ac_c='
564' ac_t=' '
565 else
566 ac_n=-n ac_c= ac_t=
567 fi
568else
569 ac_n= ac_c='\c' ac_t=
570fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000571
Guido van Rossum0a516c91994-09-12 10:58:40 +0000572
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000573
Guido van Rossum627b2d71993-12-24 10:39:16 +0000574
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000575# Set VERSION so we only need to edit in one place (i.e., here)
576
Guido van Rossum6db412b2001-04-18 04:37:57 +0000577VERSION=2.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000578
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +0000579# Arguments passed to configure.
580
581CONFIG_ARGS="$ac_configure_args"
582
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000583# NEXTSTEP|MacOSX|Darwin stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000584if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000585
586 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000587echo "configure:588: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000588 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000589if test "${with_next_archs+set}" = set; then
590 withval="$with_next_archs"
591
Guido van Rossum563e7081996-09-10 18:20:48 +0000592 if test -n "$withval"; then
593 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
594 # GCC does not currently support multi archs on the NeXT
595 with_gcc=no
596 fi
597 echo "$ac_t""$with_next_archs" 1>&6
598
599else
600 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000601fi
602
Guido van Rossum563e7081996-09-10 18:20:48 +0000603
604 if test -z "$MACHDEP"
605 then
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000606 ac_sys_system=`uname -s`
607 if test "$ac_sys_system" = "Darwin" ; then
608 ac_sys_release=`uname -r`
609 else
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000610 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000611 sed -e 's/://' -e 's/\./_/'` && \
612 ac_sys_system=next && ac_sys_release=$4
613 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000614
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000615 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000616 fi
617fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000618
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000619# Check whether --with-next-framework or --without-next-framework was given.
620if test "${with_next_framework+set}" = set; then
621 withval="$with_next_framework"
622 :
623fi
624
625# Check whether --with-dyld or --without-dyld was given.
626if test "${with_dyld+set}" = set; then
627 withval="$with_dyld"
628 :
629fi
630
Guido van Rossum91922671997-10-09 20:24:13 +0000631
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000632# Set name for machine-dependent library files
633
634echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +0000635echo "configure:636: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000636if test -z "$MACHDEP"
637then
Guido van Rossum563e7081996-09-10 18:20:48 +0000638 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +0000639 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000640 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000641 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000642 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000643 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000644 ac_md_system=`echo $ac_sys_system |
645 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
646 ac_md_release=`echo $ac_sys_release |
647 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000648 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000649
Guido van Rossum07397971997-04-29 21:49:50 +0000650 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000651 cygwin*) MACHDEP="cygwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +0000652 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000653 esac
654fi
Guido van Rossum91922671997-10-09 20:24:13 +0000655
656#
657# SGI compilers allow the specification of the both the ABI and the
658# ISA on the command line. Depending on the values of these switches,
659# different and often incompatable code will be generated.
660#
661# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
662# thus supply support for various ABI/ISA combinations. The MACHDEP
663# variable is also adjusted.
664#
665
666if test ! -z "$SGI_ABI"
667then
668 CC="cc $SGI_ABI"
669 LDFLAGS="$SGI_ABI $LDFLAGS"
670 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
671fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000672echo "$ac_t""$MACHDEP" 1>&6
673
Guido van Rossum627b2d71993-12-24 10:39:16 +0000674# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000675echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000676echo "configure:677: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000677# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000678if test "${with_gcc+set}" = set; then
679 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000680
681 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000682 no) CC=cc
683 without_gcc=yes;;
684 yes) CC=gcc
685 without_gcc=no;;
686 *) CC=$withval
687 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000688 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000689else
Guido van Rossume77438c1995-09-13 18:59:59 +0000690
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000691 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000692 AIX*) CC=cc_r
693 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000694 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000695 case $BE_HOST_CPU in
696 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000697 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000698 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000699 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000700 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000701 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000702 ;;
703 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000704 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000705 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000706 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000707 ;;
708 *)
Fred Drake5790be12000-10-09 17:06:13 +0000709 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000710 ;;
711 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000712 AR="\$(srcdir)/Modules/ar_beos"
713 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000714 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000715 Monterey*)
716 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +0000717 without_gcc=;;
718 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000719 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000720fi
721
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000722echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000723
Guido van Rossum95012191999-12-16 17:50:52 +0000724
725
Fred Drakea1a84e72001-03-06 05:52:16 +0000726MAINOBJ=python.o
Guido van Rossum95012191999-12-16 17:50:52 +0000727echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000728echo "configure:729: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000729# Check whether --with-cxx or --without-cxx was given.
730if test "${with_cxx+set}" = set; then
731 withval="$with_cxx"
732
Martin v. Löwis22352952000-12-13 17:37:02 +0000733 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000734 case $withval in
735 no) CXX=
736 with_cxx=no;;
737 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +0000738 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +0000739 with_cxx=$withval;;
740 esac
741else
742
743 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000744 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000745
746fi
747
748echo "$ac_t""$with_cxx" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000749
750
751if test "$check_cxx" = "yes"
752then
753 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
754do
755# Extract the first word of "$ac_prog", so it can be a program name with args.
756set dummy $ac_prog; ac_word=$2
757echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000758echo "configure:759: checking for $ac_word" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000759if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
760 echo $ac_n "(cached) $ac_c" 1>&6
761else
762 if test -n "$CXX"; then
763 ac_cv_prog_CXX="$CXX" # Let the user override the test.
764else
765 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
766 ac_dummy="$PATH"
767 for ac_dir in $ac_dummy; do
768 test -z "$ac_dir" && ac_dir=.
769 if test -f $ac_dir/$ac_word; then
770 ac_cv_prog_CXX="$ac_prog"
771 break
772 fi
773 done
774 IFS="$ac_save_ifs"
775fi
776fi
777CXX="$ac_cv_prog_CXX"
778if test -n "$CXX"; then
779 echo "$ac_t""$CXX" 1>&6
780else
781 echo "$ac_t""no" 1>&6
782fi
783
784test -n "$CXX" && break
785done
786test -n "$CXX" || CXX="notfound"
787
788 if test "$CXX" = "notfound"
789 then
790 CXX=
791 else
792 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000793echo "configure:794: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000794
795ac_ext=C
796# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
797ac_cpp='$CXXCPP $CPPFLAGS'
798ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
799ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
800cross_compiling=$ac_cv_prog_cxx_cross
801
802cat > conftest.$ac_ext << EOF
803
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000804#line 805 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000805#include "confdefs.h"
806
807int main(){return(0);}
808EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000809if { (eval echo configure:810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis22352952000-12-13 17:37:02 +0000810 ac_cv_prog_cxx_works=yes
811 # If we can't run a trivial program, we are probably using a cross compiler.
812 if (./conftest; exit) 2>/dev/null; then
813 ac_cv_prog_cxx_cross=no
814 else
815 ac_cv_prog_cxx_cross=yes
816 fi
817else
818 echo "configure: failed program was:" >&5
819 cat conftest.$ac_ext >&5
820 ac_cv_prog_cxx_works=no
821fi
822rm -fr conftest*
823ac_ext=c
824# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
825ac_cpp='$CPP $CPPFLAGS'
826ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
827ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
828cross_compiling=$ac_cv_prog_cc_cross
829
830echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
831if test $ac_cv_prog_cxx_works = no; then
832 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
833fi
834echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000835echo "configure:836: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000836echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
837cross_compiling=$ac_cv_prog_cxx_cross
838
839 fi
840fi
841
Guido van Rossum8b131c51995-03-09 14:10:13 +0000842# If the user switches compilers, we can't believe the cache
843if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
844then
845 { echo "configure: error: cached CC is different -- throw away $cache_file
846(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
847fi
848
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849# Extract the first word of "gcc", so it can be a program name with args.
850set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000851echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000852echo "configure:853: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000853if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000854 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855else
856 if test -n "$CC"; then
857 ac_cv_prog_CC="$CC" # Let the user override the test.
858else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000859 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
860 ac_dummy="$PATH"
861 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862 test -z "$ac_dir" && ac_dir=.
863 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000865 break
866 fi
867 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000869fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870fi
871CC="$ac_cv_prog_CC"
872if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000873 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000875 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000877
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878if test -z "$CC"; then
879 # Extract the first word of "cc", so it can be a program name with args.
880set dummy cc; ac_word=$2
881echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000882echo "configure:883: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000883if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000884 echo $ac_n "(cached) $ac_c" 1>&6
885else
886 if test -n "$CC"; then
887 ac_cv_prog_CC="$CC" # Let the user override the test.
888else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000889 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000891 ac_dummy="$PATH"
892 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893 test -z "$ac_dir" && ac_dir=.
894 if test -f $ac_dir/$ac_word; then
895 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
896 ac_prog_rejected=yes
897 continue
898 fi
899 ac_cv_prog_CC="cc"
900 break
901 fi
902 done
903 IFS="$ac_save_ifs"
904if test $ac_prog_rejected = yes; then
905 # We found a bogon in the path, so make sure we never use it.
906 set dummy $ac_cv_prog_CC
907 shift
908 if test $# -gt 0; then
909 # We chose a different compiler from the bogus one.
910 # However, it has the same basename, so the bogon will be chosen
911 # first if we set CC to just the basename; use the full file name.
912 shift
913 set dummy "$ac_dir/$ac_word" "$@"
914 shift
915 ac_cv_prog_CC="$@"
916 fi
917fi
918fi
919fi
920CC="$ac_cv_prog_CC"
921if test -n "$CC"; then
922 echo "$ac_t""$CC" 1>&6
923else
924 echo "$ac_t""no" 1>&6
925fi
926
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000927 if test -z "$CC"; then
928 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000929 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000930 # Extract the first word of "cl", so it can be a program name with args.
931set dummy cl; ac_word=$2
932echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000933echo "configure:934: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000934if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000935 echo $ac_n "(cached) $ac_c" 1>&6
936else
937 if test -n "$CC"; then
938 ac_cv_prog_CC="$CC" # Let the user override the test.
939else
940 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
941 ac_dummy="$PATH"
942 for ac_dir in $ac_dummy; do
943 test -z "$ac_dir" && ac_dir=.
944 if test -f $ac_dir/$ac_word; then
945 ac_cv_prog_CC="cl"
946 break
947 fi
948 done
949 IFS="$ac_save_ifs"
950fi
951fi
952CC="$ac_cv_prog_CC"
953if test -n "$CC"; then
954 echo "$ac_t""$CC" 1>&6
955else
956 echo "$ac_t""no" 1>&6
957fi
958 ;;
959 esac
960 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000961 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
962fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000964echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000965echo "configure:966: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000966
967ac_ext=c
968# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
969ac_cpp='$CPP $CPPFLAGS'
970ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000971ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000972cross_compiling=$ac_cv_prog_cc_cross
973
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000974cat > conftest.$ac_ext << EOF
975
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000976#line 977 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000977#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000978
Guido van Rossumf78abae1997-01-21 22:02:36 +0000979main(){return(0);}
980EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +0000981if { (eval echo configure:982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000982 ac_cv_prog_cc_works=yes
983 # If we can't run a trivial program, we are probably using a cross compiler.
984 if (./conftest; exit) 2>/dev/null; then
985 ac_cv_prog_cc_cross=no
986 else
987 ac_cv_prog_cc_cross=yes
988 fi
989else
990 echo "configure: failed program was:" >&5
991 cat conftest.$ac_ext >&5
992 ac_cv_prog_cc_works=no
993fi
994rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000995ac_ext=c
996# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
997ac_cpp='$CPP $CPPFLAGS'
998ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
999ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1000cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +00001001
1002echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1003if test $ac_cv_prog_cc_works = no; then
1004 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1005fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001006echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001007echo "configure:1008: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001008echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1009cross_compiling=$ac_cv_prog_cc_cross
1010
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001011echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001012echo "configure:1013: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001013if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001014 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001015else
1016 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001017#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001018 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001019#endif
1020EOF
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001021if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001022 ac_cv_prog_gcc=yes
1023else
1024 ac_cv_prog_gcc=no
1025fi
1026fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001028echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001029
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001030if test $ac_cv_prog_gcc = yes; then
1031 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001032else
1033 GCC=
1034fi
1035
1036ac_test_CFLAGS="${CFLAGS+set}"
1037ac_save_CFLAGS="$CFLAGS"
1038CFLAGS=
1039echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Martin v. Löwis784d3df2001-07-25 07:30:35 +00001040echo "configure:1041: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001041if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001042 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001043else
1044 echo 'void f(){}' > conftest.c
1045if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001046 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001048 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001049fi
1050rm -f conftest*
1051
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001052fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Guido van Rossumf78abae1997-01-21 22:02:36 +00001054echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001055if test "$ac_test_CFLAGS" = set; then
1056 CFLAGS="$ac_save_CFLAGS"
1057elif test $ac_cv_prog_cc_g = yes; then
1058 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001059 CFLAGS="-g -O2"
1060 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001061 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001062 fi
1063else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001064 if test "$GCC" = yes; then
1065 CFLAGS="-O2"
1066 else
1067 CFLAGS=
1068 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001069fi
1070
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001071
1072# checks for UNIX variants that set C preprocessor variables
1073echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1074echo "configure:1075: checking how to run the C preprocessor" >&5
1075# On Suns, sometimes $CPP names a directory.
1076if test -n "$CPP" && test -d "$CPP"; then
1077 CPP=
1078fi
1079if test -z "$CPP"; then
1080if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1081 echo $ac_n "(cached) $ac_c" 1>&6
1082else
1083 # This must be in double quotes, not single quotes, because CPP may get
1084 # substituted into the Makefile and "${CC-cc}" will confuse make.
1085 CPP="${CC-cc} -E"
1086 # On the NeXT, cc -E runs the code through the compiler's parser,
1087 # not just through cpp.
1088 cat > conftest.$ac_ext <<EOF
1089#line 1090 "configure"
1090#include "confdefs.h"
1091#include <assert.h>
1092Syntax Error
1093EOF
1094ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1095{ (eval echo configure:1096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1096ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1097if test -z "$ac_err"; then
1098 :
1099else
1100 echo "$ac_err" >&5
1101 echo "configure: failed program was:" >&5
1102 cat conftest.$ac_ext >&5
1103 rm -rf conftest*
1104 CPP="${CC-cc} -E -traditional-cpp"
1105 cat > conftest.$ac_ext <<EOF
1106#line 1107 "configure"
1107#include "confdefs.h"
1108#include <assert.h>
1109Syntax Error
1110EOF
1111ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1112{ (eval echo configure:1113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1113ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1114if test -z "$ac_err"; then
1115 :
1116else
1117 echo "$ac_err" >&5
1118 echo "configure: failed program was:" >&5
1119 cat conftest.$ac_ext >&5
1120 rm -rf conftest*
1121 CPP="${CC-cc} -nologo -E"
1122 cat > conftest.$ac_ext <<EOF
1123#line 1124 "configure"
1124#include "confdefs.h"
1125#include <assert.h>
1126Syntax Error
1127EOF
1128ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1129{ (eval echo configure:1130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1130ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1131if test -z "$ac_err"; then
1132 :
1133else
1134 echo "$ac_err" >&5
1135 echo "configure: failed program was:" >&5
1136 cat conftest.$ac_ext >&5
1137 rm -rf conftest*
1138 CPP=/lib/cpp
1139fi
1140rm -f conftest*
1141fi
1142rm -f conftest*
1143fi
1144rm -f conftest*
1145 ac_cv_prog_CPP="$CPP"
1146fi
1147 CPP="$ac_cv_prog_CPP"
1148else
1149 ac_cv_prog_CPP="$CPP"
1150fi
1151echo "$ac_t""$CPP" 1>&6
1152
1153echo $ac_n "checking for AIX""... $ac_c" 1>&6
1154echo "configure:1155: checking for AIX" >&5
1155cat > conftest.$ac_ext <<EOF
1156#line 1157 "configure"
1157#include "confdefs.h"
1158#ifdef _AIX
1159 yes
1160#endif
1161
1162EOF
1163if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1164 egrep "yes" >/dev/null 2>&1; then
1165 rm -rf conftest*
1166 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1167#define _ALL_SOURCE 1
1168EOF
1169
1170else
1171 rm -rf conftest*
1172 echo "$ac_t""no" 1>&6
1173fi
1174rm -f conftest*
1175
1176
1177ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1178echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
1179echo "configure:1180: checking for minix/config.h" >&5
1180if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1181 echo $ac_n "(cached) $ac_c" 1>&6
1182else
1183 cat > conftest.$ac_ext <<EOF
1184#line 1185 "configure"
1185#include "confdefs.h"
1186#include <minix/config.h>
1187EOF
1188ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1189{ (eval echo configure:1190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1190ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1191if test -z "$ac_err"; then
1192 rm -rf conftest*
1193 eval "ac_cv_header_$ac_safe=yes"
1194else
1195 echo "$ac_err" >&5
1196 echo "configure: failed program was:" >&5
1197 cat conftest.$ac_ext >&5
1198 rm -rf conftest*
1199 eval "ac_cv_header_$ac_safe=no"
1200fi
1201rm -f conftest*
1202fi
1203if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1204 echo "$ac_t""yes" 1>&6
1205 MINIX=yes
1206else
1207 echo "$ac_t""no" 1>&6
1208MINIX=
1209fi
1210
1211if test "$MINIX" = yes; then
1212 cat >> confdefs.h <<\EOF
1213#define _POSIX_SOURCE 1
1214EOF
1215
1216 cat >> confdefs.h <<\EOF
1217#define _POSIX_1_SOURCE 2
1218EOF
1219
1220 cat >> confdefs.h <<\EOF
1221#define _MINIX 1
1222EOF
1223
1224fi
1225
1226
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001227echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001228echo "configure:1229: checking for Cygwin environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001229if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1230 echo $ac_n "(cached) $ac_c" 1>&6
1231else
1232 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001233#line 1234 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001234#include "confdefs.h"
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001235
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001236int main() {
1237
1238#ifndef __CYGWIN__
1239#define __CYGWIN__ __CYGWIN32__
1240#endif
1241return __CYGWIN__;
1242; return 0; }
1243EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001244if { (eval echo configure:1245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001245 rm -rf conftest*
1246 ac_cv_cygwin=yes
1247else
1248 echo "configure: failed program was:" >&5
1249 cat conftest.$ac_ext >&5
1250 rm -rf conftest*
1251 ac_cv_cygwin=no
1252fi
1253rm -f conftest*
1254rm -f conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001255fi
1256
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001257echo "$ac_t""$ac_cv_cygwin" 1>&6
1258CYGWIN=
1259test "$ac_cv_cygwin" = yes && CYGWIN=yes
1260echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001261echo "configure:1262: checking for mingw32 environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001262if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1263 echo $ac_n "(cached) $ac_c" 1>&6
1264else
1265 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001266#line 1267 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001267#include "confdefs.h"
1268
1269int main() {
1270return __MINGW32__;
1271; return 0; }
1272EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001273if { (eval echo configure:1274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001274 rm -rf conftest*
1275 ac_cv_mingw32=yes
1276else
1277 echo "configure: failed program was:" >&5
1278 cat conftest.$ac_ext >&5
1279 rm -rf conftest*
1280 ac_cv_mingw32=no
1281fi
1282rm -f conftest*
1283rm -f conftest*
1284fi
1285
1286echo "$ac_t""$ac_cv_mingw32" 1>&6
1287MINGW32=
1288test "$ac_cv_mingw32" = yes && MINGW32=yes
1289
1290
1291echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001292echo "configure:1293: checking for executable suffix" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001293if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1294 echo $ac_n "(cached) $ac_c" 1>&6
1295else
1296 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1297 ac_cv_exeext=.exe
1298else
1299 rm -f conftest*
1300 echo 'int main () { return 0; }' > conftest.$ac_ext
1301 ac_cv_exeext=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001302 if { (eval echo configure:1303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001303 for file in conftest.*; do
1304 case $file in
1305 *.c | *.o | *.obj) ;;
1306 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1307 esac
1308 done
1309 else
1310 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1311 fi
1312 rm -f conftest*
1313 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1314fi
1315fi
1316
1317EXEEXT=""
1318test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1319echo "$ac_t""${ac_cv_exeext}" 1>&6
1320ac_exeext=$EXEEXT
1321
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001322echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001323echo "configure:1324: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001324# Check whether --with-suffix or --without-suffix was given.
1325if test "${with_suffix+set}" = set; then
1326 withval="$with_suffix"
1327
1328 case $withval in
1329 no) EXEEXT=;;
1330 yes) EXEEXT=.exe;;
1331 *) EXEEXT=$withval;;
1332 esac
1333fi
1334
1335echo "$ac_t""$EXEEXT" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001336# Test whether we're running on a non-case-sensitive system, in which
1337# case we give a warning if no ext is given
1338if test -d "python" -a -z "$EXEEXT"
1339then
1340 echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2
1341fi
Guido van Rossumff555e32000-09-22 15:38:21 +00001342
Guido van Rossumdd997f71998-10-07 19:58:26 +00001343case $MACHDEP in
1344bsdos*)
1345 case $CC in
1346 gcc) CC="$CC -D_HAVE_BSDI";;
1347 esac;;
1348esac
1349
Guido van Rossum24b1e751997-08-21 02:29:16 +00001350case $ac_sys_system in
1351hp*|HP*)
1352 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001353 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001354 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001355Monterey*)
1356 case $CC in
1357 cc) CC="$CC -Wl,-Bexport";;
1358 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001359SunOS*)
1360 # Some functions have a prototype only with that define, e.g. confstr
1361 cat >> confdefs.h <<\EOF
1362#define __EXTENSIONS__ 1
1363EOF
1364
1365 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001366esac
1367
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001368
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001369
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001370echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001371echo "configure:1372: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001372if test -z "$LIBRARY"
1373then
1374 LIBRARY='libpython$(VERSION).a'
1375fi
1376echo "$ac_t""$LIBRARY" 1>&6
1377
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001378# LDLIBRARY is the name of the library to link against (as opposed to the
1379# name of the library into which to insert object files). On systems
1380# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
Guido van Rossumaef734b2001-01-10 21:09:12 +00001381# the Makefiles). On Cygwin LDLIBRARY is the import library, DLLLIBRARY is the
1382# shared (i.e., DLL) library.
1383
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001384
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001385LDLIBRARY="$LIBRARY"
Guido van Rossumca563f22001-01-23 01:52:44 +00001386DLLLIBRARY=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001387
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001388# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001389# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001390# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001391
1392echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001393echo "configure:1394: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001394if test -z "$LINKCC"
1395then
1396 case $ac_sys_system in
1397 AIX*)
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001398 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001399 dgux*)
1400 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001401 Monterey64*)
1402 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001403 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001404 esac
1405fi
1406echo "$ac_t""$LINKCC" 1>&6
1407
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001408echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001409echo "configure:1410: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001410
1411# NeXT framework builds require that the 'ar' library be converted into
1412# a bundle using libtool.
1413if test "$with_next_framework"
1414then
1415 LDLIBRARY='libpython$(VERSION).dylib'
Jack Jansenca06bc62001-08-03 15:32:23 +00001416 DLLLIBRARY=$LDLIBRARY
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001417fi
1418
1419# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001420case $MACHDEP in
1421dguxR4)
1422 LDLIBRARY='libpython$(VERSION).so'
1423 OPT="$OPT -pic"
1424 ;;
1425beos*)
1426 LDLIBRARY='libpython$(VERSION).so'
1427 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001428cygwin*)
1429 LDLIBRARY='libpython$(VERSION).dll.a'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001430 DLLLIBRARY='libpython$(VERSION).dll'
Guido van Rossumaef734b2001-01-10 21:09:12 +00001431 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001432esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001433echo "$ac_t""$LDLIBRARY" 1>&6
1434
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001435# Extract the first word of "ranlib", so it can be a program name with args.
1436set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001437echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001438echo "configure:1439: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001439if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001440 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001441else
1442 if test -n "$RANLIB"; then
1443 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1444else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001445 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1446 ac_dummy="$PATH"
1447 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001448 test -z "$ac_dir" && ac_dir=.
1449 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001450 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001451 break
1452 fi
1453 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001454 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001455 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001456fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001457fi
1458RANLIB="$ac_cv_prog_RANLIB"
1459if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001460 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001461else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001462 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001463fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001464
1465
Guido van Rossum7f43da71994-08-01 12:15:30 +00001466for ac_prog in ar aal
1467do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001468# Extract the first word of "$ac_prog", so it can be a program name with args.
1469set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001470echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001471echo "configure:1472: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001472if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001473 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001474else
1475 if test -n "$AR"; then
1476 ac_cv_prog_AR="$AR" # Let the user override the test.
1477else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001478 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1479 ac_dummy="$PATH"
1480 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001481 test -z "$ac_dir" && ac_dir=.
1482 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001483 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001484 break
1485 fi
1486 done
1487 IFS="$ac_save_ifs"
1488fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001489fi
1490AR="$ac_cv_prog_AR"
1491if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001492 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001493else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001494 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001495fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001496
1497test -n "$AR" && break
1498done
1499test -n "$AR" || AR="ar"
1500
Neil Schemenauera42c8272001-03-31 00:01:55 +00001501
1502case $MACHDEP in
1503bsdos*)
1504 # install -d does not work on BSDI
1505 if test -z "$INSTALL"
1506 then
1507 INSTALL="${srcdir}/install-sh -c"
1508 fi
1509esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001510ac_aux_dir=
1511for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1512 if test -f $ac_dir/install-sh; then
1513 ac_aux_dir=$ac_dir
1514 ac_install_sh="$ac_aux_dir/install-sh -c"
1515 break
1516 elif test -f $ac_dir/install.sh; then
1517 ac_aux_dir=$ac_dir
1518 ac_install_sh="$ac_aux_dir/install.sh -c"
1519 break
1520 fi
1521done
1522if test -z "$ac_aux_dir"; then
1523 { 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 +00001524fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001525ac_config_guess=$ac_aux_dir/config.guess
1526ac_config_sub=$ac_aux_dir/config.sub
1527ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1528
1529# Find a good install program. We prefer a C program (faster),
1530# so one script is as good as another. But avoid the broken or
1531# incompatible versions:
1532# SysV /etc/install, /usr/sbin/install
1533# SunOS /usr/etc/install
1534# IRIX /sbin/install
1535# AIX /bin/install
1536# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1537# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1538# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1539# ./install, which can be erroneously created by make from ./install.sh.
1540echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001541echo "configure:1542: checking for a BSD compatible install" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001542if test -z "$INSTALL"; then
1543if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1544 echo $ac_n "(cached) $ac_c" 1>&6
1545else
1546 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1547 for ac_dir in $PATH; do
1548 # Account for people who put trailing slashes in PATH elements.
1549 case "$ac_dir/" in
1550 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1551 *)
1552 # OSF1 and SCO ODT 3.0 have their own names for install.
1553 # Don't use installbsd from OSF since it installs stuff as root
1554 # by default.
1555 for ac_prog in ginstall scoinst install; do
1556 if test -f $ac_dir/$ac_prog; then
1557 if test $ac_prog = install &&
1558 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1559 # AIX install. It has an incompatible calling convention.
1560 :
1561 else
1562 ac_cv_path_install="$ac_dir/$ac_prog -c"
1563 break 2
1564 fi
1565 fi
1566 done
1567 ;;
1568 esac
1569 done
1570 IFS="$ac_save_IFS"
1571
1572fi
1573 if test "${ac_cv_path_install+set}" = set; then
1574 INSTALL="$ac_cv_path_install"
1575 else
1576 # As a last resort, use the slow shell script. We don't cache a
1577 # path for INSTALL within a source directory, because that will
1578 # break other packages using the cache if that directory is
1579 # removed, or if the path is relative.
1580 INSTALL="$ac_install_sh"
1581 fi
1582fi
1583echo "$ac_t""$INSTALL" 1>&6
1584
1585# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1586# It thinks the first close brace ends the variable substitution.
1587test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1588
1589test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1590
1591test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1592
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001593
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001594# Not every filesystem supports hard links
1595
1596if test -z "$LN" ; then
1597 case $ac_sys_system in
1598 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001599 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001600 *) LN=ln;;
1601 esac
1602fi
1603
Fred Drake109d9862001-07-11 06:27:56 +00001604# Check for --with-pydebug
1605echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001606echo "configure:1607: checking for --with-pydebug" >&5
Fred Drake109d9862001-07-11 06:27:56 +00001607# Check whether --with-pydebug or --without-pydebug was given.
1608if test "${with_pydebug+set}" = set; then
1609 withval="$with_pydebug"
1610
1611if test "$withval" != no
1612then cat >> confdefs.h <<\EOF
1613#define Py_DEBUG 1
1614EOF
1615 echo "$ac_t""yes" 1>&6; Py_DEBUG='true'
1616else echo "$ac_t""no" 1>&6; Py_DEBUG='false'
1617fi
1618else
1619 echo "$ac_t""no" 1>&6
1620fi
1621
1622
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001623# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001624
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001625if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001626then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001627 case $GCC in
1628 yes)
1629 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001630 yes)
Fred Drake109d9862001-07-11 06:27:56 +00001631 if test "$Py_DEBUG" = 'true' ; then
1632 # Optimization messes up debuggers, so turn it off for
1633 # debug builds.
1634 OPT="-g -Wall -Wstrict-prototypes"
1635 else
1636 OPT="-g -O3 -Wall -Wstrict-prototypes"
1637 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001638 *)
Fred Drake109d9862001-07-11 06:27:56 +00001639 OPT="-O3 -Wall -Wstrict-prototypes";;
1640 esac
1641 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001642 *)
1643 case $ac_sys_system in
1644 UnixWare*)
1645 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1646 *)
1647 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001648 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001649 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00001650 case $ac_sys_system in
1651 Darwin*)
1652 OPT="$OPT -no-cpp-precomp";;
1653 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001654fi
1655
Trent Mick635f6fb2000-08-23 21:33:05 +00001656# The current (beta) Monterey compiler dies with optimizations
1657case $ac_sys_system in
1658Monterey*) OPT="";;
1659esac
1660
Guido van Rossum563e7081996-09-10 18:20:48 +00001661if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001662then
1663 OPT="$OPT $ac_arch_flags"
1664fi
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
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +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
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001677#line 1678 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001678#include "confdefs.h"
1679int main() { return 0; }
1680EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +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
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +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
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001714#line 1715 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001715#include "confdefs.h"
1716int main() { return 0; }
1717EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +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öwis130fb172001-07-19 11:00:41 +00001739# -Kpthread, if available, provides the right #defines
1740# and linker options to make pthread_create available
1741echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001742echo "configure:1743: checking whether $CC accepts -Kpthread" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00001743if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then
1744 echo $ac_n "(cached) $ac_c" 1>&6
1745else
1746 ac_save_cc="$CC"
1747CC="$CC -Kpthread"
1748cat > conftest.$ac_ext <<EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001749#line 1750 "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00001750#include "confdefs.h"
1751#include <pthread.h>
1752int main() {
1753pthread_create(0,0,0,0)
1754; return 0; }
1755EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001756if { (eval echo configure:1757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00001757 rm -rf conftest*
1758 ac_cv_kpthread=yes
1759else
1760 echo "configure: failed program was:" >&5
1761 cat conftest.$ac_ext >&5
1762 rm -rf conftest*
1763 ac_cv_kpthread=no
1764fi
1765rm -f conftest*
1766CC="$ac_save_cc"
1767fi
1768
1769
1770# GCC does not reject -Kpthread as an illegal option, it merely complains that
1771# it is unrecognized
1772if test "$GCC" = "yes"
1773then ac_cv_kpthread="no, we have gcc"
1774fi
1775echo "$ac_t""$ac_cv_kpthread" 1>&6
1776
Guido van Rossum84e7b241996-08-19 21:59:00 +00001777
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001778# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001779echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001780echo "configure:1781: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001781if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001782 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001783else
1784 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001785#line 1786 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001786#include "confdefs.h"
1787#include <stdlib.h>
1788#include <stdarg.h>
1789#include <string.h>
1790#include <float.h>
1791EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001792ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001793{ (eval echo configure:1794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001794ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001795if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001796 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001797 ac_cv_header_stdc=yes
1798else
1799 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001800 echo "configure: failed program was:" >&5
1801 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001802 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001803 ac_cv_header_stdc=no
1804fi
1805rm -f conftest*
1806
1807if test $ac_cv_header_stdc = yes; then
1808 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1809cat > conftest.$ac_ext <<EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001810#line 1811 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811#include "confdefs.h"
1812#include <string.h>
1813EOF
1814if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1815 egrep "memchr" >/dev/null 2>&1; then
1816 :
1817else
1818 rm -rf conftest*
1819 ac_cv_header_stdc=no
1820fi
1821rm -f conftest*
1822
1823fi
1824
1825if test $ac_cv_header_stdc = yes; then
1826 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1827cat > conftest.$ac_ext <<EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001828#line 1829 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001829#include "confdefs.h"
1830#include <stdlib.h>
1831EOF
1832if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1833 egrep "free" >/dev/null 2>&1; then
1834 :
1835else
1836 rm -rf conftest*
1837 ac_cv_header_stdc=no
1838fi
1839rm -f conftest*
1840
1841fi
1842
1843if test $ac_cv_header_stdc = yes; then
1844 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1845if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001846 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001847else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001848 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001849#line 1850 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001850#include "confdefs.h"
1851#include <ctype.h>
1852#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1853#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001854#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001855int main () { int i; for (i = 0; i < 256; i++)
1856if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1857exit (0); }
1858
1859EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001860if { (eval echo configure:1861: \"$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 +00001861then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001862 :
1863else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001864 echo "configure: failed program was:" >&5
1865 cat conftest.$ac_ext >&5
1866 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001867 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001868fi
1869rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001870fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001871
1872fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001873fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001874
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001875echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001876if test $ac_cv_header_stdc = yes; then
1877 cat >> confdefs.h <<\EOF
1878#define STDC_HEADERS 1
1879EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001880
1881fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001882
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001883for ac_hdr in dlfcn.h fcntl.h limits.h langinfo.h locale.h \
1884ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00001885signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00001886sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00001887sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00001888sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Thomas Wouterse38b2f12001-07-11 22:35:31 +00001889ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001890do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001891ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001892echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001893echo "configure:1894: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001894if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001895 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001896else
1897 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001898#line 1899 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001899#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001900#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001901EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001902ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001903{ (eval echo configure:1904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001904ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001905if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001906 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001907 eval "ac_cv_header_$ac_safe=yes"
1908else
1909 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001910 echo "configure: failed program was:" >&5
1911 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001912 rm -rf conftest*
1913 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001914fi
1915rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001916fi
1917if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001918 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001919 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001920 cat >> confdefs.h <<EOF
1921#define $ac_tr_hdr 1
1922EOF
1923
1924else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001925 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001926fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001927done
1928
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001929ac_header_dirent=no
1930for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1931do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001932ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001933echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001934echo "configure:1935: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001935if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001936 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001937else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001938 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001939#line 1940 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001940#include "confdefs.h"
1941#include <sys/types.h>
1942#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001943int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001944DIR *dirp = 0;
1945; return 0; }
1946EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001947if { (eval echo configure:1948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001948 rm -rf conftest*
1949 eval "ac_cv_header_dirent_$ac_safe=yes"
1950else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001951 echo "configure: failed program was:" >&5
1952 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001953 rm -rf conftest*
1954 eval "ac_cv_header_dirent_$ac_safe=no"
1955fi
1956rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001957fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001958if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001959 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001960 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001961 cat >> confdefs.h <<EOF
1962#define $ac_tr_hdr 1
1963EOF
1964 ac_header_dirent=$ac_hdr; break
1965else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001966 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001967fi
1968done
1969# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1970if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001971echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001972echo "configure:1973: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001973ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001974if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001975 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001976else
1977 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001978LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001979cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001980#line 1981 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001981#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001982/* Override any gcc2 internal prototype to avoid an error. */
1983/* We use char because int might match the return type of a gcc2
1984 builtin and then its argument prototype would still apply. */
1985char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001986
Guido van Rossumf78abae1997-01-21 22:02:36 +00001987int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001988opendir()
1989; return 0; }
1990EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001991if { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001992 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001993 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001994else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001995 echo "configure: failed program was:" >&5
1996 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001997 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001998 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001999fi
2000rm -f conftest*
2001LIBS="$ac_save_LIBS"
2002
2003fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002004if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002005 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002006 LIBS="$LIBS -ldir"
2007else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002008 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002009fi
2010
2011else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002012echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002013echo "configure:2014: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002014ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002015if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002016 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002017else
2018 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002019LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002020cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002021#line 2022 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002022#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002023/* Override any gcc2 internal prototype to avoid an error. */
2024/* We use char because int might match the return type of a gcc2
2025 builtin and then its argument prototype would still apply. */
2026char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002027
Guido van Rossumf78abae1997-01-21 22:02:36 +00002028int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002029opendir()
2030; return 0; }
2031EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002032if { (eval echo configure:2033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002033 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002034 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002035else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002036 echo "configure: failed program was:" >&5
2037 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002038 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002039 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002040fi
2041rm -f conftest*
2042LIBS="$ac_save_LIBS"
2043
2044fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002045if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002046 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002047 LIBS="$LIBS -lx"
2048else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002049 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002050fi
2051
2052fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002053
2054
2055# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00002056was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002057echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002058echo "configure:2059: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002059cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002060#line 2061 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002061#include "confdefs.h"
2062#include <time.h>
2063EOF
2064if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2065 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002066 rm -rf conftest*
2067 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002068else
2069 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002070 cat >> confdefs.h <<\EOF
2071#define clock_t long
2072EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002073
2074fi
2075rm -f conftest*
2076
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002077echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002078
Guido van Rossum84e7b241996-08-19 21:59:00 +00002079# Add some code to confdefs.h so that the test for off_t works on SCO
2080cat >> confdefs.h <<\EOF
2081#if defined(SCO_DS)
2082#undef _OFF_T
2083#endif
2084EOF
2085
Guido van Rossumef2255b2000-03-10 22:30:29 +00002086# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002087echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002088echo "configure:2089: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002089if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002090 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002091else
2092 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002093#line 2094 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002094#include "confdefs.h"
2095#include <sys/types.h>
2096#if STDC_HEADERS
2097#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002098#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002099#endif
2100EOF
2101if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002102 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 +00002103 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002104 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002105else
2106 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002107 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002108fi
2109rm -f conftest*
2110
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002111fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002112echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2113if test $ac_cv_type_mode_t = no; then
2114 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002115#define mode_t int
2116EOF
2117
2118fi
2119
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002120echo $ac_n "checking for off_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002121echo "configure:2122: checking for off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002122if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002123 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002124else
2125 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002126#line 2127 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002127#include "confdefs.h"
2128#include <sys/types.h>
2129#if STDC_HEADERS
2130#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002131#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002132#endif
2133EOF
2134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002135 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 +00002136 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002137 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002138else
2139 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002140 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002141fi
2142rm -f conftest*
2143
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002144fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002145echo "$ac_t""$ac_cv_type_off_t" 1>&6
2146if test $ac_cv_type_off_t = no; then
2147 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002148#define off_t long
2149EOF
2150
2151fi
2152
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002153echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002154echo "configure:2155: checking for pid_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002155if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002156 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002157else
2158 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002159#line 2160 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002160#include "confdefs.h"
2161#include <sys/types.h>
2162#if STDC_HEADERS
2163#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002164#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002165#endif
2166EOF
2167if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002168 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 +00002169 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002170 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002171else
2172 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002173 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002174fi
2175rm -f conftest*
2176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002177fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002178echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2179if test $ac_cv_type_pid_t = no; then
2180 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002181#define pid_t int
2182EOF
2183
2184fi
2185
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002186echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002187echo "configure:2188: checking return type of signal handlers" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002188if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002189 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002190else
2191 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002192#line 2193 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002193#include "confdefs.h"
2194#include <sys/types.h>
2195#include <signal.h>
2196#ifdef signal
2197#undef signal
2198#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002199#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002200extern "C" void (*signal (int, void (*)(int)))(int);
2201#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002202void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002203#endif
2204
Guido van Rossumf78abae1997-01-21 22:02:36 +00002205int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002206int i;
2207; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002208EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002209if { (eval echo configure:2210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002210 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002211 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002212else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002213 echo "configure: failed program was:" >&5
2214 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002215 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002216 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002217fi
2218rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002219fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002220
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002221echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002222cat >> confdefs.h <<EOF
2223#define RETSIGTYPE $ac_cv_type_signal
2224EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002225
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002226
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002227echo $ac_n "checking for size_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002228echo "configure:2229: checking for size_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002229if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002230 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002231else
2232 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002233#line 2234 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002234#include "confdefs.h"
2235#include <sys/types.h>
2236#if STDC_HEADERS
2237#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002238#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002239#endif
2240EOF
2241if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002242 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 +00002243 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002244 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002245else
2246 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002247 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002248fi
2249rm -f conftest*
2250
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002251fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002252echo "$ac_t""$ac_cv_type_size_t" 1>&6
2253if test $ac_cv_type_size_t = no; then
2254 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002255#define size_t unsigned
2256EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002257
2258fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002259
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002260echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002261echo "configure:2262: checking for uid_t in sys/types.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002262if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002263 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002264else
2265 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002266#line 2267 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002267#include "confdefs.h"
2268#include <sys/types.h>
2269EOF
2270if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2271 egrep "uid_t" >/dev/null 2>&1; then
2272 rm -rf conftest*
2273 ac_cv_type_uid_t=yes
2274else
2275 rm -rf conftest*
2276 ac_cv_type_uid_t=no
2277fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002278rm -f conftest*
2279
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002280fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002281
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002282echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002283if test $ac_cv_type_uid_t = no; then
2284 cat >> confdefs.h <<\EOF
2285#define uid_t int
2286EOF
2287
2288 cat >> confdefs.h <<\EOF
2289#define gid_t int
2290EOF
2291
2292fi
2293
Guido van Rossum627b2d71993-12-24 10:39:16 +00002294
Guido van Rossumef2255b2000-03-10 22:30:29 +00002295# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002296echo $ac_n "checking size of int""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002297echo "configure:2298: checking size of int" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002298if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002299 echo $ac_n "(cached) $ac_c" 1>&6
2300else
2301 if test "$cross_compiling" = yes; then
2302 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2303else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002304 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002305#line 2306 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002306#include "confdefs.h"
2307#include <stdio.h>
2308main()
2309{
2310 FILE *f=fopen("conftestval", "w");
2311 if (!f) exit(1);
2312 fprintf(f, "%d\n", sizeof(int));
2313 exit(0);
2314}
2315EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002316if { (eval echo configure:2317: \"$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 +00002317then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002318 ac_cv_sizeof_int=`cat conftestval`
2319else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002320 echo "configure: failed program was:" >&5
2321 cat conftest.$ac_ext >&5
2322 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002323 ac_cv_sizeof_int=0
2324fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002325rm -fr conftest*
2326fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002327
2328fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002329echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2330cat >> confdefs.h <<EOF
2331#define SIZEOF_INT $ac_cv_sizeof_int
2332EOF
2333
2334
2335echo $ac_n "checking size of long""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002336echo "configure:2337: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002337if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002338 echo $ac_n "(cached) $ac_c" 1>&6
2339else
2340 if test "$cross_compiling" = yes; then
2341 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2342else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002343 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002344#line 2345 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002345#include "confdefs.h"
2346#include <stdio.h>
2347main()
2348{
2349 FILE *f=fopen("conftestval", "w");
2350 if (!f) exit(1);
2351 fprintf(f, "%d\n", sizeof(long));
2352 exit(0);
2353}
2354EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002355if { (eval echo configure:2356: \"$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 +00002356then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002357 ac_cv_sizeof_long=`cat conftestval`
2358else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002359 echo "configure: failed program was:" >&5
2360 cat conftest.$ac_ext >&5
2361 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002362 ac_cv_sizeof_long=0
2363fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002364rm -fr conftest*
2365fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002366
2367fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002368echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2369cat >> confdefs.h <<EOF
2370#define SIZEOF_LONG $ac_cv_sizeof_long
2371EOF
2372
2373
Guido van Rossumad678af1998-10-02 14:42:15 +00002374echo $ac_n "checking size of void *""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002375echo "configure:2376: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002376if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002377 echo $ac_n "(cached) $ac_c" 1>&6
2378else
2379 if test "$cross_compiling" = yes; then
2380 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2381else
2382 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002383#line 2384 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002384#include "confdefs.h"
2385#include <stdio.h>
2386main()
2387{
2388 FILE *f=fopen("conftestval", "w");
2389 if (!f) exit(1);
2390 fprintf(f, "%d\n", sizeof(void *));
2391 exit(0);
2392}
2393EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002394if { (eval echo configure:2395: \"$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 +00002395then
2396 ac_cv_sizeof_void_p=`cat conftestval`
2397else
2398 echo "configure: failed program was:" >&5
2399 cat conftest.$ac_ext >&5
2400 rm -fr conftest*
2401 ac_cv_sizeof_void_p=0
2402fi
2403rm -fr conftest*
2404fi
2405
2406fi
2407echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2408cat >> confdefs.h <<EOF
2409#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2410EOF
2411
2412
Guido van Rossumef2255b2000-03-10 22:30:29 +00002413echo $ac_n "checking size of char""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002414echo "configure:2415: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002415if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002416 echo $ac_n "(cached) $ac_c" 1>&6
2417else
2418 if test "$cross_compiling" = yes; then
2419 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2420else
2421 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002422#line 2423 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002423#include "confdefs.h"
2424#include <stdio.h>
2425main()
2426{
2427 FILE *f=fopen("conftestval", "w");
2428 if (!f) exit(1);
2429 fprintf(f, "%d\n", sizeof(char));
2430 exit(0);
2431}
2432EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002433if { (eval echo configure:2434: \"$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 +00002434then
2435 ac_cv_sizeof_char=`cat conftestval`
2436else
2437 echo "configure: failed program was:" >&5
2438 cat conftest.$ac_ext >&5
2439 rm -fr conftest*
2440 ac_cv_sizeof_char=0
2441fi
2442rm -fr conftest*
2443fi
2444
2445fi
2446echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2447cat >> confdefs.h <<EOF
2448#define SIZEOF_CHAR $ac_cv_sizeof_char
2449EOF
2450
2451
2452echo $ac_n "checking size of short""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002453echo "configure:2454: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002454if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002455 echo $ac_n "(cached) $ac_c" 1>&6
2456else
2457 if test "$cross_compiling" = yes; then
2458 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2459else
2460 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002461#line 2462 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002462#include "confdefs.h"
2463#include <stdio.h>
2464main()
2465{
2466 FILE *f=fopen("conftestval", "w");
2467 if (!f) exit(1);
2468 fprintf(f, "%d\n", sizeof(short));
2469 exit(0);
2470}
2471EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002472if { (eval echo configure:2473: \"$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 +00002473then
2474 ac_cv_sizeof_short=`cat conftestval`
2475else
2476 echo "configure: failed program was:" >&5
2477 cat conftest.$ac_ext >&5
2478 rm -fr conftest*
2479 ac_cv_sizeof_short=0
2480fi
2481rm -fr conftest*
2482fi
2483
2484fi
2485echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2486cat >> confdefs.h <<EOF
2487#define SIZEOF_SHORT $ac_cv_sizeof_short
2488EOF
2489
2490
2491echo $ac_n "checking size of float""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002492echo "configure:2493: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002493if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002494 echo $ac_n "(cached) $ac_c" 1>&6
2495else
2496 if test "$cross_compiling" = yes; then
2497 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2498else
2499 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002500#line 2501 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002501#include "confdefs.h"
2502#include <stdio.h>
2503main()
2504{
2505 FILE *f=fopen("conftestval", "w");
2506 if (!f) exit(1);
2507 fprintf(f, "%d\n", sizeof(float));
2508 exit(0);
2509}
2510EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002511if { (eval echo configure:2512: \"$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 +00002512then
2513 ac_cv_sizeof_float=`cat conftestval`
2514else
2515 echo "configure: failed program was:" >&5
2516 cat conftest.$ac_ext >&5
2517 rm -fr conftest*
2518 ac_cv_sizeof_float=0
2519fi
2520rm -fr conftest*
2521fi
2522
2523fi
2524echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2525cat >> confdefs.h <<EOF
2526#define SIZEOF_FLOAT $ac_cv_sizeof_float
2527EOF
2528
2529
2530echo $ac_n "checking size of double""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002531echo "configure:2532: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002532if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002533 echo $ac_n "(cached) $ac_c" 1>&6
2534else
2535 if test "$cross_compiling" = yes; then
2536 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2537else
2538 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002539#line 2540 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002540#include "confdefs.h"
2541#include <stdio.h>
2542main()
2543{
2544 FILE *f=fopen("conftestval", "w");
2545 if (!f) exit(1);
2546 fprintf(f, "%d\n", sizeof(double));
2547 exit(0);
2548}
2549EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002550if { (eval echo configure:2551: \"$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 +00002551then
2552 ac_cv_sizeof_double=`cat conftestval`
2553else
2554 echo "configure: failed program was:" >&5
2555 cat conftest.$ac_ext >&5
2556 rm -fr conftest*
2557 ac_cv_sizeof_double=0
2558fi
2559rm -fr conftest*
2560fi
2561
2562fi
2563echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2564cat >> confdefs.h <<EOF
2565#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2566EOF
2567
2568
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002569echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002570echo "configure:2571: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002571if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002572 echo $ac_n "(cached) $ac_c" 1>&6
2573else
2574 if test "$cross_compiling" = yes; then
2575 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2576else
2577 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002578#line 2579 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002579#include "confdefs.h"
2580#include <stdio.h>
2581main()
2582{
2583 FILE *f=fopen("conftestval", "w");
2584 if (!f) exit(1);
2585 fprintf(f, "%d\n", sizeof(fpos_t));
2586 exit(0);
2587}
2588EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002589if { (eval echo configure:2590: \"$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 +00002590then
2591 ac_cv_sizeof_fpos_t=`cat conftestval`
2592else
2593 echo "configure: failed program was:" >&5
2594 cat conftest.$ac_ext >&5
2595 rm -fr conftest*
2596 ac_cv_sizeof_fpos_t=0
2597fi
2598rm -fr conftest*
2599fi
2600
2601fi
2602echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2603cat >> confdefs.h <<EOF
2604#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2605EOF
2606
2607
Guido van Rossum0a516c91994-09-12 10:58:40 +00002608
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002609echo $ac_n "checking for long long support""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002610echo "configure:2611: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002611have_long_long=no
2612cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002613#line 2614 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002614#include "confdefs.h"
2615
2616int main() {
2617long long x; x = (long long)0;
2618; return 0; }
2619EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002620if { (eval echo configure:2621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002621 rm -rf conftest*
2622 cat >> confdefs.h <<\EOF
2623#define HAVE_LONG_LONG 1
2624EOF
2625 have_long_long=yes
2626else
2627 echo "configure: failed program was:" >&5
2628 cat conftest.$ac_ext >&5
2629fi
2630rm -f conftest*
2631echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002632if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002633echo $ac_n "checking size of long long""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002634echo "configure:2635: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002635if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002636 echo $ac_n "(cached) $ac_c" 1>&6
2637else
2638 if test "$cross_compiling" = yes; then
2639 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2640else
2641 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002642#line 2643 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002643#include "confdefs.h"
2644#include <stdio.h>
2645main()
2646{
2647 FILE *f=fopen("conftestval", "w");
2648 if (!f) exit(1);
2649 fprintf(f, "%d\n", sizeof(long long));
2650 exit(0);
2651}
2652EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002653if { (eval echo configure:2654: \"$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 +00002654then
2655 ac_cv_sizeof_long_long=`cat conftestval`
2656else
2657 echo "configure: failed program was:" >&5
2658 cat conftest.$ac_ext >&5
2659 rm -fr conftest*
2660 ac_cv_sizeof_long_long=0
2661fi
2662rm -fr conftest*
2663fi
2664
2665fi
2666echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2667cat >> confdefs.h <<EOF
2668#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2669EOF
2670
2671
2672fi
2673
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002674echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002675echo "configure:2676: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002676have_uintptr_t=no
2677cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002678#line 2679 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002679#include "confdefs.h"
2680
2681int main() {
2682uintptr_t x; x = (uintptr_t)0;
2683; return 0; }
2684EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002685if { (eval echo configure:2686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002686 rm -rf conftest*
2687 cat >> confdefs.h <<\EOF
2688#define HAVE_UINTPTR_T 1
2689EOF
2690 have_uintptr_t=yes
2691else
2692 echo "configure: failed program was:" >&5
2693 cat conftest.$ac_ext >&5
2694fi
2695rm -f conftest*
2696echo "$ac_t""$have_uintptr_t" 1>&6
2697if test "$have_uintptr_t" = yes ; then
2698echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002699echo "configure:2700: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002700if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002701 echo $ac_n "(cached) $ac_c" 1>&6
2702else
2703 if test "$cross_compiling" = yes; then
2704 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2705else
2706 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002707#line 2708 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002708#include "confdefs.h"
2709#include <stdio.h>
2710main()
2711{
2712 FILE *f=fopen("conftestval", "w");
2713 if (!f) exit(1);
2714 fprintf(f, "%d\n", sizeof(uintptr_t));
2715 exit(0);
2716}
2717EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002718if { (eval echo configure:2719: \"$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 +00002719then
2720 ac_cv_sizeof_uintptr_t=`cat conftestval`
2721else
2722 echo "configure: failed program was:" >&5
2723 cat conftest.$ac_ext >&5
2724 rm -fr conftest*
2725 ac_cv_sizeof_uintptr_t=0
2726fi
2727rm -fr conftest*
2728fi
2729
2730fi
2731echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2732cat >> confdefs.h <<EOF
2733#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2734EOF
2735
2736
2737fi
2738
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002739# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2740echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002741echo "configure:2742: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002742if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002743 echo $ac_n "(cached) $ac_c" 1>&6
2744else
2745 if test "$cross_compiling" = yes; then
2746 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2747else
2748 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002749#line 2750 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002750#include "confdefs.h"
2751#include <stdio.h>
2752#include <sys/types.h>
2753main()
2754{
2755 FILE *f=fopen("conftestval", "w");
2756 if (!f) exit(1);
2757 fprintf(f, "%d\n", sizeof(off_t));
2758 exit(0);
2759}
2760EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002761if { (eval echo configure:2762: \"$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 +00002762then
2763 ac_cv_sizeof_off_t=`cat conftestval`
2764else
2765 echo "configure: failed program was:" >&5
2766 cat conftest.$ac_ext >&5
2767 rm -fr conftest*
2768 ac_cv_sizeof_off_t=0
2769fi
2770rm -fr conftest*
2771fi
2772
2773
2774fi
2775
2776echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2777cat >> confdefs.h <<EOF
2778#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2779EOF
2780
2781
2782echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002783echo "configure:2784: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002784if test "$have_long_long" = yes -a \
2785 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2786 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002787 cat >> confdefs.h <<\EOF
2788#define HAVE_LARGEFILE_SUPPORT 1
2789EOF
2790
2791 echo "$ac_t""yes" 1>&6
2792else
2793 echo "$ac_t""no" 1>&6
2794fi
2795
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002796# AC_CHECK_SIZEOF() doesn't include <time.h>.
2797echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002798echo "configure:2799: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002799if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002800 echo $ac_n "(cached) $ac_c" 1>&6
2801else
2802 if test "$cross_compiling" = yes; then
2803 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2804else
2805 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002806#line 2807 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002807#include "confdefs.h"
2808#include <stdio.h>
2809#include <time.h>
2810main()
2811{
2812 FILE *f=fopen("conftestval", "w");
2813 if (!f) exit(1);
2814 fprintf(f, "%d\n", sizeof(time_t));
2815 exit(0);
2816}
2817EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002818if { (eval echo configure:2819: \"$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 +00002819then
2820 ac_cv_sizeof_time_t=`cat conftestval`
2821else
2822 echo "configure: failed program was:" >&5
2823 cat conftest.$ac_ext >&5
2824 rm -fr conftest*
2825 ac_cv_sizeof_time_t=0
2826fi
2827rm -fr conftest*
2828fi
2829
2830
2831fi
2832
2833echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2834cat >> confdefs.h <<EOF
2835#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2836EOF
2837
2838
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002839
Trent Mick635f6fb2000-08-23 21:33:05 +00002840# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00002841ac_save_cc="$CC"
2842if test "$ac_cv_kpthread" = "yes"
2843then CC="$CC -Kpthread"
2844fi
Trent Mick635f6fb2000-08-23 21:33:05 +00002845echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002846echo "configure:2847: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002847have_pthread_t=no
2848cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002849#line 2850 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002850#include "confdefs.h"
2851#include <pthread.h>
2852int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002853pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002854; return 0; }
2855EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002856if { (eval echo configure:2857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002857 rm -rf conftest*
2858 have_pthread_t=yes
2859else
2860 echo "configure: failed program was:" >&5
2861 cat conftest.$ac_ext >&5
2862fi
2863rm -f conftest*
2864echo "$ac_t""$have_pthread_t" 1>&6
2865if test "$have_pthread_t" = yes ; then
2866 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2867 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002868echo "configure:2869: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002869 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002870 echo $ac_n "(cached) $ac_c" 1>&6
2871else
2872 if test "$cross_compiling" = yes; then
2873 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2874else
2875 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002876#line 2877 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002877#include "confdefs.h"
2878#include <stdio.h>
2879 #include <pthread.h>
2880 main()
2881 {
2882 FILE *f=fopen("conftestval", "w");
2883 if (!f) exit(1);
2884 fprintf(f, "%d\n", sizeof(pthread_t));
2885 exit(0);
2886 }
2887EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002888if { (eval echo configure:2889: \"$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 +00002889then
2890 ac_cv_sizeof_pthread_t=`cat conftestval`
2891else
2892 echo "configure: failed program was:" >&5
2893 cat conftest.$ac_ext >&5
2894 rm -fr conftest*
2895 ac_cv_sizeof_pthread_t=0
2896fi
2897rm -fr conftest*
2898fi
2899
2900
2901fi
2902
2903 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2904 cat >> confdefs.h <<EOF
2905#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2906EOF
2907
2908fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00002909CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00002910
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002911# Minor variations in building a framework between NextStep versions 4 and 5
2912
2913case $ac_sys_system/$ac_sys_release in
Guido van Rossum5839e582000-10-09 19:52:35 +00002914 Darwin/*)
2915 ns_undef_sym='_environ'
Jack Jansenca06bc62001-08-03 15:32:23 +00002916 LIBTOOL_CRUFT="-framework Foundation -framework Carbon -lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002917 next/4*)
2918 ns_undef_sym='__environ'
2919 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2920 next/5*)
2921 ns_undef_sym='_environ'
2922 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2923esac
2924
2925echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002926echo "configure:2927: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002927if test "$with_next_framework"
2928then
Jack Jansenca06bc62001-08-03 15:32:23 +00002929 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002930 # -U __environ is needed since bundles don't have access
2931 # to crt0 when built but will always be linked against it
2932 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2933 cat >> confdefs.h <<\EOF
2934#define WITH_NEXT_FRAMEWORK 1
2935EOF
2936
2937 echo "$ac_t""yes" 1>&6
2938else
2939 echo "$ac_t""no" 1>&6
2940fi
2941
2942echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002943echo "configure:2944: checking for --with-dyld" >&5
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002944case $ac_sys_system/$ac_sys_release in
2945 Darwin/*)
2946 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002947#define WITH_DYLD 1
2948EOF
2949
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002950 echo "$ac_t""always on for Darwin" 1>&6
2951 ;;
2952 *)
2953 if test "$with_next_framework" -o "$with_dyld"
2954 then
2955 if test "$with_dyld"
2956 then
2957 echo "$ac_t""yes" 1>&6
2958 else
2959 echo "$ac_t""required for framework build" 1>&6
2960 fi
2961 cat >> confdefs.h <<\EOF
2962#define WITH_DYLD 1
2963EOF
2964
2965 ns_dyld='set'
2966 else
2967 echo "$ac_t""no" 1>&6
2968 fi ;;
2969esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002970
Guido van Rossum0a516c91994-09-12 10:58:40 +00002971# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002972
2973
2974
2975
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002976
Guido van Rossum0a516c91994-09-12 10:58:40 +00002977# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00002978# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002979echo $ac_n "checking SO""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002980echo "configure:2981: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002981if test -z "$SO"
2982then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002983 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002984 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00002985 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00002986 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002987 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002988fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002989echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002990# LDSHARED is the ld *command* used to create shared library
2991# -- "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 +00002992# (Shared libraries in this instance are shared modules to be loaded into
2993# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002994echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002995echo "configure:2996: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002996if test -z "$LDSHARED"
2997then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002998 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002999 AIX*)
3000 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
3001 LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp"
3002 ;;
3003 BeOS*)
3004 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
3005 LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
3006 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003007 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003008 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003009 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00003010 SunOS/5*)
3011 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003012 then LDSHARED='$(CC) -shared'
Greg Ward57c9a6632000-05-26 12:22:54 +00003013 else LDSHARED="ld -G";
3014 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003015 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003016 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3017 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003018 Darwin/*)
3019 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
3020 if test "$with_next_framework" ; then
3021 LDSHARED="$LDSHARED \$(LDLIBRARY)"
3022 fi ;;
3023 next/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003024 if test "$ns_dyld"
Guido van Rossumacb14c72001-01-10 21:41:16 +00003025 then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003026 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
3027 fi
Guido van Rossum3dc0a512000-10-05 18:00:06 +00003028 if test "$with_next_framework" ; then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003029 LDSHARED="$LDSHARED \$(LDLIBRARY)"
3030 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00003031 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003032 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003033 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003034 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00003035 NetBSD*)
3036 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3037 then
3038 LDSHARED="cc -shared"
3039 else
3040 LDSHARED="ld -Bshareable"
3041 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003042 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003043 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003044 then
3045 LDSHARED="cc -shared ${LDFLAGS}"
3046 else
3047 LDSHARED="ld -Bshareable ${LDFLAGS}"
3048 fi;;
Martin v. Löwisbec19582001-03-21 15:57:54 +00003049 UnixWare*)
3050 if test "$GCC" = "yes"
3051 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003052 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003053 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003054 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003055 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003056 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003057 *) LDSHARED="ld";;
3058 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003059fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003060echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003061BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003062# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003063# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003064echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003065echo "configure:3066: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003066if test -z "$CCSHARED"
3067then
Guido van Rossum07397971997-04-29 21:49:50 +00003068 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003069 SunOS*) if test "$GCC" = yes;
3070 then CCSHARED="-fPIC";
3071 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003072 hp*|HP*) if test "$GCC" = yes;
3073 then CCSHARED="-fpic";
3074 else CCSHARED="+z";
3075 fi;;
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003076 Linux*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003077 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003078 OpenBSD*) CCSHARED="-fpic";;
3079 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Martin v. Löwisbec19582001-03-21 15:57:54 +00003080 UnixWare*)
3081 if test "$GCC" = "yes"
3082 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003083 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003084 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003085 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003086 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003087 IRIX*/6*) case $CC in
3088 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003089 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003090 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003091 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003092 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003093fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003094echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003095# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003096# the python executable -- this is only needed for a few systems
3097echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003098echo "configure:3099: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003099if test -z "$LINKFORSHARED"
3100then
Guido van Rossum07397971997-04-29 21:49:50 +00003101 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003102 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003103 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00003104 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003105 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00003106 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003107 # -u libsys_s pulls in all symbols in libsys
3108 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
3109 # -u __dummy makes the linker aware of the objc runtime
3110 # in System.framework; otherwise, __objcInit (referenced in
3111 # crt1.o) gets erroneously defined as common, which breaks dynamic
3112 # loading of any modules which reference it in System.framework
3113 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Neil Schemenauer4e425612001-06-19 15:44:15 +00003114 Darwin/*) LINKFORSHARED="-u __dummy -u _PyMac_Error -framework System -framework Foundation -framework Carbon" ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003115 UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003116 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003117 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003118 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003119 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3120 then
3121 LINKFORSHARED="-Wl,--export-dynamic"
3122 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003123 SunOS/5*) case $CC in
3124 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003125 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003126 then
3127 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003128 fi;;
3129 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003130 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003131fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003132echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003133
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003134
3135echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003136echo "configure:3137: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003137if test ! "$LIBRARY" = "$LDLIBRARY"
3138then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003139 case $ac_sys_system in
3140 CYGWIN*)
3141 # Cygwin needs CCSHARED when building extension DLLs
3142 # but not when building the interpreter DLL.
3143 CFLAGSFORSHARED='';;
3144 *)
3145 CFLAGSFORSHARED='$(CCSHARED)'
3146 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003147fi
3148echo "$ac_t""$CFLAGSFORSHARED" 1>&6
3149
Guido van Rossum627b2d71993-12-24 10:39:16 +00003150# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00003151echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003152echo "configure:3153: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003153ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003154if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003155 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003156else
3157 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003158LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003159cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003160#line 3161 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003161#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003162/* Override any gcc2 internal prototype to avoid an error. */
3163/* We use char because int might match the return type of a gcc2
3164 builtin and then its argument prototype would still apply. */
3165char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003166
Guido van Rossumf78abae1997-01-21 22:02:36 +00003167int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003168dlopen()
3169; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003170EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003171if { (eval echo configure:3172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003172 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003173 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003174else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003175 echo "configure: failed program was:" >&5
3176 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003177 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003178 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003179fi
3180rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003181LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003182
Guido van Rossum627b2d71993-12-24 10:39:16 +00003183fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003184if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003185 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003186 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3187 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003188 cat >> confdefs.h <<EOF
3189#define $ac_tr_lib 1
3190EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003191
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003192 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003193
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003194else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003195 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003196fi
3197 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00003198echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003199echo "configure:3200: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003200ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003201if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003202 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003203else
3204 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003205LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003206cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003207#line 3208 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003208#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003209/* Override any gcc2 internal prototype to avoid an error. */
3210/* We use char because int might match the return type of a gcc2
3211 builtin and then its argument prototype would still apply. */
3212char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003213
Guido van Rossumf78abae1997-01-21 22:02:36 +00003214int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003215shl_load()
3216; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003217EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003218if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003219 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003220 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003221else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003222 echo "configure: failed program was:" >&5
3223 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003224 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003225 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003226fi
3227rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003228LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003229
Guido van Rossum627b2d71993-12-24 10:39:16 +00003230fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003231if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003232 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003233 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3234 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003235 cat >> confdefs.h <<EOF
3236#define $ac_tr_lib 1
3237EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003238
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003239 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003240
3241else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003242 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003243fi
3244 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003245
3246# checks for system dependent C++ extensions support
3247case "$ac_sys_system" in
3248 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003249echo "configure:3250: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003250 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003251#line 3252 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003252#include "confdefs.h"
3253#include "/usr/lpp/xlC/include/load.h"
3254int main() {
3255loadAndInit("", 0, "")
3256; return 0; }
3257EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003258if { (eval echo configure:3259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003259 rm -rf conftest*
3260 cat >> confdefs.h <<\EOF
3261#define AIX_GENUINE_CPLUSPLUS 1
3262EOF
3263
3264 echo "$ac_t""yes" 1>&6
3265else
3266 echo "configure: failed program was:" >&5
3267 cat conftest.$ac_ext >&5
3268 rm -rf conftest*
3269 echo "$ac_t""no" 1>&6
3270fi
3271rm -f conftest*;;
3272 *) ;;
3273esac
3274
Guido van Rossum70c7f481998-03-26 18:44:10 +00003275# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3276# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003277# BeOS' sockets are stashed in libnet.
3278case "$ac_sys_system" in
3279IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003280*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003281echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003282echo "configure:3283: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003283ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003284if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003285 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003286else
3287 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003288LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003289cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003290#line 3291 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003291#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003292/* Override any gcc2 internal prototype to avoid an error. */
3293/* We use char because int might match the return type of a gcc2
3294 builtin and then its argument prototype would still apply. */
3295char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003296
Guido van Rossumf78abae1997-01-21 22:02:36 +00003297int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003298t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003299; return 0; }
3300EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003301if { (eval echo configure:3302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003302 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003303 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003304else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003305 echo "configure: failed program was:" >&5
3306 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003307 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003308 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003309fi
3310rm -f conftest*
3311LIBS="$ac_save_LIBS"
3312
3313fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003314if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003315 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003316 LIBS="-lnsl $LIBS"
3317else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003318 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003319fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003320 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003321echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003322echo "configure:3323: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003323ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003324if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003325 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003326else
3327 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003328LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003329cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003330#line 3331 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003331#include "confdefs.h"
3332/* Override any gcc2 internal prototype to avoid an error. */
3333/* We use char because int might match the return type of a gcc2
3334 builtin and then its argument prototype would still apply. */
3335char socket();
3336
3337int main() {
3338socket()
3339; return 0; }
3340EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003341if { (eval echo configure:3342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003342 rm -rf conftest*
3343 eval "ac_cv_lib_$ac_lib_var=yes"
3344else
3345 echo "configure: failed program was:" >&5
3346 cat conftest.$ac_ext >&5
3347 rm -rf conftest*
3348 eval "ac_cv_lib_$ac_lib_var=no"
3349fi
3350rm -f conftest*
3351LIBS="$ac_save_LIBS"
3352
3353fi
3354if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3355 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003356 LIBS="-lsocket $LIBS"
3357else
3358 echo "$ac_t""no" 1>&6
3359fi
3360 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003361;;
3362esac
3363case "$ac_sys_system" in
3364BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003365echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003366echo "configure:3367: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003367ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003368if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003369 echo $ac_n "(cached) $ac_c" 1>&6
3370else
3371 ac_save_LIBS="$LIBS"
3372LIBS="-lnet $LIBS $LIBS"
3373cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003374#line 3375 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003375#include "confdefs.h"
3376/* Override any gcc2 internal prototype to avoid an error. */
3377/* We use char because int might match the return type of a gcc2
3378 builtin and then its argument prototype would still apply. */
3379char socket();
3380
3381int main() {
3382socket()
3383; return 0; }
3384EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003385if { (eval echo configure:3386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003386 rm -rf conftest*
3387 eval "ac_cv_lib_$ac_lib_var=yes"
3388else
3389 echo "configure: failed program was:" >&5
3390 cat conftest.$ac_ext >&5
3391 rm -rf conftest*
3392 eval "ac_cv_lib_$ac_lib_var=no"
3393fi
3394rm -f conftest*
3395LIBS="$ac_save_LIBS"
3396
3397fi
3398if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3399 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003400 LIBS="-lnet $LIBS"
3401else
3402 echo "$ac_t""no" 1>&6
3403fi
3404 # BeOS
3405;;
3406esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003407
Guido van Rossuma68acba1996-07-31 17:36:39 +00003408echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003409echo "configure:3410: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003410# Check whether --with-libs or --without-libs was given.
3411if test "${with_libs+set}" = set; then
3412 withval="$with_libs"
3413
3414echo "$ac_t""$withval" 1>&6
3415LIBS="$withval $LIBS"
3416
3417else
3418 echo "$ac_t""no" 1>&6
3419fi
3420
Guido van Rossum7f43da71994-08-01 12:15:30 +00003421
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003422# Determine if signalmodule should be used.
3423
3424
3425echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003426echo "configure:3427: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003427# Check whether --with-signal-module or --without-signal-module was given.
3428if test "${with_signal_module+set}" = set; then
3429 withval="$with_signal_module"
3430 :
3431fi
3432
3433
3434if test -z "$with_signal_module"
3435then with_signal_module="yes"
3436fi
3437echo "$ac_t""$with_signal_module" 1>&6
3438
3439if test "${with_signal_module}" = "yes"; then
3440 USE_SIGNAL_MODULE=""
3441 SIGNAL_OBJS=""
3442else
3443 USE_SIGNAL_MODULE="#"
3444 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3445fi
3446
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003447# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003448
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003449USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003450
Guido van Rossumec2f0731997-01-22 20:54:01 +00003451echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003452echo "configure:3453: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003453
3454# Check whether --with-dec-threads or --without-dec-threads was given.
3455if test "${with_dec_threads+set}" = set; then
3456 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003457
3458echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003459LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003460if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003461 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003462fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003463else
3464 echo "$ac_t""no" 1>&6
3465fi
3466
3467
3468echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003469echo "configure:3470: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003470# Check whether --with-threads or --without-threads was given.
3471if test "${with_threads+set}" = set; then
3472 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003473 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003474fi
3475
3476
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003477# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003478# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003479if test "${with_thread+set}" = set; then
3480 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003481
3482with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003483fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003484
3485
3486if test -z "$with_threads"
3487then with_threads="yes"
3488fi
3489echo "$ac_t""$with_threads" 1>&6
3490
3491if test "$with_threads" = "no"
3492then
3493 USE_THREAD_MODULE="#"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003494elif test "$ac_cv_kpthread" = "yes"
3495then
3496 CC="$CC -Kpthread"
3497 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003498#define WITH_THREAD 1
3499EOF
3500
Martin v. Löwis130fb172001-07-19 11:00:41 +00003501 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003502#define _POSIX_THREADS 1
3503EOF
3504
Martin v. Löwis130fb172001-07-19 11:00:41 +00003505 LIBOBJS="$LIBOBJS thread.o"
3506else
3507 if test ! -z "$with_threads" -a -d "$with_threads"
3508 then LDFLAGS="$LDFLAGS -L$with_threads"
3509 fi
3510 if test ! -z "$withval" -a -d "$withval"
3511 then LDFLAGS="$LDFLAGS -L$withval"
3512 fi
3513 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003514#define _REENTRANT 1
3515EOF
3516
Martin v. Löwis130fb172001-07-19 11:00:41 +00003517 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003518echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003519echo "configure:3520: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003520if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003521 echo $ac_n "(cached) $ac_c" 1>&6
3522else
3523 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003524#line 3525 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003525#include "confdefs.h"
3526#include <mach/cthreads.h>
3527EOF
3528ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003529{ (eval echo configure:3530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003530ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003531if test -z "$ac_err"; then
3532 rm -rf conftest*
3533 eval "ac_cv_header_$ac_safe=yes"
3534else
3535 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003536 echo "configure: failed program was:" >&5
3537 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003538 rm -rf conftest*
3539 eval "ac_cv_header_$ac_safe=no"
3540fi
3541rm -f conftest*
3542fi
3543if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3544 echo "$ac_t""yes" 1>&6
3545 cat >> confdefs.h <<\EOF
3546#define WITH_THREAD 1
3547EOF
3548
Martin v. Löwis130fb172001-07-19 11:00:41 +00003549 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003550#define C_THREADS 1
3551EOF
3552
Martin v. Löwis130fb172001-07-19 11:00:41 +00003553 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003554else
3555 echo "$ac_t""no" 1>&6
3556
Martin v. Löwis130fb172001-07-19 11:00:41 +00003557 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003558echo "configure:3559: checking for --with-pth" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00003559 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003560if test "${with_pth+set}" = set; then
3561 withval="$with_pth"
3562
Martin v. Löwis130fb172001-07-19 11:00:41 +00003563 echo "$ac_t""$withval" 1>&6
3564 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003565#define WITH_THREAD 1
3566EOF
3567
Martin v. Löwis130fb172001-07-19 11:00:41 +00003568 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003569#define HAVE_PTH 1
3570EOF
3571
Martin v. Löwis130fb172001-07-19 11:00:41 +00003572 LIBS="-lpth $LIBS"
3573 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003574else
3575
Martin v. Löwis130fb172001-07-19 11:00:41 +00003576 echo "$ac_t""no" 1>&6
3577 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003578echo "configure:3579: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003579ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003580if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003581 echo $ac_n "(cached) $ac_c" 1>&6
3582else
3583 ac_save_LIBS="$LIBS"
3584LIBS="-lpthread $LIBS"
3585cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003586#line 3587 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003587#include "confdefs.h"
3588/* Override any gcc2 internal prototype to avoid an error. */
3589/* We use char because int might match the return type of a gcc2
3590 builtin and then its argument prototype would still apply. */
3591char pthread_create();
3592
3593int main() {
3594pthread_create()
3595; return 0; }
3596EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003597if { (eval echo configure:3598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003598 rm -rf conftest*
3599 eval "ac_cv_lib_$ac_lib_var=yes"
3600else
3601 echo "configure: failed program was:" >&5
3602 cat conftest.$ac_ext >&5
3603 rm -rf conftest*
3604 eval "ac_cv_lib_$ac_lib_var=no"
3605fi
3606rm -f conftest*
3607LIBS="$ac_save_LIBS"
3608
3609fi
3610if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3611 echo "$ac_t""yes" 1>&6
3612 cat >> confdefs.h <<\EOF
3613#define WITH_THREAD 1
3614EOF
3615
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003616 case $ac_sys_system in
3617 Darwin*) ;;
3618 *) cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003619#define _POSIX_THREADS 1
3620EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003621;;
3622 esac
Martin v. Löwis130fb172001-07-19 11:00:41 +00003623 LIBS="-lpthread $LIBS"
3624 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003625else
3626 echo "$ac_t""no" 1>&6
3627
Martin v. Löwis130fb172001-07-19 11:00:41 +00003628 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003629echo "configure:3630: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003630if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003631 echo $ac_n "(cached) $ac_c" 1>&6
3632else
3633 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003634#line 3635 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003635#include "confdefs.h"
3636/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003637 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003638#include <assert.h>
3639/* Override any gcc2 internal prototype to avoid an error. */
3640/* We use char because int might match the return type of a gcc2
3641 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003642char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003643
3644int main() {
3645
3646/* The GNU C library defines this for functions which it implements
3647 to always fail with ENOSYS. Some functions are actually named
3648 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003649#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003650choke me
3651#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003652pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003653#endif
3654
3655; return 0; }
3656EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003657if { (eval echo configure:3658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003658 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003659 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003660else
3661 echo "configure: failed program was:" >&5
3662 cat conftest.$ac_ext >&5
3663 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003664 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003665fi
3666rm -f conftest*
3667fi
3668
Guido van Rossumea516321998-12-17 18:08:55 +00003669if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003670 echo "$ac_t""yes" 1>&6
3671 cat >> confdefs.h <<\EOF
3672#define WITH_THREAD 1
3673EOF
3674
Martin v. Löwis130fb172001-07-19 11:00:41 +00003675 case $ac_sys_system in
3676 Darwin*) ;;
3677 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003678#define _POSIX_THREADS 1
3679EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003680;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003681 esac
3682 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003683else
3684 echo "$ac_t""no" 1>&6
3685
Martin v. Löwis130fb172001-07-19 11:00:41 +00003686 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003687echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003688echo "configure:3689: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003689if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003690 echo $ac_n "(cached) $ac_c" 1>&6
3691else
3692 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003693#line 3694 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003694#include "confdefs.h"
3695#include <kernel/OS.h>
3696EOF
3697ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003698{ (eval echo configure:3699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003699ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003700if test -z "$ac_err"; then
3701 rm -rf conftest*
3702 eval "ac_cv_header_$ac_safe=yes"
3703else
3704 echo "$ac_err" >&5
3705 echo "configure: failed program was:" >&5
3706 cat conftest.$ac_ext >&5
3707 rm -rf conftest*
3708 eval "ac_cv_header_$ac_safe=no"
3709fi
3710rm -f conftest*
3711fi
3712if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3713 echo "$ac_t""yes" 1>&6
3714 cat >> confdefs.h <<\EOF
3715#define WITH_THREAD 1
3716EOF
3717
Martin v. Löwis130fb172001-07-19 11:00:41 +00003718 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003719#define BEOS_THREADS 1
3720EOF
3721
Martin v. Löwis130fb172001-07-19 11:00:41 +00003722 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003723else
3724 echo "$ac_t""no" 1>&6
3725
Martin v. Löwis130fb172001-07-19 11:00:41 +00003726 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003727echo "configure:3728: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003728ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003729if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003730 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003731else
3732 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003733LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003734cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003735#line 3736 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003736#include "confdefs.h"
3737/* Override any gcc2 internal prototype to avoid an error. */
3738/* We use char because int might match the return type of a gcc2
3739 builtin and then its argument prototype would still apply. */
3740char pthread_create();
3741
3742int main() {
3743pthread_create()
3744; return 0; }
3745EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003746if { (eval echo configure:3747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003747 rm -rf conftest*
3748 eval "ac_cv_lib_$ac_lib_var=yes"
3749else
3750 echo "configure: failed program was:" >&5
3751 cat conftest.$ac_ext >&5
3752 rm -rf conftest*
3753 eval "ac_cv_lib_$ac_lib_var=no"
3754fi
3755rm -f conftest*
3756LIBS="$ac_save_LIBS"
3757
3758fi
3759if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3760 echo "$ac_t""yes" 1>&6
3761 cat >> confdefs.h <<\EOF
3762#define WITH_THREAD 1
3763EOF
3764
Martin v. Löwis130fb172001-07-19 11:00:41 +00003765 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003766#define _POSIX_THREADS 1
3767EOF
3768
Martin v. Löwis130fb172001-07-19 11:00:41 +00003769 LIBS="$LIBS -lpthreads"
3770 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003771else
3772 echo "$ac_t""no" 1>&6
3773
Martin v. Löwis130fb172001-07-19 11:00:41 +00003774 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003775echo "configure:3776: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003776ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003777if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003778 echo $ac_n "(cached) $ac_c" 1>&6
3779else
3780 ac_save_LIBS="$LIBS"
3781LIBS="-lc_r $LIBS"
3782cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003783#line 3784 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003784#include "confdefs.h"
3785/* Override any gcc2 internal prototype to avoid an error. */
3786/* We use char because int might match the return type of a gcc2
3787 builtin and then its argument prototype would still apply. */
3788char pthread_create();
3789
3790int main() {
3791pthread_create()
3792; return 0; }
3793EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003794if { (eval echo configure:3795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003795 rm -rf conftest*
3796 eval "ac_cv_lib_$ac_lib_var=yes"
3797else
3798 echo "configure: failed program was:" >&5
3799 cat conftest.$ac_ext >&5
3800 rm -rf conftest*
3801 eval "ac_cv_lib_$ac_lib_var=no"
3802fi
3803rm -f conftest*
3804LIBS="$ac_save_LIBS"
3805
3806fi
3807if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3808 echo "$ac_t""yes" 1>&6
3809 cat >> confdefs.h <<\EOF
3810#define WITH_THREAD 1
3811EOF
3812
Martin v. Löwis130fb172001-07-19 11:00:41 +00003813 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003814#define _POSIX_THREADS 1
3815EOF
3816
Martin v. Löwis130fb172001-07-19 11:00:41 +00003817 LIBS="$LIBS -lc_r"
3818 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003819else
3820 echo "$ac_t""no" 1>&6
3821
Martin v. Löwis130fb172001-07-19 11:00:41 +00003822 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003823echo "configure:3824: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003824ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003825if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003826 echo $ac_n "(cached) $ac_c" 1>&6
3827else
3828 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003829LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003830cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003831#line 3832 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003832#include "confdefs.h"
3833/* Override any gcc2 internal prototype to avoid an error. */
3834/* We use char because int might match the return type of a gcc2
3835 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003836char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003837
3838int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003839__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003840; return 0; }
3841EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003842if { (eval echo configure:3843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003843 rm -rf conftest*
3844 eval "ac_cv_lib_$ac_lib_var=yes"
3845else
3846 echo "configure: failed program was:" >&5
3847 cat conftest.$ac_ext >&5
3848 rm -rf conftest*
3849 eval "ac_cv_lib_$ac_lib_var=no"
3850fi
3851rm -f conftest*
3852LIBS="$ac_save_LIBS"
3853
3854fi
3855if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3856 echo "$ac_t""yes" 1>&6
3857 cat >> confdefs.h <<\EOF
3858#define WITH_THREAD 1
3859EOF
3860
Martin v. Löwis130fb172001-07-19 11:00:41 +00003861 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003862#define _POSIX_THREADS 1
3863EOF
3864
Martin v. Löwis130fb172001-07-19 11:00:41 +00003865 LIBS="$LIBS -lthread"
3866 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003867else
3868 echo "$ac_t""no" 1>&6
3869
Martin v. Löwis130fb172001-07-19 11:00:41 +00003870 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003871echo "configure:3872: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003872ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
3873if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3874 echo $ac_n "(cached) $ac_c" 1>&6
3875else
3876 ac_save_LIBS="$LIBS"
3877LIBS="-lpthread $LIBS"
3878cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003879#line 3880 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003880#include "confdefs.h"
3881/* Override any gcc2 internal prototype to avoid an error. */
3882/* We use char because int might match the return type of a gcc2
3883 builtin and then its argument prototype would still apply. */
3884char __pthread_create_system();
3885
3886int main() {
3887__pthread_create_system()
3888; return 0; }
3889EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003890if { (eval echo configure:3891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003891 rm -rf conftest*
3892 eval "ac_cv_lib_$ac_lib_var=yes"
3893else
3894 echo "configure: failed program was:" >&5
3895 cat conftest.$ac_ext >&5
3896 rm -rf conftest*
3897 eval "ac_cv_lib_$ac_lib_var=no"
3898fi
3899rm -f conftest*
3900LIBS="$ac_save_LIBS"
3901
3902fi
3903if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3904 echo "$ac_t""yes" 1>&6
3905 cat >> confdefs.h <<\EOF
3906#define WITH_THREAD 1
3907EOF
3908
Martin v. Löwis130fb172001-07-19 11:00:41 +00003909 cat >> confdefs.h <<\EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003910#define _POSIX_THREADS 1
3911EOF
3912
Martin v. Löwis130fb172001-07-19 11:00:41 +00003913 LIBS="$LIBS -lpthread"
3914 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003915else
3916 echo "$ac_t""no" 1>&6
3917
Martin v. Löwis130fb172001-07-19 11:00:41 +00003918 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003919echo "configure:3920: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003920ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003921if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003922 echo $ac_n "(cached) $ac_c" 1>&6
3923else
3924 ac_save_LIBS="$LIBS"
3925LIBS="-lcma $LIBS"
3926cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003927#line 3928 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003928#include "confdefs.h"
3929/* Override any gcc2 internal prototype to avoid an error. */
3930/* We use char because int might match the return type of a gcc2
3931 builtin and then its argument prototype would still apply. */
3932char pthread_create();
3933
3934int main() {
3935pthread_create()
3936; return 0; }
3937EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003938if { (eval echo configure:3939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003939 rm -rf conftest*
3940 eval "ac_cv_lib_$ac_lib_var=yes"
3941else
3942 echo "configure: failed program was:" >&5
3943 cat conftest.$ac_ext >&5
3944 rm -rf conftest*
3945 eval "ac_cv_lib_$ac_lib_var=no"
3946fi
3947rm -f conftest*
3948LIBS="$ac_save_LIBS"
3949
3950fi
3951if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3952 echo "$ac_t""yes" 1>&6
3953 cat >> confdefs.h <<\EOF
3954#define WITH_THREAD 1
3955EOF
3956
Martin v. Löwis130fb172001-07-19 11:00:41 +00003957 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003958#define _POSIX_THREADS 1
3959EOF
3960
Martin v. Löwis130fb172001-07-19 11:00:41 +00003961 LIBS="$LIBS -lcma"
3962 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003963else
3964 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003965
Martin v. Löwis130fb172001-07-19 11:00:41 +00003966 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003967fi
3968
Martin v. Löwis130fb172001-07-19 11:00:41 +00003969
Guido van Rossum627b2d71993-12-24 10:39:16 +00003970fi
3971
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003972fi
3973
Guido van Rossum0be3e491997-05-22 20:33:33 +00003974fi
3975
Guido van Rossum49545951997-12-02 19:28:29 +00003976fi
3977
Guido van Rossumb93a8621998-05-07 13:27:32 +00003978fi
3979
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003980fi
3981
Guido van Rossumad678af1998-10-02 14:42:15 +00003982fi
3983
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003984fi
3985
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003986fi
3987
Guido van Rossum0be3e491997-05-22 20:33:33 +00003988
Martin v. Löwis130fb172001-07-19 11:00:41 +00003989 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003990echo "configure:3991: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003991ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003992if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003993 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003994else
3995 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003996LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003997cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00003998#line 3999 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003999#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004000/* Override any gcc2 internal prototype to avoid an error. */
4001/* We use char because int might match the return type of a gcc2
4002 builtin and then its argument prototype would still apply. */
4003char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004004
Guido van Rossumf78abae1997-01-21 22:02:36 +00004005int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004006usconfig()
4007; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004008EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004009if { (eval echo configure:4010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004010 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004011 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004012else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004013 echo "configure: failed program was:" >&5
4014 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004015 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004016 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004017fi
4018rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004019LIBS="$ac_save_LIBS"
4020
4021fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004022if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004023 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004024 cat >> confdefs.h <<\EOF
4025#define WITH_THREAD 1
4026EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004027
Martin v. Löwis130fb172001-07-19 11:00:41 +00004028 LIBS="$LIBS -lmpc"
4029 LIBOBJS="$LIBOBJS thread.o"
4030 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004031else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004032 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004033fi
4034
Martin v. Löwis130fb172001-07-19 11:00:41 +00004035 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004036echo "configure:4037: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004037ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004038if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004039 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004040else
4041 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004042LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004043cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004044#line 4045 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004045#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004046/* Override any gcc2 internal prototype to avoid an error. */
4047/* We use char because int might match the return type of a gcc2
4048 builtin and then its argument prototype would still apply. */
4049char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004050
Guido van Rossumf78abae1997-01-21 22:02:36 +00004051int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004052thr_create()
4053; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004054EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004055if { (eval echo configure:4056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004056 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004057 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004059 echo "configure: failed program was:" >&5
4060 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004061 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004062 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004063fi
4064rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004065LIBS="$ac_save_LIBS"
4066
4067fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004068if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004069 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004070 cat >> confdefs.h <<\EOF
4071#define WITH_THREAD 1
4072EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004073
Martin v. Löwis130fb172001-07-19 11:00:41 +00004074 LIBS="$LIBS -lthread"
4075 LIBOBJS="$LIBOBJS thread.o"
4076 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004077else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004078 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004079fi
4080
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004081
Martin v. Löwis130fb172001-07-19 11:00:41 +00004082 if test "$USE_THREAD_MODULE" != "#"
4083 then
4084 # If the above checks didn't disable threads, (at least) OSF1
4085 # needs this '-threads' argument during linking.
4086 case $ac_sys_system in
4087 OSF1) LDLAST=-threads;;
4088 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004089 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004090fi
4091
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004092# Check for enable-ipv6
4093echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004094echo "configure:4095: checking whether to enable ipv6" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004095# Check whether --enable-ipv6 or --disable-ipv6 was given.
4096if test "${enable_ipv6+set}" = set; then
4097 enableval="$enable_ipv6"
4098 case "$enableval" in
4099 no)
4100 echo "$ac_t""no" 1>&6
4101 ipv6=no
4102 ;;
4103 *) echo "$ac_t""yes" 1>&6
4104 cat >> confdefs.h <<\EOF
4105#define ENABLE_IPV6 1
4106EOF
4107
4108 ipv6=yes
4109 ;;
4110 esac
4111else
4112 if test "$cross_compiling" = yes; then
4113 echo "$ac_t""no" 1>&6
4114 ipv6=no
4115
4116else
4117 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004118#line 4119 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004119#include "confdefs.h"
4120 /* AF_INET6 available check */
4121#include <sys/types.h>
4122#include <sys/socket.h>
4123main()
4124{
4125 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
4126 exit(1);
4127 else
4128 exit(0);
4129}
4130
4131EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004132if { (eval echo configure:4133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004133then
4134 echo "$ac_t""yes" 1>&6
4135 cat >> confdefs.h <<\EOF
4136#define ENABLE_IPV6 1
4137EOF
4138
4139 ipv6=yes
4140else
4141 echo "configure: failed program was:" >&5
4142 cat conftest.$ac_ext >&5
4143 rm -fr conftest*
4144 echo "$ac_t""no" 1>&6
4145 ipv6=no
4146fi
4147rm -fr conftest*
4148fi
4149
4150fi
4151
4152
4153ipv6type=unknown
4154ipv6lib=none
4155ipv6trylibc=no
4156
4157if test "$ipv6" = "yes"; then
4158 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004159echo "configure:4160: checking ipv6 stack type" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004160 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; do
4161 case $i in
4162 inria)
4163 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004164#line 4165 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004165#include "confdefs.h"
4166dnl
4167#include <netinet/in.h>
4168#ifdef IPV6_INRIA_VERSION
4169yes
4170#endif
4171EOF
4172if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4173 egrep "yes" >/dev/null 2>&1; then
4174 rm -rf conftest*
4175 ipv6type=$i;
4176 OPT="-DINET6 $OPT"
4177fi
4178rm -f conftest*
4179
4180 ;;
4181 kame)
4182 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004183#line 4184 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004184#include "confdefs.h"
4185dnl
4186#include <netinet/in.h>
4187#ifdef __KAME__
4188yes
4189#endif
4190EOF
4191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4192 egrep "yes" >/dev/null 2>&1; then
4193 rm -rf conftest*
4194 ipv6type=$i;
4195 ipv6lib=inet6
4196 ipv6libdir=/usr/local/v6/lib
4197 ipv6trylibc=yes
4198 OPT="-DINET6 $OPT"
4199fi
4200rm -f conftest*
4201
4202 ;;
4203 linux-glibc)
4204 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004205#line 4206 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004206#include "confdefs.h"
4207dnl
4208#include <features.h>
4209#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
4210yes
4211#endif
4212EOF
4213if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4214 egrep "yes" >/dev/null 2>&1; then
4215 rm -rf conftest*
4216 ipv6type=$i;
4217 ipv6trylibc=yes
4218 OPT="-DINET6 $OPT"
4219fi
4220rm -f conftest*
4221
4222 ;;
4223 linux-inet6)
4224 if test -d /usr/inet6; then
4225 ipv6type=$i
4226 ipv6lib=inet6
4227 ipv6libdir=/usr/inet6/lib
4228 OPT="-DINET6 -I/usr/inet6/include $OPT"
4229 fi
4230 ;;
4231 solaris)
4232 if test -f /etc/netconfig; then
4233 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
4234 ipv6type=$i
4235 ipv6trylibc=yes
4236 OPT="-DINET6 $OPT"
4237 fi
4238 fi
4239 ;;
4240 toshiba)
4241 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004242#line 4243 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004243#include "confdefs.h"
4244dnl
4245#include <sys/param.h>
4246#ifdef _TOSHIBA_INET6
4247yes
4248#endif
4249EOF
4250if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4251 egrep "yes" >/dev/null 2>&1; then
4252 rm -rf conftest*
4253 ipv6type=$i;
4254 ipv6lib=inet6;
4255 ipv6libdir=/usr/local/v6/lib;
4256 OPT="-DINET6 $OPT"
4257fi
4258rm -f conftest*
4259
4260 ;;
4261 v6d)
4262 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004263#line 4264 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004264#include "confdefs.h"
4265dnl
4266#include </usr/local/v6/include/sys/v6config.h>
4267#ifdef __V6D__
4268yes
4269#endif
4270EOF
4271if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4272 egrep "yes" >/dev/null 2>&1; then
4273 rm -rf conftest*
4274 ipv6type=$i;
4275 ipv6lib=v6;
4276 ipv6libdir=/usr/local/v6/lib;
4277 OPT="-I/usr/local/v6/include $OPT"
4278fi
4279rm -f conftest*
4280
4281 ;;
4282 zeta)
4283 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004284#line 4285 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004285#include "confdefs.h"
4286dnl
4287#include <sys/param.h>
4288#ifdef _ZETA_MINAMI_INET6
4289yes
4290#endif
4291EOF
4292if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4293 egrep "yes" >/dev/null 2>&1; then
4294 rm -rf conftest*
4295 ipv6type=$i;
4296 ipv6lib=inet6;
4297 ipv6libdir=/usr/local/v6/lib;
4298 OPT="-DINET6 $OPT"
4299fi
4300rm -f conftest*
4301
4302 ;;
4303 esac
4304 if test "$ipv6type" != "unknown"; then
4305 break
4306 fi
4307 done
4308 echo "$ac_t""$ipv6type" 1>&6
4309fi
4310
4311if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4312 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4313 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4314 echo "using lib$ipv6lib"
4315 else
4316 if test $ipv6trylibc = "yes"; then
4317 echo "using libc"
4318 else
4319 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4320 echo "You need to fetch lib$ipv6lib.a from appropriate"
4321 echo 'ipv6 kit and compile beforehand.'
4322 exit 1
4323 fi
4324 fi
4325fi
4326
Barry Warsawef82cd72000-06-30 16:21:01 +00004327# Check for GC support
4328
4329USE_GC_MODULE=""
4330echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004331echo "configure:4332: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004332# Check whether --with-cycle-gc or --without-cycle-gc was given.
4333if test "${with_cycle_gc+set}" = set; then
4334 withval="$with_cycle_gc"
4335 :
4336fi
4337
4338
4339if test -z "$with_cycle_gc"
4340then with_cycle_gc="yes"
4341fi
4342if test "$with_cycle_gc" = "no"
4343then
4344 USE_GC_MODULE="#"
4345else
4346 cat >> confdefs.h <<\EOF
4347#define WITH_CYCLE_GC 1
4348EOF
4349
4350fi
4351echo "$ac_t""$with_cycle_gc" 1>&6
4352
Neil Schemenauera35c6882001-02-27 04:45:05 +00004353# Check for Python-specific malloc support
4354echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004355echo "configure:4356: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004356# Check whether --with-pymalloc or --without-pymalloc was given.
4357if test "${with_pymalloc+set}" = set; then
4358 withval="$with_pymalloc"
4359
4360if test "$withval" != no
4361then cat >> confdefs.h <<\EOF
4362#define WITH_PYMALLOC 1
4363EOF
4364 echo "$ac_t""yes" 1>&6
4365else echo "$ac_t""no" 1>&6
4366fi
4367else
4368 echo "$ac_t""no" 1>&6
4369fi
4370
4371
Barry Warsawef82cd72000-06-30 16:21:01 +00004372# Check for --with-wctype-functions
4373echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004374echo "configure:4375: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004375# Check whether --with-wctype-functions or --without-wctype-functions was given.
4376if test "${with_wctype_functions+set}" = set; then
4377 withval="$with_wctype_functions"
4378
4379if test "$withval" != no
4380then cat >> confdefs.h <<\EOF
4381#define WANT_WCTYPE_FUNCTIONS 1
4382EOF
4383 echo "$ac_t""yes" 1>&6
4384else echo "$ac_t""no" 1>&6
4385fi
4386else
4387 echo "$ac_t""no" 1>&6
4388fi
4389
4390
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004391# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004392
4393DLINCLDIR=/
4394
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004395echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004396echo "configure:4397: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004397# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004398if test "${with_sgi_dl+set}" = set; then
4399 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004400
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004401echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004402cat >> confdefs.h <<\EOF
4403#define WITH_SGI_DL 1
4404EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004405
Guido van Rossume97ee181999-12-20 21:27:22 +00004406DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004407dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004408if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004409then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004410else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004411fi
4412DLINCLDIR=${dldir}
4413LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004414else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004415 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004416fi
4417
4418
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004419echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004420echo "configure:4421: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004421# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004422if test "${with_dl_dld+set}" = set; then
4423 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004424
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004425echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004426cat >> confdefs.h <<\EOF
4427#define WITH_DL_DLD 1
4428EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004429
Guido van Rossume97ee181999-12-20 21:27:22 +00004430DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004431dldir=`echo "$withval" | sed 's/,.*//'`
4432dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004433if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004434then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004435else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004436fi
4437DLINCLDIR=${dldir}
4438LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004439else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004440 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004441fi
4442
4443
Guido van Rossume97ee181999-12-20 21:27:22 +00004444# the dlopen() function means we might want to use dynload_shlib.o. some
4445# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004446for ac_func in dlopen
4447do
4448echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004449echo "configure:4450: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004450if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004451 echo $ac_n "(cached) $ac_c" 1>&6
4452else
4453 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004454#line 4455 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004455#include "confdefs.h"
4456/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004457 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004458#include <assert.h>
4459/* Override any gcc2 internal prototype to avoid an error. */
4460/* We use char because int might match the return type of a gcc2
4461 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004462char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004463
4464int main() {
4465
4466/* The GNU C library defines this for functions which it implements
4467 to always fail with ENOSYS. Some functions are actually named
4468 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004469#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004470choke me
4471#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004472$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004473#endif
4474
4475; return 0; }
4476EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004477if { (eval echo configure:4478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004478 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004479 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004480else
4481 echo "configure: failed program was:" >&5
4482 cat conftest.$ac_ext >&5
4483 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004484 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004485fi
4486rm -f conftest*
4487fi
4488
Thomas Wouters3a584202000-08-05 23:28:51 +00004489if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004490 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004491 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4492 cat >> confdefs.h <<EOF
4493#define $ac_tr_func 1
4494EOF
4495
Guido van Rossume97ee181999-12-20 21:27:22 +00004496else
4497 echo "$ac_t""no" 1>&6
4498fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004499done
Guido van Rossume97ee181999-12-20 21:27:22 +00004500
4501
4502# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4503# loading of modules.
4504
4505echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004506echo "configure:4507: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004507if test -z "$DYNLOADFILE"
4508then
4509 case $ac_sys_system/$ac_sys_release in
4510 AIX*) DYNLOADFILE="dynload_aix.o";;
4511 BeOS*) DYNLOADFILE="dynload_beos.o";;
4512 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossum5839e582000-10-09 19:52:35 +00004513 Darwin/*|next/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004514 *)
4515 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4516 # out any dynamic loading
4517 if test "$ac_cv_func_dlopen" = yes
4518 then DYNLOADFILE="dynload_shlib.o"
4519 else DYNLOADFILE="dynload_stub.o"
4520 fi
4521 ;;
4522 esac
4523fi
4524echo "$ac_t""$DYNLOADFILE" 1>&6
4525if test "$DYNLOADFILE" != "dynload_stub.o"
4526then
4527 cat >> confdefs.h <<\EOF
4528#define HAVE_DYNAMIC_LOADING 1
4529EOF
4530
4531fi
4532
Neil Schemenauer4e425612001-06-19 15:44:15 +00004533# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4534
4535
4536echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004537echo "configure:4538: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004538if test -z "$MACHDEP_OBJS"
4539then
4540 case $ac_sys_system/$ac_sys_release in
4541 Darwin/*)
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004542 MACHDEP_OBJS="Python/mactoolboxglue.o"
Neil Schemenauer4e425612001-06-19 15:44:15 +00004543 cat >> confdefs.h <<\EOF
4544#define USE_TOOLBOX_OBJECT_GLUE 1
4545EOF
4546
4547 ;;
4548 *) MACHDEP_OBJS="";;
4549 esac
4550fi
4551echo "$ac_t""$DYNLOADFILE" 1>&6
4552
Guido van Rossum627b2d71993-12-24 10:39:16 +00004553# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00004554for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004555 flock fork fsync fdatasync fpathconf ftime ftruncate \
Andrew M. Kuchlinga9586c72001-01-08 17:58:56 +00004556 getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis864e9ff2001-08-04 22:32:03 +00004557 hstrerror inet_pton kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004558 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004559 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004560 select setegid seteuid setgid \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00004561 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00004562 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004563 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Woutersc2c12dc2001-07-11 14:45:34 +00004564 truncate uname waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00004565do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004566echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004567echo "configure:4568: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004568if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004569 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004570else
4571 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004572#line 4573 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004573#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004574/* System header to define __stub macros and hopefully few prototypes,
4575 which can conflict with char $ac_func(); below. */
4576#include <assert.h>
4577/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004578/* We use char because int might match the return type of a gcc2
4579 builtin and then its argument prototype would still apply. */
4580char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004581
Guido van Rossumf78abae1997-01-21 22:02:36 +00004582int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004583
Guido van Rossum627b2d71993-12-24 10:39:16 +00004584/* The GNU C library defines this for functions which it implements
4585 to always fail with ENOSYS. Some functions are actually named
4586 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004587#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004588choke me
4589#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004590$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004591#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004592
Guido van Rossum7f43da71994-08-01 12:15:30 +00004593; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004594EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004595if { (eval echo configure:4596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004596 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004597 eval "ac_cv_func_$ac_func=yes"
4598else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004599 echo "configure: failed program was:" >&5
4600 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004601 rm -rf conftest*
4602 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004603fi
4604rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004605fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004606
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004607if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004608 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004609 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004610 cat >> confdefs.h <<EOF
4611#define $ac_tr_func 1
4612EOF
4613
4614else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004615 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004616fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004617done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004618
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004619
Fred Drake8cef4cf2000-06-28 16:40:38 +00004620# check for openpty and forkpty
4621
4622for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004623do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004624echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004625echo "configure:4626: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004626if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004627 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004628else
4629 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004630#line 4631 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004631#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004632/* System header to define __stub macros and hopefully few prototypes,
4633 which can conflict with char $ac_func(); below. */
4634#include <assert.h>
4635/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004636/* We use char because int might match the return type of a gcc2
4637 builtin and then its argument prototype would still apply. */
4638char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004639
Guido van Rossumf78abae1997-01-21 22:02:36 +00004640int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004641
Guido van Rossum627b2d71993-12-24 10:39:16 +00004642/* The GNU C library defines this for functions which it implements
4643 to always fail with ENOSYS. Some functions are actually named
4644 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004645#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004646choke me
4647#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004648$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004649#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004650
Guido van Rossum7f43da71994-08-01 12:15:30 +00004651; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004652EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004653if { (eval echo configure:4654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004654 rm -rf conftest*
4655 eval "ac_cv_func_$ac_func=yes"
4656else
4657 echo "configure: failed program was:" >&5
4658 cat conftest.$ac_ext >&5
4659 rm -rf conftest*
4660 eval "ac_cv_func_$ac_func=no"
4661fi
4662rm -f conftest*
4663fi
4664
4665if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4666 echo "$ac_t""yes" 1>&6
4667 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4668 cat >> confdefs.h <<EOF
4669#define $ac_tr_func 1
4670EOF
4671
4672else
4673 echo "$ac_t""no" 1>&6
4674echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004675echo "configure:4676: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004676ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004677if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004678 echo $ac_n "(cached) $ac_c" 1>&6
4679else
4680 ac_save_LIBS="$LIBS"
4681LIBS="-lutil $LIBS"
4682cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004683#line 4684 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004684#include "confdefs.h"
4685/* Override any gcc2 internal prototype to avoid an error. */
4686/* We use char because int might match the return type of a gcc2
4687 builtin and then its argument prototype would still apply. */
4688char openpty();
4689
4690int main() {
4691openpty()
4692; return 0; }
4693EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004694if { (eval echo configure:4695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004695 rm -rf conftest*
4696 eval "ac_cv_lib_$ac_lib_var=yes"
4697else
4698 echo "configure: failed program was:" >&5
4699 cat conftest.$ac_ext >&5
4700 rm -rf conftest*
4701 eval "ac_cv_lib_$ac_lib_var=no"
4702fi
4703rm -f conftest*
4704LIBS="$ac_save_LIBS"
4705
4706fi
4707if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4708 echo "$ac_t""yes" 1>&6
4709 cat >> confdefs.h <<\EOF
4710#define HAVE_OPENPTY 1
4711EOF
4712 LIBS="$LIBS -lutil"
4713else
4714 echo "$ac_t""no" 1>&6
4715fi
4716
4717fi
4718done
4719
4720for ac_func in forkpty
4721do
4722echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004723echo "configure:4724: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004724if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004725 echo $ac_n "(cached) $ac_c" 1>&6
4726else
4727 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004728#line 4729 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004729#include "confdefs.h"
4730/* System header to define __stub macros and hopefully few prototypes,
4731 which can conflict with char $ac_func(); below. */
4732#include <assert.h>
4733/* Override any gcc2 internal prototype to avoid an error. */
4734/* We use char because int might match the return type of a gcc2
4735 builtin and then its argument prototype would still apply. */
4736char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004737
4738int main() {
4739
4740/* The GNU C library defines this for functions which it implements
4741 to always fail with ENOSYS. Some functions are actually named
4742 something starting with __ and the normal name is an alias. */
4743#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4744choke me
4745#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004746$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004747#endif
4748
4749; return 0; }
4750EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004751if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004752 rm -rf conftest*
4753 eval "ac_cv_func_$ac_func=yes"
4754else
4755 echo "configure: failed program was:" >&5
4756 cat conftest.$ac_ext >&5
4757 rm -rf conftest*
4758 eval "ac_cv_func_$ac_func=no"
4759fi
4760rm -f conftest*
4761fi
4762
4763if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4764 echo "$ac_t""yes" 1>&6
4765 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4766 cat >> confdefs.h <<EOF
4767#define $ac_tr_func 1
4768EOF
4769
4770else
4771 echo "$ac_t""no" 1>&6
4772echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004773echo "configure:4774: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004774ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004775if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004776 echo $ac_n "(cached) $ac_c" 1>&6
4777else
4778 ac_save_LIBS="$LIBS"
4779LIBS="-lutil $LIBS"
4780cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004781#line 4782 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004782#include "confdefs.h"
4783/* Override any gcc2 internal prototype to avoid an error. */
4784/* We use char because int might match the return type of a gcc2
4785 builtin and then its argument prototype would still apply. */
4786char forkpty();
4787
4788int main() {
4789forkpty()
4790; return 0; }
4791EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004792if { (eval echo configure:4793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004793 rm -rf conftest*
4794 eval "ac_cv_lib_$ac_lib_var=yes"
4795else
4796 echo "configure: failed program was:" >&5
4797 cat conftest.$ac_ext >&5
4798 rm -rf conftest*
4799 eval "ac_cv_lib_$ac_lib_var=no"
4800fi
4801rm -f conftest*
4802LIBS="$ac_save_LIBS"
4803
4804fi
4805if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4806 echo "$ac_t""yes" 1>&6
4807 cat >> confdefs.h <<\EOF
4808#define HAVE_FORKPTY 1
4809EOF
4810 LIBS="$LIBS -lutil"
4811else
4812 echo "$ac_t""no" 1>&6
4813fi
4814
4815fi
4816done
4817
4818
4819# check for long file support functions
4820for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4821do
4822echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004823echo "configure:4824: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004824if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004825 echo $ac_n "(cached) $ac_c" 1>&6
4826else
4827 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004828#line 4829 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004829#include "confdefs.h"
4830/* System header to define __stub macros and hopefully few prototypes,
4831 which can conflict with char $ac_func(); below. */
4832#include <assert.h>
4833/* Override any gcc2 internal prototype to avoid an error. */
4834/* We use char because int might match the return type of a gcc2
4835 builtin and then its argument prototype would still apply. */
4836char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004837
4838int main() {
4839
4840/* The GNU C library defines this for functions which it implements
4841 to always fail with ENOSYS. Some functions are actually named
4842 something starting with __ and the normal name is an alias. */
4843#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4844choke me
4845#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004846$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004847#endif
4848
4849; return 0; }
4850EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004851if { (eval echo configure:4852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004852 rm -rf conftest*
4853 eval "ac_cv_func_$ac_func=yes"
4854else
4855 echo "configure: failed program was:" >&5
4856 cat conftest.$ac_ext >&5
4857 rm -rf conftest*
4858 eval "ac_cv_func_$ac_func=no"
4859fi
4860rm -f conftest*
4861fi
4862
4863if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4864 echo "$ac_t""yes" 1>&6
4865 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4866 cat >> confdefs.h <<EOF
4867#define $ac_tr_func 1
4868EOF
4869
4870else
4871 echo "$ac_t""no" 1>&6
4872fi
4873done
4874
4875
4876for ac_func in dup2 getcwd strdup strerror memmove
4877do
4878echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004879echo "configure:4880: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004880if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004881 echo $ac_n "(cached) $ac_c" 1>&6
4882else
4883 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004884#line 4885 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004885#include "confdefs.h"
4886/* System header to define __stub macros and hopefully few prototypes,
4887 which can conflict with char $ac_func(); below. */
4888#include <assert.h>
4889/* Override any gcc2 internal prototype to avoid an error. */
4890/* We use char because int might match the return type of a gcc2
4891 builtin and then its argument prototype would still apply. */
4892char $ac_func();
4893
4894int main() {
4895
4896/* The GNU C library defines this for functions which it implements
4897 to always fail with ENOSYS. Some functions are actually named
4898 something starting with __ and the normal name is an alias. */
4899#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4900choke me
4901#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004902$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004903#endif
4904
4905; return 0; }
4906EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004907if { (eval echo configure:4908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004908 rm -rf conftest*
4909 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004910else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004911 echo "configure: failed program was:" >&5
4912 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004913 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004914 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004915fi
4916rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004917fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004918
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004919if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004920 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004921 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4922 cat >> confdefs.h <<EOF
4923#define $ac_tr_func 1
4924EOF
4925
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004926else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004927 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004928LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004929fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004930done
4931
Guido van Rossumf78abae1997-01-21 22:02:36 +00004932
Thomas Wouters3a584202000-08-05 23:28:51 +00004933for ac_func in getpgrp
4934do
4935echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004936echo "configure:4937: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004937if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004938 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004939else
4940 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004941#line 4942 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004942#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004943/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004944 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004945#include <assert.h>
4946/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004947/* We use char because int might match the return type of a gcc2
4948 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004949char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004950
Guido van Rossumf78abae1997-01-21 22:02:36 +00004951int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004952
Guido van Rossum627b2d71993-12-24 10:39:16 +00004953/* The GNU C library defines this for functions which it implements
4954 to always fail with ENOSYS. Some functions are actually named
4955 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004956#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004957choke me
4958#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004959$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004960#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004961
4962; return 0; }
4963EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004964if { (eval echo configure:4965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004965 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004966 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004967else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004968 echo "configure: failed program was:" >&5
4969 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004970 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004971 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004972fi
4973rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004974fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004975
Thomas Wouters3a584202000-08-05 23:28:51 +00004976if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004977 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004978 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4979 cat >> confdefs.h <<EOF
4980#define $ac_tr_func 1
4981EOF
4982 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004983#line 4984 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004984#include "confdefs.h"
4985#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004986int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004987getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004988; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004989EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00004990if { (eval echo configure:4991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004991 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004992 cat >> confdefs.h <<\EOF
4993#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004994EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004995
Guido van Rossumf78abae1997-01-21 22:02:36 +00004996else
4997 echo "configure: failed program was:" >&5
4998 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004999fi
5000rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005001else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005002 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005003fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005004done
Guido van Rossum627b2d71993-12-24 10:39:16 +00005005
Thomas Wouters3a584202000-08-05 23:28:51 +00005006for ac_func in setpgrp
5007do
5008echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005009echo "configure:5010: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005010if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005011 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005012else
5013 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005014#line 5015 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005015#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005016/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005017 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005018#include <assert.h>
5019/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005020/* We use char because int might match the return type of a gcc2
5021 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005022char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005023
Guido van Rossumf78abae1997-01-21 22:02:36 +00005024int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005025
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005026/* The GNU C library defines this for functions which it implements
5027 to always fail with ENOSYS. Some functions are actually named
5028 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005029#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005030choke me
5031#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005032$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005033#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005034
5035; return 0; }
5036EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005037if { (eval echo configure:5038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005038 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005039 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005040else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005041 echo "configure: failed program was:" >&5
5042 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005043 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005044 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005045fi
5046rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005047fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005048
Thomas Wouters3a584202000-08-05 23:28:51 +00005049if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005050 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005051 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5052 cat >> confdefs.h <<EOF
5053#define $ac_tr_func 1
5054EOF
5055 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005056#line 5057 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005057#include "confdefs.h"
5058#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005059int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005060setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005061; return 0; }
5062EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005063if { (eval echo configure:5064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005064 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005065 cat >> confdefs.h <<\EOF
5066#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005067EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005068
Guido van Rossumf78abae1997-01-21 22:02:36 +00005069else
5070 echo "configure: failed program was:" >&5
5071 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005072fi
5073rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005074else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005075 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005076fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005077done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005078
Thomas Wouters3a584202000-08-05 23:28:51 +00005079for ac_func in gettimeofday
5080do
5081echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005082echo "configure:5083: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005083if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005084 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005085else
5086 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005087#line 5088 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005088#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005089/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005090 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005091#include <assert.h>
5092/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005093/* We use char because int might match the return type of a gcc2
5094 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005095char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005096
Guido van Rossumf78abae1997-01-21 22:02:36 +00005097int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005098
5099/* The GNU C library defines this for functions which it implements
5100 to always fail with ENOSYS. Some functions are actually named
5101 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005102#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005103choke me
5104#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005105$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005106#endif
5107
5108; return 0; }
5109EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005110if { (eval echo configure:5111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005111 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005112 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005113else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005114 echo "configure: failed program was:" >&5
5115 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005116 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005117 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005118fi
5119rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005120fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005121
Thomas Wouters3a584202000-08-05 23:28:51 +00005122if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005123 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005124 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5125 cat >> confdefs.h <<EOF
5126#define $ac_tr_func 1
5127EOF
5128 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005129#line 5130 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005130#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005131#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005132int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005133gettimeofday((struct timeval*)0,(struct timezone*)0);
5134; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005135EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005136if { (eval echo configure:5137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005137 :
5138else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005139 echo "configure: failed program was:" >&5
5140 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005141 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005142 cat >> confdefs.h <<\EOF
5143#define GETTIMEOFDAY_NO_TZ 1
5144EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005145
5146fi
5147rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005148else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005149 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005150fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005151done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005152
5153
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005154for ac_func in getaddrinfo
5155do
5156echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005157echo "configure:5158: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005158if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5159 echo $ac_n "(cached) $ac_c" 1>&6
5160else
5161 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005162#line 5163 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005163#include "confdefs.h"
5164/* System header to define __stub macros and hopefully few prototypes,
5165 which can conflict with char $ac_func(); below. */
5166#include <assert.h>
5167/* Override any gcc2 internal prototype to avoid an error. */
5168/* We use char because int might match the return type of a gcc2
5169 builtin and then its argument prototype would still apply. */
5170char $ac_func();
5171
5172int main() {
5173
5174/* The GNU C library defines this for functions which it implements
5175 to always fail with ENOSYS. Some functions are actually named
5176 something starting with __ and the normal name is an alias. */
5177#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5178choke me
5179#else
5180$ac_func();
5181#endif
5182
5183; return 0; }
5184EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005185if { (eval echo configure:5186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005186 rm -rf conftest*
5187 eval "ac_cv_func_$ac_func=yes"
5188else
5189 echo "configure: failed program was:" >&5
5190 cat conftest.$ac_ext >&5
5191 rm -rf conftest*
5192 eval "ac_cv_func_$ac_func=no"
5193fi
5194rm -f conftest*
5195fi
5196
5197if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5198 echo "$ac_t""yes" 1>&6
5199 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5200 cat >> confdefs.h <<EOF
5201#define $ac_tr_func 1
5202EOF
5203 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005204echo "configure:5205: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005205if test "$cross_compiling" = yes; then
5206 echo "$ac_t""buggy" 1>&6
5207buggygetaddrinfo=yes
5208else
5209 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005210#line 5211 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005211#include "confdefs.h"
5212
5213#include <sys/types.h>
5214#include <netdb.h>
5215#include <string.h>
5216#include <sys/socket.h>
5217#include <netinet/in.h>
5218
5219main()
5220{
5221 int passive, gaierr, inet4 = 0, inet6 = 0;
5222 struct addrinfo hints, *ai, *aitop;
5223 char straddr[INET6_ADDRSTRLEN], strport[16];
5224
5225 for (passive = 0; passive <= 1; passive++) {
5226 memset(&hints, 0, sizeof(hints));
5227 hints.ai_family = AF_UNSPEC;
5228 hints.ai_flags = passive ? AI_PASSIVE : 0;
5229 hints.ai_socktype = SOCK_STREAM;
5230 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5231 (void)gai_strerror(gaierr);
5232 goto bad;
5233 }
5234 for (ai = aitop; ai; ai = ai->ai_next) {
5235 if (ai->ai_addr == NULL ||
5236 ai->ai_addrlen == 0 ||
5237 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5238 straddr, sizeof(straddr), strport, sizeof(strport),
5239 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5240 goto bad;
5241 }
5242 switch (ai->ai_family) {
5243 case AF_INET:
5244 if (strcmp(strport, "54321") != 0) {
5245 goto bad;
5246 }
5247 if (passive) {
5248 if (strcmp(straddr, "0.0.0.0") != 0) {
5249 goto bad;
5250 }
5251 } else {
5252 if (strcmp(straddr, "127.0.0.1") != 0) {
5253 goto bad;
5254 }
5255 }
5256 inet4++;
5257 break;
5258 case AF_INET6:
5259 if (strcmp(strport, "54321") != 0) {
5260 goto bad;
5261 }
5262 if (passive) {
5263 if (strcmp(straddr, "::") != 0) {
5264 goto bad;
5265 }
5266 } else {
5267 if (strcmp(straddr, "::1") != 0) {
5268 goto bad;
5269 }
5270 }
5271 inet6++;
5272 break;
5273 case AF_UNSPEC:
5274 goto bad;
5275 break;
5276 default:
5277 /* another family support? */
5278 break;
5279 }
5280 }
5281 }
5282
5283 if (!(inet4 == 0 || inet4 == 2))
5284 goto bad;
5285 if (!(inet6 == 0 || inet6 == 2))
5286 goto bad;
5287
5288 if (aitop)
5289 freeaddrinfo(aitop);
5290 exit(0);
5291
5292 bad:
5293 if (aitop)
5294 freeaddrinfo(aitop);
5295 exit(1);
5296}
5297
5298EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005299if { (eval echo configure:5300: \"$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 +00005300then
5301 echo "$ac_t""good" 1>&6
5302buggygetaddrinfo=no
5303else
5304 echo "configure: failed program was:" >&5
5305 cat conftest.$ac_ext >&5
5306 rm -fr conftest*
5307 echo "$ac_t""buggy" 1>&6
5308buggygetaddrinfo=yes
5309fi
5310rm -fr conftest*
5311fi
5312
5313else
5314 echo "$ac_t""no" 1>&6
5315buggygetaddrinfo=yes
5316fi
5317done
5318
5319
5320if test "$buggygetaddrinfo" = "yes"; then
5321 if test "$ipv6" = "yes"; then
5322 echo 'Fatal: You must get working getaddrinfo() function.'
5323 echo ' or you can specify "--disable-ipv6"'.
5324 exit 1
5325 fi
5326fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005327for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005328do
5329echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005330echo "configure:5331: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005331if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5332 echo $ac_n "(cached) $ac_c" 1>&6
5333else
5334 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005335#line 5336 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005336#include "confdefs.h"
5337/* System header to define __stub macros and hopefully few prototypes,
5338 which can conflict with char $ac_func(); below. */
5339#include <assert.h>
5340/* Override any gcc2 internal prototype to avoid an error. */
5341/* We use char because int might match the return type of a gcc2
5342 builtin and then its argument prototype would still apply. */
5343char $ac_func();
5344
5345int main() {
5346
5347/* The GNU C library defines this for functions which it implements
5348 to always fail with ENOSYS. Some functions are actually named
5349 something starting with __ and the normal name is an alias. */
5350#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5351choke me
5352#else
5353$ac_func();
5354#endif
5355
5356; return 0; }
5357EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005358if { (eval echo configure:5359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005359 rm -rf conftest*
5360 eval "ac_cv_func_$ac_func=yes"
5361else
5362 echo "configure: failed program was:" >&5
5363 cat conftest.$ac_ext >&5
5364 rm -rf conftest*
5365 eval "ac_cv_func_$ac_func=no"
5366fi
5367rm -f conftest*
5368fi
5369
5370if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5371 echo "$ac_t""yes" 1>&6
5372 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5373 cat >> confdefs.h <<EOF
5374#define $ac_tr_func 1
5375EOF
5376
5377else
5378 echo "$ac_t""no" 1>&6
5379fi
5380done
5381
5382
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005383# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005384echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005385echo "configure:5386: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005386if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005387 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005388else
5389 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005390#line 5391 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005391#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005392#include <sys/types.h>
5393#include <sys/time.h>
5394#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005395int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005396struct tm *tp;
5397; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005398EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005399if { (eval echo configure:5400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005400 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005401 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005402else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005403 echo "configure: failed program was:" >&5
5404 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005405 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005406 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005407fi
5408rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005409fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005410
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005411echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005412if test $ac_cv_header_time = yes; then
5413 cat >> confdefs.h <<\EOF
5414#define TIME_WITH_SYS_TIME 1
5415EOF
5416
5417fi
5418
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005419echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005420echo "configure:5421: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005421if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005422 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005423else
5424 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005425#line 5426 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005426#include "confdefs.h"
5427#include <sys/types.h>
5428#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005429int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005430struct tm *tp; tp->tm_sec;
5431; return 0; }
5432EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005433if { (eval echo configure:5434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005434 rm -rf conftest*
5435 ac_cv_struct_tm=time.h
5436else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005437 echo "configure: failed program was:" >&5
5438 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005439 rm -rf conftest*
5440 ac_cv_struct_tm=sys/time.h
5441fi
5442rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005443fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005444
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005445echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005446if test $ac_cv_struct_tm = sys/time.h; then
5447 cat >> confdefs.h <<\EOF
5448#define TM_IN_SYS_TIME 1
5449EOF
5450
5451fi
5452
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005453echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005454echo "configure:5455: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005455if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005456 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005457else
5458 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005459#line 5460 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005460#include "confdefs.h"
5461#include <sys/types.h>
5462#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005463int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005464struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005465; return 0; }
5466EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005467if { (eval echo configure:5468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005468 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005469 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005470else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005471 echo "configure: failed program was:" >&5
5472 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005473 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005474 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005475fi
5476rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005477fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005478
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005479echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5480if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005481 cat >> confdefs.h <<\EOF
5482#define HAVE_TM_ZONE 1
5483EOF
5484
5485else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005486 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005487echo "configure:5488: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005488if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005489 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005490else
5491 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005492#line 5493 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005493#include "confdefs.h"
5494#include <time.h>
5495#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005496extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005497#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00005498int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005499atoi(*tzname);
5500; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005501EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005502if { (eval echo configure:5503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005503 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005504 ac_cv_var_tzname=yes
5505else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005506 echo "configure: failed program was:" >&5
5507 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005508 rm -rf conftest*
5509 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005510fi
5511rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005512fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005513
5514echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005515 if test $ac_cv_var_tzname = yes; then
5516 cat >> confdefs.h <<\EOF
5517#define HAVE_TZNAME 1
5518EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005519
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005520 fi
5521fi
5522
5523
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005524echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005525echo "configure:5526: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005526if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005527 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005528else
5529 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005530#line 5531 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005531#include "confdefs.h"
5532#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005533int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005534return altzone;
5535; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005536EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005537if { (eval echo configure:5538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005538 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005539 ac_cv_header_time_altzone=yes
5540else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005541 echo "configure: failed program was:" >&5
5542 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005543 rm -rf conftest*
5544 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005545fi
5546rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005547fi
5548
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005549echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005550if test $ac_cv_header_time_altzone = yes; then
5551 cat >> confdefs.h <<\EOF
5552#define HAVE_ALTZONE 1
5553EOF
5554
5555fi
5556
Guido van Rossumda88dad1995-01-26 00:46:29 +00005557was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005558echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005559echo "configure:5560: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005560cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005561#line 5562 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005562#include "confdefs.h"
5563
5564#include <sys/types.h>
5565#include <sys/select.h>
5566#include <sys/time.h>
5567
Guido van Rossumf78abae1997-01-21 22:02:36 +00005568int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005569;
5570; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005571EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005572if { (eval echo configure:5573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005573 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005574 cat >> confdefs.h <<\EOF
5575#define SYS_SELECT_WITH_SYS_TIME 1
5576EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005577 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005578else
5579 echo "configure: failed program was:" >&5
5580 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005581fi
5582rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005583echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005584
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005585echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005586echo "configure:5587: checking for addrinfo" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005587if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
5588 echo $ac_n "(cached) $ac_c" 1>&6
5589else
5590 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005591#line 5592 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005592#include "confdefs.h"
5593
5594# include <netdb.h>
5595int main() {
5596struct addrinfo a
5597; return 0; }
5598EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005599if { (eval echo configure:5600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005600 rm -rf conftest*
5601 ac_cv_struct_addrinfo=yes
5602else
5603 echo "configure: failed program was:" >&5
5604 cat conftest.$ac_ext >&5
5605 rm -rf conftest*
5606 ac_cv_struct_addrinfo=no
5607fi
5608rm -f conftest*
5609fi
5610
5611echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
5612if test $ac_cv_struct_addrinfo = yes; then
5613 cat >> confdefs.h <<\EOF
5614#define HAVE_ADDRINFO 1
5615EOF
5616
5617fi
5618
5619echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005620echo "configure:5621: checking for sockaddr_storage" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005621if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
5622 echo $ac_n "(cached) $ac_c" 1>&6
5623else
5624 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005625#line 5626 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005626#include "confdefs.h"
5627
5628# include <sys/types.h>
5629# include <sys/socket.h>
5630int main() {
5631struct sockaddr_storage s
5632; return 0; }
5633EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005634if { (eval echo configure:5635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005635 rm -rf conftest*
5636 ac_cv_struct_sockaddr_storage=yes
5637else
5638 echo "configure: failed program was:" >&5
5639 cat conftest.$ac_ext >&5
5640 rm -rf conftest*
5641 ac_cv_struct_sockaddr_storage=no
5642fi
5643rm -f conftest*
5644fi
5645
5646echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
5647if test $ac_cv_struct_sockaddr_storage = yes; then
5648 cat >> confdefs.h <<\EOF
5649#define HAVE_SOCKADDR_STORAGE 1
5650EOF
5651
5652fi
5653
Guido van Rossum627b2d71993-12-24 10:39:16 +00005654# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00005655
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005656echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005657echo "configure:5658: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005658if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005659 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005660else
5661 if test "$GCC" = yes; then
5662 # GCC predefines this symbol on systems where it applies.
5663cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005664#line 5665 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005665#include "confdefs.h"
5666#ifdef __CHAR_UNSIGNED__
5667 yes
5668#endif
5669
5670EOF
5671if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5672 egrep "yes" >/dev/null 2>&1; then
5673 rm -rf conftest*
5674 ac_cv_c_char_unsigned=yes
5675else
5676 rm -rf conftest*
5677 ac_cv_c_char_unsigned=no
5678fi
5679rm -f conftest*
5680
5681else
5682if test "$cross_compiling" = yes; then
5683 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5684else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005685 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005686#line 5687 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005687#include "confdefs.h"
5688/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005689#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00005690#define volatile
5691#endif
5692main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00005693 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005694}
5695EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005696if { (eval echo configure:5697: \"$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 +00005697then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005698 ac_cv_c_char_unsigned=yes
5699else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005700 echo "configure: failed program was:" >&5
5701 cat conftest.$ac_ext >&5
5702 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005703 ac_cv_c_char_unsigned=no
5704fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005705rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005706fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005707
5708fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005709fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005710
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005711echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005712if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5713 cat >> confdefs.h <<\EOF
5714#define __CHAR_UNSIGNED__ 1
5715EOF
5716
5717fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005718
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005719echo $ac_n "checking for working const""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005720echo "configure:5721: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005721if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005722 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005723else
5724 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005725#line 5726 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005726#include "confdefs.h"
5727
Guido van Rossumf78abae1997-01-21 22:02:36 +00005728int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005729
5730/* Ultrix mips cc rejects this. */
Martin v. Löwis9db2f572001-07-23 01:30:10 +00005731typedef int charset[2]; const charset x;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005732/* SunOS 4.1.1 cc rejects this. */
5733char const *const *ccp;
5734char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005735/* NEC SVR4.0.2 mips cc rejects this. */
5736struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005737static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005738/* AIX XL C 1.02.0.0 rejects this.
5739 It does not let you subtract one const X* pointer from another in an arm
5740 of an if-expression whose if-part is not a constant expression */
5741const char *g = "string";
5742ccp = &g + (g ? g-g : 0);
5743/* HPUX 7.0 cc rejects these. */
5744++ccp;
5745p = (char**) ccp;
5746ccp = (char const *const *) p;
5747{ /* SCO 3.2v4 cc rejects this. */
5748 char *t;
5749 char const *s = 0 ? (char *) 0 : (char const *) 0;
5750
5751 *t++ = 0;
5752}
5753{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005754 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005755 const int *foo = &x[0];
5756 ++foo;
5757}
5758{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5759 typedef const int *iptr;
5760 iptr p = 0;
5761 ++p;
5762}
5763{ /* AIX XL C 1.02.0.0 rejects this saying
5764 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5765 struct s { int j; const int *ap[3]; };
5766 struct s *b; b->j = 5;
5767}
5768{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5769 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005770}
5771
5772; return 0; }
5773EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005774if { (eval echo configure:5775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005775 rm -rf conftest*
5776 ac_cv_c_const=yes
5777else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005778 echo "configure: failed program was:" >&5
5779 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005780 rm -rf conftest*
5781 ac_cv_c_const=no
5782fi
5783rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005784fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005785
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005786echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005787if test $ac_cv_c_const = no; then
5788 cat >> confdefs.h <<\EOF
5789#define const
5790EOF
5791
5792fi
5793
5794
Guido van Rossumda88dad1995-01-26 00:46:29 +00005795works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005796echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005797echo "configure:5798: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005798cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005799#line 5800 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005800#include "confdefs.h"
5801
Guido van Rossumf78abae1997-01-21 22:02:36 +00005802int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005803volatile int x; x = 0;
5804; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005805EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005806if { (eval echo configure:5807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005807 rm -rf conftest*
5808 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005809else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005810 echo "configure: failed program was:" >&5
5811 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005812 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005813 cat >> confdefs.h <<\EOF
5814#define volatile
5815EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005816
5817fi
5818rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005819echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005820
Guido van Rossumda88dad1995-01-26 00:46:29 +00005821works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005822echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005823echo "configure:5824: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005824cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005825#line 5826 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005826#include "confdefs.h"
5827
Guido van Rossumf78abae1997-01-21 22:02:36 +00005828int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005829signed char c;
5830; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005831EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005832if { (eval echo configure:5833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005833 rm -rf conftest*
5834 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005835else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005836 echo "configure: failed program was:" >&5
5837 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005838 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005839 cat >> confdefs.h <<\EOF
5840#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00005841EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005842
5843fi
5844rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005845echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005846
Guido van Rossumda88dad1995-01-26 00:46:29 +00005847have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005848echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005849echo "configure:5850: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005850cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005851#line 5852 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005852#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005853int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005854int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005855return foo(10);
5856; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005857EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005858if { (eval echo configure:5859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005859 rm -rf conftest*
5860 cat >> confdefs.h <<\EOF
5861#define HAVE_PROTOTYPES 1
5862EOF
5863 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005864else
5865 echo "configure: failed program was:" >&5
5866 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005867fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005868rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005869echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005870
Guido van Rossumda88dad1995-01-26 00:46:29 +00005871works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005872echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005873echo "configure:5874: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005874cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005875#line 5876 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005876#include "confdefs.h"
5877
5878#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00005879int foo(int x, ...) {
5880 va_list va;
5881 va_start(va, x);
5882 va_arg(va, int);
5883 va_arg(va, char *);
5884 va_arg(va, double);
5885 return 0;
5886}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005887
Guido van Rossumf78abae1997-01-21 22:02:36 +00005888int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005889return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005890; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005891EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005892if { (eval echo configure:5893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005893 rm -rf conftest*
5894 cat >> confdefs.h <<\EOF
5895#define HAVE_STDARG_PROTOTYPES 1
5896EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005897 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005898else
5899 echo "configure: failed program was:" >&5
5900 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005901fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005902rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005903echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005904
Guido van Rossumda88dad1995-01-26 00:46:29 +00005905if test "$have_prototypes" = yes; then
5906bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005907echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005908echo "configure:5909: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005909cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005910#line 5911 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005911#include "confdefs.h"
5912#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005913int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005914char **t;execve("@",t,t);
5915; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005916EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005917if { (eval echo configure:5918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005918 :
5919else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005920 echo "configure: failed program was:" >&5
5921 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005922 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005923 cat >> confdefs.h <<\EOF
5924#define BAD_EXEC_PROTOTYPES 1
5925EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005926 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005927fi
5928rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005929echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005930fi
5931
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005932# check if sockaddr has sa_len member
5933echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005934echo "configure:5935: checking if sockaddr has sa_len member" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005935cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005936#line 5937 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005937#include "confdefs.h"
5938#include <sys/types.h>
5939#include <sys/socket.h>
5940int main() {
5941struct sockaddr x;
5942x.sa_len = 0;
5943; return 0; }
5944EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005945if { (eval echo configure:5946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005946 rm -rf conftest*
5947 echo "$ac_t""yes" 1>&6
5948 cat >> confdefs.h <<\EOF
5949#define HAVE_SOCKADDR_SA_LEN 1
5950EOF
5951
5952else
5953 echo "configure: failed program was:" >&5
5954 cat conftest.$ac_ext >&5
5955 rm -rf conftest*
5956 echo "$ac_t""no" 1>&6
5957fi
5958rm -f conftest*
5959
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005960echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005961echo "configure:5962: checking for bad static forward" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00005962if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
5963 echo $ac_n "(cached) $ac_c" 1>&6
5964else
5965 if test "$cross_compiling" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005966 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5967else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005968 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005969#line 5970 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005970#include "confdefs.h"
5971
5972struct s { int a; int b; };
5973static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005974int foobar() {
5975 static int random;
5976 random = (int) &foo;
5977 return random;
5978}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005979static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005980main() {
5981 exit(!((int)&foo == foobar()));
5982}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005983EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00005984if { (eval echo configure:5985: \"$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 +00005985then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00005986 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005987else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005988 echo "configure: failed program was:" >&5
5989 cat conftest.$ac_ext >&5
5990 rm -fr conftest*
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00005991 ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005992fi
5993rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005994fi
5995
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00005996fi
5997
5998echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
5999if test "$ac_cv_bad_static_forward" = yes
6000then
6001 cat >> confdefs.h <<\EOF
6002#define BAD_STATIC_FORWARD 1
6003EOF
6004
6005fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006006
Guido van Rossumda88dad1995-01-26 00:46:29 +00006007va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006008echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006009echo "configure:6010: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006010cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006011#line 6012 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006012#include "confdefs.h"
6013
6014#ifdef HAVE_STDARG_PROTOTYPES
6015#include <stdarg.h>
6016#else
6017#include <varargs.h>
6018#endif
6019
Guido van Rossumf78abae1997-01-21 22:02:36 +00006020int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006021va_list list1, list2; list1 = list2;
6022; return 0; }
6023EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006024if { (eval echo configure:6025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006025 :
6026else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006027 echo "configure: failed program was:" >&5
6028 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006029 rm -rf conftest*
6030 cat >> confdefs.h <<\EOF
6031#define VA_LIST_IS_ARRAY 1
6032EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006033 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006034fi
6035rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006036echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006037
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006038# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
6039echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006040echo "configure:6041: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006041if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006042 echo $ac_n "(cached) $ac_c" 1>&6
6043else
6044 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006045#line 6046 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006046#include "confdefs.h"
6047/* System header to define __stub macros and hopefully few prototypes,
6048 which can conflict with char gethostbyname_r(); below. */
6049#include <assert.h>
6050/* Override any gcc2 internal prototype to avoid an error. */
6051/* We use char because int might match the return type of a gcc2
6052 builtin and then its argument prototype would still apply. */
6053char gethostbyname_r();
6054
6055int main() {
6056
6057/* The GNU C library defines this for functions which it implements
6058 to always fail with ENOSYS. Some functions are actually named
6059 something starting with __ and the normal name is an alias. */
6060#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6061choke me
6062#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006063gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006064#endif
6065
6066; return 0; }
6067EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006068if { (eval echo configure:6069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006069 rm -rf conftest*
6070 eval "ac_cv_func_gethostbyname_r=yes"
6071else
6072 echo "configure: failed program was:" >&5
6073 cat conftest.$ac_ext >&5
6074 rm -rf conftest*
6075 eval "ac_cv_func_gethostbyname_r=no"
6076fi
6077rm -f conftest*
6078fi
6079
6080if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6081 echo "$ac_t""yes" 1>&6
6082
6083 cat >> confdefs.h <<\EOF
6084#define HAVE_GETHOSTBYNAME_R 1
6085EOF
6086
6087 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006088echo "configure:6089: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006089 OLD_CFLAGS=$CFLAGS
6090 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
6091 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006092#line 6093 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006093#include "confdefs.h"
6094
6095# include <netdb.h>
6096
6097int main() {
6098
6099 char *name;
6100 struct hostent *he, *res;
6101 char buffer[2048];
6102 int buflen = 2048;
6103 int h_errnop;
6104
6105 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
6106
6107; return 0; }
6108EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006109if { (eval echo configure:6110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006110 rm -rf conftest*
6111
6112 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006113#define HAVE_GETHOSTBYNAME_R 1
6114EOF
6115
6116 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006117#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6118EOF
6119
6120 echo "$ac_t""yes" 1>&6
6121
6122else
6123 echo "configure: failed program was:" >&5
6124 cat conftest.$ac_ext >&5
6125 rm -rf conftest*
6126
6127 echo "$ac_t""no" 1>&6
6128 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006129echo "configure:6130: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006130 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006131#line 6132 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006132#include "confdefs.h"
6133
6134# include <netdb.h>
6135
6136int main() {
6137
6138 char *name;
6139 struct hostent *he;
6140 char buffer[2048];
6141 int buflen = 2048;
6142 int h_errnop;
6143
6144 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
6145
6146; return 0; }
6147EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006148if { (eval echo configure:6149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006149 rm -rf conftest*
6150
6151 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006152#define HAVE_GETHOSTBYNAME_R 1
6153EOF
6154
6155 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006156#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6157EOF
6158
6159 echo "$ac_t""yes" 1>&6
6160
6161else
6162 echo "configure: failed program was:" >&5
6163 cat conftest.$ac_ext >&5
6164 rm -rf conftest*
6165
6166 echo "$ac_t""no" 1>&6
6167 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006168echo "configure:6169: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006169 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006170#line 6171 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006171#include "confdefs.h"
6172
6173# include <netdb.h>
6174
6175int main() {
6176
6177 char *name;
6178 struct hostent *he;
6179 struct hostent_data data;
6180
6181 (void) gethostbyname_r(name, he, &data);
6182
6183; return 0; }
6184EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006185if { (eval echo configure:6186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006186 rm -rf conftest*
6187
6188 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006189#define HAVE_GETHOSTBYNAME_R 1
6190EOF
6191
6192 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006193#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6194EOF
6195
6196 echo "$ac_t""yes" 1>&6
6197
6198else
6199 echo "configure: failed program was:" >&5
6200 cat conftest.$ac_ext >&5
6201 rm -rf conftest*
6202
6203 echo "$ac_t""no" 1>&6
6204
6205fi
6206rm -f conftest*
6207
6208fi
6209rm -f conftest*
6210
6211fi
6212rm -f conftest*
6213 CFLAGS=$OLD_CFLAGS
6214
6215else
6216 echo "$ac_t""no" 1>&6
6217
Thomas Wouters3a584202000-08-05 23:28:51 +00006218 for ac_func in gethostbyname
6219do
6220echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006221echo "configure:6222: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006222if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006223 echo $ac_n "(cached) $ac_c" 1>&6
6224else
6225 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006226#line 6227 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006227#include "confdefs.h"
6228/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00006229 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006230#include <assert.h>
6231/* Override any gcc2 internal prototype to avoid an error. */
6232/* We use char because int might match the return type of a gcc2
6233 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006234char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006235
6236int main() {
6237
6238/* The GNU C library defines this for functions which it implements
6239 to always fail with ENOSYS. Some functions are actually named
6240 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006241#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006242choke me
6243#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006244$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006245#endif
6246
6247; return 0; }
6248EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006249if { (eval echo configure:6250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006250 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006251 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006252else
6253 echo "configure: failed program was:" >&5
6254 cat conftest.$ac_ext >&5
6255 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006256 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006257fi
6258rm -f conftest*
6259fi
6260
Thomas Wouters3a584202000-08-05 23:28:51 +00006261if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006262 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00006263 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6264 cat >> confdefs.h <<EOF
6265#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006266EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00006267
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006268else
6269 echo "$ac_t""no" 1>&6
6270fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006271done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006272
6273
6274fi
6275
6276
6277
6278
6279
6280
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006281
Guido van Rossum627b2d71993-12-24 10:39:16 +00006282# checks for system services
6283# (none yet)
6284
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006285# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006286echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006287echo "configure:6288: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006288if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006289 echo $ac_n "(cached) $ac_c" 1>&6
6290else
6291 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006292#line 6293 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006293#include "confdefs.h"
6294/* System header to define __stub macros and hopefully few prototypes,
6295 which can conflict with char __fpu_control(); below. */
6296#include <assert.h>
6297/* Override any gcc2 internal prototype to avoid an error. */
6298/* We use char because int might match the return type of a gcc2
6299 builtin and then its argument prototype would still apply. */
6300char __fpu_control();
6301
6302int main() {
6303
6304/* The GNU C library defines this for functions which it implements
6305 to always fail with ENOSYS. Some functions are actually named
6306 something starting with __ and the normal name is an alias. */
6307#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6308choke me
6309#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006310__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006311#endif
6312
6313; return 0; }
6314EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006315if { (eval echo configure:6316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006316 rm -rf conftest*
6317 eval "ac_cv_func___fpu_control=yes"
6318else
6319 echo "configure: failed program was:" >&5
6320 cat conftest.$ac_ext >&5
6321 rm -rf conftest*
6322 eval "ac_cv_func___fpu_control=no"
6323fi
6324rm -f conftest*
6325fi
6326
6327if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6328 echo "$ac_t""yes" 1>&6
6329 :
6330else
6331 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006332echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006333echo "configure:6334: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00006334ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006335if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006336 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006337else
6338 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006339LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006340cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006341#line 6342 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006342#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006343/* Override any gcc2 internal prototype to avoid an error. */
6344/* We use char because int might match the return type of a gcc2
6345 builtin and then its argument prototype would still apply. */
6346char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00006347
Guido van Rossumf78abae1997-01-21 22:02:36 +00006348int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006349__fpu_control()
6350; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006351EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006352if { (eval echo configure:6353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006353 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006354 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006355else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006356 echo "configure: failed program was:" >&5
6357 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006358 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006359 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006360fi
6361rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006362LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006363
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006364fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006365if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006366 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006367 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6368 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006369 cat >> confdefs.h <<EOF
6370#define $ac_tr_lib 1
6371EOF
6372
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006373 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006374
6375else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006376 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006377fi
6378
6379
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006380fi
6381
6382
Guido van Rossum7f253911997-05-09 02:42:48 +00006383# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00006384echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006385echo "configure:6386: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006386# Check whether --with-fpectl or --without-fpectl was given.
6387if test "${with_fpectl+set}" = set; then
6388 withval="$with_fpectl"
6389
6390if test "$withval" != no
6391then cat >> confdefs.h <<\EOF
6392#define WANT_SIGFPE_HANDLER 1
6393EOF
6394 echo "$ac_t""yes" 1>&6
6395else echo "$ac_t""no" 1>&6
6396fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006397else
6398 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006399fi
6400
6401
Guido van Rossum7f43da71994-08-01 12:15:30 +00006402# check for --with-libm=...
6403
Guido van Rossum563e7081996-09-10 18:20:48 +00006404case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006405Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006406next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006407BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006408*) LIBM=-lm
6409esac
Guido van Rossum7f253911997-05-09 02:42:48 +00006410echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006411echo "configure:6412: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006412# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006413if test "${with_libm+set}" = set; then
6414 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006415
Guido van Rossum7f253911997-05-09 02:42:48 +00006416if test "$withval" = no
6417then LIBM=
6418 echo "$ac_t""force LIBM empty" 1>&6
6419elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006420then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006421 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006422else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006423fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006424else
6425 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006426fi
6427
6428
6429# check for --with-libc=...
6430
Guido van Rossum7f253911997-05-09 02:42:48 +00006431echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006432echo "configure:6433: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006433# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006434if test "${with_libc+set}" = set; then
6435 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006436
Guido van Rossum7f253911997-05-09 02:42:48 +00006437if test "$withval" = no
6438then LIBC=
6439 echo "$ac_t""force LIBC empty" 1>&6
6440elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006441then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006442 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006443else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006444fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006445else
6446 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006447fi
6448
6449
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006450# check for hypot() in math library
6451LIBS_SAVE=$LIBS
6452LIBS="$LIBS $LIBM"
6453for ac_func in hypot
6454do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006455echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006456echo "configure:6457: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006457if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006458 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006459else
6460 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006461#line 6462 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006462#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006463/* System header to define __stub macros and hopefully few prototypes,
6464 which can conflict with char $ac_func(); below. */
6465#include <assert.h>
6466/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006467/* We use char because int might match the return type of a gcc2
6468 builtin and then its argument prototype would still apply. */
6469char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006470
Guido van Rossumf78abae1997-01-21 22:02:36 +00006471int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006472
6473/* The GNU C library defines this for functions which it implements
6474 to always fail with ENOSYS. Some functions are actually named
6475 something starting with __ and the normal name is an alias. */
6476#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6477choke me
6478#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006479$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006480#endif
6481
6482; return 0; }
6483EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006484if { (eval echo configure:6485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006485 rm -rf conftest*
6486 eval "ac_cv_func_$ac_func=yes"
6487else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006488 echo "configure: failed program was:" >&5
6489 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006490 rm -rf conftest*
6491 eval "ac_cv_func_$ac_func=no"
6492fi
6493rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006494fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00006495
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006496if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6497 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006498 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6499 cat >> confdefs.h <<EOF
6500#define $ac_tr_func 1
6501EOF
6502
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006503else
6504 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006505LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006506fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006507done
6508
Guido van Rossumf78abae1997-01-21 22:02:36 +00006509
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006510LIBS=$LIBS_SAVE
6511
Guido van Rossumad713701997-07-10 22:42:38 +00006512# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00006513echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006514echo "configure:6515: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006515if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00006516 echo $ac_n "(cached) $ac_c" 1>&6
6517else
6518 if test "$cross_compiling" = yes; then
6519 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6520else
6521 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006522#line 6523 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006523#include "confdefs.h"
6524#include <stdio.h>
6525#ifdef HAVE_STDLIB
6526#include <stdlib.h>
6527#else
6528char *malloc(), *realloc();
6529int *free();
6530#endif
6531main() {
6532 char *p;
6533 p = malloc(0);
6534 if (p == NULL) exit(1);
6535 p = realloc(p, 0);
6536 if (p == NULL) exit(1);
6537 free(p);
6538 exit(0);
6539}
6540EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006541if { (eval echo configure:6542: \"$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 +00006542then
6543 ac_cv_malloc_zero=nonnull
6544else
6545 echo "configure: failed program was:" >&5
6546 cat conftest.$ac_ext >&5
6547 rm -fr conftest*
6548 ac_cv_malloc_zero=null
6549fi
6550rm -fr conftest*
6551fi
6552
6553fi
6554
6555echo "$ac_t""$ac_cv_malloc_zero" 1>&6
6556if test "$ac_cv_malloc_zero" = null
6557then
6558 cat >> confdefs.h <<\EOF
6559#define MALLOC_ZERO_RETURNS_NULL 1
6560EOF
6561
6562fi
6563
Guido van Rossumef2255b2000-03-10 22:30:29 +00006564# check for wchar.h
6565ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6566echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006567echo "configure:6568: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006568if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006569 echo $ac_n "(cached) $ac_c" 1>&6
6570else
6571 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006572#line 6573 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006573#include "confdefs.h"
6574#include <wchar.h>
6575EOF
6576ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006577{ (eval echo configure:6578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006578ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6579if test -z "$ac_err"; then
6580 rm -rf conftest*
6581 eval "ac_cv_header_$ac_safe=yes"
6582else
6583 echo "$ac_err" >&5
6584 echo "configure: failed program was:" >&5
6585 cat conftest.$ac_ext >&5
6586 rm -rf conftest*
6587 eval "ac_cv_header_$ac_safe=no"
6588fi
6589rm -f conftest*
6590fi
6591if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6592 echo "$ac_t""yes" 1>&6
6593 cat >> confdefs.h <<\EOF
6594#define HAVE_WCHAR_H 1
6595EOF
6596 wchar_h="yes"
6597else
6598 echo "$ac_t""no" 1>&6
6599wchar_h="no"
6600
6601fi
6602
6603
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006604# determine wchar_t size
6605if test "$wchar_h" = yes
6606then
6607 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006608echo "configure:6609: checking size of wchar_t" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006609if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
6610 echo $ac_n "(cached) $ac_c" 1>&6
6611else
6612 if test "$cross_compiling" = yes; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006613 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6614else
6615 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006616#line 6617 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006617#include "confdefs.h"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006618#include <stdio.h>
6619main()
6620{
6621 FILE *f=fopen("conftestval", "w");
6622 if (!f) exit(1);
6623 fprintf(f, "%d\n", sizeof(wchar_t));
Guido van Rossumef2255b2000-03-10 22:30:29 +00006624 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00006625}
Guido van Rossumef2255b2000-03-10 22:30:29 +00006626EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006627if { (eval echo configure:6628: \"$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 +00006628then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006629 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006630else
6631 echo "configure: failed program was:" >&5
6632 cat conftest.$ac_ext >&5
6633 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006634 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00006635fi
6636rm -fr conftest*
6637fi
6638
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006639fi
6640echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
6641cat >> confdefs.h <<EOF
6642#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
6643EOF
6644
6645
6646fi
6647
6648echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006649echo "configure:6650: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006650# Check whether --enable-unicode or --disable-unicode was given.
6651if test "${enable_unicode+set}" = set; then
6652 enableval="$enable_unicode"
6653 :
6654else
6655 enable_unicode=yes
6656fi
6657
6658
6659if test $enable_unicode = yes
6660then
Martin v. Löwisfd917792001-06-27 20:22:04 +00006661 # Without any arguments, Py_UNICODE defaults to two-byte mode
6662 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006663fi
6664
6665case "$enable_unicode" in
6666ucs2) unicode_size="2"
6667 cat >> confdefs.h <<\EOF
6668#define Py_UNICODE_SIZE 2
6669EOF
6670
6671 ;;
6672ucs4) unicode_size="4"
6673 cat >> confdefs.h <<\EOF
6674#define Py_UNICODE_SIZE 4
6675EOF
6676
6677 ;;
6678esac
6679
6680if test "$enable_unicode" = "no"
6681then
6682 echo "$ac_t""not used" 1>&6
6683else
6684 cat >> confdefs.h <<\EOF
6685#define Py_USING_UNICODE 1
6686EOF
6687
6688 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
6689 then
6690 PY_UNICODE_TYPE="wchar_t"
6691 cat >> confdefs.h <<\EOF
6692#define HAVE_USABLE_WCHAR_T 1
6693EOF
6694
6695 cat >> confdefs.h <<\EOF
6696#define PY_UNICODE_TYPE wchar_t
6697EOF
6698
6699 elif test "$ac_cv_sizeof_short" = "$unicode_size"
6700 then
6701 PY_UNICODE_TYPE="unsigned short"
6702 cat >> confdefs.h <<\EOF
6703#define PY_UNICODE_TYPE unsigned short
6704EOF
6705
6706 elif test "$ac_cv_sizeof_long" = "$unicode_size"
6707 then
6708 PY_UNICODE_TYPE="unsigned long"
6709 cat >> confdefs.h <<\EOF
6710#define PY_UNICODE_TYPE unsigned long
6711EOF
6712
6713 else
6714 PY_UNICODE_TYPE="no type found"
6715 fi
6716 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
6717fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006718
6719# check for endianness
6720echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006721echo "configure:6722: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006722if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006723 echo $ac_n "(cached) $ac_c" 1>&6
6724else
6725 ac_cv_c_bigendian=unknown
6726# See if sys/param.h defines the BYTE_ORDER macro.
6727cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006728#line 6729 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006729#include "confdefs.h"
6730#include <sys/types.h>
6731#include <sys/param.h>
6732int main() {
6733
6734#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6735 bogus endian macros
6736#endif
6737; return 0; }
6738EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006739if { (eval echo configure:6740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006740 rm -rf conftest*
6741 # It does; now see whether it defined to BIG_ENDIAN or not.
6742cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006743#line 6744 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006744#include "confdefs.h"
6745#include <sys/types.h>
6746#include <sys/param.h>
6747int main() {
6748
6749#if BYTE_ORDER != BIG_ENDIAN
6750 not big endian
6751#endif
6752; return 0; }
6753EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006754if { (eval echo configure:6755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006755 rm -rf conftest*
6756 ac_cv_c_bigendian=yes
6757else
6758 echo "configure: failed program was:" >&5
6759 cat conftest.$ac_ext >&5
6760 rm -rf conftest*
6761 ac_cv_c_bigendian=no
6762fi
6763rm -f conftest*
6764else
6765 echo "configure: failed program was:" >&5
6766 cat conftest.$ac_ext >&5
6767fi
6768rm -f conftest*
6769if test $ac_cv_c_bigendian = unknown; then
6770if test "$cross_compiling" = yes; then
6771 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6772else
6773 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006774#line 6775 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006775#include "confdefs.h"
6776main () {
6777 /* Are we little or big endian? From Harbison&Steele. */
6778 union
6779 {
6780 long l;
6781 char c[sizeof (long)];
6782 } u;
6783 u.l = 1;
6784 exit (u.c[sizeof (long) - 1] == 1);
6785}
6786EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006787if { (eval echo configure:6788: \"$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 +00006788then
6789 ac_cv_c_bigendian=no
6790else
6791 echo "configure: failed program was:" >&5
6792 cat conftest.$ac_ext >&5
6793 rm -fr conftest*
6794 ac_cv_c_bigendian=yes
6795fi
6796rm -fr conftest*
6797fi
6798
6799fi
6800fi
6801
6802echo "$ac_t""$ac_cv_c_bigendian" 1>&6
6803if test $ac_cv_c_bigendian = yes; then
6804 cat >> confdefs.h <<\EOF
6805#define WORDS_BIGENDIAN 1
6806EOF
6807
6808fi
6809
6810
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006811# Check whether right shifting a negative integer extends the sign bit
6812# or fills with zeros (like the Cray J90, according to Tim Peters).
6813echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006814echo "configure:6815: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006815if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00006816 echo $ac_n "(cached) $ac_c" 1>&6
6817else
6818
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006819if test "$cross_compiling" = yes; then
6820 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6821else
6822 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006823#line 6824 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006824#include "confdefs.h"
6825
6826int main()
6827{
Vladimir Marangozova6180282000-07-12 05:05:06 +00006828 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006829}
6830
6831EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006832if { (eval echo configure:6833: \"$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 +00006833then
6834 ac_cv_rshift_extends_sign=yes
6835else
6836 echo "configure: failed program was:" >&5
6837 cat conftest.$ac_ext >&5
6838 rm -fr conftest*
6839 ac_cv_rshift_extends_sign=no
6840fi
6841rm -fr conftest*
6842fi
6843
6844fi
6845
6846echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
6847if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006848then
6849 cat >> confdefs.h <<\EOF
6850#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
6851EOF
6852
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006853fi
6854
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006855# check for getc_unlocked and related locking functions
6856echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006857echo "configure:6858: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006858if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
6859 echo $ac_n "(cached) $ac_c" 1>&6
6860else
6861
6862cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006863#line 6864 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006864#include "confdefs.h"
6865#include <stdio.h>
6866int main() {
6867
6868 FILE *f = fopen("/dev/null", "r");
6869 flockfile(f);
6870 getc_unlocked(f);
6871 funlockfile(f);
6872
6873; return 0; }
6874EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006875if { (eval echo configure:6876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006876 rm -rf conftest*
6877 ac_cv_have_getc_unlocked=yes
6878else
6879 echo "configure: failed program was:" >&5
6880 cat conftest.$ac_ext >&5
6881 rm -rf conftest*
6882 ac_cv_have_getc_unlocked=no
6883fi
6884rm -f conftest*
6885fi
6886
6887echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
6888if test "$ac_cv_have_getc_unlocked" = yes
6889then
6890 cat >> confdefs.h <<\EOF
6891#define HAVE_GETC_UNLOCKED 1
6892EOF
6893
6894fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006895
Guido van Rossum353ae582001-07-10 16:45:32 +00006896# check for readline 4.2
6897echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006898echo "configure:6899: checking for rl_completion_matches in -lreadline" >&5
Guido van Rossum353ae582001-07-10 16:45:32 +00006899ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
6900if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6901 echo $ac_n "(cached) $ac_c" 1>&6
6902else
6903 ac_save_LIBS="$LIBS"
6904LIBS="-lreadline -ltermcap $LIBS"
6905cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006906#line 6907 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00006907#include "confdefs.h"
6908/* Override any gcc2 internal prototype to avoid an error. */
6909/* We use char because int might match the return type of a gcc2
6910 builtin and then its argument prototype would still apply. */
6911char rl_completion_matches();
6912
6913int main() {
6914rl_completion_matches()
6915; return 0; }
6916EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006917if { (eval echo configure:6918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum353ae582001-07-10 16:45:32 +00006918 rm -rf conftest*
6919 eval "ac_cv_lib_$ac_lib_var=yes"
6920else
6921 echo "configure: failed program was:" >&5
6922 cat conftest.$ac_ext >&5
6923 rm -rf conftest*
6924 eval "ac_cv_lib_$ac_lib_var=no"
6925fi
6926rm -f conftest*
6927LIBS="$ac_save_LIBS"
6928
6929fi
6930if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6931 echo "$ac_t""yes" 1>&6
6932 cat >> confdefs.h <<\EOF
6933#define HAVE_RL_COMPLETION_MATCHES 1
6934EOF
6935
6936else
6937 echo "$ac_t""no" 1>&6
6938fi
6939
6940
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006941echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006942echo "configure:6943: checking for broken nice()" >&5
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006943if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
6944 echo $ac_n "(cached) $ac_c" 1>&6
6945else
6946
6947if test "$cross_compiling" = yes; then
6948 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6949else
6950 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006951#line 6952 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006952#include "confdefs.h"
6953
6954int main()
6955{
6956 int val1 = nice(1);
6957 if (val1 != -1 && val1 == nice(2))
6958 exit(0);
6959 exit(1);
6960}
6961
6962EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006963if { (eval echo configure:6964: \"$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 +00006964then
6965 ac_cv_broken_nice=yes
6966else
6967 echo "configure: failed program was:" >&5
6968 cat conftest.$ac_ext >&5
6969 rm -fr conftest*
6970 ac_cv_broken_nice=no
6971fi
6972rm -fr conftest*
6973fi
6974
6975fi
6976
6977echo "$ac_t""$ac_cv_broken_nice" 1>&6
6978if test "$ac_cv_broken_nice" = yes
6979then
6980 cat >> confdefs.h <<\EOF
6981#define HAVE_BROKEN_NICE 1
6982EOF
6983
6984fi
6985
Guido van Rossum95713eb2000-05-18 20:53:31 +00006986# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
6987# Add sys/socket.h to confdefs.h
6988cat >> confdefs.h <<\EOF
6989#ifdef HAVE_SYS_SOCKET_H
6990#include <sys/socket.h>
6991#endif
6992EOF
6993echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006994echo "configure:6995: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006995if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00006996 echo $ac_n "(cached) $ac_c" 1>&6
6997else
6998 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00006999#line 7000 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00007000#include "confdefs.h"
7001#include <sys/types.h>
7002#if STDC_HEADERS
7003#include <stdlib.h>
7004#include <stddef.h>
7005#endif
7006EOF
7007if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7008 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7009 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007010 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00007011else
7012 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007013 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00007014fi
7015rm -f conftest*
7016
7017fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007018echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7019if test $ac_cv_type_socklen_t = no; then
7020 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00007021#define socklen_t int
7022EOF
7023
7024fi
7025
7026
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00007027# Add Python/ prefix to LIBOBJS
7028libobjs=$LIBOBJS
7029LIBOBJS=
7030for obj in $libobjs; do
7031 LIBOBJS="$LIBOBJS Python/$obj"
7032done
7033
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007034#AC_MSG_CHECKING(for Modules/Setup)
7035#if test ! -f Modules/Setup ; then
7036# if test ! -d Modules ; then
7037# mkdir Modules
7038# fi
7039# cp "$srcdir/Modules/Setup.dist" Modules/Setup
7040# AC_MSG_RESULT(creating)
7041#else
7042# AC_MSG_RESULT(already exists)
7043#fi
7044
7045
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007046SRCDIRS="Parser Grammar Objects Python Modules"
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007047echo $ac_n "checking for build directories""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00007048echo "configure:7049: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007049for dir in $SRCDIRS; do
7050 if test ! -d $dir; then
7051 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007052 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007053done
7054echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007055
Guido van Rossum627b2d71993-12-24 10:39:16 +00007056# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007057trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007058cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007059# This file is a shell script that caches the results of configure
7060# tests run on this system so they can be shared between configure
7061# scripts and configure runs. It is not useful on other systems.
7062# If it contains results you don't want to keep, you may remove or edit it.
7063#
7064# By default, configure uses ./config.cache as the cache file,
7065# creating it if it does not exist already. You can give configure
7066# the --cache-file=FILE option to use a different cache file; that is
7067# what configure does when it calls configure scripts in
7068# subdirectories, so they share the cache.
7069# Giving --cache-file=/dev/null disables caching, for debugging configure.
7070# config.status only pays attention to the cache file if you give it the
7071# --recheck option to rerun configure.
7072#
7073EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007074# The following way of writing the cache mishandles newlines in values,
7075# but we know of no workaround that is simple, portable, and efficient.
7076# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007077# Ultrix sh set writes to stderr and can't be redirected directly,
7078# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007079(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007080 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007081 *ac_space=\ *)
7082 # `set' does not quote correctly, so add quotes (double-quote substitution
7083 # turns \\\\ into \\, and sed turns \\ into \).
7084 sed -n \
7085 -e "s/'/'\\\\''/g" \
7086 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7087 ;;
7088 *)
7089 # `set' quotes correctly as required by POSIX, so do not add quotes.
7090 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7091 ;;
7092 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007093if cmp -s $cache_file confcache; then
7094 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007095else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007096 if test -w $cache_file; then
7097 echo "updating cache $cache_file"
7098 cat confcache > $cache_file
7099 else
7100 echo "not updating unwritable cache $cache_file"
7101 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007102fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007103rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007104
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007105trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007106
7107test "x$prefix" = xNONE && prefix=$ac_default_prefix
7108# Let make expand exec_prefix.
7109test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007110
Guido van Rossum7f43da71994-08-01 12:15:30 +00007111# Any assignment to VPATH causes Sun make to only execute
7112# the first set of double-colon rules, so remove it if not needed.
7113# If there is a colon in the path, we need to keep it.
7114if test "x$srcdir" = x.; then
7115 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7116fi
7117
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007118trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00007119
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007120DEFS=-DHAVE_CONFIG_H
7121
7122# Without the "./", some shells look in PATH for config.status.
7123: ${CONFIG_STATUS=./config.status}
7124
7125echo creating $CONFIG_STATUS
7126rm -f $CONFIG_STATUS
7127cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007128#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007129# Generated automatically by configure.
7130# Run this file to recreate the current configuration.
7131# This directory was configured as follows,
7132# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7133#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007134# $0 $ac_configure_args
7135#
7136# Compiler output produced by configure, useful for debugging
7137# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007138
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007139ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007140for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00007141do
Guido van Rossum7f43da71994-08-01 12:15:30 +00007142 case "\$ac_option" in
7143 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007144 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7145 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00007146 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007147 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007148 exit 0 ;;
7149 -help | --help | --hel | --he | --h)
7150 echo "\$ac_cs_usage"; exit 0 ;;
7151 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00007152 esac
7153done
7154
Guido van Rossum7f43da71994-08-01 12:15:30 +00007155ac_given_srcdir=$srcdir
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007156ac_given_INSTALL="$INSTALL"
Guido van Rossum627b2d71993-12-24 10:39:16 +00007157
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007158trap 'rm -fr `echo "Makefile.pre Modules/Setup.config pyconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007159EOF
7160cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007161
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007162# Protect against being on the right side of a sed subst in config.status.
7163sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7164 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007165$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00007166$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007167s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007168s%@CFLAGS@%$CFLAGS%g
7169s%@CPPFLAGS@%$CPPFLAGS%g
7170s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007171s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007172s%@DEFS@%$DEFS%g
7173s%@LDFLAGS@%$LDFLAGS%g
7174s%@LIBS@%$LIBS%g
7175s%@exec_prefix@%$exec_prefix%g
7176s%@prefix@%$prefix%g
7177s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007178s%@bindir@%$bindir%g
7179s%@sbindir@%$sbindir%g
7180s%@libexecdir@%$libexecdir%g
7181s%@datadir@%$datadir%g
7182s%@sysconfdir@%$sysconfdir%g
7183s%@sharedstatedir@%$sharedstatedir%g
7184s%@localstatedir@%$localstatedir%g
7185s%@libdir@%$libdir%g
7186s%@includedir@%$includedir%g
7187s%@oldincludedir@%$oldincludedir%g
7188s%@infodir@%$infodir%g
7189s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00007190s%@VERSION@%$VERSION%g
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00007191s%@CONFIG_ARGS@%$CONFIG_ARGS%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00007192s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00007193s%@SGI_ABI@%$SGI_ABI%g
Martin v. Löwis22352952000-12-13 17:37:02 +00007194s%@CXX@%$CXX%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007195s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007196s%@CC@%$CC%g
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00007197s%@CPP@%$CPP%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007198s%@EXEEXT@%$EXEEXT%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007199s%@LIBRARY@%$LIBRARY%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007200s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007201s%@DLLLIBRARY@%$DLLLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00007202s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007203s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007204s%@AR@%$AR%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007205s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007206s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007207s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007208s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00007209s%@OPT@%$OPT%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007210s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007211s%@SO@%$SO%g
7212s%@LDSHARED@%$LDSHARED%g
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007213s%@BLDSHARED@%$BLDSHARED%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007214s%@CCSHARED@%$CCSHARED%g
7215s%@LINKFORSHARED@%$LINKFORSHARED%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007216s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007217s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7218s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
Guido van Rossum009f7871997-12-04 00:51:42 +00007219s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00007220s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00007221s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007222s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00007223s%@DYNLOADFILE@%$DYNLOADFILE%g
Neil Schemenauer4e425612001-06-19 15:44:15 +00007224s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007225s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007226s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7227s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7228s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00007229s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007230s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007231s%@LIBM@%$LIBM%g
7232s%@LIBC@%$LIBC%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007233s%@SRCDIRS@%$SRCDIRS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007234
7235CEOF
7236EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007237
7238cat >> $CONFIG_STATUS <<\EOF
7239
7240# Split the substitutions into bite-sized pieces for seds with
7241# small command number limits, like on Digital OSF/1 and HP-UX.
7242ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7243ac_file=1 # Number of current file.
7244ac_beg=1 # First line for current file.
7245ac_end=$ac_max_sed_cmds # Line after last line for current file.
7246ac_more_lines=:
7247ac_sed_cmds=""
7248while $ac_more_lines; do
7249 if test $ac_beg -gt 1; then
7250 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7251 else
7252 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7253 fi
7254 if test ! -s conftest.s$ac_file; then
7255 ac_more_lines=false
7256 rm -f conftest.s$ac_file
7257 else
7258 if test -z "$ac_sed_cmds"; then
7259 ac_sed_cmds="sed -f conftest.s$ac_file"
7260 else
7261 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7262 fi
7263 ac_file=`expr $ac_file + 1`
7264 ac_beg=$ac_end
7265 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7266 fi
7267done
7268if test -z "$ac_sed_cmds"; then
7269 ac_sed_cmds=cat
7270fi
7271EOF
7272
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007273cat >> $CONFIG_STATUS <<EOF
7274
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007275CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007276EOF
7277cat >> $CONFIG_STATUS <<\EOF
7278for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007279 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007280 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007281 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007282 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7283 *) ac_file_in="${ac_file}.in" ;;
7284 esac
7285
Guido van Rossumf78abae1997-01-21 22:02:36 +00007286 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007287
7288 # Remove last slash and all that follows it. Not all systems have dirname.
7289 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7290 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7291 # The file is in a subdirectory.
7292 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007293 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007294 # A "../" for each directory in $ac_dir_suffix.
7295 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7296 else
7297 ac_dir_suffix= ac_dots=
7298 fi
7299
7300 case "$ac_given_srcdir" in
7301 .) srcdir=.
7302 if test -z "$ac_dots"; then top_srcdir=.
7303 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7304 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7305 *) # Relative path.
7306 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7307 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7308 esac
7309
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007310 case "$ac_given_INSTALL" in
7311 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7312 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7313 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007314
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007315 echo creating "$ac_file"
7316 rm -f "$ac_file"
7317 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7318 case "$ac_file" in
7319 *Makefile*) ac_comsub="1i\\
7320# $configure_input" ;;
7321 *) ac_comsub= ;;
7322 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007323
7324 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 +00007325 sed -e "$ac_comsub
7326s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007327s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007328s%@top_srcdir@%$top_srcdir%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007329s%@INSTALL@%$INSTALL%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00007330" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00007331fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00007332rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007333
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007334# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7335# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007336#
7337# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007338ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7339ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007340ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007341ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007342# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007343ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7344ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007345ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007346ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007347# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007348ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7349ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007350ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007351ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007352
Guido van Rossumf78abae1997-01-21 22:02:36 +00007353if test "${CONFIG_HEADERS+set}" != set; then
7354EOF
7355cat >> $CONFIG_STATUS <<EOF
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007356 CONFIG_HEADERS="pyconfig.h"
Guido van Rossumf78abae1997-01-21 22:02:36 +00007357EOF
7358cat >> $CONFIG_STATUS <<\EOF
7359fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007360for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007361 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007362 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007363 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007364 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7365 *) ac_file_in="${ac_file}.in" ;;
7366 esac
7367
Guido van Rossum7f43da71994-08-01 12:15:30 +00007368 echo creating $ac_file
7369
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007370 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00007371 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7372 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007373
7374EOF
7375
7376# Transform confdefs.h into a sed script conftest.vals that substitutes
7377# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007378# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007379# Protect against being in an unquoted here document in config.status.
7380rm -f conftest.vals
7381cat > conftest.hdr <<\EOF
7382s/[\\&%]/\\&/g
7383s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007384s%#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 +00007385s%ac_d%ac_u%gp
7386s%ac_u%ac_e%gp
7387EOF
7388sed -n -f conftest.hdr confdefs.h > conftest.vals
7389rm -f conftest.hdr
7390
7391# This sed command replaces #undef with comments. This is necessary, for
7392# example, in the case of _POSIX_SOURCE, which is predefined and required
7393# on some systems where configure will not decide to define it.
7394cat >> conftest.vals <<\EOF
7395s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7396EOF
7397
7398# Break up conftest.vals because some shells have a limit on
7399# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007400
7401rm -f conftest.tail
7402while :
7403do
7404 ac_lines=`grep -c . conftest.vals`
7405 # grep -c gives empty output for an empty file on some AIX systems.
7406 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7407 # Write a limited-size here document to conftest.frag.
7408 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7409 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7410 echo 'CEOF
7411 sed -f conftest.frag conftest.in > conftest.out
7412 rm -f conftest.in
7413 mv conftest.out conftest.in
7414' >> $CONFIG_STATUS
7415 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7416 rm -f conftest.vals
7417 mv conftest.tail conftest.vals
7418done
7419rm -f conftest.vals
7420
7421cat >> $CONFIG_STATUS <<\EOF
7422 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00007423 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007424 cat conftest.in >> conftest.h
7425 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00007426 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00007427 echo "$ac_file is unchanged"
7428 rm -f conftest.h
7429 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007430 # Remove last slash and all that follows it. Not all systems have dirname.
7431 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7432 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7433 # The file is in a subdirectory.
7434 test ! -d "$ac_dir" && mkdir "$ac_dir"
7435 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00007436 rm -f $ac_file
7437 mv conftest.h $ac_file
7438 fi
7439fi; done
7440
Guido van Rossumf78abae1997-01-21 22:02:36 +00007441EOF
7442cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007443
Guido van Rossumf78abae1997-01-21 22:02:36 +00007444EOF
7445cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007446
7447exit 0
7448EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007449chmod +x $CONFIG_STATUS
7450rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007451test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00007452
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007453
7454echo "creating Setup"
7455if test ! -f Modules/Setup
7456then
7457 cp $srcdir/Modules/Setup.dist Modules/Setup
7458fi
7459
7460echo "creating Setup.local"
7461if test ! -f Modules/Setup.local
7462then
7463 echo "# Edit this file for local setup changes" >Modules/Setup.local
7464fi
7465
7466echo "creating Makefile"
7467$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
7468 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00007469 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007470mv config.c Modules