blob: 6c9ea9f11122c9d2260233dc904875a52875c131 [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öwis36546db2001-09-05 14:24:43 +00003# From configure.in Revision: 1.251
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
Jack Jansene578a632001-08-15 01:27:14 +000017 --enable-framework[=INSTALLDIR] Build (MacOSX|Darwin) framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000018ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000019 --without-gcc never use gcc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000021 --with-cxx=<compiler> enable C++ support"
Guido van Rossum95012191999-12-16 17:50:52 +000022ac_help="$ac_help
Neil Schemenauerdfb38e42001-01-27 06:57:08 +000023 --with-suffix=.exe set executable suffix"
24ac_help="$ac_help
Fred Drake109d9862001-07-11 06:27:56 +000025 --with-pydebug build with Py_DEBUG defined"
26ac_help="$ac_help
Jack Jansene578a632001-08-15 01:27:14 +000027 --enable-toolbox-glue disable/enable MacOSX glue code for extensions"
28ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000029 --with-libs='lib1 ...' link against additional libs"
Guido van Rossuma68acba1996-07-31 17:36:39 +000030ac_help="$ac_help
Neil Schemenauerd32c2492001-01-24 17:25:28 +000031 --with-signal-module disable/enable signal module"
32ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000033 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000034ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000035 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000036ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000037 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000038ac_help="$ac_help
Guido van Rossum9e8181b2000-09-19 00:46:46 +000039 --with-pth use GNU pth threading libraries"
40ac_help="$ac_help
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000041 --enable-ipv6 Enable ipv6 (with ipv4) support
42 --disable-ipv6 Disable ipv6 support"
43ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000044 --with(out)-cycle-gc disable/enable garbage collection"
45ac_help="$ac_help
Neil Schemenauera35c6882001-02-27 04:45:05 +000046 --with(out)-pymalloc disable/enable specialized mallocs"
47ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000048 --with-wctype-functions use wctype.h functions"
49ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000050 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000051ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000052 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000053ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000054 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000055ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000056 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000057ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000058 --with-libc=STRING C library"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000059ac_help="$ac_help
60 --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)"
Guido van Rossum627b2d71993-12-24 10:39:16 +000061
Guido van Rossum7f43da71994-08-01 12:15:30 +000062# Initialize some variables set by options.
63# The variables have the same names as the options, with
64# dashes changed to underlines.
65build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000066cache_file=./config.cache
67exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000068host=NONE
69no_create=
70nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000071no_recursion=
72prefix=NONE
73program_prefix=NONE
74program_suffix=NONE
75program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000076silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000077site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000078srcdir=
79target=NONE
80verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000081x_includes=NONE
82x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000083bindir='${exec_prefix}/bin'
84sbindir='${exec_prefix}/sbin'
85libexecdir='${exec_prefix}/libexec'
86datadir='${prefix}/share'
87sysconfdir='${prefix}/etc'
88sharedstatedir='${prefix}/com'
89localstatedir='${prefix}/var'
90libdir='${exec_prefix}/lib'
91includedir='${prefix}/include'
92oldincludedir='/usr/include'
93infodir='${prefix}/info'
94mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000095
96# Initialize some other variables.
97subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000098MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000099SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +0000100# Maximum number of lines to put in a shell here document.
101ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +0000102
103ac_prev=
104for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000105do
Guido van Rossum627b2d71993-12-24 10:39:16 +0000106
Guido van Rossum7f43da71994-08-01 12:15:30 +0000107 # If the previous option needs an argument, assign it.
108 if test -n "$ac_prev"; then
109 eval "$ac_prev=\$ac_option"
110 ac_prev=
111 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000112 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000113
Guido van Rossum7f43da71994-08-01 12:15:30 +0000114 case "$ac_option" in
115 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
116 *) ac_optarg= ;;
117 esac
118
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000119 # Accept the important Cygnus configure options, so we can diagnose typos.
120
Guido van Rossum7f43da71994-08-01 12:15:30 +0000121 case "$ac_option" in
122
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000123 -bindir | --bindir | --bindi | --bind | --bin | --bi)
124 ac_prev=bindir ;;
125 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
126 bindir="$ac_optarg" ;;
127
128 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000129 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000130 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000131 build="$ac_optarg" ;;
132
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000133 -cache-file | --cache-file | --cache-fil | --cache-fi \
134 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
135 ac_prev=cache_file ;;
136 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
137 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
138 cache_file="$ac_optarg" ;;
139
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000140 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
141 ac_prev=datadir ;;
142 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
143 | --da=*)
144 datadir="$ac_optarg" ;;
145
Guido van Rossum7f43da71994-08-01 12:15:30 +0000146 -disable-* | --disable-*)
147 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000148 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000149 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000150 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000151 fi
152 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
153 eval "enable_${ac_feature}=no" ;;
154
155 -enable-* | --enable-*)
156 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000157 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000158 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000159 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000160 fi
161 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
162 case "$ac_option" in
163 *=*) ;;
164 *) ac_optarg=yes ;;
165 esac
166 eval "enable_${ac_feature}='$ac_optarg'" ;;
167
Guido van Rossum7f43da71994-08-01 12:15:30 +0000168 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
169 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
170 | --exec | --exe | --ex)
171 ac_prev=exec_prefix ;;
172 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
173 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
174 | --exec=* | --exe=* | --ex=*)
175 exec_prefix="$ac_optarg" ;;
176
177 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000178 # Obsolete; use --with-gas.
179 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000180
181 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000182 # Omit some internal or obsolete options to make the list less imposing.
183 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000184 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000185Usage: configure [options] [host]
186Options: [defaults in brackets after descriptions]
187Configuration:
188 --cache-file=FILE cache test results in FILE
189 --help print this message
190 --no-create do not create output files
191 --quiet, --silent do not print \`checking...' messages
192 --version print the version of autoconf that created configure
193Directory and file names:
194 --prefix=PREFIX install architecture-independent files in PREFIX
195 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000196 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000197 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000198 --bindir=DIR user executables in DIR [EPREFIX/bin]
199 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
200 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
201 --datadir=DIR read-only architecture-independent data in DIR
202 [PREFIX/share]
203 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
204 --sharedstatedir=DIR modifiable architecture-independent data in DIR
205 [PREFIX/com]
206 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
207 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
208 --includedir=DIR C header files in DIR [PREFIX/include]
209 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
210 --infodir=DIR info documentation in DIR [PREFIX/info]
211 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000212 --srcdir=DIR find the sources in DIR [configure dir or ..]
213 --program-prefix=PREFIX prepend PREFIX to installed program names
214 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000215 --program-transform-name=PROGRAM
216 run sed PROGRAM on installed program names
217EOF
218 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000219Host type:
220 --build=BUILD configure for building on BUILD [BUILD=HOST]
221 --host=HOST configure for HOST [guessed]
222 --target=TARGET configure for TARGET [TARGET=HOST]
223Features and packages:
224 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
225 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
226 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
227 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
228 --x-includes=DIR X include files are in DIR
229 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000230EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000231 if test -n "$ac_help"; then
232 echo "--enable and --with options recognized:$ac_help"
233 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000234 exit 0 ;;
235
236 -host | --host | --hos | --ho)
237 ac_prev=host ;;
238 -host=* | --host=* | --hos=* | --ho=*)
239 host="$ac_optarg" ;;
240
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000241 -includedir | --includedir | --includedi | --included | --include \
242 | --includ | --inclu | --incl | --inc)
243 ac_prev=includedir ;;
244 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
245 | --includ=* | --inclu=* | --incl=* | --inc=*)
246 includedir="$ac_optarg" ;;
247
248 -infodir | --infodir | --infodi | --infod | --info | --inf)
249 ac_prev=infodir ;;
250 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
251 infodir="$ac_optarg" ;;
252
253 -libdir | --libdir | --libdi | --libd)
254 ac_prev=libdir ;;
255 -libdir=* | --libdir=* | --libdi=* | --libd=*)
256 libdir="$ac_optarg" ;;
257
258 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
259 | --libexe | --libex | --libe)
260 ac_prev=libexecdir ;;
261 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
262 | --libexe=* | --libex=* | --libe=*)
263 libexecdir="$ac_optarg" ;;
264
265 -localstatedir | --localstatedir | --localstatedi | --localstated \
266 | --localstate | --localstat | --localsta | --localst \
267 | --locals | --local | --loca | --loc | --lo)
268 ac_prev=localstatedir ;;
269 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
270 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
271 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
272 localstatedir="$ac_optarg" ;;
273
274 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
275 ac_prev=mandir ;;
276 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
277 mandir="$ac_optarg" ;;
278
Guido van Rossum7f43da71994-08-01 12:15:30 +0000279 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000280 # Obsolete; use --without-fp.
281 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000282
283 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
284 | --no-cr | --no-c)
285 no_create=yes ;;
286
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000287 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
288 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
289 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000290
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000291 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
292 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
293 | --oldin | --oldi | --old | --ol | --o)
294 ac_prev=oldincludedir ;;
295 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
296 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
297 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
298 oldincludedir="$ac_optarg" ;;
299
Guido van Rossum7f43da71994-08-01 12:15:30 +0000300 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
301 ac_prev=prefix ;;
302 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
303 prefix="$ac_optarg" ;;
304
305 -program-prefix | --program-prefix | --program-prefi | --program-pref \
306 | --program-pre | --program-pr | --program-p)
307 ac_prev=program_prefix ;;
308 -program-prefix=* | --program-prefix=* | --program-prefi=* \
309 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
310 program_prefix="$ac_optarg" ;;
311
312 -program-suffix | --program-suffix | --program-suffi | --program-suff \
313 | --program-suf | --program-su | --program-s)
314 ac_prev=program_suffix ;;
315 -program-suffix=* | --program-suffix=* | --program-suffi=* \
316 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
317 program_suffix="$ac_optarg" ;;
318
319 -program-transform-name | --program-transform-name \
320 | --program-transform-nam | --program-transform-na \
321 | --program-transform-n | --program-transform- \
322 | --program-transform | --program-transfor \
323 | --program-transfo | --program-transf \
324 | --program-trans | --program-tran \
325 | --progr-tra | --program-tr | --program-t)
326 ac_prev=program_transform_name ;;
327 -program-transform-name=* | --program-transform-name=* \
328 | --program-transform-nam=* | --program-transform-na=* \
329 | --program-transform-n=* | --program-transform-=* \
330 | --program-transform=* | --program-transfor=* \
331 | --program-transfo=* | --program-transf=* \
332 | --program-trans=* | --program-tran=* \
333 | --progr-tra=* | --program-tr=* | --program-t=*)
334 program_transform_name="$ac_optarg" ;;
335
336 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
337 | -silent | --silent | --silen | --sile | --sil)
338 silent=yes ;;
339
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000340 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
341 ac_prev=sbindir ;;
342 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
343 | --sbi=* | --sb=*)
344 sbindir="$ac_optarg" ;;
345
346 -sharedstatedir | --sharedstatedir | --sharedstatedi \
347 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
348 | --sharedst | --shareds | --shared | --share | --shar \
349 | --sha | --sh)
350 ac_prev=sharedstatedir ;;
351 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
352 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
353 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
354 | --sha=* | --sh=*)
355 sharedstatedir="$ac_optarg" ;;
356
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000357 -site | --site | --sit)
358 ac_prev=site ;;
359 -site=* | --site=* | --sit=*)
360 site="$ac_optarg" ;;
361
Guido van Rossum7f43da71994-08-01 12:15:30 +0000362 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
363 ac_prev=srcdir ;;
364 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
365 srcdir="$ac_optarg" ;;
366
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000367 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
368 | --syscon | --sysco | --sysc | --sys | --sy)
369 ac_prev=sysconfdir ;;
370 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
371 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
372 sysconfdir="$ac_optarg" ;;
373
Guido van Rossum7f43da71994-08-01 12:15:30 +0000374 -target | --target | --targe | --targ | --tar | --ta | --t)
375 ac_prev=target ;;
376 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
377 target="$ac_optarg" ;;
378
379 -v | -verbose | --verbose | --verbos | --verbo | --verb)
380 verbose=yes ;;
381
382 -version | --version | --versio | --versi | --vers)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000383 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000384 exit 0 ;;
385
386 -with-* | --with-*)
387 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000388 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000390 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000391 fi
392 ac_package=`echo $ac_package| sed 's/-/_/g'`
393 case "$ac_option" in
394 *=*) ;;
395 *) ac_optarg=yes ;;
396 esac
397 eval "with_${ac_package}='$ac_optarg'" ;;
398
399 -without-* | --without-*)
400 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000401 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000403 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000404 fi
405 ac_package=`echo $ac_package| sed 's/-/_/g'`
406 eval "with_${ac_package}=no" ;;
407
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000408 --x)
409 # Obsolete; use --with-x.
410 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
413 | --x-incl | --x-inc | --x-in | --x-i)
414 ac_prev=x_includes ;;
415 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
416 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
417 x_includes="$ac_optarg" ;;
418
419 -x-libraries | --x-libraries | --x-librarie | --x-librari \
420 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
421 ac_prev=x_libraries ;;
422 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
423 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
424 x_libraries="$ac_optarg" ;;
425
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000426 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427 ;;
428
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000429 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000430 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000431 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000432 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000433 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000434 { 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 +0000435 fi
436 nonopt="$ac_option"
437 ;;
438
439 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000440done
441
Guido van Rossum7f43da71994-08-01 12:15:30 +0000442if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000443 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000444fi
445
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000446trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000447
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000448# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000449# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000450# 1 file creation
451# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000452# 3 some systems may open it to /dev/tty
453# 4 used on the Kubota Titan
454# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000455# 5 compiler messages saved in config.log
456if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000457 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000458else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000459 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000460fi
461exec 5>./config.log
462
463echo "\
464This file contains any messages produced by compilers while
465running configure, to aid debugging if configure makes a mistake.
466" 1>&5
467
468# Strip out --no-create and --no-recursion so they do not pile up.
469# Also quote any args containing shell metacharacters.
470ac_configure_args=
471for ac_arg
472do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000473 case "$ac_arg" in
474 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
475 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000476 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
477 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
478 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
479 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
480 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000481 esac
482done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000483
484# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000485# Only set these to C if already set. These must not be set unconditionally
486# because not all systems understand e.g. LANG=C (notably SCO).
487# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
488# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000489if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000490if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
491if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
492if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000493
Guido van Rossum7f43da71994-08-01 12:15:30 +0000494# confdefs.h avoids OS command line length limits that DEFS can exceed.
495rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000496# AIX cpp loses on an empty file, so make sure it contains at least a newline.
497echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000498
499# A filename unique to this package, relative to the directory that
500# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000501ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000502
503# Find the source files, if location was not specified.
504if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000506 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000507 ac_prog=$0
508 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
509 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
510 srcdir=$ac_confdir
511 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000512 srcdir=..
513 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000514else
515 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000516fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000517if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000518 if test "$ac_srcdir_defaulted" = yes; then
519 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000520 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000521 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000522 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000523fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000524srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
525
526# Prefer explicitly selected file to automatically selected ones.
527if test -z "$CONFIG_SITE"; then
528 if test "x$prefix" != xNONE; then
529 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
530 else
531 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
532 fi
533fi
534for ac_site_file in $CONFIG_SITE; do
535 if test -r "$ac_site_file"; then
536 echo "loading site script $ac_site_file"
537 . "$ac_site_file"
538 fi
539done
540
541if test -r "$cache_file"; then
542 echo "loading cache $cache_file"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000543 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544else
545 echo "creating cache $cache_file"
546 > $cache_file
547fi
548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000550# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000551ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000552ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000553ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000554cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000555
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000556ac_exeext=
557ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000558if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
559 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
560 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
561 ac_n= ac_c='
562' ac_t=' '
563 else
564 ac_n=-n ac_c= ac_t=
565 fi
566else
567 ac_n= ac_c='\c' ac_t=
568fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000569
Guido van Rossum0a516c91994-09-12 10:58:40 +0000570
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571
Guido van Rossum627b2d71993-12-24 10:39:16 +0000572
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000573# Set VERSION so we only need to edit in one place (i.e., here)
574
Guido van Rossum6db412b2001-04-18 04:37:57 +0000575VERSION=2.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000576
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +0000577# Arguments passed to configure.
578
579CONFIG_ARGS="$ac_configure_args"
580
Guido van Rossum563e7081996-09-10 18:20:48 +0000581
Jack Jansene578a632001-08-15 01:27:14 +0000582# Check whether --enable-framework or --disable-framework was given.
583if test "${enable_framework+set}" = set; then
584 enableval="$enable_framework"
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000585
Jack Jansene578a632001-08-15 01:27:14 +0000586 PYTHONFRAMEWORK=Python
587 PYTHONFRAMEWORKDIR=Python.framework
588 case $enableval in
589 yes)
590 enableval=/Library/Frameworks
591 PYTHONFRAMEWORKPREFIX=$enableval
592 ;;
593 *)
594 PYTHONFRAMEWORKPREFIX=$enableval
595 esac
596 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
597 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Guido van Rossum563e7081996-09-10 18:20:48 +0000598
599else
Jack Jansene578a632001-08-15 01:27:14 +0000600
601 PYTHONFRAMEWORK=
602 PYTHONFRAMEWORKDIR=
603 PYTHONFRAMEWORKPREFIX=
604 PYTHONFRAMEWORKINSTALLDIR=
605 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000606
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000607fi
608
Guido van Rossum91922671997-10-09 20:24:13 +0000609
Jack Jansene578a632001-08-15 01:27:14 +0000610
611
612
613
614##AC_ARG_WITH(dyld,
615##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
616##
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000617# Set name for machine-dependent library files
618
619echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000620echo "configure:621: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000621if test -z "$MACHDEP"
622then
Guido van Rossum563e7081996-09-10 18:20:48 +0000623 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +0000624 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000625 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000626 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000627 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000628 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000629 ac_md_system=`echo $ac_sys_system |
630 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
631 ac_md_release=`echo $ac_sys_release |
632 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000633 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000634
Guido van Rossum07397971997-04-29 21:49:50 +0000635 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000636 cygwin*) MACHDEP="cygwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +0000637 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000638 esac
639fi
Guido van Rossum91922671997-10-09 20:24:13 +0000640
641#
642# SGI compilers allow the specification of the both the ABI and the
643# ISA on the command line. Depending on the values of these switches,
644# different and often incompatable code will be generated.
645#
646# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
647# thus supply support for various ABI/ISA combinations. The MACHDEP
648# variable is also adjusted.
649#
650
651if test ! -z "$SGI_ABI"
652then
653 CC="cc $SGI_ABI"
654 LDFLAGS="$SGI_ABI $LDFLAGS"
655 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
656fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000657echo "$ac_t""$MACHDEP" 1>&6
658
Guido van Rossum627b2d71993-12-24 10:39:16 +0000659# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000660echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000661echo "configure:662: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000662# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000663if test "${with_gcc+set}" = set; then
664 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000665
666 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000667 no) CC=cc
668 without_gcc=yes;;
669 yes) CC=gcc
670 without_gcc=no;;
671 *) CC=$withval
672 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000673 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000674else
Guido van Rossume77438c1995-09-13 18:59:59 +0000675
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000676 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000677 AIX*) CC=cc_r
678 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000679 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000680 case $BE_HOST_CPU in
681 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000682 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000683 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000684 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 +0000685 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000686 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000687 ;;
688 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000689 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000690 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000691 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000692 ;;
693 *)
Fred Drake5790be12000-10-09 17:06:13 +0000694 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000695 ;;
696 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000697 AR="\$(srcdir)/Modules/ar_beos"
698 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000699 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000700 Monterey*)
701 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +0000702 without_gcc=;;
703 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000704 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000705fi
706
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000707echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000708
Guido van Rossum95012191999-12-16 17:50:52 +0000709
710
Fred Drakea1a84e72001-03-06 05:52:16 +0000711MAINOBJ=python.o
Guido van Rossum95012191999-12-16 17:50:52 +0000712echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000713echo "configure:714: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000714# Check whether --with-cxx or --without-cxx was given.
715if test "${with_cxx+set}" = set; then
716 withval="$with_cxx"
717
Martin v. Löwis22352952000-12-13 17:37:02 +0000718 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000719 case $withval in
720 no) CXX=
721 with_cxx=no;;
722 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +0000723 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +0000724 with_cxx=$withval;;
725 esac
726else
727
728 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000729 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000730
731fi
732
733echo "$ac_t""$with_cxx" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000734
735
736if test "$check_cxx" = "yes"
737then
738 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
739do
740# Extract the first word of "$ac_prog", so it can be a program name with args.
741set dummy $ac_prog; ac_word=$2
742echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000743echo "configure:744: checking for $ac_word" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000744if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
745 echo $ac_n "(cached) $ac_c" 1>&6
746else
747 if test -n "$CXX"; then
748 ac_cv_prog_CXX="$CXX" # Let the user override the test.
749else
750 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
751 ac_dummy="$PATH"
752 for ac_dir in $ac_dummy; do
753 test -z "$ac_dir" && ac_dir=.
754 if test -f $ac_dir/$ac_word; then
755 ac_cv_prog_CXX="$ac_prog"
756 break
757 fi
758 done
759 IFS="$ac_save_ifs"
760fi
761fi
762CXX="$ac_cv_prog_CXX"
763if test -n "$CXX"; then
764 echo "$ac_t""$CXX" 1>&6
765else
766 echo "$ac_t""no" 1>&6
767fi
768
769test -n "$CXX" && break
770done
771test -n "$CXX" || CXX="notfound"
772
773 if test "$CXX" = "notfound"
774 then
775 CXX=
776 else
777 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000778echo "configure:779: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000779
780ac_ext=C
781# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
782ac_cpp='$CXXCPP $CPPFLAGS'
783ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
784ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
785cross_compiling=$ac_cv_prog_cxx_cross
786
787cat > conftest.$ac_ext << EOF
788
Jack Jansene578a632001-08-15 01:27:14 +0000789#line 790 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000790#include "confdefs.h"
791
792int main(){return(0);}
793EOF
Jack Jansene578a632001-08-15 01:27:14 +0000794if { (eval echo configure:795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis22352952000-12-13 17:37:02 +0000795 ac_cv_prog_cxx_works=yes
796 # If we can't run a trivial program, we are probably using a cross compiler.
797 if (./conftest; exit) 2>/dev/null; then
798 ac_cv_prog_cxx_cross=no
799 else
800 ac_cv_prog_cxx_cross=yes
801 fi
802else
803 echo "configure: failed program was:" >&5
804 cat conftest.$ac_ext >&5
805 ac_cv_prog_cxx_works=no
806fi
807rm -fr conftest*
808ac_ext=c
809# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
810ac_cpp='$CPP $CPPFLAGS'
811ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
812ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
813cross_compiling=$ac_cv_prog_cc_cross
814
815echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
816if test $ac_cv_prog_cxx_works = no; then
817 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
818fi
819echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000820echo "configure:821: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000821echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
822cross_compiling=$ac_cv_prog_cxx_cross
823
824 fi
825fi
826
Guido van Rossum8b131c51995-03-09 14:10:13 +0000827# If the user switches compilers, we can't believe the cache
828if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
829then
830 { echo "configure: error: cached CC is different -- throw away $cache_file
831(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
832fi
833
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834# Extract the first word of "gcc", so it can be a program name with args.
835set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000836echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000837echo "configure:838: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000838if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000839 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840else
841 if test -n "$CC"; then
842 ac_cv_prog_CC="$CC" # Let the user override the test.
843else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000844 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
845 ac_dummy="$PATH"
846 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847 test -z "$ac_dir" && ac_dir=.
848 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000850 break
851 fi
852 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000854fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855fi
856CC="$ac_cv_prog_CC"
857if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000858 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000860 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000862
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863if test -z "$CC"; then
864 # Extract the first word of "cc", so it can be a program name with args.
865set dummy cc; ac_word=$2
866echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000867echo "configure:868: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000868if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000869 echo $ac_n "(cached) $ac_c" 1>&6
870else
871 if test -n "$CC"; then
872 ac_cv_prog_CC="$CC" # Let the user override the test.
873else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000874 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000876 ac_dummy="$PATH"
877 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878 test -z "$ac_dir" && ac_dir=.
879 if test -f $ac_dir/$ac_word; then
880 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
881 ac_prog_rejected=yes
882 continue
883 fi
884 ac_cv_prog_CC="cc"
885 break
886 fi
887 done
888 IFS="$ac_save_ifs"
889if test $ac_prog_rejected = yes; then
890 # We found a bogon in the path, so make sure we never use it.
891 set dummy $ac_cv_prog_CC
892 shift
893 if test $# -gt 0; then
894 # We chose a different compiler from the bogus one.
895 # However, it has the same basename, so the bogon will be chosen
896 # first if we set CC to just the basename; use the full file name.
897 shift
898 set dummy "$ac_dir/$ac_word" "$@"
899 shift
900 ac_cv_prog_CC="$@"
901 fi
902fi
903fi
904fi
905CC="$ac_cv_prog_CC"
906if test -n "$CC"; then
907 echo "$ac_t""$CC" 1>&6
908else
909 echo "$ac_t""no" 1>&6
910fi
911
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000912 if test -z "$CC"; then
913 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000914 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000915 # Extract the first word of "cl", so it can be a program name with args.
916set dummy cl; ac_word=$2
917echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000918echo "configure:919: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000919if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000920 echo $ac_n "(cached) $ac_c" 1>&6
921else
922 if test -n "$CC"; then
923 ac_cv_prog_CC="$CC" # Let the user override the test.
924else
925 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
926 ac_dummy="$PATH"
927 for ac_dir in $ac_dummy; do
928 test -z "$ac_dir" && ac_dir=.
929 if test -f $ac_dir/$ac_word; then
930 ac_cv_prog_CC="cl"
931 break
932 fi
933 done
934 IFS="$ac_save_ifs"
935fi
936fi
937CC="$ac_cv_prog_CC"
938if test -n "$CC"; then
939 echo "$ac_t""$CC" 1>&6
940else
941 echo "$ac_t""no" 1>&6
942fi
943 ;;
944 esac
945 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
947fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000949echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000950echo "configure:951: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000951
952ac_ext=c
953# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
954ac_cpp='$CPP $CPPFLAGS'
955ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000956ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000957cross_compiling=$ac_cv_prog_cc_cross
958
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000959cat > conftest.$ac_ext << EOF
960
Jack Jansene578a632001-08-15 01:27:14 +0000961#line 962 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000962#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000963
Guido van Rossumf78abae1997-01-21 22:02:36 +0000964main(){return(0);}
965EOF
Jack Jansene578a632001-08-15 01:27:14 +0000966if { (eval echo configure:967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000967 ac_cv_prog_cc_works=yes
968 # If we can't run a trivial program, we are probably using a cross compiler.
969 if (./conftest; exit) 2>/dev/null; then
970 ac_cv_prog_cc_cross=no
971 else
972 ac_cv_prog_cc_cross=yes
973 fi
974else
975 echo "configure: failed program was:" >&5
976 cat conftest.$ac_ext >&5
977 ac_cv_prog_cc_works=no
978fi
979rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000980ac_ext=c
981# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
982ac_cpp='$CPP $CPPFLAGS'
983ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
984ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
985cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000986
987echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
988if test $ac_cv_prog_cc_works = no; then
989 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
990fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000991echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000992echo "configure:993: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000993echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
994cross_compiling=$ac_cv_prog_cc_cross
995
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000996echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000997echo "configure:998: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000998if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000999 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001000else
1001 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001002#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001003 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001004#endif
1005EOF
Jack Jansene578a632001-08-15 01:27:14 +00001006if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001007 ac_cv_prog_gcc=yes
1008else
1009 ac_cv_prog_gcc=no
1010fi
1011fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001013echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001014
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001015if test $ac_cv_prog_gcc = yes; then
1016 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001017else
1018 GCC=
1019fi
1020
1021ac_test_CFLAGS="${CFLAGS+set}"
1022ac_save_CFLAGS="$CFLAGS"
1023CFLAGS=
1024echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001025echo "configure:1026: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001026if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001027 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001028else
1029 echo 'void f(){}' > conftest.c
1030if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001031 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001032else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001033 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001034fi
1035rm -f conftest*
1036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
Guido van Rossumf78abae1997-01-21 22:02:36 +00001039echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001040if test "$ac_test_CFLAGS" = set; then
1041 CFLAGS="$ac_save_CFLAGS"
1042elif test $ac_cv_prog_cc_g = yes; then
1043 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001044 CFLAGS="-g -O2"
1045 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001046 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047 fi
1048else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001049 if test "$GCC" = yes; then
1050 CFLAGS="-O2"
1051 else
1052 CFLAGS=
1053 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001054fi
1055
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001056
1057# checks for UNIX variants that set C preprocessor variables
1058echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001059echo "configure:1060: checking how to run the C preprocessor" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001060# On Suns, sometimes $CPP names a directory.
1061if test -n "$CPP" && test -d "$CPP"; then
1062 CPP=
1063fi
1064if test -z "$CPP"; then
1065if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1066 echo $ac_n "(cached) $ac_c" 1>&6
1067else
1068 # This must be in double quotes, not single quotes, because CPP may get
1069 # substituted into the Makefile and "${CC-cc}" will confuse make.
1070 CPP="${CC-cc} -E"
1071 # On the NeXT, cc -E runs the code through the compiler's parser,
1072 # not just through cpp.
1073 cat > conftest.$ac_ext <<EOF
Jack Jansene578a632001-08-15 01:27:14 +00001074#line 1075 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001075#include "confdefs.h"
1076#include <assert.h>
1077Syntax Error
1078EOF
1079ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansene578a632001-08-15 01:27:14 +00001080{ (eval echo configure:1081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001081ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1082if test -z "$ac_err"; then
1083 :
1084else
1085 echo "$ac_err" >&5
1086 echo "configure: failed program was:" >&5
1087 cat conftest.$ac_ext >&5
1088 rm -rf conftest*
1089 CPP="${CC-cc} -E -traditional-cpp"
1090 cat > conftest.$ac_ext <<EOF
Jack Jansene578a632001-08-15 01:27:14 +00001091#line 1092 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001092#include "confdefs.h"
1093#include <assert.h>
1094Syntax Error
1095EOF
1096ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansene578a632001-08-15 01:27:14 +00001097{ (eval echo configure:1098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001098ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1099if test -z "$ac_err"; then
1100 :
1101else
1102 echo "$ac_err" >&5
1103 echo "configure: failed program was:" >&5
1104 cat conftest.$ac_ext >&5
1105 rm -rf conftest*
1106 CPP="${CC-cc} -nologo -E"
1107 cat > conftest.$ac_ext <<EOF
Jack Jansene578a632001-08-15 01:27:14 +00001108#line 1109 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001109#include "confdefs.h"
1110#include <assert.h>
1111Syntax Error
1112EOF
1113ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansene578a632001-08-15 01:27:14 +00001114{ (eval echo configure:1115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001115ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1116if test -z "$ac_err"; then
1117 :
1118else
1119 echo "$ac_err" >&5
1120 echo "configure: failed program was:" >&5
1121 cat conftest.$ac_ext >&5
1122 rm -rf conftest*
1123 CPP=/lib/cpp
1124fi
1125rm -f conftest*
1126fi
1127rm -f conftest*
1128fi
1129rm -f conftest*
1130 ac_cv_prog_CPP="$CPP"
1131fi
1132 CPP="$ac_cv_prog_CPP"
1133else
1134 ac_cv_prog_CPP="$CPP"
1135fi
1136echo "$ac_t""$CPP" 1>&6
1137
1138echo $ac_n "checking for AIX""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001139echo "configure:1140: checking for AIX" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001140cat > conftest.$ac_ext <<EOF
Jack Jansene578a632001-08-15 01:27:14 +00001141#line 1142 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001142#include "confdefs.h"
1143#ifdef _AIX
1144 yes
1145#endif
1146
1147EOF
1148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1149 egrep "yes" >/dev/null 2>&1; then
1150 rm -rf conftest*
1151 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1152#define _ALL_SOURCE 1
1153EOF
1154
1155else
1156 rm -rf conftest*
1157 echo "$ac_t""no" 1>&6
1158fi
1159rm -f conftest*
1160
1161
1162ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1163echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001164echo "configure:1165: checking for minix/config.h" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001165if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1166 echo $ac_n "(cached) $ac_c" 1>&6
1167else
1168 cat > conftest.$ac_ext <<EOF
Jack Jansene578a632001-08-15 01:27:14 +00001169#line 1170 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001170#include "confdefs.h"
1171#include <minix/config.h>
1172EOF
1173ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansene578a632001-08-15 01:27:14 +00001174{ (eval echo configure:1175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001175ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1176if test -z "$ac_err"; then
1177 rm -rf conftest*
1178 eval "ac_cv_header_$ac_safe=yes"
1179else
1180 echo "$ac_err" >&5
1181 echo "configure: failed program was:" >&5
1182 cat conftest.$ac_ext >&5
1183 rm -rf conftest*
1184 eval "ac_cv_header_$ac_safe=no"
1185fi
1186rm -f conftest*
1187fi
1188if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1189 echo "$ac_t""yes" 1>&6
1190 MINIX=yes
1191else
1192 echo "$ac_t""no" 1>&6
1193MINIX=
1194fi
1195
1196if test "$MINIX" = yes; then
1197 cat >> confdefs.h <<\EOF
1198#define _POSIX_SOURCE 1
1199EOF
1200
1201 cat >> confdefs.h <<\EOF
1202#define _POSIX_1_SOURCE 2
1203EOF
1204
1205 cat >> confdefs.h <<\EOF
1206#define _MINIX 1
1207EOF
1208
1209fi
1210
1211
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001212echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001213echo "configure:1214: checking for Cygwin environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001214if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1215 echo $ac_n "(cached) $ac_c" 1>&6
1216else
1217 cat > conftest.$ac_ext <<EOF
Jack Jansene578a632001-08-15 01:27:14 +00001218#line 1219 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001219#include "confdefs.h"
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001220
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001221int main() {
1222
1223#ifndef __CYGWIN__
1224#define __CYGWIN__ __CYGWIN32__
1225#endif
1226return __CYGWIN__;
1227; return 0; }
1228EOF
Jack Jansene578a632001-08-15 01:27:14 +00001229if { (eval echo configure:1230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001230 rm -rf conftest*
1231 ac_cv_cygwin=yes
1232else
1233 echo "configure: failed program was:" >&5
1234 cat conftest.$ac_ext >&5
1235 rm -rf conftest*
1236 ac_cv_cygwin=no
1237fi
1238rm -f conftest*
1239rm -f conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001240fi
1241
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001242echo "$ac_t""$ac_cv_cygwin" 1>&6
1243CYGWIN=
1244test "$ac_cv_cygwin" = yes && CYGWIN=yes
1245echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001246echo "configure:1247: checking for mingw32 environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001247if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1248 echo $ac_n "(cached) $ac_c" 1>&6
1249else
1250 cat > conftest.$ac_ext <<EOF
Jack Jansene578a632001-08-15 01:27:14 +00001251#line 1252 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001252#include "confdefs.h"
1253
1254int main() {
1255return __MINGW32__;
1256; return 0; }
1257EOF
Jack Jansene578a632001-08-15 01:27:14 +00001258if { (eval echo configure:1259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001259 rm -rf conftest*
1260 ac_cv_mingw32=yes
1261else
1262 echo "configure: failed program was:" >&5
1263 cat conftest.$ac_ext >&5
1264 rm -rf conftest*
1265 ac_cv_mingw32=no
1266fi
1267rm -f conftest*
1268rm -f conftest*
1269fi
1270
1271echo "$ac_t""$ac_cv_mingw32" 1>&6
1272MINGW32=
1273test "$ac_cv_mingw32" = yes && MINGW32=yes
1274
1275
1276echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001277echo "configure:1278: checking for executable suffix" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001278if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1279 echo $ac_n "(cached) $ac_c" 1>&6
1280else
1281 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1282 ac_cv_exeext=.exe
1283else
1284 rm -f conftest*
1285 echo 'int main () { return 0; }' > conftest.$ac_ext
1286 ac_cv_exeext=
Jack Jansene578a632001-08-15 01:27:14 +00001287 if { (eval echo configure:1288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001288 for file in conftest.*; do
1289 case $file in
1290 *.c | *.o | *.obj) ;;
1291 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1292 esac
1293 done
1294 else
1295 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1296 fi
1297 rm -f conftest*
1298 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1299fi
1300fi
1301
1302EXEEXT=""
1303test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1304echo "$ac_t""${ac_cv_exeext}" 1>&6
1305ac_exeext=$EXEEXT
1306
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001307echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001308echo "configure:1309: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001309# Check whether --with-suffix or --without-suffix was given.
1310if test "${with_suffix+set}" = set; then
1311 withval="$with_suffix"
1312
1313 case $withval in
1314 no) EXEEXT=;;
1315 yes) EXEEXT=.exe;;
1316 *) EXEEXT=$withval;;
1317 esac
1318fi
1319
1320echo "$ac_t""$EXEEXT" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001321# Test whether we're running on a non-case-sensitive system, in which
1322# case we give a warning if no ext is given
1323if test -d "python" -a -z "$EXEEXT"
1324then
1325 echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2
1326fi
Guido van Rossumff555e32000-09-22 15:38:21 +00001327
Guido van Rossumdd997f71998-10-07 19:58:26 +00001328case $MACHDEP in
1329bsdos*)
1330 case $CC in
1331 gcc) CC="$CC -D_HAVE_BSDI";;
1332 esac;;
1333esac
1334
Guido van Rossum24b1e751997-08-21 02:29:16 +00001335case $ac_sys_system in
1336hp*|HP*)
1337 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001338 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001339 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001340Monterey*)
1341 case $CC in
1342 cc) CC="$CC -Wl,-Bexport";;
1343 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001344SunOS*)
1345 # Some functions have a prototype only with that define, e.g. confstr
1346 cat >> confdefs.h <<\EOF
1347#define __EXTENSIONS__ 1
1348EOF
1349
1350 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001351esac
1352
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001353
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001354
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001355echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001356echo "configure:1357: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001357if test -z "$LIBRARY"
1358then
1359 LIBRARY='libpython$(VERSION).a'
1360fi
1361echo "$ac_t""$LIBRARY" 1>&6
1362
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001363# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00001364# name of the library into which to insert object files). BLDLIBRARY is also
1365# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
1366# is blank as the main program is not linked directly against LDLIBRARY.
1367# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
1368# systems without shared libraries, LDLIBRARY is the same as LIBRARY
1369# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
1370# DLLLIBRARY is the shared (i.e., DLL) library.
1371#
1372
1373
Guido van Rossumaef734b2001-01-10 21:09:12 +00001374
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001375
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001376LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00001377BLDLIBRARY='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00001378DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00001379LDLIBRARYDIR=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001380
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001381# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001382# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001383# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001384
1385echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001386echo "configure:1387: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001387if test -z "$LINKCC"
1388then
1389 case $ac_sys_system in
1390 AIX*)
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001391 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001392 dgux*)
1393 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001394 Monterey64*)
1395 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001396 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001397 esac
1398fi
1399echo "$ac_t""$LINKCC" 1>&6
1400
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001401echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001402echo "configure:1403: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001403
1404# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001405case $MACHDEP in
1406dguxR4)
1407 LDLIBRARY='libpython$(VERSION).so'
1408 OPT="$OPT -pic"
1409 ;;
1410beos*)
1411 LDLIBRARY='libpython$(VERSION).so'
1412 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001413cygwin*)
1414 LDLIBRARY='libpython$(VERSION).dll.a'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001415 DLLLIBRARY='libpython$(VERSION).dll'
Guido van Rossumaef734b2001-01-10 21:09:12 +00001416 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001417esac
Jack Jansene578a632001-08-15 01:27:14 +00001418
1419# MacOSX framework builds need more magic. LDLIBRARY is the dynamic library that
1420# we build, but we do not want to link against it (we will find it with a -framework
1421# option). For this reason there is an extra variable BLDLIBRARY against which Python
1422# and the extension modules are linked, BLDLIBRARY. This is normally the same
1423# as LDLIBRARY, but empty for MacOSX framework builds.
1424if test "$enable_framework"
1425then
1426 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
1427 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
1428 BLDLIBRARY=''
1429else
1430 BLDLIBRARY='$(LDLIBRARY)'
1431fi
1432
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 \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00001889ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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öwisa5f8bb52001-09-05 08:22:34 +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
Jack Jansene578a632001-08-15 01:27:14 +00002911echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00002912echo "configure:2913: checking for --enable-toolbox-glue" >&5
Jack Jansene578a632001-08-15 01:27:14 +00002913# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
2914if test "${enable_toolbox_glue+set}" = set; then
2915 enableval="$enable_toolbox_glue"
2916 :
2917fi
2918
2919
2920if test -z "$enable_toolbox_glue"
2921then
2922 case $ac_sys_system/$ac_sys_release in
2923 Darwin/*)
2924 enable_toolbox_glue="yes";;
2925 *)
2926 enable_toolbox_glue="no";;
2927 esac
2928fi
2929case "$enable_toolbox_glue" in
2930yes)
2931 extra_frameworks="-framework Carbon -framework Foundation"
2932 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00002933 extra_undefs="-u __dummy -u _PyMac_Error"
Jack Jansene578a632001-08-15 01:27:14 +00002934 cat >> confdefs.h <<\EOF
2935#define USE_TOOLBOX_OBJECT_GLUE 1
2936EOF
2937
2938 ;;
2939*)
2940 extra_frameworks=""
2941 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00002942 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00002943 ;;
2944esac
2945echo "$ac_t""$enable_toolbox_glue" 1>&6
2946
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002947
2948case $ac_sys_system/$ac_sys_release in
Guido van Rossum5839e582000-10-09 19:52:35 +00002949 Darwin/*)
2950 ns_undef_sym='_environ'
Jack Jansene578a632001-08-15 01:27:14 +00002951 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
2952 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
2953 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
2954 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002955esac
2956
Jack Jansene578a632001-08-15 01:27:14 +00002957echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00002958echo "configure:2959: checking for --enable-framework" >&5
Jack Jansene578a632001-08-15 01:27:14 +00002959if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002960then
Jack Jansenca06bc62001-08-03 15:32:23 +00002961 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002962 # -U __environ is needed since bundles don't have access
2963 # to crt0 when built but will always be linked against it
Jack Jansene578a632001-08-15 01:27:14 +00002964 # -F. is needed to allow linking to the framework while
2965 # in the build location.
2966
2967 LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002968 cat >> confdefs.h <<\EOF
2969#define WITH_NEXT_FRAMEWORK 1
2970EOF
2971
2972 echo "$ac_t""yes" 1>&6
2973else
2974 echo "$ac_t""no" 1>&6
2975fi
2976
Jack Jansene578a632001-08-15 01:27:14 +00002977echo $ac_n "checking for dyld""... $ac_c" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00002978echo "configure:2979: checking for dyld" >&5
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002979case $ac_sys_system/$ac_sys_release in
2980 Darwin/*)
2981 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002982#define WITH_DYLD 1
2983EOF
2984
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002985 echo "$ac_t""always on for Darwin" 1>&6
2986 ;;
2987 *)
Jack Jansene578a632001-08-15 01:27:14 +00002988 echo "$ac_t""no" 1>&6
2989 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002990esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002991
Guido van Rossum0a516c91994-09-12 10:58:40 +00002992# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002993
2994
2995
2996
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002997
Guido van Rossum0a516c91994-09-12 10:58:40 +00002998# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00002999# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003000echo $ac_n "checking SO""... $ac_c" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00003001echo "configure:3002: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003002if test -z "$SO"
3003then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003004 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003005 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003006 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003007 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003008 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003009fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003010echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003011# LDSHARED is the ld *command* used to create shared library
3012# -- "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 +00003013# (Shared libraries in this instance are shared modules to be loaded into
3014# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003015echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00003016echo "configure:3017: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003017if test -z "$LDSHARED"
3018then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003019 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003020 AIX*)
3021 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
3022 LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp"
3023 ;;
3024 BeOS*)
3025 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
3026 LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
3027 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003028 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003029 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003030 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00003031 SunOS/5*)
3032 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003033 then LDSHARED='$(CC) -shared'
Greg Ward57c9a6632000-05-26 12:22:54 +00003034 else LDSHARED="ld -G";
3035 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003036 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003037 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3038 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansene578a632001-08-15 01:27:14 +00003039 Darwin/*)
3040 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3041 if test "$enable_framework" ; then
3042 # Link against the framework. All externals should be defined.
3043 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3044 else
3045 # No framework. Ignore undefined symbols, assuming they come from Python
3046 LDSHARED="$LDSHARED -undefined suppress"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003047 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00003048 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003049 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003050 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003051 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003052 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003053 then
3054 LDSHARED="cc -shared ${LDFLAGS}"
3055 else
3056 LDSHARED="ld -Bshareable ${LDFLAGS}"
3057 fi;;
Martin v. Löwisbec19582001-03-21 15:57:54 +00003058 UnixWare*)
3059 if test "$GCC" = "yes"
3060 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003061 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003062 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003063 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003064 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003065 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003066 *) LDSHARED="ld";;
3067 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003068fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003069echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003070BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003071# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003072# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003073echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003074echo "configure:3075: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003075if test -z "$CCSHARED"
3076then
Guido van Rossum07397971997-04-29 21:49:50 +00003077 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003078 SunOS*) if test "$GCC" = yes;
3079 then CCSHARED="-fPIC";
3080 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003081 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00003082 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00003083 else CCSHARED="+z";
3084 fi;;
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003085 Linux*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003086 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003087 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwisbec19582001-03-21 15:57:54 +00003088 UnixWare*)
3089 if test "$GCC" = "yes"
3090 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003091 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003092 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003093 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003094 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003095 IRIX*/6*) case $CC in
3096 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003097 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003098 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003099 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003100 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003101fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003102echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003103# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003104# the python executable -- this is only needed for a few systems
3105echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003106echo "configure:3107: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003107if test -z "$LINKFORSHARED"
3108then
Guido van Rossum07397971997-04-29 21:49:50 +00003109 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003110 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003111 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00003112 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003113 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00003114 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003115 # -u libsys_s pulls in all symbols in libsys
Jack Jansene578a632001-08-15 01:27:14 +00003116 Darwin/*)
3117 # -u __dummy makes the linker aware of the objc runtime
3118 # in System.framework; otherwise, __objcInit (referenced in
3119 # crt1.o) gets erroneously defined as common, which breaks dynamic
3120 # loading of any modules which reference it in System.framework.
3121 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
3122 # not used by the core itself but which needs to be in the core so
3123 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00003124 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00003125 if test "$enable_framework"
3126 then
3127 LINKFORSHARED="$LINKFORSHARED -framework Python"
3128 fi
3129 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003130 UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003131 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003132 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003133 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003134 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3135 then
3136 LINKFORSHARED="-Wl,--export-dynamic"
3137 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003138 SunOS/5*) case $CC in
3139 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003140 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003141 then
3142 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003143 fi;;
3144 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003145 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003146fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003147echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003148
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003149
3150echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003151echo "configure:3152: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003152if test ! "$LIBRARY" = "$LDLIBRARY"
3153then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003154 case $ac_sys_system in
3155 CYGWIN*)
3156 # Cygwin needs CCSHARED when building extension DLLs
3157 # but not when building the interpreter DLL.
3158 CFLAGSFORSHARED='';;
3159 *)
3160 CFLAGSFORSHARED='$(CCSHARED)'
3161 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003162fi
3163echo "$ac_t""$CFLAGSFORSHARED" 1>&6
3164
Guido van Rossum627b2d71993-12-24 10:39:16 +00003165# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00003166echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003167echo "configure:3168: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003168ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003169if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003170 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003171else
3172 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003173LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003174cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003175#line 3176 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003176#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003177/* Override any gcc2 internal prototype to avoid an error. */
3178/* We use char because int might match the return type of a gcc2
3179 builtin and then its argument prototype would still apply. */
3180char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003181
Guido van Rossumf78abae1997-01-21 22:02:36 +00003182int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003183dlopen()
3184; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003185EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003186if { (eval echo configure:3187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003187 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003188 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003189else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003190 echo "configure: failed program was:" >&5
3191 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003192 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003193 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003194fi
3195rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003196LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003197
Guido van Rossum627b2d71993-12-24 10:39:16 +00003198fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003199if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003200 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003201 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3202 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003203 cat >> confdefs.h <<EOF
3204#define $ac_tr_lib 1
3205EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003206
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003207 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003208
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003209else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003210 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003211fi
3212 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00003213echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003214echo "configure:3215: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003215ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003216if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003217 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003218else
3219 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003220LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003221cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003222#line 3223 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003223#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003224/* Override any gcc2 internal prototype to avoid an error. */
3225/* We use char because int might match the return type of a gcc2
3226 builtin and then its argument prototype would still apply. */
3227char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003228
Guido van Rossumf78abae1997-01-21 22:02:36 +00003229int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003230shl_load()
3231; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003232EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003233if { (eval echo configure:3234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003234 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003235 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003236else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003237 echo "configure: failed program was:" >&5
3238 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003239 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003240 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003241fi
3242rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003243LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003244
Guido van Rossum627b2d71993-12-24 10:39:16 +00003245fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003246if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003247 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003248 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3249 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003250 cat >> confdefs.h <<EOF
3251#define $ac_tr_lib 1
3252EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003253
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003254 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003255
3256else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003257 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003258fi
3259 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003260
3261# checks for system dependent C++ extensions support
3262case "$ac_sys_system" in
3263 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003264echo "configure:3265: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003265 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003266#line 3267 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003267#include "confdefs.h"
3268#include "/usr/lpp/xlC/include/load.h"
3269int main() {
3270loadAndInit("", 0, "")
3271; return 0; }
3272EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003273if { (eval echo configure:3274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003274 rm -rf conftest*
3275 cat >> confdefs.h <<\EOF
3276#define AIX_GENUINE_CPLUSPLUS 1
3277EOF
3278
3279 echo "$ac_t""yes" 1>&6
3280else
3281 echo "configure: failed program was:" >&5
3282 cat conftest.$ac_ext >&5
3283 rm -rf conftest*
3284 echo "$ac_t""no" 1>&6
3285fi
3286rm -f conftest*;;
3287 *) ;;
3288esac
3289
Guido van Rossum70c7f481998-03-26 18:44:10 +00003290# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3291# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003292# BeOS' sockets are stashed in libnet.
3293case "$ac_sys_system" in
3294IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003295*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003296echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003297echo "configure:3298: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003298ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003299if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003300 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003301else
3302 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003303LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003304cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003305#line 3306 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003306#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003307/* Override any gcc2 internal prototype to avoid an error. */
3308/* We use char because int might match the return type of a gcc2
3309 builtin and then its argument prototype would still apply. */
3310char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003311
Guido van Rossumf78abae1997-01-21 22:02:36 +00003312int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003313t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003314; return 0; }
3315EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003316if { (eval echo configure:3317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003317 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003318 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003319else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003320 echo "configure: failed program was:" >&5
3321 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003322 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003323 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003324fi
3325rm -f conftest*
3326LIBS="$ac_save_LIBS"
3327
3328fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003329if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003330 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003331 LIBS="-lnsl $LIBS"
3332else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003333 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003334fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003335 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003336echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003337echo "configure:3338: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003338ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003339if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003340 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003341else
3342 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003343LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003344cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003345#line 3346 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003346#include "confdefs.h"
3347/* Override any gcc2 internal prototype to avoid an error. */
3348/* We use char because int might match the return type of a gcc2
3349 builtin and then its argument prototype would still apply. */
3350char socket();
3351
3352int main() {
3353socket()
3354; return 0; }
3355EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003356if { (eval echo configure:3357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003357 rm -rf conftest*
3358 eval "ac_cv_lib_$ac_lib_var=yes"
3359else
3360 echo "configure: failed program was:" >&5
3361 cat conftest.$ac_ext >&5
3362 rm -rf conftest*
3363 eval "ac_cv_lib_$ac_lib_var=no"
3364fi
3365rm -f conftest*
3366LIBS="$ac_save_LIBS"
3367
3368fi
3369if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3370 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003371 LIBS="-lsocket $LIBS"
3372else
3373 echo "$ac_t""no" 1>&6
3374fi
3375 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003376;;
3377esac
3378case "$ac_sys_system" in
3379BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003380echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003381echo "configure:3382: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003382ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003383if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003384 echo $ac_n "(cached) $ac_c" 1>&6
3385else
3386 ac_save_LIBS="$LIBS"
3387LIBS="-lnet $LIBS $LIBS"
3388cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003389#line 3390 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003390#include "confdefs.h"
3391/* Override any gcc2 internal prototype to avoid an error. */
3392/* We use char because int might match the return type of a gcc2
3393 builtin and then its argument prototype would still apply. */
3394char socket();
3395
3396int main() {
3397socket()
3398; return 0; }
3399EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003400if { (eval echo configure:3401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003401 rm -rf conftest*
3402 eval "ac_cv_lib_$ac_lib_var=yes"
3403else
3404 echo "configure: failed program was:" >&5
3405 cat conftest.$ac_ext >&5
3406 rm -rf conftest*
3407 eval "ac_cv_lib_$ac_lib_var=no"
3408fi
3409rm -f conftest*
3410LIBS="$ac_save_LIBS"
3411
3412fi
3413if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3414 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003415 LIBS="-lnet $LIBS"
3416else
3417 echo "$ac_t""no" 1>&6
3418fi
3419 # BeOS
3420;;
3421esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003422
Guido van Rossuma68acba1996-07-31 17:36:39 +00003423echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003424echo "configure:3425: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003425# Check whether --with-libs or --without-libs was given.
3426if test "${with_libs+set}" = set; then
3427 withval="$with_libs"
3428
3429echo "$ac_t""$withval" 1>&6
3430LIBS="$withval $LIBS"
3431
3432else
3433 echo "$ac_t""no" 1>&6
3434fi
3435
Guido van Rossum7f43da71994-08-01 12:15:30 +00003436
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003437# Determine if signalmodule should be used.
3438
3439
3440echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003441echo "configure:3442: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003442# Check whether --with-signal-module or --without-signal-module was given.
3443if test "${with_signal_module+set}" = set; then
3444 withval="$with_signal_module"
3445 :
3446fi
3447
3448
3449if test -z "$with_signal_module"
3450then with_signal_module="yes"
3451fi
3452echo "$ac_t""$with_signal_module" 1>&6
3453
3454if test "${with_signal_module}" = "yes"; then
3455 USE_SIGNAL_MODULE=""
3456 SIGNAL_OBJS=""
3457else
3458 USE_SIGNAL_MODULE="#"
3459 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3460fi
3461
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003462# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003463
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003464USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003465
Guido van Rossumec2f0731997-01-22 20:54:01 +00003466echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003467echo "configure:3468: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003468
3469# Check whether --with-dec-threads or --without-dec-threads was given.
3470if test "${with_dec_threads+set}" = set; then
3471 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003472
3473echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003474LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003475if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003476 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003477fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003478else
3479 echo "$ac_t""no" 1>&6
3480fi
3481
3482
3483echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003484echo "configure:3485: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003485# Check whether --with-threads or --without-threads was given.
3486if test "${with_threads+set}" = set; then
3487 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003488 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003489fi
3490
3491
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003492# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003493# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003494if test "${with_thread+set}" = set; then
3495 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003496
3497with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003498fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003499
3500
3501if test -z "$with_threads"
3502then with_threads="yes"
3503fi
3504echo "$ac_t""$with_threads" 1>&6
3505
3506if test "$with_threads" = "no"
3507then
3508 USE_THREAD_MODULE="#"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003509elif test "$ac_cv_kpthread" = "yes"
3510then
3511 CC="$CC -Kpthread"
3512 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003513#define WITH_THREAD 1
3514EOF
3515
Martin v. Löwis130fb172001-07-19 11:00:41 +00003516 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003517#define _POSIX_THREADS 1
3518EOF
3519
Martin v. Löwis130fb172001-07-19 11:00:41 +00003520 LIBOBJS="$LIBOBJS thread.o"
3521else
3522 if test ! -z "$with_threads" -a -d "$with_threads"
3523 then LDFLAGS="$LDFLAGS -L$with_threads"
3524 fi
3525 if test ! -z "$withval" -a -d "$withval"
3526 then LDFLAGS="$LDFLAGS -L$withval"
3527 fi
3528 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003529#define _REENTRANT 1
3530EOF
3531
Martin v. Löwis130fb172001-07-19 11:00:41 +00003532 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003533echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003534echo "configure:3535: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003535if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003536 echo $ac_n "(cached) $ac_c" 1>&6
3537else
3538 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003539#line 3540 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003540#include "confdefs.h"
3541#include <mach/cthreads.h>
3542EOF
3543ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis36546db2001-09-05 14:24:43 +00003544{ (eval echo configure:3545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003545ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003546if test -z "$ac_err"; then
3547 rm -rf conftest*
3548 eval "ac_cv_header_$ac_safe=yes"
3549else
3550 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003551 echo "configure: failed program was:" >&5
3552 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003553 rm -rf conftest*
3554 eval "ac_cv_header_$ac_safe=no"
3555fi
3556rm -f conftest*
3557fi
3558if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3559 echo "$ac_t""yes" 1>&6
3560 cat >> confdefs.h <<\EOF
3561#define WITH_THREAD 1
3562EOF
3563
Martin v. Löwis130fb172001-07-19 11:00:41 +00003564 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003565#define C_THREADS 1
3566EOF
3567
Martin v. Löwis130fb172001-07-19 11:00:41 +00003568 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003569else
3570 echo "$ac_t""no" 1>&6
3571
Martin v. Löwis130fb172001-07-19 11:00:41 +00003572 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003573echo "configure:3574: checking for --with-pth" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00003574 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003575if test "${with_pth+set}" = set; then
3576 withval="$with_pth"
3577
Martin v. Löwis130fb172001-07-19 11:00:41 +00003578 echo "$ac_t""$withval" 1>&6
3579 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003580#define WITH_THREAD 1
3581EOF
3582
Martin v. Löwis130fb172001-07-19 11:00:41 +00003583 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003584#define HAVE_PTH 1
3585EOF
3586
Martin v. Löwis130fb172001-07-19 11:00:41 +00003587 LIBS="-lpth $LIBS"
3588 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003589else
3590
Martin v. Löwis130fb172001-07-19 11:00:41 +00003591 echo "$ac_t""no" 1>&6
3592 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003593echo "configure:3594: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003594ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003595if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003596 echo $ac_n "(cached) $ac_c" 1>&6
3597else
3598 ac_save_LIBS="$LIBS"
3599LIBS="-lpthread $LIBS"
3600cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003601#line 3602 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003602#include "confdefs.h"
3603/* Override any gcc2 internal prototype to avoid an error. */
3604/* We use char because int might match the return type of a gcc2
3605 builtin and then its argument prototype would still apply. */
3606char pthread_create();
3607
3608int main() {
3609pthread_create()
3610; return 0; }
3611EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003612if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003613 rm -rf conftest*
3614 eval "ac_cv_lib_$ac_lib_var=yes"
3615else
3616 echo "configure: failed program was:" >&5
3617 cat conftest.$ac_ext >&5
3618 rm -rf conftest*
3619 eval "ac_cv_lib_$ac_lib_var=no"
3620fi
3621rm -f conftest*
3622LIBS="$ac_save_LIBS"
3623
3624fi
3625if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3626 echo "$ac_t""yes" 1>&6
3627 cat >> confdefs.h <<\EOF
3628#define WITH_THREAD 1
3629EOF
3630
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003631 case $ac_sys_system in
3632 Darwin*) ;;
3633 *) cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003634#define _POSIX_THREADS 1
3635EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003636;;
3637 esac
Martin v. Löwis130fb172001-07-19 11:00:41 +00003638 LIBS="-lpthread $LIBS"
3639 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003640else
3641 echo "$ac_t""no" 1>&6
3642
Martin v. Löwis130fb172001-07-19 11:00:41 +00003643 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003644echo "configure:3645: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003645if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003646 echo $ac_n "(cached) $ac_c" 1>&6
3647else
3648 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003649#line 3650 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003650#include "confdefs.h"
3651/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003652 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003653#include <assert.h>
3654/* Override any gcc2 internal prototype to avoid an error. */
3655/* We use char because int might match the return type of a gcc2
3656 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003657char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003658
3659int main() {
3660
3661/* The GNU C library defines this for functions which it implements
3662 to always fail with ENOSYS. Some functions are actually named
3663 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003664#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003665choke me
3666#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003667pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003668#endif
3669
3670; return 0; }
3671EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003672if { (eval echo configure:3673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003673 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003674 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003675else
3676 echo "configure: failed program was:" >&5
3677 cat conftest.$ac_ext >&5
3678 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003679 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003680fi
3681rm -f conftest*
3682fi
3683
Guido van Rossumea516321998-12-17 18:08:55 +00003684if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003685 echo "$ac_t""yes" 1>&6
3686 cat >> confdefs.h <<\EOF
3687#define WITH_THREAD 1
3688EOF
3689
Martin v. Löwis130fb172001-07-19 11:00:41 +00003690 case $ac_sys_system in
3691 Darwin*) ;;
3692 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003693#define _POSIX_THREADS 1
3694EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003695;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003696 esac
3697 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003698else
3699 echo "$ac_t""no" 1>&6
3700
Martin v. Löwis130fb172001-07-19 11:00:41 +00003701 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003702echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003703echo "configure:3704: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003704if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003705 echo $ac_n "(cached) $ac_c" 1>&6
3706else
3707 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003708#line 3709 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003709#include "confdefs.h"
3710#include <kernel/OS.h>
3711EOF
3712ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis36546db2001-09-05 14:24:43 +00003713{ (eval echo configure:3714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003714ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003715if test -z "$ac_err"; then
3716 rm -rf conftest*
3717 eval "ac_cv_header_$ac_safe=yes"
3718else
3719 echo "$ac_err" >&5
3720 echo "configure: failed program was:" >&5
3721 cat conftest.$ac_ext >&5
3722 rm -rf conftest*
3723 eval "ac_cv_header_$ac_safe=no"
3724fi
3725rm -f conftest*
3726fi
3727if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3728 echo "$ac_t""yes" 1>&6
3729 cat >> confdefs.h <<\EOF
3730#define WITH_THREAD 1
3731EOF
3732
Martin v. Löwis130fb172001-07-19 11:00:41 +00003733 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003734#define BEOS_THREADS 1
3735EOF
3736
Martin v. Löwis130fb172001-07-19 11:00:41 +00003737 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003738else
3739 echo "$ac_t""no" 1>&6
3740
Martin v. Löwis130fb172001-07-19 11:00:41 +00003741 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003742echo "configure:3743: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003743ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003744if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003745 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003746else
3747 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003748LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003749cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003750#line 3751 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003751#include "confdefs.h"
3752/* Override any gcc2 internal prototype to avoid an error. */
3753/* We use char because int might match the return type of a gcc2
3754 builtin and then its argument prototype would still apply. */
3755char pthread_create();
3756
3757int main() {
3758pthread_create()
3759; return 0; }
3760EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003761if { (eval echo configure:3762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003762 rm -rf conftest*
3763 eval "ac_cv_lib_$ac_lib_var=yes"
3764else
3765 echo "configure: failed program was:" >&5
3766 cat conftest.$ac_ext >&5
3767 rm -rf conftest*
3768 eval "ac_cv_lib_$ac_lib_var=no"
3769fi
3770rm -f conftest*
3771LIBS="$ac_save_LIBS"
3772
3773fi
3774if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3775 echo "$ac_t""yes" 1>&6
3776 cat >> confdefs.h <<\EOF
3777#define WITH_THREAD 1
3778EOF
3779
Martin v. Löwis130fb172001-07-19 11:00:41 +00003780 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003781#define _POSIX_THREADS 1
3782EOF
3783
Martin v. Löwis130fb172001-07-19 11:00:41 +00003784 LIBS="$LIBS -lpthreads"
3785 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003786else
3787 echo "$ac_t""no" 1>&6
3788
Martin v. Löwis130fb172001-07-19 11:00:41 +00003789 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003790echo "configure:3791: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003791ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003792if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003793 echo $ac_n "(cached) $ac_c" 1>&6
3794else
3795 ac_save_LIBS="$LIBS"
3796LIBS="-lc_r $LIBS"
3797cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003798#line 3799 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003799#include "confdefs.h"
3800/* Override any gcc2 internal prototype to avoid an error. */
3801/* We use char because int might match the return type of a gcc2
3802 builtin and then its argument prototype would still apply. */
3803char pthread_create();
3804
3805int main() {
3806pthread_create()
3807; return 0; }
3808EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003809if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003810 rm -rf conftest*
3811 eval "ac_cv_lib_$ac_lib_var=yes"
3812else
3813 echo "configure: failed program was:" >&5
3814 cat conftest.$ac_ext >&5
3815 rm -rf conftest*
3816 eval "ac_cv_lib_$ac_lib_var=no"
3817fi
3818rm -f conftest*
3819LIBS="$ac_save_LIBS"
3820
3821fi
3822if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3823 echo "$ac_t""yes" 1>&6
3824 cat >> confdefs.h <<\EOF
3825#define WITH_THREAD 1
3826EOF
3827
Martin v. Löwis130fb172001-07-19 11:00:41 +00003828 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003829#define _POSIX_THREADS 1
3830EOF
3831
Martin v. Löwis130fb172001-07-19 11:00:41 +00003832 LIBS="$LIBS -lc_r"
3833 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003834else
3835 echo "$ac_t""no" 1>&6
3836
Martin v. Löwis130fb172001-07-19 11:00:41 +00003837 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003838echo "configure:3839: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003839ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003840if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003841 echo $ac_n "(cached) $ac_c" 1>&6
3842else
3843 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003844LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003845cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003846#line 3847 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003847#include "confdefs.h"
3848/* Override any gcc2 internal prototype to avoid an error. */
3849/* We use char because int might match the return type of a gcc2
3850 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003851char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003852
3853int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003854__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003855; return 0; }
3856EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003857if { (eval echo configure:3858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003858 rm -rf conftest*
3859 eval "ac_cv_lib_$ac_lib_var=yes"
3860else
3861 echo "configure: failed program was:" >&5
3862 cat conftest.$ac_ext >&5
3863 rm -rf conftest*
3864 eval "ac_cv_lib_$ac_lib_var=no"
3865fi
3866rm -f conftest*
3867LIBS="$ac_save_LIBS"
3868
3869fi
3870if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3871 echo "$ac_t""yes" 1>&6
3872 cat >> confdefs.h <<\EOF
3873#define WITH_THREAD 1
3874EOF
3875
Martin v. Löwis130fb172001-07-19 11:00:41 +00003876 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003877#define _POSIX_THREADS 1
3878EOF
3879
Martin v. Löwis130fb172001-07-19 11:00:41 +00003880 LIBS="$LIBS -lthread"
3881 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003882else
3883 echo "$ac_t""no" 1>&6
3884
Martin v. Löwis130fb172001-07-19 11:00:41 +00003885 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003886echo "configure:3887: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003887ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
3888if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3889 echo $ac_n "(cached) $ac_c" 1>&6
3890else
3891 ac_save_LIBS="$LIBS"
3892LIBS="-lpthread $LIBS"
3893cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003894#line 3895 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003895#include "confdefs.h"
3896/* Override any gcc2 internal prototype to avoid an error. */
3897/* We use char because int might match the return type of a gcc2
3898 builtin and then its argument prototype would still apply. */
3899char __pthread_create_system();
3900
3901int main() {
3902__pthread_create_system()
3903; return 0; }
3904EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003905if { (eval echo configure:3906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003906 rm -rf conftest*
3907 eval "ac_cv_lib_$ac_lib_var=yes"
3908else
3909 echo "configure: failed program was:" >&5
3910 cat conftest.$ac_ext >&5
3911 rm -rf conftest*
3912 eval "ac_cv_lib_$ac_lib_var=no"
3913fi
3914rm -f conftest*
3915LIBS="$ac_save_LIBS"
3916
3917fi
3918if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3919 echo "$ac_t""yes" 1>&6
3920 cat >> confdefs.h <<\EOF
3921#define WITH_THREAD 1
3922EOF
3923
Martin v. Löwis130fb172001-07-19 11:00:41 +00003924 cat >> confdefs.h <<\EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003925#define _POSIX_THREADS 1
3926EOF
3927
Martin v. Löwis130fb172001-07-19 11:00:41 +00003928 LIBS="$LIBS -lpthread"
3929 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003930else
3931 echo "$ac_t""no" 1>&6
3932
Martin v. Löwis130fb172001-07-19 11:00:41 +00003933 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00003934echo "configure:3935: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003935ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003936if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003937 echo $ac_n "(cached) $ac_c" 1>&6
3938else
3939 ac_save_LIBS="$LIBS"
3940LIBS="-lcma $LIBS"
3941cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003942#line 3943 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003943#include "confdefs.h"
3944/* Override any gcc2 internal prototype to avoid an error. */
3945/* We use char because int might match the return type of a gcc2
3946 builtin and then its argument prototype would still apply. */
3947char pthread_create();
3948
3949int main() {
3950pthread_create()
3951; return 0; }
3952EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00003953if { (eval echo configure:3954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003954 rm -rf conftest*
3955 eval "ac_cv_lib_$ac_lib_var=yes"
3956else
3957 echo "configure: failed program was:" >&5
3958 cat conftest.$ac_ext >&5
3959 rm -rf conftest*
3960 eval "ac_cv_lib_$ac_lib_var=no"
3961fi
3962rm -f conftest*
3963LIBS="$ac_save_LIBS"
3964
3965fi
3966if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3967 echo "$ac_t""yes" 1>&6
3968 cat >> confdefs.h <<\EOF
3969#define WITH_THREAD 1
3970EOF
3971
Martin v. Löwis130fb172001-07-19 11:00:41 +00003972 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003973#define _POSIX_THREADS 1
3974EOF
3975
Martin v. Löwis130fb172001-07-19 11:00:41 +00003976 LIBS="$LIBS -lcma"
3977 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003978else
3979 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003980
Martin v. Löwis130fb172001-07-19 11:00:41 +00003981 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003982fi
3983
Martin v. Löwis130fb172001-07-19 11:00:41 +00003984
Guido van Rossum627b2d71993-12-24 10:39:16 +00003985fi
3986
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003987fi
3988
Guido van Rossum0be3e491997-05-22 20:33:33 +00003989fi
3990
Guido van Rossum49545951997-12-02 19:28:29 +00003991fi
3992
Guido van Rossumb93a8621998-05-07 13:27:32 +00003993fi
3994
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003995fi
3996
Guido van Rossumad678af1998-10-02 14:42:15 +00003997fi
3998
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003999fi
4000
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004001fi
4002
Guido van Rossum0be3e491997-05-22 20:33:33 +00004003
Martin v. Löwis130fb172001-07-19 11:00:41 +00004004 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004005echo "configure:4006: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004006ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004007if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004008 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004009else
4010 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004011LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004012cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004013#line 4014 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004014#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004015/* Override any gcc2 internal prototype to avoid an error. */
4016/* We use char because int might match the return type of a gcc2
4017 builtin and then its argument prototype would still apply. */
4018char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004019
Guido van Rossumf78abae1997-01-21 22:02:36 +00004020int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004021usconfig()
4022; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004023EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004024if { (eval echo configure:4025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004025 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004026 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004027else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004028 echo "configure: failed program was:" >&5
4029 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004030 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004031 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004032fi
4033rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004034LIBS="$ac_save_LIBS"
4035
4036fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004037if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004038 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004039 cat >> confdefs.h <<\EOF
4040#define WITH_THREAD 1
4041EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004042
Martin v. Löwis130fb172001-07-19 11:00:41 +00004043 LIBS="$LIBS -lmpc"
4044 LIBOBJS="$LIBOBJS thread.o"
4045 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004046else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004047 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004048fi
4049
Martin v. Löwis130fb172001-07-19 11:00:41 +00004050 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004051echo "configure:4052: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004052ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004053if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004054 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004055else
4056 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004057LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004059#line 4060 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004060#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004061/* Override any gcc2 internal prototype to avoid an error. */
4062/* We use char because int might match the return type of a gcc2
4063 builtin and then its argument prototype would still apply. */
4064char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004065
Guido van Rossumf78abae1997-01-21 22:02:36 +00004066int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004067thr_create()
4068; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004069EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004070if { (eval echo configure:4071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004071 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004072 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004073else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004074 echo "configure: failed program was:" >&5
4075 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004076 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004077 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004078fi
4079rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004080LIBS="$ac_save_LIBS"
4081
4082fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004083if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004084 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004085 cat >> confdefs.h <<\EOF
4086#define WITH_THREAD 1
4087EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004088
Martin v. Löwis130fb172001-07-19 11:00:41 +00004089 LIBS="$LIBS -lthread"
4090 LIBOBJS="$LIBOBJS thread.o"
4091 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004092else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004093 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004094fi
4095
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004096
Martin v. Löwis130fb172001-07-19 11:00:41 +00004097 if test "$USE_THREAD_MODULE" != "#"
4098 then
4099 # If the above checks didn't disable threads, (at least) OSF1
4100 # needs this '-threads' argument during linking.
4101 case $ac_sys_system in
4102 OSF1) LDLAST=-threads;;
4103 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004104 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004105fi
4106
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004107# Check for enable-ipv6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004108echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004109echo "configure:4110: checking if --enable-ipv6 is specified" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004110# Check whether --enable-ipv6 or --disable-ipv6 was given.
4111if test "${enable_ipv6+set}" = set; then
4112 enableval="$enable_ipv6"
4113 case "$enableval" in
4114 no)
4115 echo "$ac_t""no" 1>&6
4116 ipv6=no
4117 ;;
4118 *) echo "$ac_t""yes" 1>&6
4119 cat >> confdefs.h <<\EOF
4120#define ENABLE_IPV6 1
4121EOF
4122
4123 ipv6=yes
4124 ;;
4125 esac
4126else
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004127
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004128 if test "$cross_compiling" = yes; then
4129 echo "$ac_t""no" 1>&6
4130 ipv6=no
4131
4132else
4133 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004134#line 4135 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004135#include "confdefs.h"
4136 /* AF_INET6 available check */
4137#include <sys/types.h>
4138#include <sys/socket.h>
4139main()
4140{
4141 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
4142 exit(1);
4143 else
4144 exit(0);
4145}
4146
4147EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004148if { (eval echo configure:4149: \"$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 +00004149then
4150 echo "$ac_t""yes" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004151 ipv6=yes
4152else
4153 echo "configure: failed program was:" >&5
4154 cat conftest.$ac_ext >&5
4155 rm -fr conftest*
4156 echo "$ac_t""no" 1>&6
4157 ipv6=no
4158fi
4159rm -fr conftest*
4160fi
4161
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004162
4163if test "$ipv6" = "yes"; then
4164 echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004165echo "configure:4166: checking if RFC2553 API is available" >&5
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004166 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004167#line 4168 "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004168#include "confdefs.h"
4169#include <sys/types.h>
4170#include <netinet/in.h>
4171int main() {
4172struct sockaddr_in6 x;
4173x.sin6_scope_id;
4174; return 0; }
4175EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004176if { (eval echo configure:4177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004177 rm -rf conftest*
4178 echo "$ac_t""yes" 1>&6
4179 ipv6=yes
4180else
4181 echo "configure: failed program was:" >&5
4182 cat conftest.$ac_ext >&5
4183 rm -rf conftest*
4184 echo "$ac_t""no" 1>&6
4185 ipv6=no
4186fi
4187rm -f conftest*
4188fi
4189
4190if test "$ipv6" = "yes"; then
4191 cat >> confdefs.h <<\EOF
4192#define ENABLE_IPV6 1
4193EOF
4194
4195fi
4196
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004197fi
4198
4199
4200ipv6type=unknown
4201ipv6lib=none
4202ipv6trylibc=no
4203
4204if test "$ipv6" = "yes"; then
4205 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004206echo "configure:4207: checking ipv6 stack type" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004207 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; do
4208 case $i in
4209 inria)
4210 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004211#line 4212 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004212#include "confdefs.h"
4213dnl
4214#include <netinet/in.h>
4215#ifdef IPV6_INRIA_VERSION
4216yes
4217#endif
4218EOF
4219if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4220 egrep "yes" >/dev/null 2>&1; then
4221 rm -rf conftest*
4222 ipv6type=$i;
4223 OPT="-DINET6 $OPT"
4224fi
4225rm -f conftest*
4226
4227 ;;
4228 kame)
4229 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004230#line 4231 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004231#include "confdefs.h"
4232dnl
4233#include <netinet/in.h>
4234#ifdef __KAME__
4235yes
4236#endif
4237EOF
4238if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4239 egrep "yes" >/dev/null 2>&1; then
4240 rm -rf conftest*
4241 ipv6type=$i;
4242 ipv6lib=inet6
4243 ipv6libdir=/usr/local/v6/lib
4244 ipv6trylibc=yes
4245 OPT="-DINET6 $OPT"
4246fi
4247rm -f conftest*
4248
4249 ;;
4250 linux-glibc)
4251 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004252#line 4253 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004253#include "confdefs.h"
4254dnl
4255#include <features.h>
4256#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
4257yes
4258#endif
4259EOF
4260if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4261 egrep "yes" >/dev/null 2>&1; then
4262 rm -rf conftest*
4263 ipv6type=$i;
4264 ipv6trylibc=yes
4265 OPT="-DINET6 $OPT"
4266fi
4267rm -f conftest*
4268
4269 ;;
4270 linux-inet6)
4271 if test -d /usr/inet6; then
4272 ipv6type=$i
4273 ipv6lib=inet6
4274 ipv6libdir=/usr/inet6/lib
4275 OPT="-DINET6 -I/usr/inet6/include $OPT"
4276 fi
4277 ;;
4278 solaris)
4279 if test -f /etc/netconfig; then
4280 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
4281 ipv6type=$i
4282 ipv6trylibc=yes
4283 OPT="-DINET6 $OPT"
4284 fi
4285 fi
4286 ;;
4287 toshiba)
4288 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004289#line 4290 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004290#include "confdefs.h"
4291dnl
4292#include <sys/param.h>
4293#ifdef _TOSHIBA_INET6
4294yes
4295#endif
4296EOF
4297if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4298 egrep "yes" >/dev/null 2>&1; then
4299 rm -rf conftest*
4300 ipv6type=$i;
4301 ipv6lib=inet6;
4302 ipv6libdir=/usr/local/v6/lib;
4303 OPT="-DINET6 $OPT"
4304fi
4305rm -f conftest*
4306
4307 ;;
4308 v6d)
4309 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004310#line 4311 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004311#include "confdefs.h"
4312dnl
4313#include </usr/local/v6/include/sys/v6config.h>
4314#ifdef __V6D__
4315yes
4316#endif
4317EOF
4318if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4319 egrep "yes" >/dev/null 2>&1; then
4320 rm -rf conftest*
4321 ipv6type=$i;
4322 ipv6lib=v6;
4323 ipv6libdir=/usr/local/v6/lib;
4324 OPT="-I/usr/local/v6/include $OPT"
4325fi
4326rm -f conftest*
4327
4328 ;;
4329 zeta)
4330 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004331#line 4332 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004332#include "confdefs.h"
4333dnl
4334#include <sys/param.h>
4335#ifdef _ZETA_MINAMI_INET6
4336yes
4337#endif
4338EOF
4339if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4340 egrep "yes" >/dev/null 2>&1; then
4341 rm -rf conftest*
4342 ipv6type=$i;
4343 ipv6lib=inet6;
4344 ipv6libdir=/usr/local/v6/lib;
4345 OPT="-DINET6 $OPT"
4346fi
4347rm -f conftest*
4348
4349 ;;
4350 esac
4351 if test "$ipv6type" != "unknown"; then
4352 break
4353 fi
4354 done
4355 echo "$ac_t""$ipv6type" 1>&6
4356fi
4357
4358if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4359 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4360 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4361 echo "using lib$ipv6lib"
4362 else
4363 if test $ipv6trylibc = "yes"; then
4364 echo "using libc"
4365 else
4366 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4367 echo "You need to fetch lib$ipv6lib.a from appropriate"
4368 echo 'ipv6 kit and compile beforehand.'
4369 exit 1
4370 fi
4371 fi
4372fi
4373
Barry Warsawef82cd72000-06-30 16:21:01 +00004374# Check for GC support
Barry Warsawef82cd72000-06-30 16:21:01 +00004375echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004376echo "configure:4377: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004377# Check whether --with-cycle-gc or --without-cycle-gc was given.
4378if test "${with_cycle_gc+set}" = set; then
4379 withval="$with_cycle_gc"
4380 :
4381fi
4382
4383
4384if test -z "$with_cycle_gc"
4385then with_cycle_gc="yes"
4386fi
Neil Schemenauercf229462001-08-29 23:58:47 +00004387if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +00004388then
Barry Warsawef82cd72000-06-30 16:21:01 +00004389 cat >> confdefs.h <<\EOF
4390#define WITH_CYCLE_GC 1
4391EOF
4392
4393fi
4394echo "$ac_t""$with_cycle_gc" 1>&6
4395
Neil Schemenauera35c6882001-02-27 04:45:05 +00004396# Check for Python-specific malloc support
4397echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004398echo "configure:4399: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004399# Check whether --with-pymalloc or --without-pymalloc was given.
4400if test "${with_pymalloc+set}" = set; then
4401 withval="$with_pymalloc"
4402
4403if test "$withval" != no
4404then cat >> confdefs.h <<\EOF
4405#define WITH_PYMALLOC 1
4406EOF
4407 echo "$ac_t""yes" 1>&6
4408else echo "$ac_t""no" 1>&6
4409fi
4410else
4411 echo "$ac_t""no" 1>&6
4412fi
4413
4414
Barry Warsawef82cd72000-06-30 16:21:01 +00004415# Check for --with-wctype-functions
4416echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004417echo "configure:4418: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004418# Check whether --with-wctype-functions or --without-wctype-functions was given.
4419if test "${with_wctype_functions+set}" = set; then
4420 withval="$with_wctype_functions"
4421
4422if test "$withval" != no
4423then cat >> confdefs.h <<\EOF
4424#define WANT_WCTYPE_FUNCTIONS 1
4425EOF
4426 echo "$ac_t""yes" 1>&6
4427else echo "$ac_t""no" 1>&6
4428fi
4429else
4430 echo "$ac_t""no" 1>&6
4431fi
4432
4433
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004434# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004435
4436DLINCLDIR=/
4437
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004438echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004439echo "configure:4440: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004440# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004441if test "${with_sgi_dl+set}" = set; then
4442 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004443
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004444echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004445cat >> confdefs.h <<\EOF
4446#define WITH_SGI_DL 1
4447EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004448
Guido van Rossume97ee181999-12-20 21:27:22 +00004449DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004450dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004451if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004452then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004453else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004454fi
4455DLINCLDIR=${dldir}
4456LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004457else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004458 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004459fi
4460
4461
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004462echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004463echo "configure:4464: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004464# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004465if test "${with_dl_dld+set}" = set; then
4466 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004467
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004468echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004469cat >> confdefs.h <<\EOF
4470#define WITH_DL_DLD 1
4471EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004472
Guido van Rossume97ee181999-12-20 21:27:22 +00004473DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004474dldir=`echo "$withval" | sed 's/,.*//'`
4475dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004476if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004477then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004478else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004479fi
4480DLINCLDIR=${dldir}
4481LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004482else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004483 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004484fi
4485
4486
Guido van Rossume97ee181999-12-20 21:27:22 +00004487# the dlopen() function means we might want to use dynload_shlib.o. some
4488# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004489for ac_func in dlopen
4490do
4491echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004492echo "configure:4493: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004493if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004494 echo $ac_n "(cached) $ac_c" 1>&6
4495else
4496 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004497#line 4498 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004498#include "confdefs.h"
4499/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004500 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004501#include <assert.h>
4502/* Override any gcc2 internal prototype to avoid an error. */
4503/* We use char because int might match the return type of a gcc2
4504 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004505char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004506
4507int main() {
4508
4509/* The GNU C library defines this for functions which it implements
4510 to always fail with ENOSYS. Some functions are actually named
4511 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004512#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004513choke me
4514#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004515$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004516#endif
4517
4518; return 0; }
4519EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004520if { (eval echo configure:4521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004521 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004522 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004523else
4524 echo "configure: failed program was:" >&5
4525 cat conftest.$ac_ext >&5
4526 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004527 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004528fi
4529rm -f conftest*
4530fi
4531
Thomas Wouters3a584202000-08-05 23:28:51 +00004532if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004533 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004534 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4535 cat >> confdefs.h <<EOF
4536#define $ac_tr_func 1
4537EOF
4538
Guido van Rossume97ee181999-12-20 21:27:22 +00004539else
4540 echo "$ac_t""no" 1>&6
4541fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004542done
Guido van Rossume97ee181999-12-20 21:27:22 +00004543
4544
4545# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4546# loading of modules.
4547
4548echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004549echo "configure:4550: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004550if test -z "$DYNLOADFILE"
4551then
4552 case $ac_sys_system/$ac_sys_release in
4553 AIX*) DYNLOADFILE="dynload_aix.o";;
4554 BeOS*) DYNLOADFILE="dynload_beos.o";;
4555 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +00004556 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004557 *)
4558 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4559 # out any dynamic loading
4560 if test "$ac_cv_func_dlopen" = yes
4561 then DYNLOADFILE="dynload_shlib.o"
4562 else DYNLOADFILE="dynload_stub.o"
4563 fi
4564 ;;
4565 esac
4566fi
4567echo "$ac_t""$DYNLOADFILE" 1>&6
4568if test "$DYNLOADFILE" != "dynload_stub.o"
4569then
4570 cat >> confdefs.h <<\EOF
4571#define HAVE_DYNAMIC_LOADING 1
4572EOF
4573
4574fi
4575
Neil Schemenauer4e425612001-06-19 15:44:15 +00004576# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4577
4578
4579echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004580echo "configure:4581: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004581if test -z "$MACHDEP_OBJS"
4582then
Jack Jansene578a632001-08-15 01:27:14 +00004583 MACHDEP_OBJS=$extra_machdep_objs
4584else
4585 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00004586fi
Jack Jansene578a632001-08-15 01:27:14 +00004587echo "$ac_t""MACHDEP_OBJS" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004588
Guido van Rossum627b2d71993-12-24 10:39:16 +00004589# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00004590for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004591 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +00004592 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis864e9ff2001-08-04 22:32:03 +00004593 hstrerror inet_pton kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004594 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004595 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004596 select setegid seteuid setgid \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00004597 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00004598 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004599 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Woutersc2c12dc2001-07-11 14:45:34 +00004600 truncate uname waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00004601do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004602echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004603echo "configure:4604: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004604if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004605 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004606else
4607 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004608#line 4609 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004609#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004610/* System header to define __stub macros and hopefully few prototypes,
4611 which can conflict with char $ac_func(); below. */
4612#include <assert.h>
4613/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004614/* We use char because int might match the return type of a gcc2
4615 builtin and then its argument prototype would still apply. */
4616char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004617
Guido van Rossumf78abae1997-01-21 22:02:36 +00004618int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004619
Guido van Rossum627b2d71993-12-24 10:39:16 +00004620/* The GNU C library defines this for functions which it implements
4621 to always fail with ENOSYS. Some functions are actually named
4622 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004623#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004624choke me
4625#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004626$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004627#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004628
Guido van Rossum7f43da71994-08-01 12:15:30 +00004629; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004630EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004631if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004632 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004633 eval "ac_cv_func_$ac_func=yes"
4634else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004635 echo "configure: failed program was:" >&5
4636 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004637 rm -rf conftest*
4638 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004639fi
4640rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004641fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004642
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004643if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004644 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004645 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004646 cat >> confdefs.h <<EOF
4647#define $ac_tr_func 1
4648EOF
4649
4650else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004651 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004652fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004653done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004654
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004655
Fred Drake8cef4cf2000-06-28 16:40:38 +00004656# check for openpty and forkpty
4657
4658for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004659do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004660echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004661echo "configure:4662: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004662if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004663 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004664else
4665 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004666#line 4667 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004667#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004668/* System header to define __stub macros and hopefully few prototypes,
4669 which can conflict with char $ac_func(); below. */
4670#include <assert.h>
4671/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004672/* We use char because int might match the return type of a gcc2
4673 builtin and then its argument prototype would still apply. */
4674char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004675
Guido van Rossumf78abae1997-01-21 22:02:36 +00004676int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004677
Guido van Rossum627b2d71993-12-24 10:39:16 +00004678/* The GNU C library defines this for functions which it implements
4679 to always fail with ENOSYS. Some functions are actually named
4680 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004681#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004682choke me
4683#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004684$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004685#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004686
Guido van Rossum7f43da71994-08-01 12:15:30 +00004687; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004688EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004689if { (eval echo configure:4690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004690 rm -rf conftest*
4691 eval "ac_cv_func_$ac_func=yes"
4692else
4693 echo "configure: failed program was:" >&5
4694 cat conftest.$ac_ext >&5
4695 rm -rf conftest*
4696 eval "ac_cv_func_$ac_func=no"
4697fi
4698rm -f conftest*
4699fi
4700
4701if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4702 echo "$ac_t""yes" 1>&6
4703 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4704 cat >> confdefs.h <<EOF
4705#define $ac_tr_func 1
4706EOF
4707
4708else
4709 echo "$ac_t""no" 1>&6
4710echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004711echo "configure:4712: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004712ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004713if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004714 echo $ac_n "(cached) $ac_c" 1>&6
4715else
4716 ac_save_LIBS="$LIBS"
4717LIBS="-lutil $LIBS"
4718cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004719#line 4720 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004720#include "confdefs.h"
4721/* Override any gcc2 internal prototype to avoid an error. */
4722/* We use char because int might match the return type of a gcc2
4723 builtin and then its argument prototype would still apply. */
4724char openpty();
4725
4726int main() {
4727openpty()
4728; return 0; }
4729EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004730if { (eval echo configure:4731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004731 rm -rf conftest*
4732 eval "ac_cv_lib_$ac_lib_var=yes"
4733else
4734 echo "configure: failed program was:" >&5
4735 cat conftest.$ac_ext >&5
4736 rm -rf conftest*
4737 eval "ac_cv_lib_$ac_lib_var=no"
4738fi
4739rm -f conftest*
4740LIBS="$ac_save_LIBS"
4741
4742fi
4743if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4744 echo "$ac_t""yes" 1>&6
4745 cat >> confdefs.h <<\EOF
4746#define HAVE_OPENPTY 1
4747EOF
4748 LIBS="$LIBS -lutil"
4749else
4750 echo "$ac_t""no" 1>&6
4751fi
4752
4753fi
4754done
4755
4756for ac_func in forkpty
4757do
4758echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004759echo "configure:4760: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004760if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004761 echo $ac_n "(cached) $ac_c" 1>&6
4762else
4763 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004764#line 4765 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004765#include "confdefs.h"
4766/* System header to define __stub macros and hopefully few prototypes,
4767 which can conflict with char $ac_func(); below. */
4768#include <assert.h>
4769/* Override any gcc2 internal prototype to avoid an error. */
4770/* We use char because int might match the return type of a gcc2
4771 builtin and then its argument prototype would still apply. */
4772char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004773
4774int main() {
4775
4776/* The GNU C library defines this for functions which it implements
4777 to always fail with ENOSYS. Some functions are actually named
4778 something starting with __ and the normal name is an alias. */
4779#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4780choke me
4781#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004782$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004783#endif
4784
4785; return 0; }
4786EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004787if { (eval echo configure:4788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004788 rm -rf conftest*
4789 eval "ac_cv_func_$ac_func=yes"
4790else
4791 echo "configure: failed program was:" >&5
4792 cat conftest.$ac_ext >&5
4793 rm -rf conftest*
4794 eval "ac_cv_func_$ac_func=no"
4795fi
4796rm -f conftest*
4797fi
4798
4799if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4800 echo "$ac_t""yes" 1>&6
4801 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4802 cat >> confdefs.h <<EOF
4803#define $ac_tr_func 1
4804EOF
4805
4806else
4807 echo "$ac_t""no" 1>&6
4808echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004809echo "configure:4810: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004810ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004811if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004812 echo $ac_n "(cached) $ac_c" 1>&6
4813else
4814 ac_save_LIBS="$LIBS"
4815LIBS="-lutil $LIBS"
4816cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004817#line 4818 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004818#include "confdefs.h"
4819/* Override any gcc2 internal prototype to avoid an error. */
4820/* We use char because int might match the return type of a gcc2
4821 builtin and then its argument prototype would still apply. */
4822char forkpty();
4823
4824int main() {
4825forkpty()
4826; return 0; }
4827EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004828if { (eval echo configure:4829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004829 rm -rf conftest*
4830 eval "ac_cv_lib_$ac_lib_var=yes"
4831else
4832 echo "configure: failed program was:" >&5
4833 cat conftest.$ac_ext >&5
4834 rm -rf conftest*
4835 eval "ac_cv_lib_$ac_lib_var=no"
4836fi
4837rm -f conftest*
4838LIBS="$ac_save_LIBS"
4839
4840fi
4841if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4842 echo "$ac_t""yes" 1>&6
4843 cat >> confdefs.h <<\EOF
4844#define HAVE_FORKPTY 1
4845EOF
4846 LIBS="$LIBS -lutil"
4847else
4848 echo "$ac_t""no" 1>&6
4849fi
4850
4851fi
4852done
4853
4854
4855# check for long file support functions
4856for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4857do
4858echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004859echo "configure:4860: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004860if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004861 echo $ac_n "(cached) $ac_c" 1>&6
4862else
4863 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004864#line 4865 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004865#include "confdefs.h"
4866/* System header to define __stub macros and hopefully few prototypes,
4867 which can conflict with char $ac_func(); below. */
4868#include <assert.h>
4869/* Override any gcc2 internal prototype to avoid an error. */
4870/* We use char because int might match the return type of a gcc2
4871 builtin and then its argument prototype would still apply. */
4872char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004873
4874int main() {
4875
4876/* The GNU C library defines this for functions which it implements
4877 to always fail with ENOSYS. Some functions are actually named
4878 something starting with __ and the normal name is an alias. */
4879#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4880choke me
4881#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004882$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004883#endif
4884
4885; return 0; }
4886EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004887if { (eval echo configure:4888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004888 rm -rf conftest*
4889 eval "ac_cv_func_$ac_func=yes"
4890else
4891 echo "configure: failed program was:" >&5
4892 cat conftest.$ac_ext >&5
4893 rm -rf conftest*
4894 eval "ac_cv_func_$ac_func=no"
4895fi
4896rm -f conftest*
4897fi
4898
4899if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4900 echo "$ac_t""yes" 1>&6
4901 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4902 cat >> confdefs.h <<EOF
4903#define $ac_tr_func 1
4904EOF
4905
4906else
4907 echo "$ac_t""no" 1>&6
4908fi
4909done
4910
4911
4912for ac_func in dup2 getcwd strdup strerror memmove
4913do
4914echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004915echo "configure:4916: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004916if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004917 echo $ac_n "(cached) $ac_c" 1>&6
4918else
4919 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004920#line 4921 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004921#include "confdefs.h"
4922/* System header to define __stub macros and hopefully few prototypes,
4923 which can conflict with char $ac_func(); below. */
4924#include <assert.h>
4925/* Override any gcc2 internal prototype to avoid an error. */
4926/* We use char because int might match the return type of a gcc2
4927 builtin and then its argument prototype would still apply. */
4928char $ac_func();
4929
4930int main() {
4931
4932/* The GNU C library defines this for functions which it implements
4933 to always fail with ENOSYS. Some functions are actually named
4934 something starting with __ and the normal name is an alias. */
4935#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4936choke me
4937#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004938$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004939#endif
4940
4941; return 0; }
4942EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004943if { (eval echo configure:4944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004944 rm -rf conftest*
4945 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004946else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004947 echo "configure: failed program was:" >&5
4948 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004949 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004950 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004951fi
4952rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004953fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004954
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004955if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004956 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004957 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4958 cat >> confdefs.h <<EOF
4959#define $ac_tr_func 1
4960EOF
4961
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004962else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004963 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004964LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004965fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004966done
4967
Guido van Rossumf78abae1997-01-21 22:02:36 +00004968
Thomas Wouters3a584202000-08-05 23:28:51 +00004969for ac_func in getpgrp
4970do
4971echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00004972echo "configure:4973: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004973if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004974 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004975else
4976 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00004977#line 4978 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004978#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004979/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004980 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004981#include <assert.h>
4982/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004983/* We use char because int might match the return type of a gcc2
4984 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004985char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004986
Guido van Rossumf78abae1997-01-21 22:02:36 +00004987int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004988
Guido van Rossum627b2d71993-12-24 10:39:16 +00004989/* The GNU C library defines this for functions which it implements
4990 to always fail with ENOSYS. Some functions are actually named
4991 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004992#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004993choke me
4994#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004995$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004996#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004997
4998; return 0; }
4999EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005000if { (eval echo configure:5001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005001 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005002 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005003else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005004 echo "configure: failed program was:" >&5
5005 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005006 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005007 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005008fi
5009rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005010fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005011
Thomas Wouters3a584202000-08-05 23:28:51 +00005012if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005013 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005014 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5015 cat >> confdefs.h <<EOF
5016#define $ac_tr_func 1
5017EOF
5018 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005019#line 5020 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005020#include "confdefs.h"
5021#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005022int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005023getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005024; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005025EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005026if { (eval echo configure:5027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005027 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005028 cat >> confdefs.h <<\EOF
5029#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005030EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005031
Guido van Rossumf78abae1997-01-21 22:02:36 +00005032else
5033 echo "configure: failed program was:" >&5
5034 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005035fi
5036rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005037else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005038 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005039fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005040done
Guido van Rossum627b2d71993-12-24 10:39:16 +00005041
Thomas Wouters3a584202000-08-05 23:28:51 +00005042for ac_func in setpgrp
5043do
5044echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005045echo "configure:5046: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005046if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005047 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005048else
5049 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005050#line 5051 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005051#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005052/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005053 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005054#include <assert.h>
5055/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005056/* We use char because int might match the return type of a gcc2
5057 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005058char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005059
Guido van Rossumf78abae1997-01-21 22:02:36 +00005060int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005061
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005062/* The GNU C library defines this for functions which it implements
5063 to always fail with ENOSYS. Some functions are actually named
5064 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005065#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005066choke me
5067#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005068$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005069#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005070
5071; return 0; }
5072EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005073if { (eval echo configure:5074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005074 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005075 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005076else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005077 echo "configure: failed program was:" >&5
5078 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005079 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005080 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005081fi
5082rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005083fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005084
Thomas Wouters3a584202000-08-05 23:28:51 +00005085if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005086 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005087 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5088 cat >> confdefs.h <<EOF
5089#define $ac_tr_func 1
5090EOF
5091 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005092#line 5093 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005093#include "confdefs.h"
5094#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005095int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005096setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005097; return 0; }
5098EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005099if { (eval echo configure:5100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005100 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005101 cat >> confdefs.h <<\EOF
5102#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005103EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005104
Guido van Rossumf78abae1997-01-21 22:02:36 +00005105else
5106 echo "configure: failed program was:" >&5
5107 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005108fi
5109rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005110else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005111 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005112fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005113done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005114
Thomas Wouters3a584202000-08-05 23:28:51 +00005115for ac_func in gettimeofday
5116do
5117echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005118echo "configure:5119: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005119if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005120 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005121else
5122 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005123#line 5124 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005124#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005125/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005126 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005127#include <assert.h>
5128/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005129/* We use char because int might match the return type of a gcc2
5130 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005131char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005132
Guido van Rossumf78abae1997-01-21 22:02:36 +00005133int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005134
5135/* The GNU C library defines this for functions which it implements
5136 to always fail with ENOSYS. Some functions are actually named
5137 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005138#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005139choke me
5140#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005141$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005142#endif
5143
5144; return 0; }
5145EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005146if { (eval echo configure:5147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005147 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005148 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005149else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005150 echo "configure: failed program was:" >&5
5151 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005152 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005153 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005154fi
5155rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005156fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005157
Thomas Wouters3a584202000-08-05 23:28:51 +00005158if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005159 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005160 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5161 cat >> confdefs.h <<EOF
5162#define $ac_tr_func 1
5163EOF
5164 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005165#line 5166 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005166#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005167#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005168int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005169gettimeofday((struct timeval*)0,(struct timezone*)0);
5170; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005171EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005172if { (eval echo configure:5173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005173 :
5174else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005175 echo "configure: failed program was:" >&5
5176 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005177 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005178 cat >> confdefs.h <<\EOF
5179#define GETTIMEOFDAY_NO_TZ 1
5180EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005181
5182fi
5183rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005184else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005185 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005186fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005187done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005188
5189
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005190for ac_func in getaddrinfo
5191do
5192echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005193echo "configure:5194: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005194if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5195 echo $ac_n "(cached) $ac_c" 1>&6
5196else
5197 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005198#line 5199 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005199#include "confdefs.h"
5200/* System header to define __stub macros and hopefully few prototypes,
5201 which can conflict with char $ac_func(); below. */
5202#include <assert.h>
5203/* Override any gcc2 internal prototype to avoid an error. */
5204/* We use char because int might match the return type of a gcc2
5205 builtin and then its argument prototype would still apply. */
5206char $ac_func();
5207
5208int main() {
5209
5210/* The GNU C library defines this for functions which it implements
5211 to always fail with ENOSYS. Some functions are actually named
5212 something starting with __ and the normal name is an alias. */
5213#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5214choke me
5215#else
5216$ac_func();
5217#endif
5218
5219; return 0; }
5220EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005221if { (eval echo configure:5222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005222 rm -rf conftest*
5223 eval "ac_cv_func_$ac_func=yes"
5224else
5225 echo "configure: failed program was:" >&5
5226 cat conftest.$ac_ext >&5
5227 rm -rf conftest*
5228 eval "ac_cv_func_$ac_func=no"
5229fi
5230rm -f conftest*
5231fi
5232
5233if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5234 echo "$ac_t""yes" 1>&6
5235 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5236 cat >> confdefs.h <<EOF
5237#define $ac_tr_func 1
5238EOF
5239 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005240echo "configure:5241: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005241if test "$cross_compiling" = yes; then
5242 echo "$ac_t""buggy" 1>&6
5243buggygetaddrinfo=yes
5244else
5245 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005246#line 5247 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005247#include "confdefs.h"
5248
5249#include <sys/types.h>
5250#include <netdb.h>
5251#include <string.h>
5252#include <sys/socket.h>
5253#include <netinet/in.h>
5254
5255main()
5256{
5257 int passive, gaierr, inet4 = 0, inet6 = 0;
5258 struct addrinfo hints, *ai, *aitop;
5259 char straddr[INET6_ADDRSTRLEN], strport[16];
5260
5261 for (passive = 0; passive <= 1; passive++) {
5262 memset(&hints, 0, sizeof(hints));
5263 hints.ai_family = AF_UNSPEC;
5264 hints.ai_flags = passive ? AI_PASSIVE : 0;
5265 hints.ai_socktype = SOCK_STREAM;
5266 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5267 (void)gai_strerror(gaierr);
5268 goto bad;
5269 }
5270 for (ai = aitop; ai; ai = ai->ai_next) {
5271 if (ai->ai_addr == NULL ||
5272 ai->ai_addrlen == 0 ||
5273 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5274 straddr, sizeof(straddr), strport, sizeof(strport),
5275 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5276 goto bad;
5277 }
5278 switch (ai->ai_family) {
5279 case AF_INET:
5280 if (strcmp(strport, "54321") != 0) {
5281 goto bad;
5282 }
5283 if (passive) {
5284 if (strcmp(straddr, "0.0.0.0") != 0) {
5285 goto bad;
5286 }
5287 } else {
5288 if (strcmp(straddr, "127.0.0.1") != 0) {
5289 goto bad;
5290 }
5291 }
5292 inet4++;
5293 break;
5294 case AF_INET6:
5295 if (strcmp(strport, "54321") != 0) {
5296 goto bad;
5297 }
5298 if (passive) {
5299 if (strcmp(straddr, "::") != 0) {
5300 goto bad;
5301 }
5302 } else {
5303 if (strcmp(straddr, "::1") != 0) {
5304 goto bad;
5305 }
5306 }
5307 inet6++;
5308 break;
5309 case AF_UNSPEC:
5310 goto bad;
5311 break;
5312 default:
5313 /* another family support? */
5314 break;
5315 }
5316 }
5317 }
5318
5319 if (!(inet4 == 0 || inet4 == 2))
5320 goto bad;
5321 if (!(inet6 == 0 || inet6 == 2))
5322 goto bad;
5323
5324 if (aitop)
5325 freeaddrinfo(aitop);
5326 exit(0);
5327
5328 bad:
5329 if (aitop)
5330 freeaddrinfo(aitop);
5331 exit(1);
5332}
5333
5334EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005335if { (eval echo configure:5336: \"$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 +00005336then
5337 echo "$ac_t""good" 1>&6
5338buggygetaddrinfo=no
5339else
5340 echo "configure: failed program was:" >&5
5341 cat conftest.$ac_ext >&5
5342 rm -fr conftest*
5343 echo "$ac_t""buggy" 1>&6
5344buggygetaddrinfo=yes
5345fi
5346rm -fr conftest*
5347fi
5348
5349else
5350 echo "$ac_t""no" 1>&6
5351buggygetaddrinfo=yes
5352fi
5353done
5354
5355
5356if test "$buggygetaddrinfo" = "yes"; then
5357 if test "$ipv6" = "yes"; then
5358 echo 'Fatal: You must get working getaddrinfo() function.'
5359 echo ' or you can specify "--disable-ipv6"'.
5360 exit 1
5361 fi
5362fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005363for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005364do
5365echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005366echo "configure:5367: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005367if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5368 echo $ac_n "(cached) $ac_c" 1>&6
5369else
5370 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005371#line 5372 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005372#include "confdefs.h"
5373/* System header to define __stub macros and hopefully few prototypes,
5374 which can conflict with char $ac_func(); below. */
5375#include <assert.h>
5376/* Override any gcc2 internal prototype to avoid an error. */
5377/* We use char because int might match the return type of a gcc2
5378 builtin and then its argument prototype would still apply. */
5379char $ac_func();
5380
5381int main() {
5382
5383/* The GNU C library defines this for functions which it implements
5384 to always fail with ENOSYS. Some functions are actually named
5385 something starting with __ and the normal name is an alias. */
5386#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5387choke me
5388#else
5389$ac_func();
5390#endif
5391
5392; return 0; }
5393EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005394if { (eval echo configure:5395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005395 rm -rf conftest*
5396 eval "ac_cv_func_$ac_func=yes"
5397else
5398 echo "configure: failed program was:" >&5
5399 cat conftest.$ac_ext >&5
5400 rm -rf conftest*
5401 eval "ac_cv_func_$ac_func=no"
5402fi
5403rm -f conftest*
5404fi
5405
5406if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5407 echo "$ac_t""yes" 1>&6
5408 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5409 cat >> confdefs.h <<EOF
5410#define $ac_tr_func 1
5411EOF
5412
5413else
5414 echo "$ac_t""no" 1>&6
5415fi
5416done
5417
5418
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005419# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005420echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005421echo "configure:5422: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005422if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005423 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005424else
5425 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005426#line 5427 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005427#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005428#include <sys/types.h>
5429#include <sys/time.h>
5430#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005431int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005432struct tm *tp;
5433; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005434EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005435if { (eval echo configure:5436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005436 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005437 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005438else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005439 echo "configure: failed program was:" >&5
5440 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005441 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005442 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005443fi
5444rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005445fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005446
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005447echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005448if test $ac_cv_header_time = yes; then
5449 cat >> confdefs.h <<\EOF
5450#define TIME_WITH_SYS_TIME 1
5451EOF
5452
5453fi
5454
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005455echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005456echo "configure:5457: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005457if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005458 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005459else
5460 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005461#line 5462 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005462#include "confdefs.h"
5463#include <sys/types.h>
5464#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005465int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005466struct tm *tp; tp->tm_sec;
5467; return 0; }
5468EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005469if { (eval echo configure:5470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005470 rm -rf conftest*
5471 ac_cv_struct_tm=time.h
5472else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005473 echo "configure: failed program was:" >&5
5474 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005475 rm -rf conftest*
5476 ac_cv_struct_tm=sys/time.h
5477fi
5478rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005479fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005480
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005481echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005482if test $ac_cv_struct_tm = sys/time.h; then
5483 cat >> confdefs.h <<\EOF
5484#define TM_IN_SYS_TIME 1
5485EOF
5486
5487fi
5488
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005489echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005490echo "configure:5491: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005491if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005492 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005493else
5494 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005495#line 5496 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005496#include "confdefs.h"
5497#include <sys/types.h>
5498#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005499int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005500struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005501; return 0; }
5502EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005503if { (eval echo configure:5504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005504 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005505 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005506else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005507 echo "configure: failed program was:" >&5
5508 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005509 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005510 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005511fi
5512rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005513fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005514
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005515echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5516if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005517 cat >> confdefs.h <<\EOF
5518#define HAVE_TM_ZONE 1
5519EOF
5520
5521else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005522 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005523echo "configure:5524: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005524if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005525 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005526else
5527 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005528#line 5529 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005529#include "confdefs.h"
5530#include <time.h>
5531#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005532extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005533#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00005534int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005535atoi(*tzname);
5536; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005537EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005538if { (eval echo configure:5539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005539 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005540 ac_cv_var_tzname=yes
5541else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005542 echo "configure: failed program was:" >&5
5543 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005544 rm -rf conftest*
5545 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005546fi
5547rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005548fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005549
5550echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005551 if test $ac_cv_var_tzname = yes; then
5552 cat >> confdefs.h <<\EOF
5553#define HAVE_TZNAME 1
5554EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005555
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005556 fi
5557fi
5558
5559
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005560echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005561echo "configure:5562: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005562if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005563 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005564else
5565 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005566#line 5567 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005567#include "confdefs.h"
5568#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005569int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005570return altzone;
5571; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005572EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005573if { (eval echo configure:5574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005574 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005575 ac_cv_header_time_altzone=yes
5576else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005577 echo "configure: failed program was:" >&5
5578 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005579 rm -rf conftest*
5580 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005581fi
5582rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005583fi
5584
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005585echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005586if test $ac_cv_header_time_altzone = yes; then
5587 cat >> confdefs.h <<\EOF
5588#define HAVE_ALTZONE 1
5589EOF
5590
5591fi
5592
Guido van Rossumda88dad1995-01-26 00:46:29 +00005593was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005594echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005595echo "configure:5596: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005596cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005597#line 5598 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005598#include "confdefs.h"
5599
5600#include <sys/types.h>
5601#include <sys/select.h>
5602#include <sys/time.h>
5603
Guido van Rossumf78abae1997-01-21 22:02:36 +00005604int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005605;
5606; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005607EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005608if { (eval echo configure:5609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005609 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005610 cat >> confdefs.h <<\EOF
5611#define SYS_SELECT_WITH_SYS_TIME 1
5612EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005613 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005614else
5615 echo "configure: failed program was:" >&5
5616 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005617fi
5618rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005619echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005620
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005621echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005622echo "configure:5623: checking for addrinfo" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005623if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
5624 echo $ac_n "(cached) $ac_c" 1>&6
5625else
5626 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005627#line 5628 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005628#include "confdefs.h"
5629
5630# include <netdb.h>
5631int main() {
5632struct addrinfo a
5633; return 0; }
5634EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005635if { (eval echo configure:5636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005636 rm -rf conftest*
5637 ac_cv_struct_addrinfo=yes
5638else
5639 echo "configure: failed program was:" >&5
5640 cat conftest.$ac_ext >&5
5641 rm -rf conftest*
5642 ac_cv_struct_addrinfo=no
5643fi
5644rm -f conftest*
5645fi
5646
5647echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
5648if test $ac_cv_struct_addrinfo = yes; then
5649 cat >> confdefs.h <<\EOF
5650#define HAVE_ADDRINFO 1
5651EOF
5652
5653fi
5654
5655echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005656echo "configure:5657: checking for sockaddr_storage" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005657if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
5658 echo $ac_n "(cached) $ac_c" 1>&6
5659else
5660 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005661#line 5662 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005662#include "confdefs.h"
5663
5664# include <sys/types.h>
5665# include <sys/socket.h>
5666int main() {
5667struct sockaddr_storage s
5668; return 0; }
5669EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005670if { (eval echo configure:5671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005671 rm -rf conftest*
5672 ac_cv_struct_sockaddr_storage=yes
5673else
5674 echo "configure: failed program was:" >&5
5675 cat conftest.$ac_ext >&5
5676 rm -rf conftest*
5677 ac_cv_struct_sockaddr_storage=no
5678fi
5679rm -f conftest*
5680fi
5681
5682echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
5683if test $ac_cv_struct_sockaddr_storage = yes; then
5684 cat >> confdefs.h <<\EOF
5685#define HAVE_SOCKADDR_STORAGE 1
5686EOF
5687
5688fi
5689
Guido van Rossum627b2d71993-12-24 10:39:16 +00005690# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00005691
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005692echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005693echo "configure:5694: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005694if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005695 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005696else
5697 if test "$GCC" = yes; then
5698 # GCC predefines this symbol on systems where it applies.
5699cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005700#line 5701 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005701#include "confdefs.h"
5702#ifdef __CHAR_UNSIGNED__
5703 yes
5704#endif
5705
5706EOF
5707if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5708 egrep "yes" >/dev/null 2>&1; then
5709 rm -rf conftest*
5710 ac_cv_c_char_unsigned=yes
5711else
5712 rm -rf conftest*
5713 ac_cv_c_char_unsigned=no
5714fi
5715rm -f conftest*
5716
5717else
5718if test "$cross_compiling" = yes; then
5719 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5720else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005721 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005722#line 5723 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005723#include "confdefs.h"
5724/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005725#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00005726#define volatile
5727#endif
5728main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00005729 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005730}
5731EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005732if { (eval echo configure:5733: \"$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 +00005733then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005734 ac_cv_c_char_unsigned=yes
5735else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005736 echo "configure: failed program was:" >&5
5737 cat conftest.$ac_ext >&5
5738 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005739 ac_cv_c_char_unsigned=no
5740fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005741rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005742fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005743
5744fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005745fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005746
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005747echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005748if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5749 cat >> confdefs.h <<\EOF
5750#define __CHAR_UNSIGNED__ 1
5751EOF
5752
5753fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005754
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005755echo $ac_n "checking for working const""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005756echo "configure:5757: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005757if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005758 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005759else
5760 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005761#line 5762 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005762#include "confdefs.h"
5763
Guido van Rossumf78abae1997-01-21 22:02:36 +00005764int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005765
5766/* Ultrix mips cc rejects this. */
Martin v. Löwis9db2f572001-07-23 01:30:10 +00005767typedef int charset[2]; const charset x;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005768/* SunOS 4.1.1 cc rejects this. */
5769char const *const *ccp;
5770char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005771/* NEC SVR4.0.2 mips cc rejects this. */
5772struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005773static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005774/* AIX XL C 1.02.0.0 rejects this.
5775 It does not let you subtract one const X* pointer from another in an arm
5776 of an if-expression whose if-part is not a constant expression */
5777const char *g = "string";
5778ccp = &g + (g ? g-g : 0);
5779/* HPUX 7.0 cc rejects these. */
5780++ccp;
5781p = (char**) ccp;
5782ccp = (char const *const *) p;
5783{ /* SCO 3.2v4 cc rejects this. */
5784 char *t;
5785 char const *s = 0 ? (char *) 0 : (char const *) 0;
5786
5787 *t++ = 0;
5788}
5789{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005790 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005791 const int *foo = &x[0];
5792 ++foo;
5793}
5794{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5795 typedef const int *iptr;
5796 iptr p = 0;
5797 ++p;
5798}
5799{ /* AIX XL C 1.02.0.0 rejects this saying
5800 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5801 struct s { int j; const int *ap[3]; };
5802 struct s *b; b->j = 5;
5803}
5804{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5805 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005806}
5807
5808; return 0; }
5809EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005810if { (eval echo configure:5811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005811 rm -rf conftest*
5812 ac_cv_c_const=yes
5813else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005814 echo "configure: failed program was:" >&5
5815 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005816 rm -rf conftest*
5817 ac_cv_c_const=no
5818fi
5819rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005820fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005821
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005822echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005823if test $ac_cv_c_const = no; then
5824 cat >> confdefs.h <<\EOF
5825#define const
5826EOF
5827
5828fi
5829
5830
Guido van Rossumda88dad1995-01-26 00:46:29 +00005831works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005832echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005833echo "configure:5834: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005834cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005835#line 5836 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005836#include "confdefs.h"
5837
Guido van Rossumf78abae1997-01-21 22:02:36 +00005838int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005839volatile int x; x = 0;
5840; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005841EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005842if { (eval echo configure:5843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005843 rm -rf conftest*
5844 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005845else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005846 echo "configure: failed program was:" >&5
5847 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005848 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005849 cat >> confdefs.h <<\EOF
5850#define volatile
5851EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005852
5853fi
5854rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005855echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005856
Guido van Rossumda88dad1995-01-26 00:46:29 +00005857works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005858echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005859echo "configure:5860: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005860cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005861#line 5862 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005862#include "confdefs.h"
5863
Guido van Rossumf78abae1997-01-21 22:02:36 +00005864int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005865signed char c;
5866; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005867EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005868if { (eval echo configure:5869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005869 rm -rf conftest*
5870 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005871else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005872 echo "configure: failed program was:" >&5
5873 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005874 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005875 cat >> confdefs.h <<\EOF
5876#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00005877EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005878
5879fi
5880rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005881echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005882
Guido van Rossumda88dad1995-01-26 00:46:29 +00005883have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005884echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005885echo "configure:5886: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005886cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005887#line 5888 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005888#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005889int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005890int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005891return foo(10);
5892; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005893EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005894if { (eval echo configure:5895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005895 rm -rf conftest*
5896 cat >> confdefs.h <<\EOF
5897#define HAVE_PROTOTYPES 1
5898EOF
5899 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005900else
5901 echo "configure: failed program was:" >&5
5902 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005903fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005904rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005905echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005906
Guido van Rossumda88dad1995-01-26 00:46:29 +00005907works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005908echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005909echo "configure:5910: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005910cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005911#line 5912 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005912#include "confdefs.h"
5913
5914#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00005915int foo(int x, ...) {
5916 va_list va;
5917 va_start(va, x);
5918 va_arg(va, int);
5919 va_arg(va, char *);
5920 va_arg(va, double);
5921 return 0;
5922}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005923
Guido van Rossumf78abae1997-01-21 22:02:36 +00005924int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005925return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005926; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005927EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005928if { (eval echo configure:5929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005929 rm -rf conftest*
5930 cat >> confdefs.h <<\EOF
5931#define HAVE_STDARG_PROTOTYPES 1
5932EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005933 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005934else
5935 echo "configure: failed program was:" >&5
5936 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005937fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005938rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005939echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005940
Guido van Rossumda88dad1995-01-26 00:46:29 +00005941if test "$have_prototypes" = yes; then
5942bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005943echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005944echo "configure:5945: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005945cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005946#line 5947 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005947#include "confdefs.h"
5948#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005949int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005950char **t;execve("@",t,t);
5951; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005952EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005953if { (eval echo configure:5954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005954 :
5955else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005956 echo "configure: failed program was:" >&5
5957 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005958 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005959 cat >> confdefs.h <<\EOF
5960#define BAD_EXEC_PROTOTYPES 1
5961EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005962 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005963fi
5964rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005965echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005966fi
5967
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005968# check if sockaddr has sa_len member
5969echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005970echo "configure:5971: checking if sockaddr has sa_len member" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005971cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005972#line 5973 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005973#include "confdefs.h"
5974#include <sys/types.h>
5975#include <sys/socket.h>
5976int main() {
5977struct sockaddr x;
5978x.sa_len = 0;
5979; return 0; }
5980EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00005981if { (eval echo configure:5982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005982 rm -rf conftest*
5983 echo "$ac_t""yes" 1>&6
5984 cat >> confdefs.h <<\EOF
5985#define HAVE_SOCKADDR_SA_LEN 1
5986EOF
5987
5988else
5989 echo "configure: failed program was:" >&5
5990 cat conftest.$ac_ext >&5
5991 rm -rf conftest*
5992 echo "$ac_t""no" 1>&6
5993fi
5994rm -f conftest*
5995
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005996echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00005997echo "configure:5998: checking for bad static forward" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00005998if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
5999 echo $ac_n "(cached) $ac_c" 1>&6
6000else
6001 if test "$cross_compiling" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006002 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6003else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006004 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006005#line 6006 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006006#include "confdefs.h"
6007
6008struct s { int a; int b; };
6009static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006010int foobar() {
6011 static int random;
6012 random = (int) &foo;
6013 return random;
6014}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006015static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006016main() {
6017 exit(!((int)&foo == foobar()));
6018}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006019EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006020if { (eval echo configure:6021: \"$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 +00006021then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006022 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006023else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006024 echo "configure: failed program was:" >&5
6025 cat conftest.$ac_ext >&5
6026 rm -fr conftest*
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006027 ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006028fi
6029rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00006030fi
6031
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006032fi
6033
6034echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
6035if test "$ac_cv_bad_static_forward" = yes
6036then
6037 cat >> confdefs.h <<\EOF
6038#define BAD_STATIC_FORWARD 1
6039EOF
6040
6041fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006042
Guido van Rossumda88dad1995-01-26 00:46:29 +00006043va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006044echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006045echo "configure:6046: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006046cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006047#line 6048 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006048#include "confdefs.h"
6049
6050#ifdef HAVE_STDARG_PROTOTYPES
6051#include <stdarg.h>
6052#else
6053#include <varargs.h>
6054#endif
6055
Guido van Rossumf78abae1997-01-21 22:02:36 +00006056int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006057va_list list1, list2; list1 = list2;
6058; return 0; }
6059EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006060if { (eval echo configure:6061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006061 :
6062else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006063 echo "configure: failed program was:" >&5
6064 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006065 rm -rf conftest*
6066 cat >> confdefs.h <<\EOF
6067#define VA_LIST_IS_ARRAY 1
6068EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006069 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006070fi
6071rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006072echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006073
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006074# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
6075echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006076echo "configure:6077: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006077if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006078 echo $ac_n "(cached) $ac_c" 1>&6
6079else
6080 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006081#line 6082 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006082#include "confdefs.h"
6083/* System header to define __stub macros and hopefully few prototypes,
6084 which can conflict with char gethostbyname_r(); below. */
6085#include <assert.h>
6086/* Override any gcc2 internal prototype to avoid an error. */
6087/* We use char because int might match the return type of a gcc2
6088 builtin and then its argument prototype would still apply. */
6089char gethostbyname_r();
6090
6091int main() {
6092
6093/* The GNU C library defines this for functions which it implements
6094 to always fail with ENOSYS. Some functions are actually named
6095 something starting with __ and the normal name is an alias. */
6096#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6097choke me
6098#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006099gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006100#endif
6101
6102; return 0; }
6103EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006104if { (eval echo configure:6105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006105 rm -rf conftest*
6106 eval "ac_cv_func_gethostbyname_r=yes"
6107else
6108 echo "configure: failed program was:" >&5
6109 cat conftest.$ac_ext >&5
6110 rm -rf conftest*
6111 eval "ac_cv_func_gethostbyname_r=no"
6112fi
6113rm -f conftest*
6114fi
6115
6116if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6117 echo "$ac_t""yes" 1>&6
6118
6119 cat >> confdefs.h <<\EOF
6120#define HAVE_GETHOSTBYNAME_R 1
6121EOF
6122
6123 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006124echo "configure:6125: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006125 OLD_CFLAGS=$CFLAGS
6126 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
6127 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006128#line 6129 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006129#include "confdefs.h"
6130
6131# include <netdb.h>
6132
6133int main() {
6134
6135 char *name;
6136 struct hostent *he, *res;
6137 char buffer[2048];
6138 int buflen = 2048;
6139 int h_errnop;
6140
6141 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
6142
6143; return 0; }
6144EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006145if { (eval echo configure:6146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006146 rm -rf conftest*
6147
6148 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006149#define HAVE_GETHOSTBYNAME_R 1
6150EOF
6151
6152 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006153#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6154EOF
6155
6156 echo "$ac_t""yes" 1>&6
6157
6158else
6159 echo "configure: failed program was:" >&5
6160 cat conftest.$ac_ext >&5
6161 rm -rf conftest*
6162
6163 echo "$ac_t""no" 1>&6
6164 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006165echo "configure:6166: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006166 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006167#line 6168 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006168#include "confdefs.h"
6169
6170# include <netdb.h>
6171
6172int main() {
6173
6174 char *name;
6175 struct hostent *he;
6176 char buffer[2048];
6177 int buflen = 2048;
6178 int h_errnop;
6179
6180 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
6181
6182; return 0; }
6183EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006184if { (eval echo configure:6185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006185 rm -rf conftest*
6186
6187 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006188#define HAVE_GETHOSTBYNAME_R 1
6189EOF
6190
6191 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006192#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6193EOF
6194
6195 echo "$ac_t""yes" 1>&6
6196
6197else
6198 echo "configure: failed program was:" >&5
6199 cat conftest.$ac_ext >&5
6200 rm -rf conftest*
6201
6202 echo "$ac_t""no" 1>&6
6203 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006204echo "configure:6205: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006205 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006206#line 6207 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006207#include "confdefs.h"
6208
6209# include <netdb.h>
6210
6211int main() {
6212
6213 char *name;
6214 struct hostent *he;
6215 struct hostent_data data;
6216
6217 (void) gethostbyname_r(name, he, &data);
6218
6219; return 0; }
6220EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006221if { (eval echo configure:6222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006222 rm -rf conftest*
6223
6224 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006225#define HAVE_GETHOSTBYNAME_R 1
6226EOF
6227
6228 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006229#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6230EOF
6231
6232 echo "$ac_t""yes" 1>&6
6233
6234else
6235 echo "configure: failed program was:" >&5
6236 cat conftest.$ac_ext >&5
6237 rm -rf conftest*
6238
6239 echo "$ac_t""no" 1>&6
6240
6241fi
6242rm -f conftest*
6243
6244fi
6245rm -f conftest*
6246
6247fi
6248rm -f conftest*
6249 CFLAGS=$OLD_CFLAGS
6250
6251else
6252 echo "$ac_t""no" 1>&6
6253
Thomas Wouters3a584202000-08-05 23:28:51 +00006254 for ac_func in gethostbyname
6255do
6256echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006257echo "configure:6258: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006258if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006259 echo $ac_n "(cached) $ac_c" 1>&6
6260else
6261 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006262#line 6263 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006263#include "confdefs.h"
6264/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00006265 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006266#include <assert.h>
6267/* Override any gcc2 internal prototype to avoid an error. */
6268/* We use char because int might match the return type of a gcc2
6269 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006270char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006271
6272int main() {
6273
6274/* The GNU C library defines this for functions which it implements
6275 to always fail with ENOSYS. Some functions are actually named
6276 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006277#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006278choke me
6279#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006280$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006281#endif
6282
6283; return 0; }
6284EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006285if { (eval echo configure:6286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006286 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006287 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006288else
6289 echo "configure: failed program was:" >&5
6290 cat conftest.$ac_ext >&5
6291 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006292 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006293fi
6294rm -f conftest*
6295fi
6296
Thomas Wouters3a584202000-08-05 23:28:51 +00006297if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006298 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00006299 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6300 cat >> confdefs.h <<EOF
6301#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006302EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00006303
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006304else
6305 echo "$ac_t""no" 1>&6
6306fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006307done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006308
6309
6310fi
6311
6312
6313
6314
6315
6316
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006317
Guido van Rossum627b2d71993-12-24 10:39:16 +00006318# checks for system services
6319# (none yet)
6320
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006321# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006322echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006323echo "configure:6324: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006324if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006325 echo $ac_n "(cached) $ac_c" 1>&6
6326else
6327 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006328#line 6329 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006329#include "confdefs.h"
6330/* System header to define __stub macros and hopefully few prototypes,
6331 which can conflict with char __fpu_control(); below. */
6332#include <assert.h>
6333/* Override any gcc2 internal prototype to avoid an error. */
6334/* We use char because int might match the return type of a gcc2
6335 builtin and then its argument prototype would still apply. */
6336char __fpu_control();
6337
6338int main() {
6339
6340/* The GNU C library defines this for functions which it implements
6341 to always fail with ENOSYS. Some functions are actually named
6342 something starting with __ and the normal name is an alias. */
6343#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6344choke me
6345#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006346__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006347#endif
6348
6349; return 0; }
6350EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006351if { (eval echo configure:6352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006352 rm -rf conftest*
6353 eval "ac_cv_func___fpu_control=yes"
6354else
6355 echo "configure: failed program was:" >&5
6356 cat conftest.$ac_ext >&5
6357 rm -rf conftest*
6358 eval "ac_cv_func___fpu_control=no"
6359fi
6360rm -f conftest*
6361fi
6362
6363if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6364 echo "$ac_t""yes" 1>&6
6365 :
6366else
6367 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006368echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006369echo "configure:6370: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00006370ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006371if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006372 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006373else
6374 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006375LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006376cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006377#line 6378 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006378#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006379/* Override any gcc2 internal prototype to avoid an error. */
6380/* We use char because int might match the return type of a gcc2
6381 builtin and then its argument prototype would still apply. */
6382char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00006383
Guido van Rossumf78abae1997-01-21 22:02:36 +00006384int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006385__fpu_control()
6386; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006387EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006388if { (eval echo configure:6389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006389 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006390 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006391else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006392 echo "configure: failed program was:" >&5
6393 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006394 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006395 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006396fi
6397rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006398LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006399
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006400fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006401if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006402 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006403 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6404 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006405 cat >> confdefs.h <<EOF
6406#define $ac_tr_lib 1
6407EOF
6408
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006409 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006410
6411else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006412 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006413fi
6414
6415
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006416fi
6417
6418
Guido van Rossum7f253911997-05-09 02:42:48 +00006419# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00006420echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006421echo "configure:6422: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006422# Check whether --with-fpectl or --without-fpectl was given.
6423if test "${with_fpectl+set}" = set; then
6424 withval="$with_fpectl"
6425
6426if test "$withval" != no
6427then cat >> confdefs.h <<\EOF
6428#define WANT_SIGFPE_HANDLER 1
6429EOF
6430 echo "$ac_t""yes" 1>&6
6431else echo "$ac_t""no" 1>&6
6432fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006433else
6434 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006435fi
6436
6437
Guido van Rossum7f43da71994-08-01 12:15:30 +00006438# check for --with-libm=...
6439
Guido van Rossum563e7081996-09-10 18:20:48 +00006440case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006441Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006442BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006443*) LIBM=-lm
6444esac
Guido van Rossum7f253911997-05-09 02:42:48 +00006445echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006446echo "configure:6447: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006447# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006448if test "${with_libm+set}" = set; then
6449 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006450
Guido van Rossum7f253911997-05-09 02:42:48 +00006451if test "$withval" = no
6452then LIBM=
6453 echo "$ac_t""force LIBM empty" 1>&6
6454elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006455then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006456 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006457else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006458fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006459else
6460 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006461fi
6462
6463
6464# check for --with-libc=...
6465
Guido van Rossum7f253911997-05-09 02:42:48 +00006466echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006467echo "configure:6468: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006468# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006469if test "${with_libc+set}" = set; then
6470 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006471
Guido van Rossum7f253911997-05-09 02:42:48 +00006472if test "$withval" = no
6473then LIBC=
6474 echo "$ac_t""force LIBC empty" 1>&6
6475elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006476then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006477 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006478else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006479fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006480else
6481 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006482fi
6483
6484
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006485# check for hypot() in math library
6486LIBS_SAVE=$LIBS
6487LIBS="$LIBS $LIBM"
6488for ac_func in hypot
6489do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006490echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006491echo "configure:6492: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006492if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006493 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006494else
6495 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006496#line 6497 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006497#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006498/* System header to define __stub macros and hopefully few prototypes,
6499 which can conflict with char $ac_func(); below. */
6500#include <assert.h>
6501/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006502/* We use char because int might match the return type of a gcc2
6503 builtin and then its argument prototype would still apply. */
6504char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006505
Guido van Rossumf78abae1997-01-21 22:02:36 +00006506int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006507
6508/* The GNU C library defines this for functions which it implements
6509 to always fail with ENOSYS. Some functions are actually named
6510 something starting with __ and the normal name is an alias. */
6511#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6512choke me
6513#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006514$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006515#endif
6516
6517; return 0; }
6518EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006519if { (eval echo configure:6520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006520 rm -rf conftest*
6521 eval "ac_cv_func_$ac_func=yes"
6522else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006523 echo "configure: failed program was:" >&5
6524 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006525 rm -rf conftest*
6526 eval "ac_cv_func_$ac_func=no"
6527fi
6528rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006529fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00006530
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006531if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6532 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006533 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6534 cat >> confdefs.h <<EOF
6535#define $ac_tr_func 1
6536EOF
6537
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006538else
6539 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006540LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006541fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006542done
6543
Guido van Rossumf78abae1997-01-21 22:02:36 +00006544
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006545LIBS=$LIBS_SAVE
6546
Guido van Rossumad713701997-07-10 22:42:38 +00006547# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00006548echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006549echo "configure:6550: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006550if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00006551 echo $ac_n "(cached) $ac_c" 1>&6
6552else
6553 if test "$cross_compiling" = yes; then
6554 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6555else
6556 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006557#line 6558 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006558#include "confdefs.h"
6559#include <stdio.h>
6560#ifdef HAVE_STDLIB
6561#include <stdlib.h>
6562#else
6563char *malloc(), *realloc();
6564int *free();
6565#endif
6566main() {
6567 char *p;
6568 p = malloc(0);
6569 if (p == NULL) exit(1);
6570 p = realloc(p, 0);
6571 if (p == NULL) exit(1);
6572 free(p);
6573 exit(0);
6574}
6575EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006576if { (eval echo configure:6577: \"$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 +00006577then
6578 ac_cv_malloc_zero=nonnull
6579else
6580 echo "configure: failed program was:" >&5
6581 cat conftest.$ac_ext >&5
6582 rm -fr conftest*
6583 ac_cv_malloc_zero=null
6584fi
6585rm -fr conftest*
6586fi
6587
6588fi
6589
6590echo "$ac_t""$ac_cv_malloc_zero" 1>&6
6591if test "$ac_cv_malloc_zero" = null
6592then
6593 cat >> confdefs.h <<\EOF
6594#define MALLOC_ZERO_RETURNS_NULL 1
6595EOF
6596
6597fi
6598
Guido van Rossumef2255b2000-03-10 22:30:29 +00006599# check for wchar.h
6600ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6601echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006602echo "configure:6603: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006603if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006604 echo $ac_n "(cached) $ac_c" 1>&6
6605else
6606 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006607#line 6608 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006608#include "confdefs.h"
6609#include <wchar.h>
6610EOF
6611ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis36546db2001-09-05 14:24:43 +00006612{ (eval echo configure:6613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006613ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6614if test -z "$ac_err"; then
6615 rm -rf conftest*
6616 eval "ac_cv_header_$ac_safe=yes"
6617else
6618 echo "$ac_err" >&5
6619 echo "configure: failed program was:" >&5
6620 cat conftest.$ac_ext >&5
6621 rm -rf conftest*
6622 eval "ac_cv_header_$ac_safe=no"
6623fi
6624rm -f conftest*
6625fi
6626if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6627 echo "$ac_t""yes" 1>&6
6628 cat >> confdefs.h <<\EOF
6629#define HAVE_WCHAR_H 1
6630EOF
6631 wchar_h="yes"
6632else
6633 echo "$ac_t""no" 1>&6
6634wchar_h="no"
6635
6636fi
6637
6638
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006639# determine wchar_t size
6640if test "$wchar_h" = yes
6641then
6642 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006643echo "configure:6644: checking size of wchar_t" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006644if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
6645 echo $ac_n "(cached) $ac_c" 1>&6
6646else
6647 if test "$cross_compiling" = yes; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006648 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6649else
6650 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006651#line 6652 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006652#include "confdefs.h"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006653#include <stdio.h>
6654main()
6655{
6656 FILE *f=fopen("conftestval", "w");
6657 if (!f) exit(1);
6658 fprintf(f, "%d\n", sizeof(wchar_t));
Guido van Rossumef2255b2000-03-10 22:30:29 +00006659 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00006660}
Guido van Rossumef2255b2000-03-10 22:30:29 +00006661EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006662if { (eval echo configure:6663: \"$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 +00006663then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006664 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006665else
6666 echo "configure: failed program was:" >&5
6667 cat conftest.$ac_ext >&5
6668 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006669 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00006670fi
6671rm -fr conftest*
6672fi
6673
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006674fi
6675echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
6676cat >> confdefs.h <<EOF
6677#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
6678EOF
6679
6680
6681fi
6682
6683echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006684echo "configure:6685: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006685# Check whether --enable-unicode or --disable-unicode was given.
6686if test "${enable_unicode+set}" = set; then
6687 enableval="$enable_unicode"
6688 :
6689else
6690 enable_unicode=yes
6691fi
6692
6693
6694if test $enable_unicode = yes
6695then
Martin v. Löwisfd917792001-06-27 20:22:04 +00006696 # Without any arguments, Py_UNICODE defaults to two-byte mode
6697 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006698fi
6699
6700case "$enable_unicode" in
6701ucs2) unicode_size="2"
6702 cat >> confdefs.h <<\EOF
6703#define Py_UNICODE_SIZE 2
6704EOF
6705
6706 ;;
6707ucs4) unicode_size="4"
6708 cat >> confdefs.h <<\EOF
6709#define Py_UNICODE_SIZE 4
6710EOF
6711
6712 ;;
6713esac
6714
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006715
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006716if test "$enable_unicode" = "no"
6717then
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006718 UNICODE_OBJS=""
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006719 echo "$ac_t""not used" 1>&6
6720else
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006721 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006722 cat >> confdefs.h <<\EOF
6723#define Py_USING_UNICODE 1
6724EOF
6725
6726 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
6727 then
6728 PY_UNICODE_TYPE="wchar_t"
6729 cat >> confdefs.h <<\EOF
6730#define HAVE_USABLE_WCHAR_T 1
6731EOF
6732
6733 cat >> confdefs.h <<\EOF
6734#define PY_UNICODE_TYPE wchar_t
6735EOF
6736
6737 elif test "$ac_cv_sizeof_short" = "$unicode_size"
6738 then
6739 PY_UNICODE_TYPE="unsigned short"
6740 cat >> confdefs.h <<\EOF
6741#define PY_UNICODE_TYPE unsigned short
6742EOF
6743
6744 elif test "$ac_cv_sizeof_long" = "$unicode_size"
6745 then
6746 PY_UNICODE_TYPE="unsigned long"
6747 cat >> confdefs.h <<\EOF
6748#define PY_UNICODE_TYPE unsigned long
6749EOF
6750
6751 else
6752 PY_UNICODE_TYPE="no type found"
6753 fi
6754 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
6755fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006756
6757# check for endianness
6758echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006759echo "configure:6760: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006760if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006761 echo $ac_n "(cached) $ac_c" 1>&6
6762else
6763 ac_cv_c_bigendian=unknown
6764# See if sys/param.h defines the BYTE_ORDER macro.
6765cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006766#line 6767 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006767#include "confdefs.h"
6768#include <sys/types.h>
6769#include <sys/param.h>
6770int main() {
6771
6772#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6773 bogus endian macros
6774#endif
6775; return 0; }
6776EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006777if { (eval echo configure:6778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006778 rm -rf conftest*
6779 # It does; now see whether it defined to BIG_ENDIAN or not.
6780cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006781#line 6782 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006782#include "confdefs.h"
6783#include <sys/types.h>
6784#include <sys/param.h>
6785int main() {
6786
6787#if BYTE_ORDER != BIG_ENDIAN
6788 not big endian
6789#endif
6790; return 0; }
6791EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006792if { (eval echo configure:6793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006793 rm -rf conftest*
6794 ac_cv_c_bigendian=yes
6795else
6796 echo "configure: failed program was:" >&5
6797 cat conftest.$ac_ext >&5
6798 rm -rf conftest*
6799 ac_cv_c_bigendian=no
6800fi
6801rm -f conftest*
6802else
6803 echo "configure: failed program was:" >&5
6804 cat conftest.$ac_ext >&5
6805fi
6806rm -f conftest*
6807if test $ac_cv_c_bigendian = unknown; then
6808if test "$cross_compiling" = yes; then
6809 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6810else
6811 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006812#line 6813 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006813#include "confdefs.h"
6814main () {
6815 /* Are we little or big endian? From Harbison&Steele. */
6816 union
6817 {
6818 long l;
6819 char c[sizeof (long)];
6820 } u;
6821 u.l = 1;
6822 exit (u.c[sizeof (long) - 1] == 1);
6823}
6824EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006825if { (eval echo configure:6826: \"$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 +00006826then
6827 ac_cv_c_bigendian=no
6828else
6829 echo "configure: failed program was:" >&5
6830 cat conftest.$ac_ext >&5
6831 rm -fr conftest*
6832 ac_cv_c_bigendian=yes
6833fi
6834rm -fr conftest*
6835fi
6836
6837fi
6838fi
6839
6840echo "$ac_t""$ac_cv_c_bigendian" 1>&6
6841if test $ac_cv_c_bigendian = yes; then
6842 cat >> confdefs.h <<\EOF
6843#define WORDS_BIGENDIAN 1
6844EOF
6845
6846fi
6847
6848
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006849# Check whether right shifting a negative integer extends the sign bit
6850# or fills with zeros (like the Cray J90, according to Tim Peters).
6851echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006852echo "configure:6853: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006853if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00006854 echo $ac_n "(cached) $ac_c" 1>&6
6855else
6856
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006857if test "$cross_compiling" = yes; then
6858 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6859else
6860 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006861#line 6862 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006862#include "confdefs.h"
6863
6864int main()
6865{
Vladimir Marangozova6180282000-07-12 05:05:06 +00006866 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006867}
6868
6869EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006870if { (eval echo configure:6871: \"$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 +00006871then
6872 ac_cv_rshift_extends_sign=yes
6873else
6874 echo "configure: failed program was:" >&5
6875 cat conftest.$ac_ext >&5
6876 rm -fr conftest*
6877 ac_cv_rshift_extends_sign=no
6878fi
6879rm -fr conftest*
6880fi
6881
6882fi
6883
6884echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
6885if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006886then
6887 cat >> confdefs.h <<\EOF
6888#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
6889EOF
6890
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006891fi
6892
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006893# check for getc_unlocked and related locking functions
6894echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006895echo "configure:6896: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006896if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
6897 echo $ac_n "(cached) $ac_c" 1>&6
6898else
6899
6900cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006901#line 6902 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006902#include "confdefs.h"
6903#include <stdio.h>
6904int main() {
6905
6906 FILE *f = fopen("/dev/null", "r");
6907 flockfile(f);
6908 getc_unlocked(f);
6909 funlockfile(f);
6910
6911; return 0; }
6912EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006913if { (eval echo configure:6914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006914 rm -rf conftest*
6915 ac_cv_have_getc_unlocked=yes
6916else
6917 echo "configure: failed program was:" >&5
6918 cat conftest.$ac_ext >&5
6919 rm -rf conftest*
6920 ac_cv_have_getc_unlocked=no
6921fi
6922rm -f conftest*
6923fi
6924
6925echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
6926if test "$ac_cv_have_getc_unlocked" = yes
6927then
6928 cat >> confdefs.h <<\EOF
6929#define HAVE_GETC_UNLOCKED 1
6930EOF
6931
6932fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006933
Guido van Rossum353ae582001-07-10 16:45:32 +00006934# check for readline 4.2
6935echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006936echo "configure:6937: checking for rl_completion_matches in -lreadline" >&5
Guido van Rossum353ae582001-07-10 16:45:32 +00006937ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
6938if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6939 echo $ac_n "(cached) $ac_c" 1>&6
6940else
6941 ac_save_LIBS="$LIBS"
6942LIBS="-lreadline -ltermcap $LIBS"
6943cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006944#line 6945 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00006945#include "confdefs.h"
6946/* Override any gcc2 internal prototype to avoid an error. */
6947/* We use char because int might match the return type of a gcc2
6948 builtin and then its argument prototype would still apply. */
6949char rl_completion_matches();
6950
6951int main() {
6952rl_completion_matches()
6953; return 0; }
6954EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006955if { (eval echo configure:6956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum353ae582001-07-10 16:45:32 +00006956 rm -rf conftest*
6957 eval "ac_cv_lib_$ac_lib_var=yes"
6958else
6959 echo "configure: failed program was:" >&5
6960 cat conftest.$ac_ext >&5
6961 rm -rf conftest*
6962 eval "ac_cv_lib_$ac_lib_var=no"
6963fi
6964rm -f conftest*
6965LIBS="$ac_save_LIBS"
6966
6967fi
6968if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6969 echo "$ac_t""yes" 1>&6
6970 cat >> confdefs.h <<\EOF
6971#define HAVE_RL_COMPLETION_MATCHES 1
6972EOF
6973
6974else
6975 echo "$ac_t""no" 1>&6
6976fi
6977
6978
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006979echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00006980echo "configure:6981: checking for broken nice()" >&5
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006981if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
6982 echo $ac_n "(cached) $ac_c" 1>&6
6983else
6984
6985if test "$cross_compiling" = yes; then
6986 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6987else
6988 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00006989#line 6990 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006990#include "confdefs.h"
6991
6992int main()
6993{
6994 int val1 = nice(1);
6995 if (val1 != -1 && val1 == nice(2))
6996 exit(0);
6997 exit(1);
6998}
6999
7000EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00007001if { (eval echo configure:7002: \"$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 +00007002then
7003 ac_cv_broken_nice=yes
7004else
7005 echo "configure: failed program was:" >&5
7006 cat conftest.$ac_ext >&5
7007 rm -fr conftest*
7008 ac_cv_broken_nice=no
7009fi
7010rm -fr conftest*
7011fi
7012
7013fi
7014
7015echo "$ac_t""$ac_cv_broken_nice" 1>&6
7016if test "$ac_cv_broken_nice" = yes
7017then
7018 cat >> confdefs.h <<\EOF
7019#define HAVE_BROKEN_NICE 1
7020EOF
7021
7022fi
7023
Guido van Rossum95713eb2000-05-18 20:53:31 +00007024# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
7025# Add sys/socket.h to confdefs.h
7026cat >> confdefs.h <<\EOF
7027#ifdef HAVE_SYS_SOCKET_H
7028#include <sys/socket.h>
7029#endif
7030EOF
7031echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00007032echo "configure:7033: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007033if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00007034 echo $ac_n "(cached) $ac_c" 1>&6
7035else
7036 cat > conftest.$ac_ext <<EOF
Martin v. Löwis36546db2001-09-05 14:24:43 +00007037#line 7038 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00007038#include "confdefs.h"
7039#include <sys/types.h>
7040#if STDC_HEADERS
7041#include <stdlib.h>
7042#include <stddef.h>
7043#endif
7044EOF
7045if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7046 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7047 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007048 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00007049else
7050 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007051 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00007052fi
7053rm -f conftest*
7054
7055fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007056echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7057if test $ac_cv_type_socklen_t = no; then
7058 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00007059#define socklen_t int
7060EOF
7061
7062fi
7063
7064
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00007065# Add Python/ prefix to LIBOBJS
7066libobjs=$LIBOBJS
7067LIBOBJS=
7068for obj in $libobjs; do
7069 LIBOBJS="$LIBOBJS Python/$obj"
7070done
7071
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007072#AC_MSG_CHECKING(for Modules/Setup)
7073#if test ! -f Modules/Setup ; then
7074# if test ! -d Modules ; then
7075# mkdir Modules
7076# fi
7077# cp "$srcdir/Modules/Setup.dist" Modules/Setup
7078# AC_MSG_RESULT(creating)
7079#else
7080# AC_MSG_RESULT(already exists)
7081#fi
7082
7083
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007084SRCDIRS="Parser Grammar Objects Python Modules"
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007085echo $ac_n "checking for build directories""... $ac_c" 1>&6
Martin v. Löwis36546db2001-09-05 14:24:43 +00007086echo "configure:7087: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007087for dir in $SRCDIRS; do
7088 if test ! -d $dir; then
7089 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007090 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007091done
7092echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007093
Guido van Rossum627b2d71993-12-24 10:39:16 +00007094# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007095trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007096cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007097# This file is a shell script that caches the results of configure
7098# tests run on this system so they can be shared between configure
7099# scripts and configure runs. It is not useful on other systems.
7100# If it contains results you don't want to keep, you may remove or edit it.
7101#
7102# By default, configure uses ./config.cache as the cache file,
7103# creating it if it does not exist already. You can give configure
7104# the --cache-file=FILE option to use a different cache file; that is
7105# what configure does when it calls configure scripts in
7106# subdirectories, so they share the cache.
7107# Giving --cache-file=/dev/null disables caching, for debugging configure.
7108# config.status only pays attention to the cache file if you give it the
7109# --recheck option to rerun configure.
7110#
7111EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007112# The following way of writing the cache mishandles newlines in values,
7113# but we know of no workaround that is simple, portable, and efficient.
7114# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007115# Ultrix sh set writes to stderr and can't be redirected directly,
7116# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007117(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007118 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007119 *ac_space=\ *)
7120 # `set' does not quote correctly, so add quotes (double-quote substitution
7121 # turns \\\\ into \\, and sed turns \\ into \).
7122 sed -n \
7123 -e "s/'/'\\\\''/g" \
7124 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7125 ;;
7126 *)
7127 # `set' quotes correctly as required by POSIX, so do not add quotes.
7128 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7129 ;;
7130 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007131if cmp -s $cache_file confcache; then
7132 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007133else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007134 if test -w $cache_file; then
7135 echo "updating cache $cache_file"
7136 cat confcache > $cache_file
7137 else
7138 echo "not updating unwritable cache $cache_file"
7139 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007140fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007141rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007142
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007143trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007144
7145test "x$prefix" = xNONE && prefix=$ac_default_prefix
7146# Let make expand exec_prefix.
7147test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007148
Guido van Rossum7f43da71994-08-01 12:15:30 +00007149# Any assignment to VPATH causes Sun make to only execute
7150# the first set of double-colon rules, so remove it if not needed.
7151# If there is a colon in the path, we need to keep it.
7152if test "x$srcdir" = x.; then
7153 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7154fi
7155
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007156trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00007157
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007158DEFS=-DHAVE_CONFIG_H
7159
7160# Without the "./", some shells look in PATH for config.status.
7161: ${CONFIG_STATUS=./config.status}
7162
7163echo creating $CONFIG_STATUS
7164rm -f $CONFIG_STATUS
7165cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007166#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007167# Generated automatically by configure.
7168# Run this file to recreate the current configuration.
7169# This directory was configured as follows,
7170# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7171#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007172# $0 $ac_configure_args
7173#
7174# Compiler output produced by configure, useful for debugging
7175# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007177ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007178for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00007179do
Guido van Rossum7f43da71994-08-01 12:15:30 +00007180 case "\$ac_option" in
7181 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007182 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7183 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00007184 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007185 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007186 exit 0 ;;
7187 -help | --help | --hel | --he | --h)
7188 echo "\$ac_cs_usage"; exit 0 ;;
7189 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00007190 esac
7191done
7192
Guido van Rossum7f43da71994-08-01 12:15:30 +00007193ac_given_srcdir=$srcdir
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007194ac_given_INSTALL="$INSTALL"
Guido van Rossum627b2d71993-12-24 10:39:16 +00007195
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007196trap '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 +00007197EOF
7198cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007199
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007200# Protect against being on the right side of a sed subst in config.status.
7201sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7202 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007203$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00007204$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007205s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007206s%@CFLAGS@%$CFLAGS%g
7207s%@CPPFLAGS@%$CPPFLAGS%g
7208s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007209s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007210s%@DEFS@%$DEFS%g
7211s%@LDFLAGS@%$LDFLAGS%g
7212s%@LIBS@%$LIBS%g
7213s%@exec_prefix@%$exec_prefix%g
7214s%@prefix@%$prefix%g
7215s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007216s%@bindir@%$bindir%g
7217s%@sbindir@%$sbindir%g
7218s%@libexecdir@%$libexecdir%g
7219s%@datadir@%$datadir%g
7220s%@sysconfdir@%$sysconfdir%g
7221s%@sharedstatedir@%$sharedstatedir%g
7222s%@localstatedir@%$localstatedir%g
7223s%@libdir@%$libdir%g
7224s%@includedir@%$includedir%g
7225s%@oldincludedir@%$oldincludedir%g
7226s%@infodir@%$infodir%g
7227s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00007228s%@VERSION@%$VERSION%g
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00007229s%@CONFIG_ARGS@%$CONFIG_ARGS%g
Jack Jansene578a632001-08-15 01:27:14 +00007230s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g
7231s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g
7232s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g
7233s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00007234s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00007235s%@SGI_ABI@%$SGI_ABI%g
Martin v. Löwis22352952000-12-13 17:37:02 +00007236s%@CXX@%$CXX%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007237s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007238s%@CC@%$CC%g
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00007239s%@CPP@%$CPP%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007240s%@EXEEXT@%$EXEEXT%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007241s%@LIBRARY@%$LIBRARY%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007242s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007243s%@DLLLIBRARY@%$DLLLIBRARY%g
Jack Jansene578a632001-08-15 01:27:14 +00007244s%@BLDLIBRARY@%$BLDLIBRARY%g
7245s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00007246s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007247s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007248s%@AR@%$AR%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007249s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007250s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007251s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007252s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00007253s%@OPT@%$OPT%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007254s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007255s%@SO@%$SO%g
7256s%@LDSHARED@%$LDSHARED%g
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007257s%@BLDSHARED@%$BLDSHARED%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007258s%@CCSHARED@%$CCSHARED%g
7259s%@LINKFORSHARED@%$LINKFORSHARED%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007260s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007261s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7262s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
Guido van Rossum009f7871997-12-04 00:51:42 +00007263s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00007264s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007265s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00007266s%@DYNLOADFILE@%$DYNLOADFILE%g
Neil Schemenauer4e425612001-06-19 15:44:15 +00007267s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007268s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007269s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7270s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7271s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00007272s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007273s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007274s%@LIBM@%$LIBM%g
7275s%@LIBC@%$LIBC%g
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007276s%@UNICODE_OBJS@%$UNICODE_OBJS%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007277s%@SRCDIRS@%$SRCDIRS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007278
7279CEOF
7280EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007281
7282cat >> $CONFIG_STATUS <<\EOF
7283
7284# Split the substitutions into bite-sized pieces for seds with
7285# small command number limits, like on Digital OSF/1 and HP-UX.
7286ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7287ac_file=1 # Number of current file.
7288ac_beg=1 # First line for current file.
7289ac_end=$ac_max_sed_cmds # Line after last line for current file.
7290ac_more_lines=:
7291ac_sed_cmds=""
7292while $ac_more_lines; do
7293 if test $ac_beg -gt 1; then
7294 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7295 else
7296 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7297 fi
7298 if test ! -s conftest.s$ac_file; then
7299 ac_more_lines=false
7300 rm -f conftest.s$ac_file
7301 else
7302 if test -z "$ac_sed_cmds"; then
7303 ac_sed_cmds="sed -f conftest.s$ac_file"
7304 else
7305 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7306 fi
7307 ac_file=`expr $ac_file + 1`
7308 ac_beg=$ac_end
7309 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7310 fi
7311done
7312if test -z "$ac_sed_cmds"; then
7313 ac_sed_cmds=cat
7314fi
7315EOF
7316
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007317cat >> $CONFIG_STATUS <<EOF
7318
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007319CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007320EOF
7321cat >> $CONFIG_STATUS <<\EOF
7322for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007323 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007324 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007325 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007326 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7327 *) ac_file_in="${ac_file}.in" ;;
7328 esac
7329
Guido van Rossumf78abae1997-01-21 22:02:36 +00007330 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007331
7332 # Remove last slash and all that follows it. Not all systems have dirname.
7333 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7334 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7335 # The file is in a subdirectory.
7336 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007337 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007338 # A "../" for each directory in $ac_dir_suffix.
7339 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7340 else
7341 ac_dir_suffix= ac_dots=
7342 fi
7343
7344 case "$ac_given_srcdir" in
7345 .) srcdir=.
7346 if test -z "$ac_dots"; then top_srcdir=.
7347 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7348 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7349 *) # Relative path.
7350 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7351 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7352 esac
7353
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007354 case "$ac_given_INSTALL" in
7355 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7356 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7357 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007358
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007359 echo creating "$ac_file"
7360 rm -f "$ac_file"
7361 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7362 case "$ac_file" in
7363 *Makefile*) ac_comsub="1i\\
7364# $configure_input" ;;
7365 *) ac_comsub= ;;
7366 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007367
7368 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 +00007369 sed -e "$ac_comsub
7370s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007371s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007372s%@top_srcdir@%$top_srcdir%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007373s%@INSTALL@%$INSTALL%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00007374" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00007375fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00007376rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007377
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007378# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7379# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007380#
7381# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007382ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7383ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007384ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007385ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007386# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007387ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7388ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007389ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007390ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007391# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007392ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7393ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007394ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007395ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007396
Guido van Rossumf78abae1997-01-21 22:02:36 +00007397if test "${CONFIG_HEADERS+set}" != set; then
7398EOF
7399cat >> $CONFIG_STATUS <<EOF
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007400 CONFIG_HEADERS="pyconfig.h"
Guido van Rossumf78abae1997-01-21 22:02:36 +00007401EOF
7402cat >> $CONFIG_STATUS <<\EOF
7403fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007404for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007405 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007406 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007407 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007408 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7409 *) ac_file_in="${ac_file}.in" ;;
7410 esac
7411
Guido van Rossum7f43da71994-08-01 12:15:30 +00007412 echo creating $ac_file
7413
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007414 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00007415 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7416 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007417
7418EOF
7419
7420# Transform confdefs.h into a sed script conftest.vals that substitutes
7421# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007422# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007423# Protect against being in an unquoted here document in config.status.
7424rm -f conftest.vals
7425cat > conftest.hdr <<\EOF
7426s/[\\&%]/\\&/g
7427s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007428s%#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 +00007429s%ac_d%ac_u%gp
7430s%ac_u%ac_e%gp
7431EOF
7432sed -n -f conftest.hdr confdefs.h > conftest.vals
7433rm -f conftest.hdr
7434
7435# This sed command replaces #undef with comments. This is necessary, for
7436# example, in the case of _POSIX_SOURCE, which is predefined and required
7437# on some systems where configure will not decide to define it.
7438cat >> conftest.vals <<\EOF
7439s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7440EOF
7441
7442# Break up conftest.vals because some shells have a limit on
7443# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007444
7445rm -f conftest.tail
7446while :
7447do
7448 ac_lines=`grep -c . conftest.vals`
7449 # grep -c gives empty output for an empty file on some AIX systems.
7450 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7451 # Write a limited-size here document to conftest.frag.
7452 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7453 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7454 echo 'CEOF
7455 sed -f conftest.frag conftest.in > conftest.out
7456 rm -f conftest.in
7457 mv conftest.out conftest.in
7458' >> $CONFIG_STATUS
7459 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7460 rm -f conftest.vals
7461 mv conftest.tail conftest.vals
7462done
7463rm -f conftest.vals
7464
7465cat >> $CONFIG_STATUS <<\EOF
7466 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00007467 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007468 cat conftest.in >> conftest.h
7469 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00007470 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00007471 echo "$ac_file is unchanged"
7472 rm -f conftest.h
7473 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007474 # Remove last slash and all that follows it. Not all systems have dirname.
7475 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7476 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7477 # The file is in a subdirectory.
7478 test ! -d "$ac_dir" && mkdir "$ac_dir"
7479 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00007480 rm -f $ac_file
7481 mv conftest.h $ac_file
7482 fi
7483fi; done
7484
Guido van Rossumf78abae1997-01-21 22:02:36 +00007485EOF
7486cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007487
Guido van Rossumf78abae1997-01-21 22:02:36 +00007488EOF
7489cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007490
7491exit 0
7492EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007493chmod +x $CONFIG_STATUS
7494rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007495test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00007496
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007497
7498echo "creating Setup"
7499if test ! -f Modules/Setup
7500then
7501 cp $srcdir/Modules/Setup.dist Modules/Setup
7502fi
7503
7504echo "creating Setup.local"
7505if test ! -f Modules/Setup.local
7506then
7507 echo "# Edit this file for local setup changes" >Modules/Setup.local
7508fi
7509
7510echo "creating Makefile"
7511$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
7512 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00007513 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007514mv config.c Modules