blob: 224e72cea0fb39a14ba9e3fb4b9776edade92dcf [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Neil Schemenauercf229462001-08-29 23:58:47 +00003# From configure.in Revision: 1.249
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>
Neil Schemenauercf229462001-08-29 23:58:47 +00002308#include <sys/types.h>
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002309main()
2310{
2311 FILE *f=fopen("conftestval", "w");
2312 if (!f) exit(1);
2313 fprintf(f, "%d\n", sizeof(int));
2314 exit(0);
2315}
2316EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002317if { (eval echo configure:2318: \"$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 +00002318then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002319 ac_cv_sizeof_int=`cat conftestval`
2320else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002321 echo "configure: failed program was:" >&5
2322 cat conftest.$ac_ext >&5
2323 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002324 ac_cv_sizeof_int=0
2325fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002326rm -fr conftest*
2327fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002328
2329fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002330echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2331cat >> confdefs.h <<EOF
2332#define SIZEOF_INT $ac_cv_sizeof_int
2333EOF
2334
2335
2336echo $ac_n "checking size of long""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002337echo "configure:2338: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002338if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002339 echo $ac_n "(cached) $ac_c" 1>&6
2340else
2341 if test "$cross_compiling" = yes; then
2342 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2343else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002344 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002345#line 2346 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002346#include "confdefs.h"
2347#include <stdio.h>
Neil Schemenauercf229462001-08-29 23:58:47 +00002348#include <sys/types.h>
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002349main()
2350{
2351 FILE *f=fopen("conftestval", "w");
2352 if (!f) exit(1);
2353 fprintf(f, "%d\n", sizeof(long));
2354 exit(0);
2355}
2356EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002357if { (eval echo configure:2358: \"$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 +00002358then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002359 ac_cv_sizeof_long=`cat conftestval`
2360else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002361 echo "configure: failed program was:" >&5
2362 cat conftest.$ac_ext >&5
2363 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002364 ac_cv_sizeof_long=0
2365fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002366rm -fr conftest*
2367fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002368
2369fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002370echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2371cat >> confdefs.h <<EOF
2372#define SIZEOF_LONG $ac_cv_sizeof_long
2373EOF
2374
2375
Guido van Rossumad678af1998-10-02 14:42:15 +00002376echo $ac_n "checking size of void *""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002377echo "configure:2378: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002378if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002379 echo $ac_n "(cached) $ac_c" 1>&6
2380else
2381 if test "$cross_compiling" = yes; then
2382 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2383else
2384 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002385#line 2386 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002386#include "confdefs.h"
2387#include <stdio.h>
Neil Schemenauercf229462001-08-29 23:58:47 +00002388#include <sys/types.h>
Guido van Rossumad678af1998-10-02 14:42:15 +00002389main()
2390{
2391 FILE *f=fopen("conftestval", "w");
2392 if (!f) exit(1);
2393 fprintf(f, "%d\n", sizeof(void *));
2394 exit(0);
2395}
2396EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002397if { (eval echo configure:2398: \"$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 +00002398then
2399 ac_cv_sizeof_void_p=`cat conftestval`
2400else
2401 echo "configure: failed program was:" >&5
2402 cat conftest.$ac_ext >&5
2403 rm -fr conftest*
2404 ac_cv_sizeof_void_p=0
2405fi
2406rm -fr conftest*
2407fi
2408
2409fi
2410echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2411cat >> confdefs.h <<EOF
2412#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2413EOF
2414
2415
Guido van Rossumef2255b2000-03-10 22:30:29 +00002416echo $ac_n "checking size of char""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002417echo "configure:2418: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002418if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002419 echo $ac_n "(cached) $ac_c" 1>&6
2420else
2421 if test "$cross_compiling" = yes; then
2422 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2423else
2424 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002425#line 2426 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002426#include "confdefs.h"
2427#include <stdio.h>
Neil Schemenauercf229462001-08-29 23:58:47 +00002428#include <sys/types.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +00002429main()
2430{
2431 FILE *f=fopen("conftestval", "w");
2432 if (!f) exit(1);
2433 fprintf(f, "%d\n", sizeof(char));
2434 exit(0);
2435}
2436EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002437if { (eval echo configure:2438: \"$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 +00002438then
2439 ac_cv_sizeof_char=`cat conftestval`
2440else
2441 echo "configure: failed program was:" >&5
2442 cat conftest.$ac_ext >&5
2443 rm -fr conftest*
2444 ac_cv_sizeof_char=0
2445fi
2446rm -fr conftest*
2447fi
2448
2449fi
2450echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2451cat >> confdefs.h <<EOF
2452#define SIZEOF_CHAR $ac_cv_sizeof_char
2453EOF
2454
2455
2456echo $ac_n "checking size of short""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002457echo "configure:2458: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002458if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002459 echo $ac_n "(cached) $ac_c" 1>&6
2460else
2461 if test "$cross_compiling" = yes; then
2462 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2463else
2464 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002465#line 2466 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002466#include "confdefs.h"
2467#include <stdio.h>
Neil Schemenauercf229462001-08-29 23:58:47 +00002468#include <sys/types.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +00002469main()
2470{
2471 FILE *f=fopen("conftestval", "w");
2472 if (!f) exit(1);
2473 fprintf(f, "%d\n", sizeof(short));
2474 exit(0);
2475}
2476EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002477if { (eval echo configure:2478: \"$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 +00002478then
2479 ac_cv_sizeof_short=`cat conftestval`
2480else
2481 echo "configure: failed program was:" >&5
2482 cat conftest.$ac_ext >&5
2483 rm -fr conftest*
2484 ac_cv_sizeof_short=0
2485fi
2486rm -fr conftest*
2487fi
2488
2489fi
2490echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2491cat >> confdefs.h <<EOF
2492#define SIZEOF_SHORT $ac_cv_sizeof_short
2493EOF
2494
2495
2496echo $ac_n "checking size of float""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002497echo "configure:2498: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002498if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002499 echo $ac_n "(cached) $ac_c" 1>&6
2500else
2501 if test "$cross_compiling" = yes; then
2502 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2503else
2504 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002505#line 2506 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002506#include "confdefs.h"
2507#include <stdio.h>
Neil Schemenauercf229462001-08-29 23:58:47 +00002508#include <sys/types.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +00002509main()
2510{
2511 FILE *f=fopen("conftestval", "w");
2512 if (!f) exit(1);
2513 fprintf(f, "%d\n", sizeof(float));
2514 exit(0);
2515}
2516EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002517if { (eval echo configure:2518: \"$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 +00002518then
2519 ac_cv_sizeof_float=`cat conftestval`
2520else
2521 echo "configure: failed program was:" >&5
2522 cat conftest.$ac_ext >&5
2523 rm -fr conftest*
2524 ac_cv_sizeof_float=0
2525fi
2526rm -fr conftest*
2527fi
2528
2529fi
2530echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2531cat >> confdefs.h <<EOF
2532#define SIZEOF_FLOAT $ac_cv_sizeof_float
2533EOF
2534
2535
2536echo $ac_n "checking size of double""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002537echo "configure:2538: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002538if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002539 echo $ac_n "(cached) $ac_c" 1>&6
2540else
2541 if test "$cross_compiling" = yes; then
2542 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2543else
2544 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002545#line 2546 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002546#include "confdefs.h"
2547#include <stdio.h>
Neil Schemenauercf229462001-08-29 23:58:47 +00002548#include <sys/types.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +00002549main()
2550{
2551 FILE *f=fopen("conftestval", "w");
2552 if (!f) exit(1);
2553 fprintf(f, "%d\n", sizeof(double));
2554 exit(0);
2555}
2556EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002557if { (eval echo configure:2558: \"$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 +00002558then
2559 ac_cv_sizeof_double=`cat conftestval`
2560else
2561 echo "configure: failed program was:" >&5
2562 cat conftest.$ac_ext >&5
2563 rm -fr conftest*
2564 ac_cv_sizeof_double=0
2565fi
2566rm -fr conftest*
2567fi
2568
2569fi
2570echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2571cat >> confdefs.h <<EOF
2572#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2573EOF
2574
2575
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002576echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002577echo "configure:2578: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002578if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002579 echo $ac_n "(cached) $ac_c" 1>&6
2580else
2581 if test "$cross_compiling" = yes; then
2582 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2583else
2584 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002585#line 2586 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002586#include "confdefs.h"
2587#include <stdio.h>
Neil Schemenauercf229462001-08-29 23:58:47 +00002588#include <sys/types.h>
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002589main()
2590{
2591 FILE *f=fopen("conftestval", "w");
2592 if (!f) exit(1);
2593 fprintf(f, "%d\n", sizeof(fpos_t));
2594 exit(0);
2595}
2596EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002597if { (eval echo configure:2598: \"$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 +00002598then
2599 ac_cv_sizeof_fpos_t=`cat conftestval`
2600else
2601 echo "configure: failed program was:" >&5
2602 cat conftest.$ac_ext >&5
2603 rm -fr conftest*
2604 ac_cv_sizeof_fpos_t=0
2605fi
2606rm -fr conftest*
2607fi
2608
2609fi
2610echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2611cat >> confdefs.h <<EOF
2612#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2613EOF
2614
2615
Guido van Rossum0a516c91994-09-12 10:58:40 +00002616
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002617echo $ac_n "checking for long long support""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002618echo "configure:2619: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002619have_long_long=no
2620cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002621#line 2622 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002622#include "confdefs.h"
2623
2624int main() {
2625long long x; x = (long long)0;
2626; return 0; }
2627EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002628if { (eval echo configure:2629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002629 rm -rf conftest*
2630 cat >> confdefs.h <<\EOF
2631#define HAVE_LONG_LONG 1
2632EOF
2633 have_long_long=yes
2634else
2635 echo "configure: failed program was:" >&5
2636 cat conftest.$ac_ext >&5
2637fi
2638rm -f conftest*
2639echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002640if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002641echo $ac_n "checking size of long long""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002642echo "configure:2643: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002643if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002644 echo $ac_n "(cached) $ac_c" 1>&6
2645else
2646 if test "$cross_compiling" = yes; then
2647 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2648else
2649 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002650#line 2651 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002651#include "confdefs.h"
2652#include <stdio.h>
Neil Schemenauercf229462001-08-29 23:58:47 +00002653#include <sys/types.h>
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002654main()
2655{
2656 FILE *f=fopen("conftestval", "w");
2657 if (!f) exit(1);
2658 fprintf(f, "%d\n", sizeof(long long));
2659 exit(0);
2660}
2661EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002662if { (eval echo configure:2663: \"$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 +00002663then
2664 ac_cv_sizeof_long_long=`cat conftestval`
2665else
2666 echo "configure: failed program was:" >&5
2667 cat conftest.$ac_ext >&5
2668 rm -fr conftest*
2669 ac_cv_sizeof_long_long=0
2670fi
2671rm -fr conftest*
2672fi
2673
2674fi
2675echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2676cat >> confdefs.h <<EOF
2677#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2678EOF
2679
2680
2681fi
2682
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002683echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002684echo "configure:2685: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002685have_uintptr_t=no
2686cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002687#line 2688 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002688#include "confdefs.h"
2689
2690int main() {
2691uintptr_t x; x = (uintptr_t)0;
2692; return 0; }
2693EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002694if { (eval echo configure:2695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002695 rm -rf conftest*
2696 cat >> confdefs.h <<\EOF
2697#define HAVE_UINTPTR_T 1
2698EOF
2699 have_uintptr_t=yes
2700else
2701 echo "configure: failed program was:" >&5
2702 cat conftest.$ac_ext >&5
2703fi
2704rm -f conftest*
2705echo "$ac_t""$have_uintptr_t" 1>&6
2706if test "$have_uintptr_t" = yes ; then
2707echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002708echo "configure:2709: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002709if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002710 echo $ac_n "(cached) $ac_c" 1>&6
2711else
2712 if test "$cross_compiling" = yes; then
2713 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2714else
2715 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002716#line 2717 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002717#include "confdefs.h"
2718#include <stdio.h>
Neil Schemenauercf229462001-08-29 23:58:47 +00002719#include <sys/types.h>
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002720main()
2721{
2722 FILE *f=fopen("conftestval", "w");
2723 if (!f) exit(1);
2724 fprintf(f, "%d\n", sizeof(uintptr_t));
2725 exit(0);
2726}
2727EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002728if { (eval echo configure:2729: \"$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 +00002729then
2730 ac_cv_sizeof_uintptr_t=`cat conftestval`
2731else
2732 echo "configure: failed program was:" >&5
2733 cat conftest.$ac_ext >&5
2734 rm -fr conftest*
2735 ac_cv_sizeof_uintptr_t=0
2736fi
2737rm -fr conftest*
2738fi
2739
2740fi
2741echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2742cat >> confdefs.h <<EOF
2743#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2744EOF
2745
2746
2747fi
2748
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002749# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2750echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002751echo "configure:2752: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002752if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002753 echo $ac_n "(cached) $ac_c" 1>&6
2754else
2755 if test "$cross_compiling" = yes; then
2756 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2757else
2758 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002759#line 2760 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002760#include "confdefs.h"
2761#include <stdio.h>
2762#include <sys/types.h>
2763main()
2764{
2765 FILE *f=fopen("conftestval", "w");
2766 if (!f) exit(1);
2767 fprintf(f, "%d\n", sizeof(off_t));
2768 exit(0);
2769}
2770EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002771if { (eval echo configure:2772: \"$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 +00002772then
2773 ac_cv_sizeof_off_t=`cat conftestval`
2774else
2775 echo "configure: failed program was:" >&5
2776 cat conftest.$ac_ext >&5
2777 rm -fr conftest*
2778 ac_cv_sizeof_off_t=0
2779fi
2780rm -fr conftest*
2781fi
2782
2783
2784fi
2785
2786echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2787cat >> confdefs.h <<EOF
2788#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2789EOF
2790
2791
2792echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002793echo "configure:2794: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002794if test "$have_long_long" = yes -a \
2795 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2796 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002797 cat >> confdefs.h <<\EOF
2798#define HAVE_LARGEFILE_SUPPORT 1
2799EOF
2800
2801 echo "$ac_t""yes" 1>&6
2802else
2803 echo "$ac_t""no" 1>&6
2804fi
2805
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002806# AC_CHECK_SIZEOF() doesn't include <time.h>.
2807echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002808echo "configure:2809: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002809if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002810 echo $ac_n "(cached) $ac_c" 1>&6
2811else
2812 if test "$cross_compiling" = yes; then
2813 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2814else
2815 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002816#line 2817 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002817#include "confdefs.h"
2818#include <stdio.h>
2819#include <time.h>
2820main()
2821{
2822 FILE *f=fopen("conftestval", "w");
2823 if (!f) exit(1);
2824 fprintf(f, "%d\n", sizeof(time_t));
2825 exit(0);
2826}
2827EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002828if { (eval echo configure:2829: \"$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 +00002829then
2830 ac_cv_sizeof_time_t=`cat conftestval`
2831else
2832 echo "configure: failed program was:" >&5
2833 cat conftest.$ac_ext >&5
2834 rm -fr conftest*
2835 ac_cv_sizeof_time_t=0
2836fi
2837rm -fr conftest*
2838fi
2839
2840
2841fi
2842
2843echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2844cat >> confdefs.h <<EOF
2845#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2846EOF
2847
2848
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002849
Trent Mick635f6fb2000-08-23 21:33:05 +00002850# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00002851ac_save_cc="$CC"
2852if test "$ac_cv_kpthread" = "yes"
2853then CC="$CC -Kpthread"
2854fi
Trent Mick635f6fb2000-08-23 21:33:05 +00002855echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002856echo "configure:2857: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002857have_pthread_t=no
2858cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002859#line 2860 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002860#include "confdefs.h"
2861#include <pthread.h>
2862int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002863pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002864; return 0; }
2865EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002866if { (eval echo configure:2867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002867 rm -rf conftest*
2868 have_pthread_t=yes
2869else
2870 echo "configure: failed program was:" >&5
2871 cat conftest.$ac_ext >&5
2872fi
2873rm -f conftest*
2874echo "$ac_t""$have_pthread_t" 1>&6
2875if test "$have_pthread_t" = yes ; then
2876 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2877 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002878echo "configure:2879: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002879 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002880 echo $ac_n "(cached) $ac_c" 1>&6
2881else
2882 if test "$cross_compiling" = yes; then
2883 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2884else
2885 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002886#line 2887 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002887#include "confdefs.h"
2888#include <stdio.h>
2889 #include <pthread.h>
2890 main()
2891 {
2892 FILE *f=fopen("conftestval", "w");
2893 if (!f) exit(1);
2894 fprintf(f, "%d\n", sizeof(pthread_t));
2895 exit(0);
2896 }
2897EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00002898if { (eval echo configure:2899: \"$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 +00002899then
2900 ac_cv_sizeof_pthread_t=`cat conftestval`
2901else
2902 echo "configure: failed program was:" >&5
2903 cat conftest.$ac_ext >&5
2904 rm -fr conftest*
2905 ac_cv_sizeof_pthread_t=0
2906fi
2907rm -fr conftest*
2908fi
2909
2910
2911fi
2912
2913 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2914 cat >> confdefs.h <<EOF
2915#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2916EOF
2917
2918fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00002919CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00002920
Jack Jansene578a632001-08-15 01:27:14 +00002921echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002922echo "configure:2923: checking for --enable-toolbox-glue" >&5
Jack Jansene578a632001-08-15 01:27:14 +00002923# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
2924if test "${enable_toolbox_glue+set}" = set; then
2925 enableval="$enable_toolbox_glue"
2926 :
2927fi
2928
2929
2930if test -z "$enable_toolbox_glue"
2931then
2932 case $ac_sys_system/$ac_sys_release in
2933 Darwin/*)
2934 enable_toolbox_glue="yes";;
2935 *)
2936 enable_toolbox_glue="no";;
2937 esac
2938fi
2939case "$enable_toolbox_glue" in
2940yes)
2941 extra_frameworks="-framework Carbon -framework Foundation"
2942 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00002943 extra_undefs="-u __dummy -u _PyMac_Error"
Jack Jansene578a632001-08-15 01:27:14 +00002944 cat >> confdefs.h <<\EOF
2945#define USE_TOOLBOX_OBJECT_GLUE 1
2946EOF
2947
2948 ;;
2949*)
2950 extra_frameworks=""
2951 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00002952 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00002953 ;;
2954esac
2955echo "$ac_t""$enable_toolbox_glue" 1>&6
2956
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002957
2958case $ac_sys_system/$ac_sys_release in
Guido van Rossum5839e582000-10-09 19:52:35 +00002959 Darwin/*)
2960 ns_undef_sym='_environ'
Jack Jansene578a632001-08-15 01:27:14 +00002961 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
2962 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
2963 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
2964 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002965esac
2966
Jack Jansene578a632001-08-15 01:27:14 +00002967echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002968echo "configure:2969: checking for --enable-framework" >&5
Jack Jansene578a632001-08-15 01:27:14 +00002969if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002970then
Jack Jansenca06bc62001-08-03 15:32:23 +00002971 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002972 # -U __environ is needed since bundles don't have access
2973 # to crt0 when built but will always be linked against it
Jack Jansene578a632001-08-15 01:27:14 +00002974 # -F. is needed to allow linking to the framework while
2975 # in the build location.
2976
2977 LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002978 cat >> confdefs.h <<\EOF
2979#define WITH_NEXT_FRAMEWORK 1
2980EOF
2981
2982 echo "$ac_t""yes" 1>&6
2983else
2984 echo "$ac_t""no" 1>&6
2985fi
2986
Jack Jansene578a632001-08-15 01:27:14 +00002987echo $ac_n "checking for dyld""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00002988echo "configure:2989: checking for dyld" >&5
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002989case $ac_sys_system/$ac_sys_release in
2990 Darwin/*)
2991 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002992#define WITH_DYLD 1
2993EOF
2994
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002995 echo "$ac_t""always on for Darwin" 1>&6
2996 ;;
2997 *)
Jack Jansene578a632001-08-15 01:27:14 +00002998 echo "$ac_t""no" 1>&6
2999 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003000esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003001
Guido van Rossum0a516c91994-09-12 10:58:40 +00003002# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00003003
3004
3005
3006
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003007
Guido van Rossum0a516c91994-09-12 10:58:40 +00003008# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00003009# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003010echo $ac_n "checking SO""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003011echo "configure:3012: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003012if test -z "$SO"
3013then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003014 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003015 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003016 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003017 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003018 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003019fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003020echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003021# LDSHARED is the ld *command* used to create shared library
3022# -- "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 +00003023# (Shared libraries in this instance are shared modules to be loaded into
3024# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003025echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003026echo "configure:3027: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003027if test -z "$LDSHARED"
3028then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003029 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003030 AIX*)
3031 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
3032 LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp"
3033 ;;
3034 BeOS*)
3035 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
3036 LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
3037 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003038 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003039 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003040 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00003041 SunOS/5*)
3042 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003043 then LDSHARED='$(CC) -shared'
Greg Ward57c9a6632000-05-26 12:22:54 +00003044 else LDSHARED="ld -G";
3045 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003046 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003047 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3048 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansene578a632001-08-15 01:27:14 +00003049 Darwin/*)
3050 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3051 if test "$enable_framework" ; then
3052 # Link against the framework. All externals should be defined.
3053 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3054 else
3055 # No framework. Ignore undefined symbols, assuming they come from Python
3056 LDSHARED="$LDSHARED -undefined suppress"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003057 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00003058 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003059 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003060 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003061 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00003062 NetBSD*)
3063 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3064 then
3065 LDSHARED="cc -shared"
3066 else
3067 LDSHARED="ld -Bshareable"
3068 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003069 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003070 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003071 then
3072 LDSHARED="cc -shared ${LDFLAGS}"
3073 else
3074 LDSHARED="ld -Bshareable ${LDFLAGS}"
3075 fi;;
Martin v. Löwisbec19582001-03-21 15:57:54 +00003076 UnixWare*)
3077 if test "$GCC" = "yes"
3078 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003079 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003080 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003081 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003082 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003083 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003084 *) LDSHARED="ld";;
3085 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003086fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003087echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003088BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003089# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003090# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003091echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003092echo "configure:3093: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003093if test -z "$CCSHARED"
3094then
Guido van Rossum07397971997-04-29 21:49:50 +00003095 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003096 SunOS*) if test "$GCC" = yes;
3097 then CCSHARED="-fPIC";
3098 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003099 hp*|HP*) if test "$GCC" = yes;
3100 then CCSHARED="-fpic";
3101 else CCSHARED="+z";
3102 fi;;
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003103 Linux*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003104 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003105 OpenBSD*) CCSHARED="-fpic";;
3106 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Martin v. Löwisbec19582001-03-21 15:57:54 +00003107 UnixWare*)
3108 if test "$GCC" = "yes"
3109 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003110 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003111 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003112 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003113 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003114 IRIX*/6*) case $CC in
3115 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003116 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003117 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003118 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003119 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003120fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003121echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003122# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003123# the python executable -- this is only needed for a few systems
3124echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003125echo "configure:3126: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003126if test -z "$LINKFORSHARED"
3127then
Guido van Rossum07397971997-04-29 21:49:50 +00003128 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003129 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003130 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00003131 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003132 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00003133 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003134 # -u libsys_s pulls in all symbols in libsys
Jack Jansene578a632001-08-15 01:27:14 +00003135 Darwin/*)
3136 # -u __dummy makes the linker aware of the objc runtime
3137 # in System.framework; otherwise, __objcInit (referenced in
3138 # crt1.o) gets erroneously defined as common, which breaks dynamic
3139 # loading of any modules which reference it in System.framework.
3140 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
3141 # not used by the core itself but which needs to be in the core so
3142 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00003143 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00003144 if test "$enable_framework"
3145 then
3146 LINKFORSHARED="$LINKFORSHARED -framework Python"
3147 fi
3148 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003149 UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003150 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003151 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003152 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003153 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3154 then
3155 LINKFORSHARED="-Wl,--export-dynamic"
3156 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003157 SunOS/5*) case $CC in
3158 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003159 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003160 then
3161 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003162 fi;;
3163 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003164 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003165fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003166echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003167
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003168
3169echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003170echo "configure:3171: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003171if test ! "$LIBRARY" = "$LDLIBRARY"
3172then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003173 case $ac_sys_system in
3174 CYGWIN*)
3175 # Cygwin needs CCSHARED when building extension DLLs
3176 # but not when building the interpreter DLL.
3177 CFLAGSFORSHARED='';;
3178 *)
3179 CFLAGSFORSHARED='$(CCSHARED)'
3180 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003181fi
3182echo "$ac_t""$CFLAGSFORSHARED" 1>&6
3183
Guido van Rossum627b2d71993-12-24 10:39:16 +00003184# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00003185echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003186echo "configure:3187: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003187ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003188if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003189 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003190else
3191 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003192LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003193cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003194#line 3195 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003195#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003196/* Override any gcc2 internal prototype to avoid an error. */
3197/* We use char because int might match the return type of a gcc2
3198 builtin and then its argument prototype would still apply. */
3199char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003200
Guido van Rossumf78abae1997-01-21 22:02:36 +00003201int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003202dlopen()
3203; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003204EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003205if { (eval echo configure:3206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003206 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003207 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003208else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003209 echo "configure: failed program was:" >&5
3210 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003211 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003212 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003213fi
3214rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003215LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003216
Guido van Rossum627b2d71993-12-24 10:39:16 +00003217fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003218if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003219 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003220 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3221 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003222 cat >> confdefs.h <<EOF
3223#define $ac_tr_lib 1
3224EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003225
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003226 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003227
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003228else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003229 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003230fi
3231 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00003232echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003233echo "configure:3234: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003234ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003235if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003236 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003237else
3238 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003239LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003240cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003241#line 3242 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003242#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003243/* Override any gcc2 internal prototype to avoid an error. */
3244/* We use char because int might match the return type of a gcc2
3245 builtin and then its argument prototype would still apply. */
3246char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003247
Guido van Rossumf78abae1997-01-21 22:02:36 +00003248int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003249shl_load()
3250; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003251EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003252if { (eval echo configure:3253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003253 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003254 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003255else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003256 echo "configure: failed program was:" >&5
3257 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003258 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003259 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003260fi
3261rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003262LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003263
Guido van Rossum627b2d71993-12-24 10:39:16 +00003264fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003265if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003266 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003267 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3268 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003269 cat >> confdefs.h <<EOF
3270#define $ac_tr_lib 1
3271EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003272
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003273 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003274
3275else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003276 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003277fi
3278 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003279
3280# checks for system dependent C++ extensions support
3281case "$ac_sys_system" in
3282 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003283echo "configure:3284: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003284 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003285#line 3286 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003286#include "confdefs.h"
3287#include "/usr/lpp/xlC/include/load.h"
3288int main() {
3289loadAndInit("", 0, "")
3290; return 0; }
3291EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003292if { (eval echo configure:3293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003293 rm -rf conftest*
3294 cat >> confdefs.h <<\EOF
3295#define AIX_GENUINE_CPLUSPLUS 1
3296EOF
3297
3298 echo "$ac_t""yes" 1>&6
3299else
3300 echo "configure: failed program was:" >&5
3301 cat conftest.$ac_ext >&5
3302 rm -rf conftest*
3303 echo "$ac_t""no" 1>&6
3304fi
3305rm -f conftest*;;
3306 *) ;;
3307esac
3308
Guido van Rossum70c7f481998-03-26 18:44:10 +00003309# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3310# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003311# BeOS' sockets are stashed in libnet.
3312case "$ac_sys_system" in
3313IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003314*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003315echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003316echo "configure:3317: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003317ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003318if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003319 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003320else
3321 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003322LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003323cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003324#line 3325 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003325#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003326/* Override any gcc2 internal prototype to avoid an error. */
3327/* We use char because int might match the return type of a gcc2
3328 builtin and then its argument prototype would still apply. */
3329char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003330
Guido van Rossumf78abae1997-01-21 22:02:36 +00003331int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003332t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003333; return 0; }
3334EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003335if { (eval echo configure:3336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003336 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003337 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003338else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003339 echo "configure: failed program was:" >&5
3340 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003341 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003342 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003343fi
3344rm -f conftest*
3345LIBS="$ac_save_LIBS"
3346
3347fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003348if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003349 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003350 LIBS="-lnsl $LIBS"
3351else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003352 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003353fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003354 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003355echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003356echo "configure:3357: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003357ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003358if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003359 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003360else
3361 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003362LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003363cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003364#line 3365 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003365#include "confdefs.h"
3366/* Override any gcc2 internal prototype to avoid an error. */
3367/* We use char because int might match the return type of a gcc2
3368 builtin and then its argument prototype would still apply. */
3369char socket();
3370
3371int main() {
3372socket()
3373; return 0; }
3374EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003375if { (eval echo configure:3376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003376 rm -rf conftest*
3377 eval "ac_cv_lib_$ac_lib_var=yes"
3378else
3379 echo "configure: failed program was:" >&5
3380 cat conftest.$ac_ext >&5
3381 rm -rf conftest*
3382 eval "ac_cv_lib_$ac_lib_var=no"
3383fi
3384rm -f conftest*
3385LIBS="$ac_save_LIBS"
3386
3387fi
3388if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3389 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003390 LIBS="-lsocket $LIBS"
3391else
3392 echo "$ac_t""no" 1>&6
3393fi
3394 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003395;;
3396esac
3397case "$ac_sys_system" in
3398BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003399echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003400echo "configure:3401: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003401ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003402if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003403 echo $ac_n "(cached) $ac_c" 1>&6
3404else
3405 ac_save_LIBS="$LIBS"
3406LIBS="-lnet $LIBS $LIBS"
3407cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003408#line 3409 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003409#include "confdefs.h"
3410/* Override any gcc2 internal prototype to avoid an error. */
3411/* We use char because int might match the return type of a gcc2
3412 builtin and then its argument prototype would still apply. */
3413char socket();
3414
3415int main() {
3416socket()
3417; return 0; }
3418EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003419if { (eval echo configure:3420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003420 rm -rf conftest*
3421 eval "ac_cv_lib_$ac_lib_var=yes"
3422else
3423 echo "configure: failed program was:" >&5
3424 cat conftest.$ac_ext >&5
3425 rm -rf conftest*
3426 eval "ac_cv_lib_$ac_lib_var=no"
3427fi
3428rm -f conftest*
3429LIBS="$ac_save_LIBS"
3430
3431fi
3432if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3433 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003434 LIBS="-lnet $LIBS"
3435else
3436 echo "$ac_t""no" 1>&6
3437fi
3438 # BeOS
3439;;
3440esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003441
Guido van Rossuma68acba1996-07-31 17:36:39 +00003442echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003443echo "configure:3444: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003444# Check whether --with-libs or --without-libs was given.
3445if test "${with_libs+set}" = set; then
3446 withval="$with_libs"
3447
3448echo "$ac_t""$withval" 1>&6
3449LIBS="$withval $LIBS"
3450
3451else
3452 echo "$ac_t""no" 1>&6
3453fi
3454
Guido van Rossum7f43da71994-08-01 12:15:30 +00003455
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003456# Determine if signalmodule should be used.
3457
3458
3459echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003460echo "configure:3461: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003461# Check whether --with-signal-module or --without-signal-module was given.
3462if test "${with_signal_module+set}" = set; then
3463 withval="$with_signal_module"
3464 :
3465fi
3466
3467
3468if test -z "$with_signal_module"
3469then with_signal_module="yes"
3470fi
3471echo "$ac_t""$with_signal_module" 1>&6
3472
3473if test "${with_signal_module}" = "yes"; then
3474 USE_SIGNAL_MODULE=""
3475 SIGNAL_OBJS=""
3476else
3477 USE_SIGNAL_MODULE="#"
3478 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3479fi
3480
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003481# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003482
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003483USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003484
Guido van Rossumec2f0731997-01-22 20:54:01 +00003485echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003486echo "configure:3487: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003487
3488# Check whether --with-dec-threads or --without-dec-threads was given.
3489if test "${with_dec_threads+set}" = set; then
3490 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003491
3492echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003493LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003494if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003495 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003496fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003497else
3498 echo "$ac_t""no" 1>&6
3499fi
3500
3501
3502echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003503echo "configure:3504: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003504# Check whether --with-threads or --without-threads was given.
3505if test "${with_threads+set}" = set; then
3506 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003507 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003508fi
3509
3510
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003511# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003512# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003513if test "${with_thread+set}" = set; then
3514 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003515
3516with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003517fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003518
3519
3520if test -z "$with_threads"
3521then with_threads="yes"
3522fi
3523echo "$ac_t""$with_threads" 1>&6
3524
3525if test "$with_threads" = "no"
3526then
3527 USE_THREAD_MODULE="#"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003528elif test "$ac_cv_kpthread" = "yes"
3529then
3530 CC="$CC -Kpthread"
3531 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003532#define WITH_THREAD 1
3533EOF
3534
Martin v. Löwis130fb172001-07-19 11:00:41 +00003535 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003536#define _POSIX_THREADS 1
3537EOF
3538
Martin v. Löwis130fb172001-07-19 11:00:41 +00003539 LIBOBJS="$LIBOBJS thread.o"
3540else
3541 if test ! -z "$with_threads" -a -d "$with_threads"
3542 then LDFLAGS="$LDFLAGS -L$with_threads"
3543 fi
3544 if test ! -z "$withval" -a -d "$withval"
3545 then LDFLAGS="$LDFLAGS -L$withval"
3546 fi
3547 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003548#define _REENTRANT 1
3549EOF
3550
Martin v. Löwis130fb172001-07-19 11:00:41 +00003551 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003552echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003553echo "configure:3554: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003554if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003555 echo $ac_n "(cached) $ac_c" 1>&6
3556else
3557 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003558#line 3559 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003559#include "confdefs.h"
3560#include <mach/cthreads.h>
3561EOF
3562ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Neil Schemenauercf229462001-08-29 23:58:47 +00003563{ (eval echo configure:3564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003564ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003565if test -z "$ac_err"; then
3566 rm -rf conftest*
3567 eval "ac_cv_header_$ac_safe=yes"
3568else
3569 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003570 echo "configure: failed program was:" >&5
3571 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003572 rm -rf conftest*
3573 eval "ac_cv_header_$ac_safe=no"
3574fi
3575rm -f conftest*
3576fi
3577if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3578 echo "$ac_t""yes" 1>&6
3579 cat >> confdefs.h <<\EOF
3580#define WITH_THREAD 1
3581EOF
3582
Martin v. Löwis130fb172001-07-19 11:00:41 +00003583 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003584#define C_THREADS 1
3585EOF
3586
Martin v. Löwis130fb172001-07-19 11:00:41 +00003587 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003588else
3589 echo "$ac_t""no" 1>&6
3590
Martin v. Löwis130fb172001-07-19 11:00:41 +00003591 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003592echo "configure:3593: checking for --with-pth" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00003593 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003594if test "${with_pth+set}" = set; then
3595 withval="$with_pth"
3596
Martin v. Löwis130fb172001-07-19 11:00:41 +00003597 echo "$ac_t""$withval" 1>&6
3598 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003599#define WITH_THREAD 1
3600EOF
3601
Martin v. Löwis130fb172001-07-19 11:00:41 +00003602 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003603#define HAVE_PTH 1
3604EOF
3605
Martin v. Löwis130fb172001-07-19 11:00:41 +00003606 LIBS="-lpth $LIBS"
3607 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003608else
3609
Martin v. Löwis130fb172001-07-19 11:00:41 +00003610 echo "$ac_t""no" 1>&6
3611 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003612echo "configure:3613: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003613ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003614if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003615 echo $ac_n "(cached) $ac_c" 1>&6
3616else
3617 ac_save_LIBS="$LIBS"
3618LIBS="-lpthread $LIBS"
3619cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003620#line 3621 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003621#include "confdefs.h"
3622/* Override any gcc2 internal prototype to avoid an error. */
3623/* We use char because int might match the return type of a gcc2
3624 builtin and then its argument prototype would still apply. */
3625char pthread_create();
3626
3627int main() {
3628pthread_create()
3629; return 0; }
3630EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003631if { (eval echo configure:3632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003632 rm -rf conftest*
3633 eval "ac_cv_lib_$ac_lib_var=yes"
3634else
3635 echo "configure: failed program was:" >&5
3636 cat conftest.$ac_ext >&5
3637 rm -rf conftest*
3638 eval "ac_cv_lib_$ac_lib_var=no"
3639fi
3640rm -f conftest*
3641LIBS="$ac_save_LIBS"
3642
3643fi
3644if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3645 echo "$ac_t""yes" 1>&6
3646 cat >> confdefs.h <<\EOF
3647#define WITH_THREAD 1
3648EOF
3649
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003650 case $ac_sys_system in
3651 Darwin*) ;;
3652 *) cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003653#define _POSIX_THREADS 1
3654EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003655;;
3656 esac
Martin v. Löwis130fb172001-07-19 11:00:41 +00003657 LIBS="-lpthread $LIBS"
3658 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003659else
3660 echo "$ac_t""no" 1>&6
3661
Martin v. Löwis130fb172001-07-19 11:00:41 +00003662 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003663echo "configure:3664: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003664if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003665 echo $ac_n "(cached) $ac_c" 1>&6
3666else
3667 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003668#line 3669 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003669#include "confdefs.h"
3670/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003671 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003672#include <assert.h>
3673/* Override any gcc2 internal prototype to avoid an error. */
3674/* We use char because int might match the return type of a gcc2
3675 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003676char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003677
3678int main() {
3679
3680/* The GNU C library defines this for functions which it implements
3681 to always fail with ENOSYS. Some functions are actually named
3682 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003683#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003684choke me
3685#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003686pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003687#endif
3688
3689; return 0; }
3690EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003691if { (eval echo configure:3692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003692 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003693 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003694else
3695 echo "configure: failed program was:" >&5
3696 cat conftest.$ac_ext >&5
3697 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003698 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003699fi
3700rm -f conftest*
3701fi
3702
Guido van Rossumea516321998-12-17 18:08:55 +00003703if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003704 echo "$ac_t""yes" 1>&6
3705 cat >> confdefs.h <<\EOF
3706#define WITH_THREAD 1
3707EOF
3708
Martin v. Löwis130fb172001-07-19 11:00:41 +00003709 case $ac_sys_system in
3710 Darwin*) ;;
3711 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003712#define _POSIX_THREADS 1
3713EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003714;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003715 esac
3716 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003717else
3718 echo "$ac_t""no" 1>&6
3719
Martin v. Löwis130fb172001-07-19 11:00:41 +00003720 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003721echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003722echo "configure:3723: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003723if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003724 echo $ac_n "(cached) $ac_c" 1>&6
3725else
3726 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003727#line 3728 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003728#include "confdefs.h"
3729#include <kernel/OS.h>
3730EOF
3731ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Neil Schemenauercf229462001-08-29 23:58:47 +00003732{ (eval echo configure:3733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003733ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003734if test -z "$ac_err"; then
3735 rm -rf conftest*
3736 eval "ac_cv_header_$ac_safe=yes"
3737else
3738 echo "$ac_err" >&5
3739 echo "configure: failed program was:" >&5
3740 cat conftest.$ac_ext >&5
3741 rm -rf conftest*
3742 eval "ac_cv_header_$ac_safe=no"
3743fi
3744rm -f conftest*
3745fi
3746if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3747 echo "$ac_t""yes" 1>&6
3748 cat >> confdefs.h <<\EOF
3749#define WITH_THREAD 1
3750EOF
3751
Martin v. Löwis130fb172001-07-19 11:00:41 +00003752 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003753#define BEOS_THREADS 1
3754EOF
3755
Martin v. Löwis130fb172001-07-19 11:00:41 +00003756 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003757else
3758 echo "$ac_t""no" 1>&6
3759
Martin v. Löwis130fb172001-07-19 11:00:41 +00003760 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003761echo "configure:3762: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003762ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003763if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003764 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003765else
3766 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003767LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003768cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003769#line 3770 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003770#include "confdefs.h"
3771/* Override any gcc2 internal prototype to avoid an error. */
3772/* We use char because int might match the return type of a gcc2
3773 builtin and then its argument prototype would still apply. */
3774char pthread_create();
3775
3776int main() {
3777pthread_create()
3778; return 0; }
3779EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003780if { (eval echo configure:3781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003781 rm -rf conftest*
3782 eval "ac_cv_lib_$ac_lib_var=yes"
3783else
3784 echo "configure: failed program was:" >&5
3785 cat conftest.$ac_ext >&5
3786 rm -rf conftest*
3787 eval "ac_cv_lib_$ac_lib_var=no"
3788fi
3789rm -f conftest*
3790LIBS="$ac_save_LIBS"
3791
3792fi
3793if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3794 echo "$ac_t""yes" 1>&6
3795 cat >> confdefs.h <<\EOF
3796#define WITH_THREAD 1
3797EOF
3798
Martin v. Löwis130fb172001-07-19 11:00:41 +00003799 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003800#define _POSIX_THREADS 1
3801EOF
3802
Martin v. Löwis130fb172001-07-19 11:00:41 +00003803 LIBS="$LIBS -lpthreads"
3804 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003805else
3806 echo "$ac_t""no" 1>&6
3807
Martin v. Löwis130fb172001-07-19 11:00:41 +00003808 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003809echo "configure:3810: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003810ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003811if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003812 echo $ac_n "(cached) $ac_c" 1>&6
3813else
3814 ac_save_LIBS="$LIBS"
3815LIBS="-lc_r $LIBS"
3816cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003817#line 3818 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003818#include "confdefs.h"
3819/* Override any gcc2 internal prototype to avoid an error. */
3820/* We use char because int might match the return type of a gcc2
3821 builtin and then its argument prototype would still apply. */
3822char pthread_create();
3823
3824int main() {
3825pthread_create()
3826; return 0; }
3827EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003828if { (eval echo configure:3829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003829 rm -rf conftest*
3830 eval "ac_cv_lib_$ac_lib_var=yes"
3831else
3832 echo "configure: failed program was:" >&5
3833 cat conftest.$ac_ext >&5
3834 rm -rf conftest*
3835 eval "ac_cv_lib_$ac_lib_var=no"
3836fi
3837rm -f conftest*
3838LIBS="$ac_save_LIBS"
3839
3840fi
3841if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3842 echo "$ac_t""yes" 1>&6
3843 cat >> confdefs.h <<\EOF
3844#define WITH_THREAD 1
3845EOF
3846
Martin v. Löwis130fb172001-07-19 11:00:41 +00003847 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003848#define _POSIX_THREADS 1
3849EOF
3850
Martin v. Löwis130fb172001-07-19 11:00:41 +00003851 LIBS="$LIBS -lc_r"
3852 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003853else
3854 echo "$ac_t""no" 1>&6
3855
Martin v. Löwis130fb172001-07-19 11:00:41 +00003856 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003857echo "configure:3858: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003858ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003859if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003860 echo $ac_n "(cached) $ac_c" 1>&6
3861else
3862 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003863LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003864cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003865#line 3866 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003866#include "confdefs.h"
3867/* Override any gcc2 internal prototype to avoid an error. */
3868/* We use char because int might match the return type of a gcc2
3869 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003870char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003871
3872int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003873__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003874; return 0; }
3875EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003876if { (eval echo configure:3877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003877 rm -rf conftest*
3878 eval "ac_cv_lib_$ac_lib_var=yes"
3879else
3880 echo "configure: failed program was:" >&5
3881 cat conftest.$ac_ext >&5
3882 rm -rf conftest*
3883 eval "ac_cv_lib_$ac_lib_var=no"
3884fi
3885rm -f conftest*
3886LIBS="$ac_save_LIBS"
3887
3888fi
3889if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3890 echo "$ac_t""yes" 1>&6
3891 cat >> confdefs.h <<\EOF
3892#define WITH_THREAD 1
3893EOF
3894
Martin v. Löwis130fb172001-07-19 11:00:41 +00003895 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003896#define _POSIX_THREADS 1
3897EOF
3898
Martin v. Löwis130fb172001-07-19 11:00:41 +00003899 LIBS="$LIBS -lthread"
3900 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003901else
3902 echo "$ac_t""no" 1>&6
3903
Martin v. Löwis130fb172001-07-19 11:00:41 +00003904 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003905echo "configure:3906: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003906ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
3907if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3908 echo $ac_n "(cached) $ac_c" 1>&6
3909else
3910 ac_save_LIBS="$LIBS"
3911LIBS="-lpthread $LIBS"
3912cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003913#line 3914 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003914#include "confdefs.h"
3915/* Override any gcc2 internal prototype to avoid an error. */
3916/* We use char because int might match the return type of a gcc2
3917 builtin and then its argument prototype would still apply. */
3918char __pthread_create_system();
3919
3920int main() {
3921__pthread_create_system()
3922; return 0; }
3923EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003924if { (eval echo configure:3925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003925 rm -rf conftest*
3926 eval "ac_cv_lib_$ac_lib_var=yes"
3927else
3928 echo "configure: failed program was:" >&5
3929 cat conftest.$ac_ext >&5
3930 rm -rf conftest*
3931 eval "ac_cv_lib_$ac_lib_var=no"
3932fi
3933rm -f conftest*
3934LIBS="$ac_save_LIBS"
3935
3936fi
3937if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3938 echo "$ac_t""yes" 1>&6
3939 cat >> confdefs.h <<\EOF
3940#define WITH_THREAD 1
3941EOF
3942
Martin v. Löwis130fb172001-07-19 11:00:41 +00003943 cat >> confdefs.h <<\EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003944#define _POSIX_THREADS 1
3945EOF
3946
Martin v. Löwis130fb172001-07-19 11:00:41 +00003947 LIBS="$LIBS -lpthread"
3948 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003949else
3950 echo "$ac_t""no" 1>&6
3951
Martin v. Löwis130fb172001-07-19 11:00:41 +00003952 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00003953echo "configure:3954: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003954ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003955if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003956 echo $ac_n "(cached) $ac_c" 1>&6
3957else
3958 ac_save_LIBS="$LIBS"
3959LIBS="-lcma $LIBS"
3960cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003961#line 3962 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003962#include "confdefs.h"
3963/* Override any gcc2 internal prototype to avoid an error. */
3964/* We use char because int might match the return type of a gcc2
3965 builtin and then its argument prototype would still apply. */
3966char pthread_create();
3967
3968int main() {
3969pthread_create()
3970; return 0; }
3971EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00003972if { (eval echo configure:3973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003973 rm -rf conftest*
3974 eval "ac_cv_lib_$ac_lib_var=yes"
3975else
3976 echo "configure: failed program was:" >&5
3977 cat conftest.$ac_ext >&5
3978 rm -rf conftest*
3979 eval "ac_cv_lib_$ac_lib_var=no"
3980fi
3981rm -f conftest*
3982LIBS="$ac_save_LIBS"
3983
3984fi
3985if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3986 echo "$ac_t""yes" 1>&6
3987 cat >> confdefs.h <<\EOF
3988#define WITH_THREAD 1
3989EOF
3990
Martin v. Löwis130fb172001-07-19 11:00:41 +00003991 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003992#define _POSIX_THREADS 1
3993EOF
3994
Martin v. Löwis130fb172001-07-19 11:00:41 +00003995 LIBS="$LIBS -lcma"
3996 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003997else
3998 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003999
Martin v. Löwis130fb172001-07-19 11:00:41 +00004000 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00004001fi
4002
Martin v. Löwis130fb172001-07-19 11:00:41 +00004003
Guido van Rossum627b2d71993-12-24 10:39:16 +00004004fi
4005
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004006fi
4007
Guido van Rossum0be3e491997-05-22 20:33:33 +00004008fi
4009
Guido van Rossum49545951997-12-02 19:28:29 +00004010fi
4011
Guido van Rossumb93a8621998-05-07 13:27:32 +00004012fi
4013
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004014fi
4015
Guido van Rossumad678af1998-10-02 14:42:15 +00004016fi
4017
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004018fi
4019
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004020fi
4021
Guido van Rossum0be3e491997-05-22 20:33:33 +00004022
Martin v. Löwis130fb172001-07-19 11:00:41 +00004023 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004024echo "configure:4025: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004025ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004026if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004027 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004028else
4029 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004030LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004031cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004032#line 4033 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004033#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004034/* Override any gcc2 internal prototype to avoid an error. */
4035/* We use char because int might match the return type of a gcc2
4036 builtin and then its argument prototype would still apply. */
4037char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004038
Guido van Rossumf78abae1997-01-21 22:02:36 +00004039int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004040usconfig()
4041; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004042EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004043if { (eval echo configure:4044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004044 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004045 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004046else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004047 echo "configure: failed program was:" >&5
4048 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004049 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004050 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004051fi
4052rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004053LIBS="$ac_save_LIBS"
4054
4055fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004056if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004057 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058 cat >> confdefs.h <<\EOF
4059#define WITH_THREAD 1
4060EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004061
Martin v. Löwis130fb172001-07-19 11:00:41 +00004062 LIBS="$LIBS -lmpc"
4063 LIBOBJS="$LIBOBJS thread.o"
4064 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004065else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004066 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004067fi
4068
Martin v. Löwis130fb172001-07-19 11:00:41 +00004069 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004070echo "configure:4071: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004071ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004072if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004073 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004074else
4075 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004076LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004077cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004078#line 4079 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004079#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004080/* Override any gcc2 internal prototype to avoid an error. */
4081/* We use char because int might match the return type of a gcc2
4082 builtin and then its argument prototype would still apply. */
4083char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004084
Guido van Rossumf78abae1997-01-21 22:02:36 +00004085int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004086thr_create()
4087; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004088EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004089if { (eval echo configure:4090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004090 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004091 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004092else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004093 echo "configure: failed program was:" >&5
4094 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004095 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004096 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004097fi
4098rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004099LIBS="$ac_save_LIBS"
4100
4101fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004102if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004103 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004104 cat >> confdefs.h <<\EOF
4105#define WITH_THREAD 1
4106EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004107
Martin v. Löwis130fb172001-07-19 11:00:41 +00004108 LIBS="$LIBS -lthread"
4109 LIBOBJS="$LIBOBJS thread.o"
4110 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004111else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004112 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004113fi
4114
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004115
Martin v. Löwis130fb172001-07-19 11:00:41 +00004116 if test "$USE_THREAD_MODULE" != "#"
4117 then
4118 # If the above checks didn't disable threads, (at least) OSF1
4119 # needs this '-threads' argument during linking.
4120 case $ac_sys_system in
4121 OSF1) LDLAST=-threads;;
4122 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004123 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004124fi
4125
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004126# Check for enable-ipv6
4127echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004128echo "configure:4129: checking whether to enable ipv6" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004129# Check whether --enable-ipv6 or --disable-ipv6 was given.
4130if test "${enable_ipv6+set}" = set; then
4131 enableval="$enable_ipv6"
4132 case "$enableval" in
4133 no)
4134 echo "$ac_t""no" 1>&6
4135 ipv6=no
4136 ;;
4137 *) echo "$ac_t""yes" 1>&6
4138 cat >> confdefs.h <<\EOF
4139#define ENABLE_IPV6 1
4140EOF
4141
4142 ipv6=yes
4143 ;;
4144 esac
4145else
4146 if test "$cross_compiling" = yes; then
4147 echo "$ac_t""no" 1>&6
4148 ipv6=no
4149
4150else
4151 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004152#line 4153 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004153#include "confdefs.h"
4154 /* AF_INET6 available check */
4155#include <sys/types.h>
4156#include <sys/socket.h>
4157main()
4158{
4159 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
4160 exit(1);
4161 else
4162 exit(0);
4163}
4164
4165EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004166if { (eval echo configure:4167: \"$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 +00004167then
4168 echo "$ac_t""yes" 1>&6
4169 cat >> confdefs.h <<\EOF
4170#define ENABLE_IPV6 1
4171EOF
4172
4173 ipv6=yes
4174else
4175 echo "configure: failed program was:" >&5
4176 cat conftest.$ac_ext >&5
4177 rm -fr conftest*
4178 echo "$ac_t""no" 1>&6
4179 ipv6=no
4180fi
4181rm -fr conftest*
4182fi
4183
4184fi
4185
4186
4187ipv6type=unknown
4188ipv6lib=none
4189ipv6trylibc=no
4190
4191if test "$ipv6" = "yes"; then
4192 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004193echo "configure:4194: checking ipv6 stack type" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004194 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; do
4195 case $i in
4196 inria)
4197 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004198#line 4199 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004199#include "confdefs.h"
4200dnl
4201#include <netinet/in.h>
4202#ifdef IPV6_INRIA_VERSION
4203yes
4204#endif
4205EOF
4206if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4207 egrep "yes" >/dev/null 2>&1; then
4208 rm -rf conftest*
4209 ipv6type=$i;
4210 OPT="-DINET6 $OPT"
4211fi
4212rm -f conftest*
4213
4214 ;;
4215 kame)
4216 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004217#line 4218 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004218#include "confdefs.h"
4219dnl
4220#include <netinet/in.h>
4221#ifdef __KAME__
4222yes
4223#endif
4224EOF
4225if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4226 egrep "yes" >/dev/null 2>&1; then
4227 rm -rf conftest*
4228 ipv6type=$i;
4229 ipv6lib=inet6
4230 ipv6libdir=/usr/local/v6/lib
4231 ipv6trylibc=yes
4232 OPT="-DINET6 $OPT"
4233fi
4234rm -f conftest*
4235
4236 ;;
4237 linux-glibc)
4238 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004239#line 4240 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004240#include "confdefs.h"
4241dnl
4242#include <features.h>
4243#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
4244yes
4245#endif
4246EOF
4247if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4248 egrep "yes" >/dev/null 2>&1; then
4249 rm -rf conftest*
4250 ipv6type=$i;
4251 ipv6trylibc=yes
4252 OPT="-DINET6 $OPT"
4253fi
4254rm -f conftest*
4255
4256 ;;
4257 linux-inet6)
4258 if test -d /usr/inet6; then
4259 ipv6type=$i
4260 ipv6lib=inet6
4261 ipv6libdir=/usr/inet6/lib
4262 OPT="-DINET6 -I/usr/inet6/include $OPT"
4263 fi
4264 ;;
4265 solaris)
4266 if test -f /etc/netconfig; then
4267 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
4268 ipv6type=$i
4269 ipv6trylibc=yes
4270 OPT="-DINET6 $OPT"
4271 fi
4272 fi
4273 ;;
4274 toshiba)
4275 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004276#line 4277 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004277#include "confdefs.h"
4278dnl
4279#include <sys/param.h>
4280#ifdef _TOSHIBA_INET6
4281yes
4282#endif
4283EOF
4284if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4285 egrep "yes" >/dev/null 2>&1; then
4286 rm -rf conftest*
4287 ipv6type=$i;
4288 ipv6lib=inet6;
4289 ipv6libdir=/usr/local/v6/lib;
4290 OPT="-DINET6 $OPT"
4291fi
4292rm -f conftest*
4293
4294 ;;
4295 v6d)
4296 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004297#line 4298 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004298#include "confdefs.h"
4299dnl
4300#include </usr/local/v6/include/sys/v6config.h>
4301#ifdef __V6D__
4302yes
4303#endif
4304EOF
4305if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4306 egrep "yes" >/dev/null 2>&1; then
4307 rm -rf conftest*
4308 ipv6type=$i;
4309 ipv6lib=v6;
4310 ipv6libdir=/usr/local/v6/lib;
4311 OPT="-I/usr/local/v6/include $OPT"
4312fi
4313rm -f conftest*
4314
4315 ;;
4316 zeta)
4317 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004318#line 4319 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004319#include "confdefs.h"
4320dnl
4321#include <sys/param.h>
4322#ifdef _ZETA_MINAMI_INET6
4323yes
4324#endif
4325EOF
4326if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4327 egrep "yes" >/dev/null 2>&1; then
4328 rm -rf conftest*
4329 ipv6type=$i;
4330 ipv6lib=inet6;
4331 ipv6libdir=/usr/local/v6/lib;
4332 OPT="-DINET6 $OPT"
4333fi
4334rm -f conftest*
4335
4336 ;;
4337 esac
4338 if test "$ipv6type" != "unknown"; then
4339 break
4340 fi
4341 done
4342 echo "$ac_t""$ipv6type" 1>&6
4343fi
4344
4345if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4346 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4347 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4348 echo "using lib$ipv6lib"
4349 else
4350 if test $ipv6trylibc = "yes"; then
4351 echo "using libc"
4352 else
4353 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4354 echo "You need to fetch lib$ipv6lib.a from appropriate"
4355 echo 'ipv6 kit and compile beforehand.'
4356 exit 1
4357 fi
4358 fi
4359fi
4360
Barry Warsawef82cd72000-06-30 16:21:01 +00004361# Check for GC support
Barry Warsawef82cd72000-06-30 16:21:01 +00004362echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004363echo "configure:4364: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004364# Check whether --with-cycle-gc or --without-cycle-gc was given.
4365if test "${with_cycle_gc+set}" = set; then
4366 withval="$with_cycle_gc"
4367 :
4368fi
4369
4370
4371if test -z "$with_cycle_gc"
4372then with_cycle_gc="yes"
4373fi
Neil Schemenauercf229462001-08-29 23:58:47 +00004374if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +00004375then
Barry Warsawef82cd72000-06-30 16:21:01 +00004376 cat >> confdefs.h <<\EOF
4377#define WITH_CYCLE_GC 1
4378EOF
4379
4380fi
4381echo "$ac_t""$with_cycle_gc" 1>&6
4382
Neil Schemenauera35c6882001-02-27 04:45:05 +00004383# Check for Python-specific malloc support
4384echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004385echo "configure:4386: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004386# Check whether --with-pymalloc or --without-pymalloc was given.
4387if test "${with_pymalloc+set}" = set; then
4388 withval="$with_pymalloc"
4389
4390if test "$withval" != no
4391then cat >> confdefs.h <<\EOF
4392#define WITH_PYMALLOC 1
4393EOF
4394 echo "$ac_t""yes" 1>&6
4395else echo "$ac_t""no" 1>&6
4396fi
4397else
4398 echo "$ac_t""no" 1>&6
4399fi
4400
4401
Barry Warsawef82cd72000-06-30 16:21:01 +00004402# Check for --with-wctype-functions
4403echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004404echo "configure:4405: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004405# Check whether --with-wctype-functions or --without-wctype-functions was given.
4406if test "${with_wctype_functions+set}" = set; then
4407 withval="$with_wctype_functions"
4408
4409if test "$withval" != no
4410then cat >> confdefs.h <<\EOF
4411#define WANT_WCTYPE_FUNCTIONS 1
4412EOF
4413 echo "$ac_t""yes" 1>&6
4414else echo "$ac_t""no" 1>&6
4415fi
4416else
4417 echo "$ac_t""no" 1>&6
4418fi
4419
4420
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004421# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004422
4423DLINCLDIR=/
4424
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004425echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004426echo "configure:4427: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004427# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004428if test "${with_sgi_dl+set}" = set; then
4429 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004430
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004431echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004432cat >> confdefs.h <<\EOF
4433#define WITH_SGI_DL 1
4434EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004435
Guido van Rossume97ee181999-12-20 21:27:22 +00004436DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004437dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004438if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004439then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004440else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004441fi
4442DLINCLDIR=${dldir}
4443LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004444else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004445 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004446fi
4447
4448
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004449echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004450echo "configure:4451: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004451# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004452if test "${with_dl_dld+set}" = set; then
4453 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004454
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004455echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004456cat >> confdefs.h <<\EOF
4457#define WITH_DL_DLD 1
4458EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004459
Guido van Rossume97ee181999-12-20 21:27:22 +00004460DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004461dldir=`echo "$withval" | sed 's/,.*//'`
4462dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004463if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004464then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004465else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004466fi
4467DLINCLDIR=${dldir}
4468LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004469else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004470 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004471fi
4472
4473
Guido van Rossume97ee181999-12-20 21:27:22 +00004474# the dlopen() function means we might want to use dynload_shlib.o. some
4475# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004476for ac_func in dlopen
4477do
4478echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004479echo "configure:4480: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004480if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004481 echo $ac_n "(cached) $ac_c" 1>&6
4482else
4483 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004484#line 4485 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004485#include "confdefs.h"
4486/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004487 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004488#include <assert.h>
4489/* Override any gcc2 internal prototype to avoid an error. */
4490/* We use char because int might match the return type of a gcc2
4491 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004492char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004493
4494int main() {
4495
4496/* The GNU C library defines this for functions which it implements
4497 to always fail with ENOSYS. Some functions are actually named
4498 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004499#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004500choke me
4501#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004502$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004503#endif
4504
4505; return 0; }
4506EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004507if { (eval echo configure:4508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004508 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004509 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004510else
4511 echo "configure: failed program was:" >&5
4512 cat conftest.$ac_ext >&5
4513 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004514 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004515fi
4516rm -f conftest*
4517fi
4518
Thomas Wouters3a584202000-08-05 23:28:51 +00004519if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004520 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004521 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4522 cat >> confdefs.h <<EOF
4523#define $ac_tr_func 1
4524EOF
4525
Guido van Rossume97ee181999-12-20 21:27:22 +00004526else
4527 echo "$ac_t""no" 1>&6
4528fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004529done
Guido van Rossume97ee181999-12-20 21:27:22 +00004530
4531
4532# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4533# loading of modules.
4534
4535echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004536echo "configure:4537: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004537if test -z "$DYNLOADFILE"
4538then
4539 case $ac_sys_system/$ac_sys_release in
4540 AIX*) DYNLOADFILE="dynload_aix.o";;
4541 BeOS*) DYNLOADFILE="dynload_beos.o";;
4542 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +00004543 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004544 *)
4545 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4546 # out any dynamic loading
4547 if test "$ac_cv_func_dlopen" = yes
4548 then DYNLOADFILE="dynload_shlib.o"
4549 else DYNLOADFILE="dynload_stub.o"
4550 fi
4551 ;;
4552 esac
4553fi
4554echo "$ac_t""$DYNLOADFILE" 1>&6
4555if test "$DYNLOADFILE" != "dynload_stub.o"
4556then
4557 cat >> confdefs.h <<\EOF
4558#define HAVE_DYNAMIC_LOADING 1
4559EOF
4560
4561fi
4562
Neil Schemenauer4e425612001-06-19 15:44:15 +00004563# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4564
4565
4566echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004567echo "configure:4568: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004568if test -z "$MACHDEP_OBJS"
4569then
Jack Jansene578a632001-08-15 01:27:14 +00004570 MACHDEP_OBJS=$extra_machdep_objs
4571else
4572 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00004573fi
Jack Jansene578a632001-08-15 01:27:14 +00004574echo "$ac_t""MACHDEP_OBJS" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004575
Guido van Rossum627b2d71993-12-24 10:39:16 +00004576# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00004577for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004578 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +00004579 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis864e9ff2001-08-04 22:32:03 +00004580 hstrerror inet_pton kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004581 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004582 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004583 select setegid seteuid setgid \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00004584 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00004585 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004586 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Woutersc2c12dc2001-07-11 14:45:34 +00004587 truncate uname waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00004588do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004589echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004590echo "configure:4591: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004591if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004592 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004593else
4594 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004595#line 4596 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004596#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004597/* System header to define __stub macros and hopefully few prototypes,
4598 which can conflict with char $ac_func(); below. */
4599#include <assert.h>
4600/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004601/* We use char because int might match the return type of a gcc2
4602 builtin and then its argument prototype would still apply. */
4603char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004604
Guido van Rossumf78abae1997-01-21 22:02:36 +00004605int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004606
Guido van Rossum627b2d71993-12-24 10:39:16 +00004607/* The GNU C library defines this for functions which it implements
4608 to always fail with ENOSYS. Some functions are actually named
4609 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004610#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004611choke me
4612#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004613$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004614#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004615
Guido van Rossum7f43da71994-08-01 12:15:30 +00004616; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004617EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004618if { (eval echo configure:4619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004619 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004620 eval "ac_cv_func_$ac_func=yes"
4621else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004622 echo "configure: failed program was:" >&5
4623 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004624 rm -rf conftest*
4625 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004626fi
4627rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004628fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004629
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004630if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004631 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004632 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004633 cat >> confdefs.h <<EOF
4634#define $ac_tr_func 1
4635EOF
4636
4637else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004638 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004639fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004640done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004641
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004642
Fred Drake8cef4cf2000-06-28 16:40:38 +00004643# check for openpty and forkpty
4644
4645for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004646do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004647echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004648echo "configure:4649: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004649if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004650 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004651else
4652 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004653#line 4654 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004654#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004655/* System header to define __stub macros and hopefully few prototypes,
4656 which can conflict with char $ac_func(); below. */
4657#include <assert.h>
4658/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004659/* We use char because int might match the return type of a gcc2
4660 builtin and then its argument prototype would still apply. */
4661char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004662
Guido van Rossumf78abae1997-01-21 22:02:36 +00004663int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004664
Guido van Rossum627b2d71993-12-24 10:39:16 +00004665/* The GNU C library defines this for functions which it implements
4666 to always fail with ENOSYS. Some functions are actually named
4667 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004668#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004669choke me
4670#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004671$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004672#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004673
Guido van Rossum7f43da71994-08-01 12:15:30 +00004674; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004675EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004676if { (eval echo configure:4677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004677 rm -rf conftest*
4678 eval "ac_cv_func_$ac_func=yes"
4679else
4680 echo "configure: failed program was:" >&5
4681 cat conftest.$ac_ext >&5
4682 rm -rf conftest*
4683 eval "ac_cv_func_$ac_func=no"
4684fi
4685rm -f conftest*
4686fi
4687
4688if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4689 echo "$ac_t""yes" 1>&6
4690 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4691 cat >> confdefs.h <<EOF
4692#define $ac_tr_func 1
4693EOF
4694
4695else
4696 echo "$ac_t""no" 1>&6
4697echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004698echo "configure:4699: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004699ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004700if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004701 echo $ac_n "(cached) $ac_c" 1>&6
4702else
4703 ac_save_LIBS="$LIBS"
4704LIBS="-lutil $LIBS"
4705cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004706#line 4707 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004707#include "confdefs.h"
4708/* Override any gcc2 internal prototype to avoid an error. */
4709/* We use char because int might match the return type of a gcc2
4710 builtin and then its argument prototype would still apply. */
4711char openpty();
4712
4713int main() {
4714openpty()
4715; return 0; }
4716EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004717if { (eval echo configure:4718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004718 rm -rf conftest*
4719 eval "ac_cv_lib_$ac_lib_var=yes"
4720else
4721 echo "configure: failed program was:" >&5
4722 cat conftest.$ac_ext >&5
4723 rm -rf conftest*
4724 eval "ac_cv_lib_$ac_lib_var=no"
4725fi
4726rm -f conftest*
4727LIBS="$ac_save_LIBS"
4728
4729fi
4730if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4731 echo "$ac_t""yes" 1>&6
4732 cat >> confdefs.h <<\EOF
4733#define HAVE_OPENPTY 1
4734EOF
4735 LIBS="$LIBS -lutil"
4736else
4737 echo "$ac_t""no" 1>&6
4738fi
4739
4740fi
4741done
4742
4743for ac_func in forkpty
4744do
4745echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004746echo "configure:4747: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004747if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004748 echo $ac_n "(cached) $ac_c" 1>&6
4749else
4750 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004751#line 4752 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004752#include "confdefs.h"
4753/* System header to define __stub macros and hopefully few prototypes,
4754 which can conflict with char $ac_func(); below. */
4755#include <assert.h>
4756/* Override any gcc2 internal prototype to avoid an error. */
4757/* We use char because int might match the return type of a gcc2
4758 builtin and then its argument prototype would still apply. */
4759char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004760
4761int main() {
4762
4763/* The GNU C library defines this for functions which it implements
4764 to always fail with ENOSYS. Some functions are actually named
4765 something starting with __ and the normal name is an alias. */
4766#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4767choke me
4768#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004769$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004770#endif
4771
4772; return 0; }
4773EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004774if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004775 rm -rf conftest*
4776 eval "ac_cv_func_$ac_func=yes"
4777else
4778 echo "configure: failed program was:" >&5
4779 cat conftest.$ac_ext >&5
4780 rm -rf conftest*
4781 eval "ac_cv_func_$ac_func=no"
4782fi
4783rm -f conftest*
4784fi
4785
4786if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4787 echo "$ac_t""yes" 1>&6
4788 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4789 cat >> confdefs.h <<EOF
4790#define $ac_tr_func 1
4791EOF
4792
4793else
4794 echo "$ac_t""no" 1>&6
4795echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004796echo "configure:4797: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004797ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004798if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004799 echo $ac_n "(cached) $ac_c" 1>&6
4800else
4801 ac_save_LIBS="$LIBS"
4802LIBS="-lutil $LIBS"
4803cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004804#line 4805 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004805#include "confdefs.h"
4806/* Override any gcc2 internal prototype to avoid an error. */
4807/* We use char because int might match the return type of a gcc2
4808 builtin and then its argument prototype would still apply. */
4809char forkpty();
4810
4811int main() {
4812forkpty()
4813; return 0; }
4814EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004815if { (eval echo configure:4816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004816 rm -rf conftest*
4817 eval "ac_cv_lib_$ac_lib_var=yes"
4818else
4819 echo "configure: failed program was:" >&5
4820 cat conftest.$ac_ext >&5
4821 rm -rf conftest*
4822 eval "ac_cv_lib_$ac_lib_var=no"
4823fi
4824rm -f conftest*
4825LIBS="$ac_save_LIBS"
4826
4827fi
4828if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4829 echo "$ac_t""yes" 1>&6
4830 cat >> confdefs.h <<\EOF
4831#define HAVE_FORKPTY 1
4832EOF
4833 LIBS="$LIBS -lutil"
4834else
4835 echo "$ac_t""no" 1>&6
4836fi
4837
4838fi
4839done
4840
4841
4842# check for long file support functions
4843for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4844do
4845echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004846echo "configure:4847: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004847if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004848 echo $ac_n "(cached) $ac_c" 1>&6
4849else
4850 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004851#line 4852 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004852#include "confdefs.h"
4853/* System header to define __stub macros and hopefully few prototypes,
4854 which can conflict with char $ac_func(); below. */
4855#include <assert.h>
4856/* Override any gcc2 internal prototype to avoid an error. */
4857/* We use char because int might match the return type of a gcc2
4858 builtin and then its argument prototype would still apply. */
4859char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004860
4861int main() {
4862
4863/* The GNU C library defines this for functions which it implements
4864 to always fail with ENOSYS. Some functions are actually named
4865 something starting with __ and the normal name is an alias. */
4866#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4867choke me
4868#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004869$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004870#endif
4871
4872; return 0; }
4873EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004874if { (eval echo configure:4875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004875 rm -rf conftest*
4876 eval "ac_cv_func_$ac_func=yes"
4877else
4878 echo "configure: failed program was:" >&5
4879 cat conftest.$ac_ext >&5
4880 rm -rf conftest*
4881 eval "ac_cv_func_$ac_func=no"
4882fi
4883rm -f conftest*
4884fi
4885
4886if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4887 echo "$ac_t""yes" 1>&6
4888 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4889 cat >> confdefs.h <<EOF
4890#define $ac_tr_func 1
4891EOF
4892
4893else
4894 echo "$ac_t""no" 1>&6
4895fi
4896done
4897
4898
4899for ac_func in dup2 getcwd strdup strerror memmove
4900do
4901echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004902echo "configure:4903: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004903if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004904 echo $ac_n "(cached) $ac_c" 1>&6
4905else
4906 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004907#line 4908 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004908#include "confdefs.h"
4909/* System header to define __stub macros and hopefully few prototypes,
4910 which can conflict with char $ac_func(); below. */
4911#include <assert.h>
4912/* Override any gcc2 internal prototype to avoid an error. */
4913/* We use char because int might match the return type of a gcc2
4914 builtin and then its argument prototype would still apply. */
4915char $ac_func();
4916
4917int main() {
4918
4919/* The GNU C library defines this for functions which it implements
4920 to always fail with ENOSYS. Some functions are actually named
4921 something starting with __ and the normal name is an alias. */
4922#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4923choke me
4924#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004925$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004926#endif
4927
4928; return 0; }
4929EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004930if { (eval echo configure:4931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004931 rm -rf conftest*
4932 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004933else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004934 echo "configure: failed program was:" >&5
4935 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004936 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004937 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004938fi
4939rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004940fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004941
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004942if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004943 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004944 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4945 cat >> confdefs.h <<EOF
4946#define $ac_tr_func 1
4947EOF
4948
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004949else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004950 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004951LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004952fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004953done
4954
Guido van Rossumf78abae1997-01-21 22:02:36 +00004955
Thomas Wouters3a584202000-08-05 23:28:51 +00004956for ac_func in getpgrp
4957do
4958echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00004959echo "configure:4960: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004960if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004961 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004962else
4963 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004964#line 4965 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004965#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004966/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004967 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004968#include <assert.h>
4969/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004970/* We use char because int might match the return type of a gcc2
4971 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004972char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004973
Guido van Rossumf78abae1997-01-21 22:02:36 +00004974int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004975
Guido van Rossum627b2d71993-12-24 10:39:16 +00004976/* The GNU C library defines this for functions which it implements
4977 to always fail with ENOSYS. Some functions are actually named
4978 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004979#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004980choke me
4981#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004982$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004983#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004984
4985; return 0; }
4986EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00004987if { (eval echo configure:4988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004988 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004989 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004990else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004991 echo "configure: failed program was:" >&5
4992 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004993 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004994 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004995fi
4996rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004997fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004998
Thomas Wouters3a584202000-08-05 23:28:51 +00004999if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005000 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005001 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5002 cat >> confdefs.h <<EOF
5003#define $ac_tr_func 1
5004EOF
5005 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005006#line 5007 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005007#include "confdefs.h"
5008#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005009int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005010getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005011; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005012EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005013if { (eval echo configure:5014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005014 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005015 cat >> confdefs.h <<\EOF
5016#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005017EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005018
Guido van Rossumf78abae1997-01-21 22:02:36 +00005019else
5020 echo "configure: failed program was:" >&5
5021 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005022fi
5023rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005024else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005025 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005026fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005027done
Guido van Rossum627b2d71993-12-24 10:39:16 +00005028
Thomas Wouters3a584202000-08-05 23:28:51 +00005029for ac_func in setpgrp
5030do
5031echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005032echo "configure:5033: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005033if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005034 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005035else
5036 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005037#line 5038 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005038#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005039/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005040 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005041#include <assert.h>
5042/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005043/* We use char because int might match the return type of a gcc2
5044 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005045char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005046
Guido van Rossumf78abae1997-01-21 22:02:36 +00005047int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005048
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005049/* The GNU C library defines this for functions which it implements
5050 to always fail with ENOSYS. Some functions are actually named
5051 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005052#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005053choke me
5054#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005055$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005056#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005057
5058; return 0; }
5059EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005060if { (eval echo configure:5061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005061 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005062 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005063else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005064 echo "configure: failed program was:" >&5
5065 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005066 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005067 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005068fi
5069rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005070fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005071
Thomas Wouters3a584202000-08-05 23:28:51 +00005072if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005073 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005074 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5075 cat >> confdefs.h <<EOF
5076#define $ac_tr_func 1
5077EOF
5078 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005079#line 5080 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005080#include "confdefs.h"
5081#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005082int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005083setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005084; return 0; }
5085EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005086if { (eval echo configure:5087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005087 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005088 cat >> confdefs.h <<\EOF
5089#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005090EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005091
Guido van Rossumf78abae1997-01-21 22:02:36 +00005092else
5093 echo "configure: failed program was:" >&5
5094 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005095fi
5096rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005097else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005098 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005099fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005100done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005101
Thomas Wouters3a584202000-08-05 23:28:51 +00005102for ac_func in gettimeofday
5103do
5104echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005105echo "configure:5106: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005106if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005107 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005108else
5109 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005110#line 5111 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005111#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005112/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005113 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005114#include <assert.h>
5115/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005116/* We use char because int might match the return type of a gcc2
5117 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005118char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005119
Guido van Rossumf78abae1997-01-21 22:02:36 +00005120int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005121
5122/* The GNU C library defines this for functions which it implements
5123 to always fail with ENOSYS. Some functions are actually named
5124 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005125#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005126choke me
5127#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005128$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005129#endif
5130
5131; return 0; }
5132EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005133if { (eval echo configure:5134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005134 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005135 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005136else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005137 echo "configure: failed program was:" >&5
5138 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005139 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005140 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005141fi
5142rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005143fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005144
Thomas Wouters3a584202000-08-05 23:28:51 +00005145if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005146 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005147 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5148 cat >> confdefs.h <<EOF
5149#define $ac_tr_func 1
5150EOF
5151 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005152#line 5153 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005153#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005154#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005155int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005156gettimeofday((struct timeval*)0,(struct timezone*)0);
5157; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005158EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005159if { (eval echo configure:5160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005160 :
5161else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005162 echo "configure: failed program was:" >&5
5163 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005164 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005165 cat >> confdefs.h <<\EOF
5166#define GETTIMEOFDAY_NO_TZ 1
5167EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005168
5169fi
5170rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005171else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005172 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005173fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005174done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005175
5176
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005177for ac_func in getaddrinfo
5178do
5179echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005180echo "configure:5181: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005181if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5182 echo $ac_n "(cached) $ac_c" 1>&6
5183else
5184 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005185#line 5186 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005186#include "confdefs.h"
5187/* System header to define __stub macros and hopefully few prototypes,
5188 which can conflict with char $ac_func(); below. */
5189#include <assert.h>
5190/* Override any gcc2 internal prototype to avoid an error. */
5191/* We use char because int might match the return type of a gcc2
5192 builtin and then its argument prototype would still apply. */
5193char $ac_func();
5194
5195int main() {
5196
5197/* The GNU C library defines this for functions which it implements
5198 to always fail with ENOSYS. Some functions are actually named
5199 something starting with __ and the normal name is an alias. */
5200#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5201choke me
5202#else
5203$ac_func();
5204#endif
5205
5206; return 0; }
5207EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005208if { (eval echo configure:5209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005209 rm -rf conftest*
5210 eval "ac_cv_func_$ac_func=yes"
5211else
5212 echo "configure: failed program was:" >&5
5213 cat conftest.$ac_ext >&5
5214 rm -rf conftest*
5215 eval "ac_cv_func_$ac_func=no"
5216fi
5217rm -f conftest*
5218fi
5219
5220if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5221 echo "$ac_t""yes" 1>&6
5222 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5223 cat >> confdefs.h <<EOF
5224#define $ac_tr_func 1
5225EOF
5226 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005227echo "configure:5228: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005228if test "$cross_compiling" = yes; then
5229 echo "$ac_t""buggy" 1>&6
5230buggygetaddrinfo=yes
5231else
5232 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005233#line 5234 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005234#include "confdefs.h"
5235
5236#include <sys/types.h>
5237#include <netdb.h>
5238#include <string.h>
5239#include <sys/socket.h>
5240#include <netinet/in.h>
5241
5242main()
5243{
5244 int passive, gaierr, inet4 = 0, inet6 = 0;
5245 struct addrinfo hints, *ai, *aitop;
5246 char straddr[INET6_ADDRSTRLEN], strport[16];
5247
5248 for (passive = 0; passive <= 1; passive++) {
5249 memset(&hints, 0, sizeof(hints));
5250 hints.ai_family = AF_UNSPEC;
5251 hints.ai_flags = passive ? AI_PASSIVE : 0;
5252 hints.ai_socktype = SOCK_STREAM;
5253 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5254 (void)gai_strerror(gaierr);
5255 goto bad;
5256 }
5257 for (ai = aitop; ai; ai = ai->ai_next) {
5258 if (ai->ai_addr == NULL ||
5259 ai->ai_addrlen == 0 ||
5260 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5261 straddr, sizeof(straddr), strport, sizeof(strport),
5262 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5263 goto bad;
5264 }
5265 switch (ai->ai_family) {
5266 case AF_INET:
5267 if (strcmp(strport, "54321") != 0) {
5268 goto bad;
5269 }
5270 if (passive) {
5271 if (strcmp(straddr, "0.0.0.0") != 0) {
5272 goto bad;
5273 }
5274 } else {
5275 if (strcmp(straddr, "127.0.0.1") != 0) {
5276 goto bad;
5277 }
5278 }
5279 inet4++;
5280 break;
5281 case AF_INET6:
5282 if (strcmp(strport, "54321") != 0) {
5283 goto bad;
5284 }
5285 if (passive) {
5286 if (strcmp(straddr, "::") != 0) {
5287 goto bad;
5288 }
5289 } else {
5290 if (strcmp(straddr, "::1") != 0) {
5291 goto bad;
5292 }
5293 }
5294 inet6++;
5295 break;
5296 case AF_UNSPEC:
5297 goto bad;
5298 break;
5299 default:
5300 /* another family support? */
5301 break;
5302 }
5303 }
5304 }
5305
5306 if (!(inet4 == 0 || inet4 == 2))
5307 goto bad;
5308 if (!(inet6 == 0 || inet6 == 2))
5309 goto bad;
5310
5311 if (aitop)
5312 freeaddrinfo(aitop);
5313 exit(0);
5314
5315 bad:
5316 if (aitop)
5317 freeaddrinfo(aitop);
5318 exit(1);
5319}
5320
5321EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005322if { (eval echo configure:5323: \"$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 +00005323then
5324 echo "$ac_t""good" 1>&6
5325buggygetaddrinfo=no
5326else
5327 echo "configure: failed program was:" >&5
5328 cat conftest.$ac_ext >&5
5329 rm -fr conftest*
5330 echo "$ac_t""buggy" 1>&6
5331buggygetaddrinfo=yes
5332fi
5333rm -fr conftest*
5334fi
5335
5336else
5337 echo "$ac_t""no" 1>&6
5338buggygetaddrinfo=yes
5339fi
5340done
5341
5342
5343if test "$buggygetaddrinfo" = "yes"; then
5344 if test "$ipv6" = "yes"; then
5345 echo 'Fatal: You must get working getaddrinfo() function.'
5346 echo ' or you can specify "--disable-ipv6"'.
5347 exit 1
5348 fi
5349fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005350for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005351do
5352echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005353echo "configure:5354: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005354if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5355 echo $ac_n "(cached) $ac_c" 1>&6
5356else
5357 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005358#line 5359 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005359#include "confdefs.h"
5360/* System header to define __stub macros and hopefully few prototypes,
5361 which can conflict with char $ac_func(); below. */
5362#include <assert.h>
5363/* Override any gcc2 internal prototype to avoid an error. */
5364/* We use char because int might match the return type of a gcc2
5365 builtin and then its argument prototype would still apply. */
5366char $ac_func();
5367
5368int main() {
5369
5370/* The GNU C library defines this for functions which it implements
5371 to always fail with ENOSYS. Some functions are actually named
5372 something starting with __ and the normal name is an alias. */
5373#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5374choke me
5375#else
5376$ac_func();
5377#endif
5378
5379; return 0; }
5380EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005381if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005382 rm -rf conftest*
5383 eval "ac_cv_func_$ac_func=yes"
5384else
5385 echo "configure: failed program was:" >&5
5386 cat conftest.$ac_ext >&5
5387 rm -rf conftest*
5388 eval "ac_cv_func_$ac_func=no"
5389fi
5390rm -f conftest*
5391fi
5392
5393if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5394 echo "$ac_t""yes" 1>&6
5395 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5396 cat >> confdefs.h <<EOF
5397#define $ac_tr_func 1
5398EOF
5399
5400else
5401 echo "$ac_t""no" 1>&6
5402fi
5403done
5404
5405
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005406# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005407echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005408echo "configure:5409: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005409if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005410 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005411else
5412 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005413#line 5414 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005414#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005415#include <sys/types.h>
5416#include <sys/time.h>
5417#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005418int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005419struct tm *tp;
5420; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005421EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005422if { (eval echo configure:5423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005423 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005424 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005425else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005426 echo "configure: failed program was:" >&5
5427 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005428 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005429 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005430fi
5431rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005432fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005433
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005434echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005435if test $ac_cv_header_time = yes; then
5436 cat >> confdefs.h <<\EOF
5437#define TIME_WITH_SYS_TIME 1
5438EOF
5439
5440fi
5441
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005442echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005443echo "configure:5444: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005444if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005445 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005446else
5447 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005448#line 5449 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005449#include "confdefs.h"
5450#include <sys/types.h>
5451#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005452int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005453struct tm *tp; tp->tm_sec;
5454; return 0; }
5455EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005456if { (eval echo configure:5457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005457 rm -rf conftest*
5458 ac_cv_struct_tm=time.h
5459else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005460 echo "configure: failed program was:" >&5
5461 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005462 rm -rf conftest*
5463 ac_cv_struct_tm=sys/time.h
5464fi
5465rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005466fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005467
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005468echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005469if test $ac_cv_struct_tm = sys/time.h; then
5470 cat >> confdefs.h <<\EOF
5471#define TM_IN_SYS_TIME 1
5472EOF
5473
5474fi
5475
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005476echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005477echo "configure:5478: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005478if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005479 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005480else
5481 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005482#line 5483 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005483#include "confdefs.h"
5484#include <sys/types.h>
5485#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005486int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005487struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005488; return 0; }
5489EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005490if { (eval echo configure:5491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005491 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005492 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005493else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005494 echo "configure: failed program was:" >&5
5495 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005496 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005497 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005498fi
5499rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005500fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005501
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005502echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5503if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005504 cat >> confdefs.h <<\EOF
5505#define HAVE_TM_ZONE 1
5506EOF
5507
5508else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005509 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005510echo "configure:5511: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005511if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005512 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005513else
5514 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005515#line 5516 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005516#include "confdefs.h"
5517#include <time.h>
5518#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005519extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005520#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00005521int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005522atoi(*tzname);
5523; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005524EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005525if { (eval echo configure:5526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005526 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005527 ac_cv_var_tzname=yes
5528else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005529 echo "configure: failed program was:" >&5
5530 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005531 rm -rf conftest*
5532 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005533fi
5534rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005535fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005536
5537echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005538 if test $ac_cv_var_tzname = yes; then
5539 cat >> confdefs.h <<\EOF
5540#define HAVE_TZNAME 1
5541EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005542
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005543 fi
5544fi
5545
5546
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005547echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005548echo "configure:5549: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005549if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005550 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005551else
5552 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005553#line 5554 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005554#include "confdefs.h"
5555#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005556int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005557return altzone;
5558; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005559EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005560if { (eval echo configure:5561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005561 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005562 ac_cv_header_time_altzone=yes
5563else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005564 echo "configure: failed program was:" >&5
5565 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005566 rm -rf conftest*
5567 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005568fi
5569rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005570fi
5571
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005572echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005573if test $ac_cv_header_time_altzone = yes; then
5574 cat >> confdefs.h <<\EOF
5575#define HAVE_ALTZONE 1
5576EOF
5577
5578fi
5579
Guido van Rossumda88dad1995-01-26 00:46:29 +00005580was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005581echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005582echo "configure:5583: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005583cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005584#line 5585 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005585#include "confdefs.h"
5586
5587#include <sys/types.h>
5588#include <sys/select.h>
5589#include <sys/time.h>
5590
Guido van Rossumf78abae1997-01-21 22:02:36 +00005591int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005592;
5593; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005594EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005595if { (eval echo configure:5596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005596 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005597 cat >> confdefs.h <<\EOF
5598#define SYS_SELECT_WITH_SYS_TIME 1
5599EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005600 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005601else
5602 echo "configure: failed program was:" >&5
5603 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005604fi
5605rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005606echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005607
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005608echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005609echo "configure:5610: checking for addrinfo" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005610if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
5611 echo $ac_n "(cached) $ac_c" 1>&6
5612else
5613 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005614#line 5615 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005615#include "confdefs.h"
5616
5617# include <netdb.h>
5618int main() {
5619struct addrinfo a
5620; return 0; }
5621EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005622if { (eval echo configure:5623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005623 rm -rf conftest*
5624 ac_cv_struct_addrinfo=yes
5625else
5626 echo "configure: failed program was:" >&5
5627 cat conftest.$ac_ext >&5
5628 rm -rf conftest*
5629 ac_cv_struct_addrinfo=no
5630fi
5631rm -f conftest*
5632fi
5633
5634echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
5635if test $ac_cv_struct_addrinfo = yes; then
5636 cat >> confdefs.h <<\EOF
5637#define HAVE_ADDRINFO 1
5638EOF
5639
5640fi
5641
5642echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005643echo "configure:5644: checking for sockaddr_storage" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005644if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
5645 echo $ac_n "(cached) $ac_c" 1>&6
5646else
5647 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005648#line 5649 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005649#include "confdefs.h"
5650
5651# include <sys/types.h>
5652# include <sys/socket.h>
5653int main() {
5654struct sockaddr_storage s
5655; return 0; }
5656EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005657if { (eval echo configure:5658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005658 rm -rf conftest*
5659 ac_cv_struct_sockaddr_storage=yes
5660else
5661 echo "configure: failed program was:" >&5
5662 cat conftest.$ac_ext >&5
5663 rm -rf conftest*
5664 ac_cv_struct_sockaddr_storage=no
5665fi
5666rm -f conftest*
5667fi
5668
5669echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
5670if test $ac_cv_struct_sockaddr_storage = yes; then
5671 cat >> confdefs.h <<\EOF
5672#define HAVE_SOCKADDR_STORAGE 1
5673EOF
5674
5675fi
5676
Guido van Rossum627b2d71993-12-24 10:39:16 +00005677# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00005678
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005679echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005680echo "configure:5681: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005681if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005682 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005683else
5684 if test "$GCC" = yes; then
5685 # GCC predefines this symbol on systems where it applies.
5686cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005687#line 5688 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005688#include "confdefs.h"
5689#ifdef __CHAR_UNSIGNED__
5690 yes
5691#endif
5692
5693EOF
5694if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5695 egrep "yes" >/dev/null 2>&1; then
5696 rm -rf conftest*
5697 ac_cv_c_char_unsigned=yes
5698else
5699 rm -rf conftest*
5700 ac_cv_c_char_unsigned=no
5701fi
5702rm -f conftest*
5703
5704else
5705if test "$cross_compiling" = yes; then
5706 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5707else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005708 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005709#line 5710 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005710#include "confdefs.h"
5711/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005712#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00005713#define volatile
5714#endif
5715main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00005716 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005717}
5718EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005719if { (eval echo configure:5720: \"$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 +00005720then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005721 ac_cv_c_char_unsigned=yes
5722else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005723 echo "configure: failed program was:" >&5
5724 cat conftest.$ac_ext >&5
5725 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005726 ac_cv_c_char_unsigned=no
5727fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005728rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005729fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005730
5731fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005732fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005733
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005734echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005735if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5736 cat >> confdefs.h <<\EOF
5737#define __CHAR_UNSIGNED__ 1
5738EOF
5739
5740fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005741
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005742echo $ac_n "checking for working const""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005743echo "configure:5744: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005744if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005745 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005746else
5747 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005748#line 5749 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005749#include "confdefs.h"
5750
Guido van Rossumf78abae1997-01-21 22:02:36 +00005751int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005752
5753/* Ultrix mips cc rejects this. */
Martin v. Löwis9db2f572001-07-23 01:30:10 +00005754typedef int charset[2]; const charset x;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005755/* SunOS 4.1.1 cc rejects this. */
5756char const *const *ccp;
5757char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005758/* NEC SVR4.0.2 mips cc rejects this. */
5759struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005760static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005761/* AIX XL C 1.02.0.0 rejects this.
5762 It does not let you subtract one const X* pointer from another in an arm
5763 of an if-expression whose if-part is not a constant expression */
5764const char *g = "string";
5765ccp = &g + (g ? g-g : 0);
5766/* HPUX 7.0 cc rejects these. */
5767++ccp;
5768p = (char**) ccp;
5769ccp = (char const *const *) p;
5770{ /* SCO 3.2v4 cc rejects this. */
5771 char *t;
5772 char const *s = 0 ? (char *) 0 : (char const *) 0;
5773
5774 *t++ = 0;
5775}
5776{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005777 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005778 const int *foo = &x[0];
5779 ++foo;
5780}
5781{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5782 typedef const int *iptr;
5783 iptr p = 0;
5784 ++p;
5785}
5786{ /* AIX XL C 1.02.0.0 rejects this saying
5787 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5788 struct s { int j; const int *ap[3]; };
5789 struct s *b; b->j = 5;
5790}
5791{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5792 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005793}
5794
5795; return 0; }
5796EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005797if { (eval echo configure:5798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005798 rm -rf conftest*
5799 ac_cv_c_const=yes
5800else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005801 echo "configure: failed program was:" >&5
5802 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005803 rm -rf conftest*
5804 ac_cv_c_const=no
5805fi
5806rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005807fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005808
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005809echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005810if test $ac_cv_c_const = no; then
5811 cat >> confdefs.h <<\EOF
5812#define const
5813EOF
5814
5815fi
5816
5817
Guido van Rossumda88dad1995-01-26 00:46:29 +00005818works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005819echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005820echo "configure:5821: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005821cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005822#line 5823 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005823#include "confdefs.h"
5824
Guido van Rossumf78abae1997-01-21 22:02:36 +00005825int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005826volatile int x; x = 0;
5827; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005828EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005829if { (eval echo configure:5830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005830 rm -rf conftest*
5831 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005832else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005833 echo "configure: failed program was:" >&5
5834 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005835 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005836 cat >> confdefs.h <<\EOF
5837#define volatile
5838EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005839
5840fi
5841rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005842echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005843
Guido van Rossumda88dad1995-01-26 00:46:29 +00005844works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005845echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005846echo "configure:5847: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005847cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005848#line 5849 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005849#include "confdefs.h"
5850
Guido van Rossumf78abae1997-01-21 22:02:36 +00005851int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005852signed char c;
5853; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005854EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005855if { (eval echo configure:5856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005856 rm -rf conftest*
5857 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005858else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005859 echo "configure: failed program was:" >&5
5860 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005861 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005862 cat >> confdefs.h <<\EOF
5863#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00005864EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005865
5866fi
5867rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005868echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005869
Guido van Rossumda88dad1995-01-26 00:46:29 +00005870have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005871echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005872echo "configure:5873: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005873cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005874#line 5875 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005875#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005876int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005877int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005878return foo(10);
5879; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005880EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005881if { (eval echo configure:5882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005882 rm -rf conftest*
5883 cat >> confdefs.h <<\EOF
5884#define HAVE_PROTOTYPES 1
5885EOF
5886 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005887else
5888 echo "configure: failed program was:" >&5
5889 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005890fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005891rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005892echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005893
Guido van Rossumda88dad1995-01-26 00:46:29 +00005894works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005895echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005896echo "configure:5897: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005897cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005898#line 5899 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005899#include "confdefs.h"
5900
5901#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00005902int foo(int x, ...) {
5903 va_list va;
5904 va_start(va, x);
5905 va_arg(va, int);
5906 va_arg(va, char *);
5907 va_arg(va, double);
5908 return 0;
5909}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005910
Guido van Rossumf78abae1997-01-21 22:02:36 +00005911int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005912return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005913; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005914EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005915if { (eval echo configure:5916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005916 rm -rf conftest*
5917 cat >> confdefs.h <<\EOF
5918#define HAVE_STDARG_PROTOTYPES 1
5919EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005920 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005921else
5922 echo "configure: failed program was:" >&5
5923 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005924fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005925rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005926echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005927
Guido van Rossumda88dad1995-01-26 00:46:29 +00005928if test "$have_prototypes" = yes; then
5929bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005930echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005931echo "configure:5932: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005932cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005933#line 5934 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005934#include "confdefs.h"
5935#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005936int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005937char **t;execve("@",t,t);
5938; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005939EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005940if { (eval echo configure:5941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005941 :
5942else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005943 echo "configure: failed program was:" >&5
5944 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005945 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005946 cat >> confdefs.h <<\EOF
5947#define BAD_EXEC_PROTOTYPES 1
5948EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005949 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005950fi
5951rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005952echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005953fi
5954
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005955# check if sockaddr has sa_len member
5956echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005957echo "configure:5958: checking if sockaddr has sa_len member" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005958cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005959#line 5960 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005960#include "confdefs.h"
5961#include <sys/types.h>
5962#include <sys/socket.h>
5963int main() {
5964struct sockaddr x;
5965x.sa_len = 0;
5966; return 0; }
5967EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005968if { (eval echo configure:5969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005969 rm -rf conftest*
5970 echo "$ac_t""yes" 1>&6
5971 cat >> confdefs.h <<\EOF
5972#define HAVE_SOCKADDR_SA_LEN 1
5973EOF
5974
5975else
5976 echo "configure: failed program was:" >&5
5977 cat conftest.$ac_ext >&5
5978 rm -rf conftest*
5979 echo "$ac_t""no" 1>&6
5980fi
5981rm -f conftest*
5982
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005983echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00005984echo "configure:5985: checking for bad static forward" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00005985if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
5986 echo $ac_n "(cached) $ac_c" 1>&6
5987else
5988 if test "$cross_compiling" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005989 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5990else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005991 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00005992#line 5993 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005993#include "confdefs.h"
5994
5995struct s { int a; int b; };
5996static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005997int foobar() {
5998 static int random;
5999 random = (int) &foo;
6000 return random;
6001}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006002static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006003main() {
6004 exit(!((int)&foo == foobar()));
6005}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006006EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006007if { (eval echo configure:6008: \"$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 +00006008then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006009 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006010else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006011 echo "configure: failed program was:" >&5
6012 cat conftest.$ac_ext >&5
6013 rm -fr conftest*
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006014 ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006015fi
6016rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00006017fi
6018
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006019fi
6020
6021echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
6022if test "$ac_cv_bad_static_forward" = yes
6023then
6024 cat >> confdefs.h <<\EOF
6025#define BAD_STATIC_FORWARD 1
6026EOF
6027
6028fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006029
Guido van Rossumda88dad1995-01-26 00:46:29 +00006030va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006031echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006032echo "configure:6033: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006033cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006034#line 6035 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006035#include "confdefs.h"
6036
6037#ifdef HAVE_STDARG_PROTOTYPES
6038#include <stdarg.h>
6039#else
6040#include <varargs.h>
6041#endif
6042
Guido van Rossumf78abae1997-01-21 22:02:36 +00006043int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006044va_list list1, list2; list1 = list2;
6045; return 0; }
6046EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006047if { (eval echo configure:6048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006048 :
6049else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006050 echo "configure: failed program was:" >&5
6051 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006052 rm -rf conftest*
6053 cat >> confdefs.h <<\EOF
6054#define VA_LIST_IS_ARRAY 1
6055EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006056 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006057fi
6058rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006059echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006060
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006061# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
6062echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006063echo "configure:6064: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006064if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006065 echo $ac_n "(cached) $ac_c" 1>&6
6066else
6067 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006068#line 6069 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006069#include "confdefs.h"
6070/* System header to define __stub macros and hopefully few prototypes,
6071 which can conflict with char gethostbyname_r(); below. */
6072#include <assert.h>
6073/* Override any gcc2 internal prototype to avoid an error. */
6074/* We use char because int might match the return type of a gcc2
6075 builtin and then its argument prototype would still apply. */
6076char gethostbyname_r();
6077
6078int main() {
6079
6080/* The GNU C library defines this for functions which it implements
6081 to always fail with ENOSYS. Some functions are actually named
6082 something starting with __ and the normal name is an alias. */
6083#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6084choke me
6085#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006086gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006087#endif
6088
6089; return 0; }
6090EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006091if { (eval echo configure:6092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006092 rm -rf conftest*
6093 eval "ac_cv_func_gethostbyname_r=yes"
6094else
6095 echo "configure: failed program was:" >&5
6096 cat conftest.$ac_ext >&5
6097 rm -rf conftest*
6098 eval "ac_cv_func_gethostbyname_r=no"
6099fi
6100rm -f conftest*
6101fi
6102
6103if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6104 echo "$ac_t""yes" 1>&6
6105
6106 cat >> confdefs.h <<\EOF
6107#define HAVE_GETHOSTBYNAME_R 1
6108EOF
6109
6110 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006111echo "configure:6112: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006112 OLD_CFLAGS=$CFLAGS
6113 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
6114 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006115#line 6116 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006116#include "confdefs.h"
6117
6118# include <netdb.h>
6119
6120int main() {
6121
6122 char *name;
6123 struct hostent *he, *res;
6124 char buffer[2048];
6125 int buflen = 2048;
6126 int h_errnop;
6127
6128 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
6129
6130; return 0; }
6131EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006132if { (eval echo configure:6133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006133 rm -rf conftest*
6134
6135 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006136#define HAVE_GETHOSTBYNAME_R 1
6137EOF
6138
6139 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006140#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6141EOF
6142
6143 echo "$ac_t""yes" 1>&6
6144
6145else
6146 echo "configure: failed program was:" >&5
6147 cat conftest.$ac_ext >&5
6148 rm -rf conftest*
6149
6150 echo "$ac_t""no" 1>&6
6151 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006152echo "configure:6153: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006153 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006154#line 6155 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006155#include "confdefs.h"
6156
6157# include <netdb.h>
6158
6159int main() {
6160
6161 char *name;
6162 struct hostent *he;
6163 char buffer[2048];
6164 int buflen = 2048;
6165 int h_errnop;
6166
6167 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
6168
6169; return 0; }
6170EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006171if { (eval echo configure:6172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006172 rm -rf conftest*
6173
6174 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006175#define HAVE_GETHOSTBYNAME_R 1
6176EOF
6177
6178 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006179#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6180EOF
6181
6182 echo "$ac_t""yes" 1>&6
6183
6184else
6185 echo "configure: failed program was:" >&5
6186 cat conftest.$ac_ext >&5
6187 rm -rf conftest*
6188
6189 echo "$ac_t""no" 1>&6
6190 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006191echo "configure:6192: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006192 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006193#line 6194 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006194#include "confdefs.h"
6195
6196# include <netdb.h>
6197
6198int main() {
6199
6200 char *name;
6201 struct hostent *he;
6202 struct hostent_data data;
6203
6204 (void) gethostbyname_r(name, he, &data);
6205
6206; return 0; }
6207EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006208if { (eval echo configure:6209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006209 rm -rf conftest*
6210
6211 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006212#define HAVE_GETHOSTBYNAME_R 1
6213EOF
6214
6215 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006216#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6217EOF
6218
6219 echo "$ac_t""yes" 1>&6
6220
6221else
6222 echo "configure: failed program was:" >&5
6223 cat conftest.$ac_ext >&5
6224 rm -rf conftest*
6225
6226 echo "$ac_t""no" 1>&6
6227
6228fi
6229rm -f conftest*
6230
6231fi
6232rm -f conftest*
6233
6234fi
6235rm -f conftest*
6236 CFLAGS=$OLD_CFLAGS
6237
6238else
6239 echo "$ac_t""no" 1>&6
6240
Thomas Wouters3a584202000-08-05 23:28:51 +00006241 for ac_func in gethostbyname
6242do
6243echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006244echo "configure:6245: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006245if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006246 echo $ac_n "(cached) $ac_c" 1>&6
6247else
6248 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006249#line 6250 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006250#include "confdefs.h"
6251/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00006252 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006253#include <assert.h>
6254/* Override any gcc2 internal prototype to avoid an error. */
6255/* We use char because int might match the return type of a gcc2
6256 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006257char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006258
6259int main() {
6260
6261/* The GNU C library defines this for functions which it implements
6262 to always fail with ENOSYS. Some functions are actually named
6263 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006264#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006265choke me
6266#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006267$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006268#endif
6269
6270; return 0; }
6271EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006272if { (eval echo configure:6273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006273 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006274 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006275else
6276 echo "configure: failed program was:" >&5
6277 cat conftest.$ac_ext >&5
6278 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006279 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006280fi
6281rm -f conftest*
6282fi
6283
Thomas Wouters3a584202000-08-05 23:28:51 +00006284if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006285 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00006286 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6287 cat >> confdefs.h <<EOF
6288#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006289EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00006290
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006291else
6292 echo "$ac_t""no" 1>&6
6293fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006294done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006295
6296
6297fi
6298
6299
6300
6301
6302
6303
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006304
Guido van Rossum627b2d71993-12-24 10:39:16 +00006305# checks for system services
6306# (none yet)
6307
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006308# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006309echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006310echo "configure:6311: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006311if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006312 echo $ac_n "(cached) $ac_c" 1>&6
6313else
6314 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006315#line 6316 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006316#include "confdefs.h"
6317/* System header to define __stub macros and hopefully few prototypes,
6318 which can conflict with char __fpu_control(); below. */
6319#include <assert.h>
6320/* Override any gcc2 internal prototype to avoid an error. */
6321/* We use char because int might match the return type of a gcc2
6322 builtin and then its argument prototype would still apply. */
6323char __fpu_control();
6324
6325int main() {
6326
6327/* The GNU C library defines this for functions which it implements
6328 to always fail with ENOSYS. Some functions are actually named
6329 something starting with __ and the normal name is an alias. */
6330#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6331choke me
6332#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006333__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006334#endif
6335
6336; return 0; }
6337EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006338if { (eval echo configure:6339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006339 rm -rf conftest*
6340 eval "ac_cv_func___fpu_control=yes"
6341else
6342 echo "configure: failed program was:" >&5
6343 cat conftest.$ac_ext >&5
6344 rm -rf conftest*
6345 eval "ac_cv_func___fpu_control=no"
6346fi
6347rm -f conftest*
6348fi
6349
6350if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6351 echo "$ac_t""yes" 1>&6
6352 :
6353else
6354 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006355echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006356echo "configure:6357: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00006357ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006358if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006359 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006360else
6361 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006362LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006363cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006364#line 6365 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006365#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006366/* Override any gcc2 internal prototype to avoid an error. */
6367/* We use char because int might match the return type of a gcc2
6368 builtin and then its argument prototype would still apply. */
6369char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00006370
Guido van Rossumf78abae1997-01-21 22:02:36 +00006371int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006372__fpu_control()
6373; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006374EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006375if { (eval echo configure:6376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006376 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006377 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006378else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006379 echo "configure: failed program was:" >&5
6380 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006381 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006382 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006383fi
6384rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006385LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006386
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006387fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006388if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006389 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006390 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6391 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006392 cat >> confdefs.h <<EOF
6393#define $ac_tr_lib 1
6394EOF
6395
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006396 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006397
6398else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006399 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006400fi
6401
6402
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006403fi
6404
6405
Guido van Rossum7f253911997-05-09 02:42:48 +00006406# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00006407echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006408echo "configure:6409: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006409# Check whether --with-fpectl or --without-fpectl was given.
6410if test "${with_fpectl+set}" = set; then
6411 withval="$with_fpectl"
6412
6413if test "$withval" != no
6414then cat >> confdefs.h <<\EOF
6415#define WANT_SIGFPE_HANDLER 1
6416EOF
6417 echo "$ac_t""yes" 1>&6
6418else echo "$ac_t""no" 1>&6
6419fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006420else
6421 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006422fi
6423
6424
Guido van Rossum7f43da71994-08-01 12:15:30 +00006425# check for --with-libm=...
6426
Guido van Rossum563e7081996-09-10 18:20:48 +00006427case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006428Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006429BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006430*) LIBM=-lm
6431esac
Guido van Rossum7f253911997-05-09 02:42:48 +00006432echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006433echo "configure:6434: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006434# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006435if test "${with_libm+set}" = set; then
6436 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006437
Guido van Rossum7f253911997-05-09 02:42:48 +00006438if test "$withval" = no
6439then LIBM=
6440 echo "$ac_t""force LIBM empty" 1>&6
6441elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006442then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006443 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006444else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006445fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006446else
6447 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006448fi
6449
6450
6451# check for --with-libc=...
6452
Guido van Rossum7f253911997-05-09 02:42:48 +00006453echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006454echo "configure:6455: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006455# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006456if test "${with_libc+set}" = set; then
6457 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006458
Guido van Rossum7f253911997-05-09 02:42:48 +00006459if test "$withval" = no
6460then LIBC=
6461 echo "$ac_t""force LIBC empty" 1>&6
6462elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006463then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006464 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006465else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006466fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006467else
6468 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006469fi
6470
6471
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006472# check for hypot() in math library
6473LIBS_SAVE=$LIBS
6474LIBS="$LIBS $LIBM"
6475for ac_func in hypot
6476do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006477echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006478echo "configure:6479: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006479if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006480 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006481else
6482 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006483#line 6484 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006484#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006485/* System header to define __stub macros and hopefully few prototypes,
6486 which can conflict with char $ac_func(); below. */
6487#include <assert.h>
6488/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006489/* We use char because int might match the return type of a gcc2
6490 builtin and then its argument prototype would still apply. */
6491char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006492
Guido van Rossumf78abae1997-01-21 22:02:36 +00006493int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006494
6495/* The GNU C library defines this for functions which it implements
6496 to always fail with ENOSYS. Some functions are actually named
6497 something starting with __ and the normal name is an alias. */
6498#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6499choke me
6500#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006501$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006502#endif
6503
6504; return 0; }
6505EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006506if { (eval echo configure:6507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006507 rm -rf conftest*
6508 eval "ac_cv_func_$ac_func=yes"
6509else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006510 echo "configure: failed program was:" >&5
6511 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006512 rm -rf conftest*
6513 eval "ac_cv_func_$ac_func=no"
6514fi
6515rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006516fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00006517
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006518if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6519 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006520 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6521 cat >> confdefs.h <<EOF
6522#define $ac_tr_func 1
6523EOF
6524
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006525else
6526 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006527LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006528fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006529done
6530
Guido van Rossumf78abae1997-01-21 22:02:36 +00006531
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006532LIBS=$LIBS_SAVE
6533
Guido van Rossumad713701997-07-10 22:42:38 +00006534# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00006535echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006536echo "configure:6537: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006537if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00006538 echo $ac_n "(cached) $ac_c" 1>&6
6539else
6540 if test "$cross_compiling" = yes; then
6541 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6542else
6543 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006544#line 6545 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006545#include "confdefs.h"
6546#include <stdio.h>
6547#ifdef HAVE_STDLIB
6548#include <stdlib.h>
6549#else
6550char *malloc(), *realloc();
6551int *free();
6552#endif
6553main() {
6554 char *p;
6555 p = malloc(0);
6556 if (p == NULL) exit(1);
6557 p = realloc(p, 0);
6558 if (p == NULL) exit(1);
6559 free(p);
6560 exit(0);
6561}
6562EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006563if { (eval echo configure:6564: \"$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 +00006564then
6565 ac_cv_malloc_zero=nonnull
6566else
6567 echo "configure: failed program was:" >&5
6568 cat conftest.$ac_ext >&5
6569 rm -fr conftest*
6570 ac_cv_malloc_zero=null
6571fi
6572rm -fr conftest*
6573fi
6574
6575fi
6576
6577echo "$ac_t""$ac_cv_malloc_zero" 1>&6
6578if test "$ac_cv_malloc_zero" = null
6579then
6580 cat >> confdefs.h <<\EOF
6581#define MALLOC_ZERO_RETURNS_NULL 1
6582EOF
6583
6584fi
6585
Guido van Rossumef2255b2000-03-10 22:30:29 +00006586# check for wchar.h
6587ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6588echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006589echo "configure:6590: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006590if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006591 echo $ac_n "(cached) $ac_c" 1>&6
6592else
6593 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006594#line 6595 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006595#include "confdefs.h"
6596#include <wchar.h>
6597EOF
6598ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Neil Schemenauercf229462001-08-29 23:58:47 +00006599{ (eval echo configure:6600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006600ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6601if test -z "$ac_err"; then
6602 rm -rf conftest*
6603 eval "ac_cv_header_$ac_safe=yes"
6604else
6605 echo "$ac_err" >&5
6606 echo "configure: failed program was:" >&5
6607 cat conftest.$ac_ext >&5
6608 rm -rf conftest*
6609 eval "ac_cv_header_$ac_safe=no"
6610fi
6611rm -f conftest*
6612fi
6613if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6614 echo "$ac_t""yes" 1>&6
6615 cat >> confdefs.h <<\EOF
6616#define HAVE_WCHAR_H 1
6617EOF
6618 wchar_h="yes"
6619else
6620 echo "$ac_t""no" 1>&6
6621wchar_h="no"
6622
6623fi
6624
6625
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006626# determine wchar_t size
6627if test "$wchar_h" = yes
6628then
6629 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006630echo "configure:6631: checking size of wchar_t" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006631if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
6632 echo $ac_n "(cached) $ac_c" 1>&6
6633else
6634 if test "$cross_compiling" = yes; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006635 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6636else
6637 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006638#line 6639 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006639#include "confdefs.h"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006640#include <stdio.h>
Neil Schemenauercf229462001-08-29 23:58:47 +00006641#include <sys/types.h>
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006642main()
6643{
6644 FILE *f=fopen("conftestval", "w");
6645 if (!f) exit(1);
6646 fprintf(f, "%d\n", sizeof(wchar_t));
Guido van Rossumef2255b2000-03-10 22:30:29 +00006647 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00006648}
Guido van Rossumef2255b2000-03-10 22:30:29 +00006649EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006650if { (eval echo configure:6651: \"$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 +00006651then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006652 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006653else
6654 echo "configure: failed program was:" >&5
6655 cat conftest.$ac_ext >&5
6656 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006657 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00006658fi
6659rm -fr conftest*
6660fi
6661
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006662fi
6663echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
6664cat >> confdefs.h <<EOF
6665#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
6666EOF
6667
6668
6669fi
6670
6671echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006672echo "configure:6673: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006673# Check whether --enable-unicode or --disable-unicode was given.
6674if test "${enable_unicode+set}" = set; then
6675 enableval="$enable_unicode"
6676 :
6677else
6678 enable_unicode=yes
6679fi
6680
6681
6682if test $enable_unicode = yes
6683then
Martin v. Löwisfd917792001-06-27 20:22:04 +00006684 # Without any arguments, Py_UNICODE defaults to two-byte mode
6685 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006686fi
6687
6688case "$enable_unicode" in
6689ucs2) unicode_size="2"
6690 cat >> confdefs.h <<\EOF
6691#define Py_UNICODE_SIZE 2
6692EOF
6693
6694 ;;
6695ucs4) unicode_size="4"
6696 cat >> confdefs.h <<\EOF
6697#define Py_UNICODE_SIZE 4
6698EOF
6699
6700 ;;
6701esac
6702
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006703
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006704if test "$enable_unicode" = "no"
6705then
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006706 UNICODE_OBJS=""
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006707 echo "$ac_t""not used" 1>&6
6708else
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006709 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006710 cat >> confdefs.h <<\EOF
6711#define Py_USING_UNICODE 1
6712EOF
6713
6714 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
6715 then
6716 PY_UNICODE_TYPE="wchar_t"
6717 cat >> confdefs.h <<\EOF
6718#define HAVE_USABLE_WCHAR_T 1
6719EOF
6720
6721 cat >> confdefs.h <<\EOF
6722#define PY_UNICODE_TYPE wchar_t
6723EOF
6724
6725 elif test "$ac_cv_sizeof_short" = "$unicode_size"
6726 then
6727 PY_UNICODE_TYPE="unsigned short"
6728 cat >> confdefs.h <<\EOF
6729#define PY_UNICODE_TYPE unsigned short
6730EOF
6731
6732 elif test "$ac_cv_sizeof_long" = "$unicode_size"
6733 then
6734 PY_UNICODE_TYPE="unsigned long"
6735 cat >> confdefs.h <<\EOF
6736#define PY_UNICODE_TYPE unsigned long
6737EOF
6738
6739 else
6740 PY_UNICODE_TYPE="no type found"
6741 fi
6742 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
6743fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006744
6745# check for endianness
6746echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006747echo "configure:6748: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006748if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006749 echo $ac_n "(cached) $ac_c" 1>&6
6750else
6751 ac_cv_c_bigendian=unknown
6752# See if sys/param.h defines the BYTE_ORDER macro.
6753cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006754#line 6755 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006755#include "confdefs.h"
6756#include <sys/types.h>
6757#include <sys/param.h>
6758int main() {
6759
6760#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6761 bogus endian macros
6762#endif
6763; return 0; }
6764EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006765if { (eval echo configure:6766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006766 rm -rf conftest*
6767 # It does; now see whether it defined to BIG_ENDIAN or not.
6768cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006769#line 6770 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006770#include "confdefs.h"
6771#include <sys/types.h>
6772#include <sys/param.h>
6773int main() {
6774
6775#if BYTE_ORDER != BIG_ENDIAN
6776 not big endian
6777#endif
6778; return 0; }
6779EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006780if { (eval echo configure:6781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006781 rm -rf conftest*
6782 ac_cv_c_bigendian=yes
6783else
6784 echo "configure: failed program was:" >&5
6785 cat conftest.$ac_ext >&5
6786 rm -rf conftest*
6787 ac_cv_c_bigendian=no
6788fi
6789rm -f conftest*
6790else
6791 echo "configure: failed program was:" >&5
6792 cat conftest.$ac_ext >&5
6793fi
6794rm -f conftest*
6795if test $ac_cv_c_bigendian = unknown; then
6796if test "$cross_compiling" = yes; then
6797 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6798else
6799 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006800#line 6801 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006801#include "confdefs.h"
6802main () {
6803 /* Are we little or big endian? From Harbison&Steele. */
6804 union
6805 {
6806 long l;
6807 char c[sizeof (long)];
6808 } u;
6809 u.l = 1;
6810 exit (u.c[sizeof (long) - 1] == 1);
6811}
6812EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006813if { (eval echo configure:6814: \"$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 +00006814then
6815 ac_cv_c_bigendian=no
6816else
6817 echo "configure: failed program was:" >&5
6818 cat conftest.$ac_ext >&5
6819 rm -fr conftest*
6820 ac_cv_c_bigendian=yes
6821fi
6822rm -fr conftest*
6823fi
6824
6825fi
6826fi
6827
6828echo "$ac_t""$ac_cv_c_bigendian" 1>&6
6829if test $ac_cv_c_bigendian = yes; then
6830 cat >> confdefs.h <<\EOF
6831#define WORDS_BIGENDIAN 1
6832EOF
6833
6834fi
6835
6836
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006837# Check whether right shifting a negative integer extends the sign bit
6838# or fills with zeros (like the Cray J90, according to Tim Peters).
6839echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006840echo "configure:6841: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006841if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00006842 echo $ac_n "(cached) $ac_c" 1>&6
6843else
6844
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006845if test "$cross_compiling" = yes; then
6846 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6847else
6848 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006849#line 6850 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006850#include "confdefs.h"
6851
6852int main()
6853{
Vladimir Marangozova6180282000-07-12 05:05:06 +00006854 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006855}
6856
6857EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006858if { (eval echo configure:6859: \"$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 +00006859then
6860 ac_cv_rshift_extends_sign=yes
6861else
6862 echo "configure: failed program was:" >&5
6863 cat conftest.$ac_ext >&5
6864 rm -fr conftest*
6865 ac_cv_rshift_extends_sign=no
6866fi
6867rm -fr conftest*
6868fi
6869
6870fi
6871
6872echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
6873if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006874then
6875 cat >> confdefs.h <<\EOF
6876#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
6877EOF
6878
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006879fi
6880
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006881# check for getc_unlocked and related locking functions
6882echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006883echo "configure:6884: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006884if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
6885 echo $ac_n "(cached) $ac_c" 1>&6
6886else
6887
6888cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006889#line 6890 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006890#include "confdefs.h"
6891#include <stdio.h>
6892int main() {
6893
6894 FILE *f = fopen("/dev/null", "r");
6895 flockfile(f);
6896 getc_unlocked(f);
6897 funlockfile(f);
6898
6899; return 0; }
6900EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006901if { (eval echo configure:6902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006902 rm -rf conftest*
6903 ac_cv_have_getc_unlocked=yes
6904else
6905 echo "configure: failed program was:" >&5
6906 cat conftest.$ac_ext >&5
6907 rm -rf conftest*
6908 ac_cv_have_getc_unlocked=no
6909fi
6910rm -f conftest*
6911fi
6912
6913echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
6914if test "$ac_cv_have_getc_unlocked" = yes
6915then
6916 cat >> confdefs.h <<\EOF
6917#define HAVE_GETC_UNLOCKED 1
6918EOF
6919
6920fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006921
Guido van Rossum353ae582001-07-10 16:45:32 +00006922# check for readline 4.2
6923echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006924echo "configure:6925: checking for rl_completion_matches in -lreadline" >&5
Guido van Rossum353ae582001-07-10 16:45:32 +00006925ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
6926if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6927 echo $ac_n "(cached) $ac_c" 1>&6
6928else
6929 ac_save_LIBS="$LIBS"
6930LIBS="-lreadline -ltermcap $LIBS"
6931cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006932#line 6933 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00006933#include "confdefs.h"
6934/* Override any gcc2 internal prototype to avoid an error. */
6935/* We use char because int might match the return type of a gcc2
6936 builtin and then its argument prototype would still apply. */
6937char rl_completion_matches();
6938
6939int main() {
6940rl_completion_matches()
6941; return 0; }
6942EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006943if { (eval echo configure:6944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum353ae582001-07-10 16:45:32 +00006944 rm -rf conftest*
6945 eval "ac_cv_lib_$ac_lib_var=yes"
6946else
6947 echo "configure: failed program was:" >&5
6948 cat conftest.$ac_ext >&5
6949 rm -rf conftest*
6950 eval "ac_cv_lib_$ac_lib_var=no"
6951fi
6952rm -f conftest*
6953LIBS="$ac_save_LIBS"
6954
6955fi
6956if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6957 echo "$ac_t""yes" 1>&6
6958 cat >> confdefs.h <<\EOF
6959#define HAVE_RL_COMPLETION_MATCHES 1
6960EOF
6961
6962else
6963 echo "$ac_t""no" 1>&6
6964fi
6965
6966
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006967echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00006968echo "configure:6969: checking for broken nice()" >&5
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006969if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
6970 echo $ac_n "(cached) $ac_c" 1>&6
6971else
6972
6973if test "$cross_compiling" = yes; then
6974 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6975else
6976 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006977#line 6978 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006978#include "confdefs.h"
6979
6980int main()
6981{
6982 int val1 = nice(1);
6983 if (val1 != -1 && val1 == nice(2))
6984 exit(0);
6985 exit(1);
6986}
6987
6988EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00006989if { (eval echo configure:6990: \"$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 +00006990then
6991 ac_cv_broken_nice=yes
6992else
6993 echo "configure: failed program was:" >&5
6994 cat conftest.$ac_ext >&5
6995 rm -fr conftest*
6996 ac_cv_broken_nice=no
6997fi
6998rm -fr conftest*
6999fi
7000
7001fi
7002
7003echo "$ac_t""$ac_cv_broken_nice" 1>&6
7004if test "$ac_cv_broken_nice" = yes
7005then
7006 cat >> confdefs.h <<\EOF
7007#define HAVE_BROKEN_NICE 1
7008EOF
7009
7010fi
7011
Guido van Rossum95713eb2000-05-18 20:53:31 +00007012# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
7013# Add sys/socket.h to confdefs.h
7014cat >> confdefs.h <<\EOF
7015#ifdef HAVE_SYS_SOCKET_H
7016#include <sys/socket.h>
7017#endif
7018EOF
7019echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00007020echo "configure:7021: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007021if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00007022 echo $ac_n "(cached) $ac_c" 1>&6
7023else
7024 cat > conftest.$ac_ext <<EOF
Neil Schemenauercf229462001-08-29 23:58:47 +00007025#line 7026 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00007026#include "confdefs.h"
7027#include <sys/types.h>
7028#if STDC_HEADERS
7029#include <stdlib.h>
7030#include <stddef.h>
7031#endif
7032EOF
7033if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7034 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7035 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007036 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00007037else
7038 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007039 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00007040fi
7041rm -f conftest*
7042
7043fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007044echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7045if test $ac_cv_type_socklen_t = no; then
7046 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00007047#define socklen_t int
7048EOF
7049
7050fi
7051
7052
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00007053# Add Python/ prefix to LIBOBJS
7054libobjs=$LIBOBJS
7055LIBOBJS=
7056for obj in $libobjs; do
7057 LIBOBJS="$LIBOBJS Python/$obj"
7058done
7059
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007060#AC_MSG_CHECKING(for Modules/Setup)
7061#if test ! -f Modules/Setup ; then
7062# if test ! -d Modules ; then
7063# mkdir Modules
7064# fi
7065# cp "$srcdir/Modules/Setup.dist" Modules/Setup
7066# AC_MSG_RESULT(creating)
7067#else
7068# AC_MSG_RESULT(already exists)
7069#fi
7070
7071
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007072SRCDIRS="Parser Grammar Objects Python Modules"
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007073echo $ac_n "checking for build directories""... $ac_c" 1>&6
Neil Schemenauercf229462001-08-29 23:58:47 +00007074echo "configure:7075: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007075for dir in $SRCDIRS; do
7076 if test ! -d $dir; then
7077 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007078 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007079done
7080echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007081
Guido van Rossum627b2d71993-12-24 10:39:16 +00007082# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007083trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007084cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007085# This file is a shell script that caches the results of configure
7086# tests run on this system so they can be shared between configure
7087# scripts and configure runs. It is not useful on other systems.
7088# If it contains results you don't want to keep, you may remove or edit it.
7089#
7090# By default, configure uses ./config.cache as the cache file,
7091# creating it if it does not exist already. You can give configure
7092# the --cache-file=FILE option to use a different cache file; that is
7093# what configure does when it calls configure scripts in
7094# subdirectories, so they share the cache.
7095# Giving --cache-file=/dev/null disables caching, for debugging configure.
7096# config.status only pays attention to the cache file if you give it the
7097# --recheck option to rerun configure.
7098#
7099EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007100# The following way of writing the cache mishandles newlines in values,
7101# but we know of no workaround that is simple, portable, and efficient.
7102# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007103# Ultrix sh set writes to stderr and can't be redirected directly,
7104# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007105(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007106 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007107 *ac_space=\ *)
7108 # `set' does not quote correctly, so add quotes (double-quote substitution
7109 # turns \\\\ into \\, and sed turns \\ into \).
7110 sed -n \
7111 -e "s/'/'\\\\''/g" \
7112 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7113 ;;
7114 *)
7115 # `set' quotes correctly as required by POSIX, so do not add quotes.
7116 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7117 ;;
7118 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007119if cmp -s $cache_file confcache; then
7120 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007121else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007122 if test -w $cache_file; then
7123 echo "updating cache $cache_file"
7124 cat confcache > $cache_file
7125 else
7126 echo "not updating unwritable cache $cache_file"
7127 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007128fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007129rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007130
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007131trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007132
7133test "x$prefix" = xNONE && prefix=$ac_default_prefix
7134# Let make expand exec_prefix.
7135test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007136
Guido van Rossum7f43da71994-08-01 12:15:30 +00007137# Any assignment to VPATH causes Sun make to only execute
7138# the first set of double-colon rules, so remove it if not needed.
7139# If there is a colon in the path, we need to keep it.
7140if test "x$srcdir" = x.; then
7141 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7142fi
7143
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007144trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00007145
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007146DEFS=-DHAVE_CONFIG_H
7147
7148# Without the "./", some shells look in PATH for config.status.
7149: ${CONFIG_STATUS=./config.status}
7150
7151echo creating $CONFIG_STATUS
7152rm -f $CONFIG_STATUS
7153cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007154#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007155# Generated automatically by configure.
7156# Run this file to recreate the current configuration.
7157# This directory was configured as follows,
7158# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7159#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007160# $0 $ac_configure_args
7161#
7162# Compiler output produced by configure, useful for debugging
7163# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007164
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007165ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007166for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00007167do
Guido van Rossum7f43da71994-08-01 12:15:30 +00007168 case "\$ac_option" in
7169 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007170 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7171 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00007172 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007173 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007174 exit 0 ;;
7175 -help | --help | --hel | --he | --h)
7176 echo "\$ac_cs_usage"; exit 0 ;;
7177 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00007178 esac
7179done
7180
Guido van Rossum7f43da71994-08-01 12:15:30 +00007181ac_given_srcdir=$srcdir
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007182ac_given_INSTALL="$INSTALL"
Guido van Rossum627b2d71993-12-24 10:39:16 +00007183
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007184trap '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 +00007185EOF
7186cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007187
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007188# Protect against being on the right side of a sed subst in config.status.
7189sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7190 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007191$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00007192$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007193s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007194s%@CFLAGS@%$CFLAGS%g
7195s%@CPPFLAGS@%$CPPFLAGS%g
7196s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007197s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007198s%@DEFS@%$DEFS%g
7199s%@LDFLAGS@%$LDFLAGS%g
7200s%@LIBS@%$LIBS%g
7201s%@exec_prefix@%$exec_prefix%g
7202s%@prefix@%$prefix%g
7203s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007204s%@bindir@%$bindir%g
7205s%@sbindir@%$sbindir%g
7206s%@libexecdir@%$libexecdir%g
7207s%@datadir@%$datadir%g
7208s%@sysconfdir@%$sysconfdir%g
7209s%@sharedstatedir@%$sharedstatedir%g
7210s%@localstatedir@%$localstatedir%g
7211s%@libdir@%$libdir%g
7212s%@includedir@%$includedir%g
7213s%@oldincludedir@%$oldincludedir%g
7214s%@infodir@%$infodir%g
7215s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00007216s%@VERSION@%$VERSION%g
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00007217s%@CONFIG_ARGS@%$CONFIG_ARGS%g
Jack Jansene578a632001-08-15 01:27:14 +00007218s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g
7219s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g
7220s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g
7221s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00007222s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00007223s%@SGI_ABI@%$SGI_ABI%g
Martin v. Löwis22352952000-12-13 17:37:02 +00007224s%@CXX@%$CXX%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007225s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007226s%@CC@%$CC%g
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00007227s%@CPP@%$CPP%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007228s%@EXEEXT@%$EXEEXT%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007229s%@LIBRARY@%$LIBRARY%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007230s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007231s%@DLLLIBRARY@%$DLLLIBRARY%g
Jack Jansene578a632001-08-15 01:27:14 +00007232s%@BLDLIBRARY@%$BLDLIBRARY%g
7233s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00007234s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007235s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007236s%@AR@%$AR%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007237s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007238s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007239s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007240s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00007241s%@OPT@%$OPT%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007242s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007243s%@SO@%$SO%g
7244s%@LDSHARED@%$LDSHARED%g
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007245s%@BLDSHARED@%$BLDSHARED%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007246s%@CCSHARED@%$CCSHARED%g
7247s%@LINKFORSHARED@%$LINKFORSHARED%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007248s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007249s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7250s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
Guido van Rossum009f7871997-12-04 00:51:42 +00007251s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00007252s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007253s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00007254s%@DYNLOADFILE@%$DYNLOADFILE%g
Neil Schemenauer4e425612001-06-19 15:44:15 +00007255s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007256s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007257s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7258s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7259s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00007260s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007261s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007262s%@LIBM@%$LIBM%g
7263s%@LIBC@%$LIBC%g
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007264s%@UNICODE_OBJS@%$UNICODE_OBJS%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007265s%@SRCDIRS@%$SRCDIRS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007266
7267CEOF
7268EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007269
7270cat >> $CONFIG_STATUS <<\EOF
7271
7272# Split the substitutions into bite-sized pieces for seds with
7273# small command number limits, like on Digital OSF/1 and HP-UX.
7274ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7275ac_file=1 # Number of current file.
7276ac_beg=1 # First line for current file.
7277ac_end=$ac_max_sed_cmds # Line after last line for current file.
7278ac_more_lines=:
7279ac_sed_cmds=""
7280while $ac_more_lines; do
7281 if test $ac_beg -gt 1; then
7282 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7283 else
7284 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7285 fi
7286 if test ! -s conftest.s$ac_file; then
7287 ac_more_lines=false
7288 rm -f conftest.s$ac_file
7289 else
7290 if test -z "$ac_sed_cmds"; then
7291 ac_sed_cmds="sed -f conftest.s$ac_file"
7292 else
7293 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7294 fi
7295 ac_file=`expr $ac_file + 1`
7296 ac_beg=$ac_end
7297 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7298 fi
7299done
7300if test -z "$ac_sed_cmds"; then
7301 ac_sed_cmds=cat
7302fi
7303EOF
7304
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007305cat >> $CONFIG_STATUS <<EOF
7306
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007307CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007308EOF
7309cat >> $CONFIG_STATUS <<\EOF
7310for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007311 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007312 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007313 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007314 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7315 *) ac_file_in="${ac_file}.in" ;;
7316 esac
7317
Guido van Rossumf78abae1997-01-21 22:02:36 +00007318 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007319
7320 # Remove last slash and all that follows it. Not all systems have dirname.
7321 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7322 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7323 # The file is in a subdirectory.
7324 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007325 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007326 # A "../" for each directory in $ac_dir_suffix.
7327 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7328 else
7329 ac_dir_suffix= ac_dots=
7330 fi
7331
7332 case "$ac_given_srcdir" in
7333 .) srcdir=.
7334 if test -z "$ac_dots"; then top_srcdir=.
7335 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7336 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7337 *) # Relative path.
7338 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7339 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7340 esac
7341
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007342 case "$ac_given_INSTALL" in
7343 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7344 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7345 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007346
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007347 echo creating "$ac_file"
7348 rm -f "$ac_file"
7349 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7350 case "$ac_file" in
7351 *Makefile*) ac_comsub="1i\\
7352# $configure_input" ;;
7353 *) ac_comsub= ;;
7354 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007355
7356 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 +00007357 sed -e "$ac_comsub
7358s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007359s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007360s%@top_srcdir@%$top_srcdir%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007361s%@INSTALL@%$INSTALL%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00007362" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00007363fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00007364rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007365
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007366# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7367# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007368#
7369# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007370ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7371ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007372ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007373ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007374# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007375ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7376ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007377ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007378ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007379# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007380ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7381ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007382ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007383ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007384
Guido van Rossumf78abae1997-01-21 22:02:36 +00007385if test "${CONFIG_HEADERS+set}" != set; then
7386EOF
7387cat >> $CONFIG_STATUS <<EOF
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007388 CONFIG_HEADERS="pyconfig.h"
Guido van Rossumf78abae1997-01-21 22:02:36 +00007389EOF
7390cat >> $CONFIG_STATUS <<\EOF
7391fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007392for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007393 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007394 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007395 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007396 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7397 *) ac_file_in="${ac_file}.in" ;;
7398 esac
7399
Guido van Rossum7f43da71994-08-01 12:15:30 +00007400 echo creating $ac_file
7401
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007402 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00007403 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7404 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007405
7406EOF
7407
7408# Transform confdefs.h into a sed script conftest.vals that substitutes
7409# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007410# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007411# Protect against being in an unquoted here document in config.status.
7412rm -f conftest.vals
7413cat > conftest.hdr <<\EOF
7414s/[\\&%]/\\&/g
7415s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007416s%#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 +00007417s%ac_d%ac_u%gp
7418s%ac_u%ac_e%gp
7419EOF
7420sed -n -f conftest.hdr confdefs.h > conftest.vals
7421rm -f conftest.hdr
7422
7423# This sed command replaces #undef with comments. This is necessary, for
7424# example, in the case of _POSIX_SOURCE, which is predefined and required
7425# on some systems where configure will not decide to define it.
7426cat >> conftest.vals <<\EOF
7427s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7428EOF
7429
7430# Break up conftest.vals because some shells have a limit on
7431# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007432
7433rm -f conftest.tail
7434while :
7435do
7436 ac_lines=`grep -c . conftest.vals`
7437 # grep -c gives empty output for an empty file on some AIX systems.
7438 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7439 # Write a limited-size here document to conftest.frag.
7440 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7441 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7442 echo 'CEOF
7443 sed -f conftest.frag conftest.in > conftest.out
7444 rm -f conftest.in
7445 mv conftest.out conftest.in
7446' >> $CONFIG_STATUS
7447 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7448 rm -f conftest.vals
7449 mv conftest.tail conftest.vals
7450done
7451rm -f conftest.vals
7452
7453cat >> $CONFIG_STATUS <<\EOF
7454 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00007455 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007456 cat conftest.in >> conftest.h
7457 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00007458 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00007459 echo "$ac_file is unchanged"
7460 rm -f conftest.h
7461 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007462 # Remove last slash and all that follows it. Not all systems have dirname.
7463 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7464 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7465 # The file is in a subdirectory.
7466 test ! -d "$ac_dir" && mkdir "$ac_dir"
7467 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00007468 rm -f $ac_file
7469 mv conftest.h $ac_file
7470 fi
7471fi; done
7472
Guido van Rossumf78abae1997-01-21 22:02:36 +00007473EOF
7474cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007475
Guido van Rossumf78abae1997-01-21 22:02:36 +00007476EOF
7477cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007478
7479exit 0
7480EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007481chmod +x $CONFIG_STATUS
7482rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007483test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00007484
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007485
7486echo "creating Setup"
7487if test ! -f Modules/Setup
7488then
7489 cp $srcdir/Modules/Setup.dist Modules/Setup
7490fi
7491
7492echo "creating Setup.local"
7493if test ! -f Modules/Setup.local
7494then
7495 echo "# Edit this file for local setup changes" >Modules/Setup.local
7496fi
7497
7498echo "creating Makefile"
7499$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
7500 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00007501 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007502mv config.c Modules