blob: 37e2a9d9b1bd154397f21dd6521da91ffe9acc29 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Martin v. Löwise3eb1f22001-08-16 13:15:00 +00003# From configure.in Revision: 1.247
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 Warsawc0d24d82000-06-29 16:12:00 +000019 --without-gcc never use gcc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020ac_help="$ac_help
Barry Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-06-29 16:12:00 +000054 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000055ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000056 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000057ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000058 --with-libc=STRING C library"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000059ac_help="$ac_help
60 --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)"
Guido van Rossum627b2d71993-12-24 10:39:16 +000061
Guido van Rossum7f43da71994-08-01 12:15:30 +000062# Initialize some variables set by options.
63# The variables have the same names as the options, with
64# dashes changed to underlines.
65build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000066cache_file=./config.cache
67exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000068host=NONE
69no_create=
70nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000071no_recursion=
72prefix=NONE
73program_prefix=NONE
74program_suffix=NONE
75program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000076silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000077site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000078srcdir=
79target=NONE
80verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000081x_includes=NONE
82x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000083bindir='${exec_prefix}/bin'
84sbindir='${exec_prefix}/sbin'
85libexecdir='${exec_prefix}/libexec'
86datadir='${prefix}/share'
87sysconfdir='${prefix}/etc'
88sharedstatedir='${prefix}/com'
89localstatedir='${prefix}/var'
90libdir='${exec_prefix}/lib'
91includedir='${prefix}/include'
92oldincludedir='/usr/include'
93infodir='${prefix}/info'
94mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000095
96# Initialize some other variables.
97subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000098MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000099SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +0000100# Maximum number of lines to put in a shell here document.
101ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +0000102
103ac_prev=
104for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000105do
Guido van Rossum627b2d71993-12-24 10:39:16 +0000106
Guido van Rossum7f43da71994-08-01 12:15:30 +0000107 # If the previous option needs an argument, assign it.
108 if test -n "$ac_prev"; then
109 eval "$ac_prev=\$ac_option"
110 ac_prev=
111 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000112 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000113
Guido van Rossum7f43da71994-08-01 12:15:30 +0000114 case "$ac_option" in
115 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
116 *) ac_optarg= ;;
117 esac
118
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000119 # Accept the important Cygnus configure options, so we can diagnose typos.
120
Guido van Rossum7f43da71994-08-01 12:15:30 +0000121 case "$ac_option" in
122
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000123 -bindir | --bindir | --bindi | --bind | --bin | --bi)
124 ac_prev=bindir ;;
125 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
126 bindir="$ac_optarg" ;;
127
128 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000129 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000130 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000131 build="$ac_optarg" ;;
132
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000133 -cache-file | --cache-file | --cache-fil | --cache-fi \
134 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
135 ac_prev=cache_file ;;
136 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
137 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
138 cache_file="$ac_optarg" ;;
139
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000140 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
141 ac_prev=datadir ;;
142 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
143 | --da=*)
144 datadir="$ac_optarg" ;;
145
Guido van Rossum7f43da71994-08-01 12:15:30 +0000146 -disable-* | --disable-*)
147 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000148 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000149 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000150 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000151 fi
152 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
153 eval "enable_${ac_feature}=no" ;;
154
155 -enable-* | --enable-*)
156 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000157 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000158 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000159 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000160 fi
161 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
162 case "$ac_option" in
163 *=*) ;;
164 *) ac_optarg=yes ;;
165 esac
166 eval "enable_${ac_feature}='$ac_optarg'" ;;
167
Guido van Rossum7f43da71994-08-01 12:15:30 +0000168 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
169 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
170 | --exec | --exe | --ex)
171 ac_prev=exec_prefix ;;
172 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
173 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
174 | --exec=* | --exe=* | --ex=*)
175 exec_prefix="$ac_optarg" ;;
176
177 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000178 # Obsolete; use --with-gas.
179 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000180
181 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000182 # Omit some internal or obsolete options to make the list less imposing.
183 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000184 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000185Usage: configure [options] [host]
186Options: [defaults in brackets after descriptions]
187Configuration:
188 --cache-file=FILE cache test results in FILE
189 --help print this message
190 --no-create do not create output files
191 --quiet, --silent do not print \`checking...' messages
192 --version print the version of autoconf that created configure
193Directory and file names:
194 --prefix=PREFIX install architecture-independent files in PREFIX
195 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000196 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000197 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000198 --bindir=DIR user executables in DIR [EPREFIX/bin]
199 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
200 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
201 --datadir=DIR read-only architecture-independent data in DIR
202 [PREFIX/share]
203 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
204 --sharedstatedir=DIR modifiable architecture-independent data in DIR
205 [PREFIX/com]
206 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
207 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
208 --includedir=DIR C header files in DIR [PREFIX/include]
209 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
210 --infodir=DIR info documentation in DIR [PREFIX/info]
211 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000212 --srcdir=DIR find the sources in DIR [configure dir or ..]
213 --program-prefix=PREFIX prepend PREFIX to installed program names
214 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000215 --program-transform-name=PROGRAM
216 run sed PROGRAM on installed program names
217EOF
218 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000219Host type:
220 --build=BUILD configure for building on BUILD [BUILD=HOST]
221 --host=HOST configure for HOST [guessed]
222 --target=TARGET configure for TARGET [TARGET=HOST]
223Features and packages:
224 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
225 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
226 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
227 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
228 --x-includes=DIR X include files are in DIR
229 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000230EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000231 if test -n "$ac_help"; then
232 echo "--enable and --with options recognized:$ac_help"
233 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000234 exit 0 ;;
235
236 -host | --host | --hos | --ho)
237 ac_prev=host ;;
238 -host=* | --host=* | --hos=* | --ho=*)
239 host="$ac_optarg" ;;
240
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000241 -includedir | --includedir | --includedi | --included | --include \
242 | --includ | --inclu | --incl | --inc)
243 ac_prev=includedir ;;
244 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
245 | --includ=* | --inclu=* | --incl=* | --inc=*)
246 includedir="$ac_optarg" ;;
247
248 -infodir | --infodir | --infodi | --infod | --info | --inf)
249 ac_prev=infodir ;;
250 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
251 infodir="$ac_optarg" ;;
252
253 -libdir | --libdir | --libdi | --libd)
254 ac_prev=libdir ;;
255 -libdir=* | --libdir=* | --libdi=* | --libd=*)
256 libdir="$ac_optarg" ;;
257
258 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
259 | --libexe | --libex | --libe)
260 ac_prev=libexecdir ;;
261 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
262 | --libexe=* | --libex=* | --libe=*)
263 libexecdir="$ac_optarg" ;;
264
265 -localstatedir | --localstatedir | --localstatedi | --localstated \
266 | --localstate | --localstat | --localsta | --localst \
267 | --locals | --local | --loca | --loc | --lo)
268 ac_prev=localstatedir ;;
269 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
270 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
271 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
272 localstatedir="$ac_optarg" ;;
273
274 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
275 ac_prev=mandir ;;
276 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
277 mandir="$ac_optarg" ;;
278
Guido van Rossum7f43da71994-08-01 12:15:30 +0000279 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000280 # Obsolete; use --without-fp.
281 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000282
283 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
284 | --no-cr | --no-c)
285 no_create=yes ;;
286
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000287 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
288 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
289 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000290
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000291 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
292 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
293 | --oldin | --oldi | --old | --ol | --o)
294 ac_prev=oldincludedir ;;
295 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
296 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
297 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
298 oldincludedir="$ac_optarg" ;;
299
Guido van Rossum7f43da71994-08-01 12:15:30 +0000300 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
301 ac_prev=prefix ;;
302 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
303 prefix="$ac_optarg" ;;
304
305 -program-prefix | --program-prefix | --program-prefi | --program-pref \
306 | --program-pre | --program-pr | --program-p)
307 ac_prev=program_prefix ;;
308 -program-prefix=* | --program-prefix=* | --program-prefi=* \
309 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
310 program_prefix="$ac_optarg" ;;
311
312 -program-suffix | --program-suffix | --program-suffi | --program-suff \
313 | --program-suf | --program-su | --program-s)
314 ac_prev=program_suffix ;;
315 -program-suffix=* | --program-suffix=* | --program-suffi=* \
316 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
317 program_suffix="$ac_optarg" ;;
318
319 -program-transform-name | --program-transform-name \
320 | --program-transform-nam | --program-transform-na \
321 | --program-transform-n | --program-transform- \
322 | --program-transform | --program-transfor \
323 | --program-transfo | --program-transf \
324 | --program-trans | --program-tran \
325 | --progr-tra | --program-tr | --program-t)
326 ac_prev=program_transform_name ;;
327 -program-transform-name=* | --program-transform-name=* \
328 | --program-transform-nam=* | --program-transform-na=* \
329 | --program-transform-n=* | --program-transform-=* \
330 | --program-transform=* | --program-transfor=* \
331 | --program-transfo=* | --program-transf=* \
332 | --program-trans=* | --program-tran=* \
333 | --progr-tra=* | --program-tr=* | --program-t=*)
334 program_transform_name="$ac_optarg" ;;
335
336 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
337 | -silent | --silent | --silen | --sile | --sil)
338 silent=yes ;;
339
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000340 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
341 ac_prev=sbindir ;;
342 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
343 | --sbi=* | --sb=*)
344 sbindir="$ac_optarg" ;;
345
346 -sharedstatedir | --sharedstatedir | --sharedstatedi \
347 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
348 | --sharedst | --shareds | --shared | --share | --shar \
349 | --sha | --sh)
350 ac_prev=sharedstatedir ;;
351 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
352 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
353 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
354 | --sha=* | --sh=*)
355 sharedstatedir="$ac_optarg" ;;
356
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000357 -site | --site | --sit)
358 ac_prev=site ;;
359 -site=* | --site=* | --sit=*)
360 site="$ac_optarg" ;;
361
Guido van Rossum7f43da71994-08-01 12:15:30 +0000362 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
363 ac_prev=srcdir ;;
364 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
365 srcdir="$ac_optarg" ;;
366
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000367 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
368 | --syscon | --sysco | --sysc | --sys | --sy)
369 ac_prev=sysconfdir ;;
370 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
371 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
372 sysconfdir="$ac_optarg" ;;
373
Guido van Rossum7f43da71994-08-01 12:15:30 +0000374 -target | --target | --targe | --targ | --tar | --ta | --t)
375 ac_prev=target ;;
376 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
377 target="$ac_optarg" ;;
378
379 -v | -verbose | --verbose | --verbos | --verbo | --verb)
380 verbose=yes ;;
381
382 -version | --version | --versio | --versi | --vers)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000383 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000384 exit 0 ;;
385
386 -with-* | --with-*)
387 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000388 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000390 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000391 fi
392 ac_package=`echo $ac_package| sed 's/-/_/g'`
393 case "$ac_option" in
394 *=*) ;;
395 *) ac_optarg=yes ;;
396 esac
397 eval "with_${ac_package}='$ac_optarg'" ;;
398
399 -without-* | --without-*)
400 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000401 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000403 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000404 fi
405 ac_package=`echo $ac_package| sed 's/-/_/g'`
406 eval "with_${ac_package}=no" ;;
407
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000408 --x)
409 # Obsolete; use --with-x.
410 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
413 | --x-incl | --x-inc | --x-in | --x-i)
414 ac_prev=x_includes ;;
415 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
416 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
417 x_includes="$ac_optarg" ;;
418
419 -x-libraries | --x-libraries | --x-librarie | --x-librari \
420 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
421 ac_prev=x_libraries ;;
422 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
423 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
424 x_libraries="$ac_optarg" ;;
425
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000426 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427 ;;
428
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000429 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000430 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000431 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000432 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000433 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000434 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000435 fi
436 nonopt="$ac_option"
437 ;;
438
439 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000440done
441
Guido van Rossum7f43da71994-08-01 12:15:30 +0000442if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000443 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000444fi
445
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000446trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000447
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000448# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000449# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000450# 1 file creation
451# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000452# 3 some systems may open it to /dev/tty
453# 4 used on the Kubota Titan
454# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000455# 5 compiler messages saved in config.log
456if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000457 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000458else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000459 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000460fi
461exec 5>./config.log
462
463echo "\
464This file contains any messages produced by compilers while
465running configure, to aid debugging if configure makes a mistake.
466" 1>&5
467
468# Strip out --no-create and --no-recursion so they do not pile up.
469# Also quote any args containing shell metacharacters.
470ac_configure_args=
471for ac_arg
472do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000473 case "$ac_arg" in
474 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
475 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000476 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
477 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
478 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
479 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
480 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000481 esac
482done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000483
484# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000485# Only set these to C if already set. These must not be set unconditionally
486# because not all systems understand e.g. LANG=C (notably SCO).
487# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
488# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000489if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000490if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
491if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
492if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000493
Guido van Rossum7f43da71994-08-01 12:15:30 +0000494# confdefs.h avoids OS command line length limits that DEFS can exceed.
495rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000496# AIX cpp loses on an empty file, so make sure it contains at least a newline.
497echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000498
499# A filename unique to this package, relative to the directory that
500# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000501ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000502
503# Find the source files, if location was not specified.
504if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000506 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000507 ac_prog=$0
508 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
509 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
510 srcdir=$ac_confdir
511 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000512 srcdir=..
513 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000514else
515 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000516fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000517if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000518 if test "$ac_srcdir_defaulted" = yes; then
519 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000520 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000521 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000522 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000523fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000524srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
525
526# Prefer explicitly selected file to automatically selected ones.
527if test -z "$CONFIG_SITE"; then
528 if test "x$prefix" != xNONE; then
529 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
530 else
531 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
532 fi
533fi
534for ac_site_file in $CONFIG_SITE; do
535 if test -r "$ac_site_file"; then
536 echo "loading site script $ac_site_file"
537 . "$ac_site_file"
538 fi
539done
540
541if test -r "$cache_file"; then
542 echo "loading cache $cache_file"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000543 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544else
545 echo "creating cache $cache_file"
546 > $cache_file
547fi
548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000550# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000551ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000552ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000553ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000554cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000555
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000556ac_exeext=
557ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000558if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
559 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
560 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
561 ac_n= ac_c='
562' ac_t=' '
563 else
564 ac_n=-n ac_c= ac_t=
565 fi
566else
567 ac_n= ac_c='\c' ac_t=
568fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000569
Guido van Rossum0a516c91994-09-12 10:58:40 +0000570
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571
Guido van Rossum627b2d71993-12-24 10:39:16 +0000572
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000573# Set VERSION so we only need to edit in one place (i.e., here)
574
Guido van Rossum6db412b2001-04-18 04:37:57 +0000575VERSION=2.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000576
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +0000577# Arguments passed to configure.
578
579CONFIG_ARGS="$ac_configure_args"
580
Guido van Rossum563e7081996-09-10 18:20:48 +0000581
Jack Jansene578a632001-08-15 01:27:14 +0000582# Check whether --enable-framework or --disable-framework was given.
583if test "${enable_framework+set}" = set; then
584 enableval="$enable_framework"
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000585
Jack Jansene578a632001-08-15 01:27:14 +0000586 PYTHONFRAMEWORK=Python
587 PYTHONFRAMEWORKDIR=Python.framework
588 case $enableval in
589 yes)
590 enableval=/Library/Frameworks
591 PYTHONFRAMEWORKPREFIX=$enableval
592 ;;
593 *)
594 PYTHONFRAMEWORKPREFIX=$enableval
595 esac
596 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
597 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Guido van Rossum563e7081996-09-10 18:20:48 +0000598
599else
Jack Jansene578a632001-08-15 01:27:14 +0000600
601 PYTHONFRAMEWORK=
602 PYTHONFRAMEWORKDIR=
603 PYTHONFRAMEWORKPREFIX=
604 PYTHONFRAMEWORKINSTALLDIR=
605 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000606
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000607fi
608
Guido van Rossum91922671997-10-09 20:24:13 +0000609
Jack Jansene578a632001-08-15 01:27:14 +0000610
611
612
613
614##AC_ARG_WITH(dyld,
615##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
616##
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000617# Set name for machine-dependent library files
618
619echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000620echo "configure:621: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000621if test -z "$MACHDEP"
622then
Guido van Rossum563e7081996-09-10 18:20:48 +0000623 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +0000624 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000625 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000626 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000627 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000628 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000629 ac_md_system=`echo $ac_sys_system |
630 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
631 ac_md_release=`echo $ac_sys_release |
632 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000633 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000634
Guido van Rossum07397971997-04-29 21:49:50 +0000635 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000636 cygwin*) MACHDEP="cygwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +0000637 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000638 esac
639fi
Guido van Rossum91922671997-10-09 20:24:13 +0000640
641#
642# SGI compilers allow the specification of the both the ABI and the
643# ISA on the command line. Depending on the values of these switches,
644# different and often incompatable code will be generated.
645#
646# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
647# thus supply support for various ABI/ISA combinations. The MACHDEP
648# variable is also adjusted.
649#
650
651if test ! -z "$SGI_ABI"
652then
653 CC="cc $SGI_ABI"
654 LDFLAGS="$SGI_ABI $LDFLAGS"
655 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
656fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000657echo "$ac_t""$MACHDEP" 1>&6
658
Guido van Rossum627b2d71993-12-24 10:39:16 +0000659# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000660echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000661echo "configure:662: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000662# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000663if test "${with_gcc+set}" = set; then
664 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000665
666 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000667 no) CC=cc
668 without_gcc=yes;;
669 yes) CC=gcc
670 without_gcc=no;;
671 *) CC=$withval
672 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000673 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000674else
Guido van Rossume77438c1995-09-13 18:59:59 +0000675
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000676 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000677 AIX*) CC=cc_r
678 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000679 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000680 case $BE_HOST_CPU in
681 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000682 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000683 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000684 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000685 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000686 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000687 ;;
688 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000689 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000690 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000691 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000692 ;;
693 *)
Fred Drake5790be12000-10-09 17:06:13 +0000694 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000695 ;;
696 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000697 AR="\$(srcdir)/Modules/ar_beos"
698 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000699 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000700 Monterey*)
701 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +0000702 without_gcc=;;
703 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000704 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000705fi
706
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000707echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000708
Guido van Rossum95012191999-12-16 17:50:52 +0000709
710
Fred Drakea1a84e72001-03-06 05:52:16 +0000711MAINOBJ=python.o
Guido van Rossum95012191999-12-16 17:50:52 +0000712echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000713echo "configure:714: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000714# Check whether --with-cxx or --without-cxx was given.
715if test "${with_cxx+set}" = set; then
716 withval="$with_cxx"
717
Martin v. Löwis22352952000-12-13 17:37:02 +0000718 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000719 case $withval in
720 no) CXX=
721 with_cxx=no;;
722 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +0000723 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +0000724 with_cxx=$withval;;
725 esac
726else
727
728 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000729 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000730
731fi
732
733echo "$ac_t""$with_cxx" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000734
735
736if test "$check_cxx" = "yes"
737then
738 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
739do
740# Extract the first word of "$ac_prog", so it can be a program name with args.
741set dummy $ac_prog; ac_word=$2
742echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000743echo "configure:744: checking for $ac_word" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000744if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
745 echo $ac_n "(cached) $ac_c" 1>&6
746else
747 if test -n "$CXX"; then
748 ac_cv_prog_CXX="$CXX" # Let the user override the test.
749else
750 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
751 ac_dummy="$PATH"
752 for ac_dir in $ac_dummy; do
753 test -z "$ac_dir" && ac_dir=.
754 if test -f $ac_dir/$ac_word; then
755 ac_cv_prog_CXX="$ac_prog"
756 break
757 fi
758 done
759 IFS="$ac_save_ifs"
760fi
761fi
762CXX="$ac_cv_prog_CXX"
763if test -n "$CXX"; then
764 echo "$ac_t""$CXX" 1>&6
765else
766 echo "$ac_t""no" 1>&6
767fi
768
769test -n "$CXX" && break
770done
771test -n "$CXX" || CXX="notfound"
772
773 if test "$CXX" = "notfound"
774 then
775 CXX=
776 else
777 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000778echo "configure:779: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000779
780ac_ext=C
781# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
782ac_cpp='$CXXCPP $CPPFLAGS'
783ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
784ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
785cross_compiling=$ac_cv_prog_cxx_cross
786
787cat > conftest.$ac_ext << EOF
788
Jack Jansene578a632001-08-15 01:27:14 +0000789#line 790 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000790#include "confdefs.h"
791
792int main(){return(0);}
793EOF
Jack Jansene578a632001-08-15 01:27:14 +0000794if { (eval echo configure:795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis22352952000-12-13 17:37:02 +0000795 ac_cv_prog_cxx_works=yes
796 # If we can't run a trivial program, we are probably using a cross compiler.
797 if (./conftest; exit) 2>/dev/null; then
798 ac_cv_prog_cxx_cross=no
799 else
800 ac_cv_prog_cxx_cross=yes
801 fi
802else
803 echo "configure: failed program was:" >&5
804 cat conftest.$ac_ext >&5
805 ac_cv_prog_cxx_works=no
806fi
807rm -fr conftest*
808ac_ext=c
809# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
810ac_cpp='$CPP $CPPFLAGS'
811ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
812ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
813cross_compiling=$ac_cv_prog_cc_cross
814
815echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
816if test $ac_cv_prog_cxx_works = no; then
817 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
818fi
819echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000820echo "configure:821: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000821echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
822cross_compiling=$ac_cv_prog_cxx_cross
823
824 fi
825fi
826
Guido van Rossum8b131c51995-03-09 14:10:13 +0000827# If the user switches compilers, we can't believe the cache
828if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
829then
830 { echo "configure: error: cached CC is different -- throw away $cache_file
831(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
832fi
833
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834# Extract the first word of "gcc", so it can be a program name with args.
835set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000836echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000837echo "configure:838: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000838if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000839 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840else
841 if test -n "$CC"; then
842 ac_cv_prog_CC="$CC" # Let the user override the test.
843else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000844 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
845 ac_dummy="$PATH"
846 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847 test -z "$ac_dir" && ac_dir=.
848 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000850 break
851 fi
852 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000854fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855fi
856CC="$ac_cv_prog_CC"
857if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000858 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000860 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000862
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863if test -z "$CC"; then
864 # Extract the first word of "cc", so it can be a program name with args.
865set dummy cc; ac_word=$2
866echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000867echo "configure:868: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000868if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000869 echo $ac_n "(cached) $ac_c" 1>&6
870else
871 if test -n "$CC"; then
872 ac_cv_prog_CC="$CC" # Let the user override the test.
873else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000874 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000876 ac_dummy="$PATH"
877 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878 test -z "$ac_dir" && ac_dir=.
879 if test -f $ac_dir/$ac_word; then
880 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
881 ac_prog_rejected=yes
882 continue
883 fi
884 ac_cv_prog_CC="cc"
885 break
886 fi
887 done
888 IFS="$ac_save_ifs"
889if test $ac_prog_rejected = yes; then
890 # We found a bogon in the path, so make sure we never use it.
891 set dummy $ac_cv_prog_CC
892 shift
893 if test $# -gt 0; then
894 # We chose a different compiler from the bogus one.
895 # However, it has the same basename, so the bogon will be chosen
896 # first if we set CC to just the basename; use the full file name.
897 shift
898 set dummy "$ac_dir/$ac_word" "$@"
899 shift
900 ac_cv_prog_CC="$@"
901 fi
902fi
903fi
904fi
905CC="$ac_cv_prog_CC"
906if test -n "$CC"; then
907 echo "$ac_t""$CC" 1>&6
908else
909 echo "$ac_t""no" 1>&6
910fi
911
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000912 if test -z "$CC"; then
913 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000914 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000915 # Extract the first word of "cl", so it can be a program name with args.
916set dummy cl; ac_word=$2
917echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000918echo "configure:919: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000919if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000920 echo $ac_n "(cached) $ac_c" 1>&6
921else
922 if test -n "$CC"; then
923 ac_cv_prog_CC="$CC" # Let the user override the test.
924else
925 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
926 ac_dummy="$PATH"
927 for ac_dir in $ac_dummy; do
928 test -z "$ac_dir" && ac_dir=.
929 if test -f $ac_dir/$ac_word; then
930 ac_cv_prog_CC="cl"
931 break
932 fi
933 done
934 IFS="$ac_save_ifs"
935fi
936fi
937CC="$ac_cv_prog_CC"
938if test -n "$CC"; then
939 echo "$ac_t""$CC" 1>&6
940else
941 echo "$ac_t""no" 1>&6
942fi
943 ;;
944 esac
945 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
947fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000949echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000950echo "configure:951: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000951
952ac_ext=c
953# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
954ac_cpp='$CPP $CPPFLAGS'
955ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000956ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000957cross_compiling=$ac_cv_prog_cc_cross
958
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000959cat > conftest.$ac_ext << EOF
960
Jack Jansene578a632001-08-15 01:27:14 +0000961#line 962 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000962#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000963
Guido van Rossumf78abae1997-01-21 22:02:36 +0000964main(){return(0);}
965EOF
Jack Jansene578a632001-08-15 01:27:14 +0000966if { (eval echo configure:967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000967 ac_cv_prog_cc_works=yes
968 # If we can't run a trivial program, we are probably using a cross compiler.
969 if (./conftest; exit) 2>/dev/null; then
970 ac_cv_prog_cc_cross=no
971 else
972 ac_cv_prog_cc_cross=yes
973 fi
974else
975 echo "configure: failed program was:" >&5
976 cat conftest.$ac_ext >&5
977 ac_cv_prog_cc_works=no
978fi
979rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000980ac_ext=c
981# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
982ac_cpp='$CPP $CPPFLAGS'
983ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
984ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
985cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000986
987echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
988if test $ac_cv_prog_cc_works = no; then
989 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
990fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000991echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000992echo "configure:993: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000993echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
994cross_compiling=$ac_cv_prog_cc_cross
995
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000996echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +0000997echo "configure:998: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000998if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000999 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001000else
1001 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001002#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001003 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001004#endif
1005EOF
Jack Jansene578a632001-08-15 01:27:14 +00001006if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001007 ac_cv_prog_gcc=yes
1008else
1009 ac_cv_prog_gcc=no
1010fi
1011fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001013echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001014
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001015if test $ac_cv_prog_gcc = yes; then
1016 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001017else
1018 GCC=
1019fi
1020
1021ac_test_CFLAGS="${CFLAGS+set}"
1022ac_save_CFLAGS="$CFLAGS"
1023CFLAGS=
1024echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001025echo "configure:1026: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001026if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001027 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001028else
1029 echo 'void f(){}' > conftest.c
1030if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001031 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001032else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001033 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001034fi
1035rm -f conftest*
1036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
Guido van Rossumf78abae1997-01-21 22:02:36 +00001039echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001040if test "$ac_test_CFLAGS" = set; then
1041 CFLAGS="$ac_save_CFLAGS"
1042elif test $ac_cv_prog_cc_g = yes; then
1043 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001044 CFLAGS="-g -O2"
1045 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001046 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047 fi
1048else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001049 if test "$GCC" = yes; then
1050 CFLAGS="-O2"
1051 else
1052 CFLAGS=
1053 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001054fi
1055
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001056
1057# checks for UNIX variants that set C preprocessor variables
1058echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001059echo "configure:1060: checking how to run the C preprocessor" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001060# On Suns, sometimes $CPP names a directory.
1061if test -n "$CPP" && test -d "$CPP"; then
1062 CPP=
1063fi
1064if test -z "$CPP"; then
1065if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1066 echo $ac_n "(cached) $ac_c" 1>&6
1067else
1068 # This must be in double quotes, not single quotes, because CPP may get
1069 # substituted into the Makefile and "${CC-cc}" will confuse make.
1070 CPP="${CC-cc} -E"
1071 # On the NeXT, cc -E runs the code through the compiler's parser,
1072 # not just through cpp.
1073 cat > conftest.$ac_ext <<EOF
Jack Jansene578a632001-08-15 01:27:14 +00001074#line 1075 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001075#include "confdefs.h"
1076#include <assert.h>
1077Syntax Error
1078EOF
1079ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansene578a632001-08-15 01:27:14 +00001080{ (eval echo configure:1081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001081ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1082if test -z "$ac_err"; then
1083 :
1084else
1085 echo "$ac_err" >&5
1086 echo "configure: failed program was:" >&5
1087 cat conftest.$ac_ext >&5
1088 rm -rf conftest*
1089 CPP="${CC-cc} -E -traditional-cpp"
1090 cat > conftest.$ac_ext <<EOF
Jack Jansene578a632001-08-15 01:27:14 +00001091#line 1092 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001092#include "confdefs.h"
1093#include <assert.h>
1094Syntax Error
1095EOF
1096ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansene578a632001-08-15 01:27:14 +00001097{ (eval echo configure:1098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001098ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1099if test -z "$ac_err"; then
1100 :
1101else
1102 echo "$ac_err" >&5
1103 echo "configure: failed program was:" >&5
1104 cat conftest.$ac_ext >&5
1105 rm -rf conftest*
1106 CPP="${CC-cc} -nologo -E"
1107 cat > conftest.$ac_ext <<EOF
Jack Jansene578a632001-08-15 01:27:14 +00001108#line 1109 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001109#include "confdefs.h"
1110#include <assert.h>
1111Syntax Error
1112EOF
1113ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansene578a632001-08-15 01:27:14 +00001114{ (eval echo configure:1115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001115ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1116if test -z "$ac_err"; then
1117 :
1118else
1119 echo "$ac_err" >&5
1120 echo "configure: failed program was:" >&5
1121 cat conftest.$ac_ext >&5
1122 rm -rf conftest*
1123 CPP=/lib/cpp
1124fi
1125rm -f conftest*
1126fi
1127rm -f conftest*
1128fi
1129rm -f conftest*
1130 ac_cv_prog_CPP="$CPP"
1131fi
1132 CPP="$ac_cv_prog_CPP"
1133else
1134 ac_cv_prog_CPP="$CPP"
1135fi
1136echo "$ac_t""$CPP" 1>&6
1137
1138echo $ac_n "checking for AIX""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001139echo "configure:1140: checking for AIX" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001140cat > conftest.$ac_ext <<EOF
Jack Jansene578a632001-08-15 01:27:14 +00001141#line 1142 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001142#include "confdefs.h"
1143#ifdef _AIX
1144 yes
1145#endif
1146
1147EOF
1148if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1149 egrep "yes" >/dev/null 2>&1; then
1150 rm -rf conftest*
1151 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1152#define _ALL_SOURCE 1
1153EOF
1154
1155else
1156 rm -rf conftest*
1157 echo "$ac_t""no" 1>&6
1158fi
1159rm -f conftest*
1160
1161
1162ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1163echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001164echo "configure:1165: checking for minix/config.h" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001165if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1166 echo $ac_n "(cached) $ac_c" 1>&6
1167else
1168 cat > conftest.$ac_ext <<EOF
Jack Jansene578a632001-08-15 01:27:14 +00001169#line 1170 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001170#include "confdefs.h"
1171#include <minix/config.h>
1172EOF
1173ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansene578a632001-08-15 01:27:14 +00001174{ (eval echo configure:1175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001175ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1176if test -z "$ac_err"; then
1177 rm -rf conftest*
1178 eval "ac_cv_header_$ac_safe=yes"
1179else
1180 echo "$ac_err" >&5
1181 echo "configure: failed program was:" >&5
1182 cat conftest.$ac_ext >&5
1183 rm -rf conftest*
1184 eval "ac_cv_header_$ac_safe=no"
1185fi
1186rm -f conftest*
1187fi
1188if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1189 echo "$ac_t""yes" 1>&6
1190 MINIX=yes
1191else
1192 echo "$ac_t""no" 1>&6
1193MINIX=
1194fi
1195
1196if test "$MINIX" = yes; then
1197 cat >> confdefs.h <<\EOF
1198#define _POSIX_SOURCE 1
1199EOF
1200
1201 cat >> confdefs.h <<\EOF
1202#define _POSIX_1_SOURCE 2
1203EOF
1204
1205 cat >> confdefs.h <<\EOF
1206#define _MINIX 1
1207EOF
1208
1209fi
1210
1211
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001212echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001213echo "configure:1214: checking for Cygwin environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001214if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1215 echo $ac_n "(cached) $ac_c" 1>&6
1216else
1217 cat > conftest.$ac_ext <<EOF
Jack Jansene578a632001-08-15 01:27:14 +00001218#line 1219 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001219#include "confdefs.h"
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001220
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001221int main() {
1222
1223#ifndef __CYGWIN__
1224#define __CYGWIN__ __CYGWIN32__
1225#endif
1226return __CYGWIN__;
1227; return 0; }
1228EOF
Jack Jansene578a632001-08-15 01:27:14 +00001229if { (eval echo configure:1230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001230 rm -rf conftest*
1231 ac_cv_cygwin=yes
1232else
1233 echo "configure: failed program was:" >&5
1234 cat conftest.$ac_ext >&5
1235 rm -rf conftest*
1236 ac_cv_cygwin=no
1237fi
1238rm -f conftest*
1239rm -f conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001240fi
1241
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001242echo "$ac_t""$ac_cv_cygwin" 1>&6
1243CYGWIN=
1244test "$ac_cv_cygwin" = yes && CYGWIN=yes
1245echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001246echo "configure:1247: checking for mingw32 environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001247if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1248 echo $ac_n "(cached) $ac_c" 1>&6
1249else
1250 cat > conftest.$ac_ext <<EOF
Jack Jansene578a632001-08-15 01:27:14 +00001251#line 1252 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001252#include "confdefs.h"
1253
1254int main() {
1255return __MINGW32__;
1256; return 0; }
1257EOF
Jack Jansene578a632001-08-15 01:27:14 +00001258if { (eval echo configure:1259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001259 rm -rf conftest*
1260 ac_cv_mingw32=yes
1261else
1262 echo "configure: failed program was:" >&5
1263 cat conftest.$ac_ext >&5
1264 rm -rf conftest*
1265 ac_cv_mingw32=no
1266fi
1267rm -f conftest*
1268rm -f conftest*
1269fi
1270
1271echo "$ac_t""$ac_cv_mingw32" 1>&6
1272MINGW32=
1273test "$ac_cv_mingw32" = yes && MINGW32=yes
1274
1275
1276echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001277echo "configure:1278: checking for executable suffix" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001278if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1279 echo $ac_n "(cached) $ac_c" 1>&6
1280else
1281 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1282 ac_cv_exeext=.exe
1283else
1284 rm -f conftest*
1285 echo 'int main () { return 0; }' > conftest.$ac_ext
1286 ac_cv_exeext=
Jack Jansene578a632001-08-15 01:27:14 +00001287 if { (eval echo configure:1288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001288 for file in conftest.*; do
1289 case $file in
1290 *.c | *.o | *.obj) ;;
1291 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1292 esac
1293 done
1294 else
1295 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1296 fi
1297 rm -f conftest*
1298 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1299fi
1300fi
1301
1302EXEEXT=""
1303test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1304echo "$ac_t""${ac_cv_exeext}" 1>&6
1305ac_exeext=$EXEEXT
1306
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001307echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001308echo "configure:1309: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001309# Check whether --with-suffix or --without-suffix was given.
1310if test "${with_suffix+set}" = set; then
1311 withval="$with_suffix"
1312
1313 case $withval in
1314 no) EXEEXT=;;
1315 yes) EXEEXT=.exe;;
1316 *) EXEEXT=$withval;;
1317 esac
1318fi
1319
1320echo "$ac_t""$EXEEXT" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001321# Test whether we're running on a non-case-sensitive system, in which
1322# case we give a warning if no ext is given
1323if test -d "python" -a -z "$EXEEXT"
1324then
1325 echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2
1326fi
Guido van Rossumff555e32000-09-22 15:38:21 +00001327
Guido van Rossumdd997f71998-10-07 19:58:26 +00001328case $MACHDEP in
1329bsdos*)
1330 case $CC in
1331 gcc) CC="$CC -D_HAVE_BSDI";;
1332 esac;;
1333esac
1334
Guido van Rossum24b1e751997-08-21 02:29:16 +00001335case $ac_sys_system in
1336hp*|HP*)
1337 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001338 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001339 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001340Monterey*)
1341 case $CC in
1342 cc) CC="$CC -Wl,-Bexport";;
1343 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001344SunOS*)
1345 # Some functions have a prototype only with that define, e.g. confstr
1346 cat >> confdefs.h <<\EOF
1347#define __EXTENSIONS__ 1
1348EOF
1349
1350 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001351esac
1352
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001353
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001354
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001355echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001356echo "configure:1357: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001357if test -z "$LIBRARY"
1358then
1359 LIBRARY='libpython$(VERSION).a'
1360fi
1361echo "$ac_t""$LIBRARY" 1>&6
1362
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001363# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00001364# name of the library into which to insert object files). BLDLIBRARY is also
1365# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
1366# is blank as the main program is not linked directly against LDLIBRARY.
1367# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
1368# systems without shared libraries, LDLIBRARY is the same as LIBRARY
1369# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
1370# DLLLIBRARY is the shared (i.e., DLL) library.
1371#
1372
1373
Guido van Rossumaef734b2001-01-10 21:09:12 +00001374
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001375
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001376LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00001377BLDLIBRARY='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00001378DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00001379LDLIBRARYDIR=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001380
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001381# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001382# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001383# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001384
1385echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001386echo "configure:1387: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001387if test -z "$LINKCC"
1388then
1389 case $ac_sys_system in
1390 AIX*)
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001391 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001392 dgux*)
1393 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001394 Monterey64*)
1395 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001396 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001397 esac
1398fi
1399echo "$ac_t""$LINKCC" 1>&6
1400
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001401echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00001402echo "configure:1403: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001403
1404# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001405case $MACHDEP in
1406dguxR4)
1407 LDLIBRARY='libpython$(VERSION).so'
1408 OPT="$OPT -pic"
1409 ;;
1410beos*)
1411 LDLIBRARY='libpython$(VERSION).so'
1412 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001413cygwin*)
1414 LDLIBRARY='libpython$(VERSION).dll.a'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001415 DLLLIBRARY='libpython$(VERSION).dll'
Guido van Rossumaef734b2001-01-10 21:09:12 +00001416 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001417esac
Jack Jansene578a632001-08-15 01:27:14 +00001418
1419# MacOSX framework builds need more magic. LDLIBRARY is the dynamic library that
1420# we build, but we do not want to link against it (we will find it with a -framework
1421# option). For this reason there is an extra variable BLDLIBRARY against which Python
1422# and the extension modules are linked, BLDLIBRARY. This is normally the same
1423# as LDLIBRARY, but empty for MacOSX framework builds.
1424if test "$enable_framework"
1425then
1426 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
1427 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
1428 BLDLIBRARY=''
1429else
1430 BLDLIBRARY='$(LDLIBRARY)'
1431fi
1432
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001433echo "$ac_t""$LDLIBRARY" 1>&6
1434
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001435# Extract the first word of "ranlib", so it can be a program name with args.
1436set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001437echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001438echo "configure:1439: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001439if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001440 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001441else
1442 if test -n "$RANLIB"; then
1443 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1444else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001445 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1446 ac_dummy="$PATH"
1447 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001448 test -z "$ac_dir" && ac_dir=.
1449 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001450 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001451 break
1452 fi
1453 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001454 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001455 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001456fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001457fi
1458RANLIB="$ac_cv_prog_RANLIB"
1459if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001460 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001461else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001462 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001463fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001464
1465
Guido van Rossum7f43da71994-08-01 12:15:30 +00001466for ac_prog in ar aal
1467do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001468# Extract the first word of "$ac_prog", so it can be a program name with args.
1469set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001470echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001471echo "configure:1472: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001472if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001473 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001474else
1475 if test -n "$AR"; then
1476 ac_cv_prog_AR="$AR" # Let the user override the test.
1477else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001478 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1479 ac_dummy="$PATH"
1480 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001481 test -z "$ac_dir" && ac_dir=.
1482 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001483 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001484 break
1485 fi
1486 done
1487 IFS="$ac_save_ifs"
1488fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001489fi
1490AR="$ac_cv_prog_AR"
1491if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001492 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001493else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001494 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001495fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001496
1497test -n "$AR" && break
1498done
1499test -n "$AR" || AR="ar"
1500
Neil Schemenauera42c8272001-03-31 00:01:55 +00001501
1502case $MACHDEP in
1503bsdos*)
1504 # install -d does not work on BSDI
1505 if test -z "$INSTALL"
1506 then
1507 INSTALL="${srcdir}/install-sh -c"
1508 fi
1509esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001510ac_aux_dir=
1511for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1512 if test -f $ac_dir/install-sh; then
1513 ac_aux_dir=$ac_dir
1514 ac_install_sh="$ac_aux_dir/install-sh -c"
1515 break
1516 elif test -f $ac_dir/install.sh; then
1517 ac_aux_dir=$ac_dir
1518 ac_install_sh="$ac_aux_dir/install.sh -c"
1519 break
1520 fi
1521done
1522if test -z "$ac_aux_dir"; then
1523 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001524fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001525ac_config_guess=$ac_aux_dir/config.guess
1526ac_config_sub=$ac_aux_dir/config.sub
1527ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1528
1529# Find a good install program. We prefer a C program (faster),
1530# so one script is as good as another. But avoid the broken or
1531# incompatible versions:
1532# SysV /etc/install, /usr/sbin/install
1533# SunOS /usr/etc/install
1534# IRIX /sbin/install
1535# AIX /bin/install
1536# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1537# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1538# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1539# ./install, which can be erroneously created by make from ./install.sh.
1540echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001541echo "configure:1542: checking for a BSD compatible install" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001542if test -z "$INSTALL"; then
1543if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1544 echo $ac_n "(cached) $ac_c" 1>&6
1545else
1546 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1547 for ac_dir in $PATH; do
1548 # Account for people who put trailing slashes in PATH elements.
1549 case "$ac_dir/" in
1550 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1551 *)
1552 # OSF1 and SCO ODT 3.0 have their own names for install.
1553 # Don't use installbsd from OSF since it installs stuff as root
1554 # by default.
1555 for ac_prog in ginstall scoinst install; do
1556 if test -f $ac_dir/$ac_prog; then
1557 if test $ac_prog = install &&
1558 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1559 # AIX install. It has an incompatible calling convention.
1560 :
1561 else
1562 ac_cv_path_install="$ac_dir/$ac_prog -c"
1563 break 2
1564 fi
1565 fi
1566 done
1567 ;;
1568 esac
1569 done
1570 IFS="$ac_save_IFS"
1571
1572fi
1573 if test "${ac_cv_path_install+set}" = set; then
1574 INSTALL="$ac_cv_path_install"
1575 else
1576 # As a last resort, use the slow shell script. We don't cache a
1577 # path for INSTALL within a source directory, because that will
1578 # break other packages using the cache if that directory is
1579 # removed, or if the path is relative.
1580 INSTALL="$ac_install_sh"
1581 fi
1582fi
1583echo "$ac_t""$INSTALL" 1>&6
1584
1585# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1586# It thinks the first close brace ends the variable substitution.
1587test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1588
1589test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1590
1591test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1592
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001593
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001594# Not every filesystem supports hard links
1595
1596if test -z "$LN" ; then
1597 case $ac_sys_system in
1598 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001599 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001600 *) LN=ln;;
1601 esac
1602fi
1603
Fred Drake109d9862001-07-11 06:27:56 +00001604# Check for --with-pydebug
1605echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001606echo "configure:1607: checking for --with-pydebug" >&5
Fred Drake109d9862001-07-11 06:27:56 +00001607# Check whether --with-pydebug or --without-pydebug was given.
1608if test "${with_pydebug+set}" = set; then
1609 withval="$with_pydebug"
1610
1611if test "$withval" != no
1612then cat >> confdefs.h <<\EOF
1613#define Py_DEBUG 1
1614EOF
1615 echo "$ac_t""yes" 1>&6; Py_DEBUG='true'
1616else echo "$ac_t""no" 1>&6; Py_DEBUG='false'
1617fi
1618else
1619 echo "$ac_t""no" 1>&6
1620fi
1621
1622
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001623# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001624
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001625if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001626then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001627 case $GCC in
1628 yes)
1629 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001630 yes)
Fred Drake109d9862001-07-11 06:27:56 +00001631 if test "$Py_DEBUG" = 'true' ; then
1632 # Optimization messes up debuggers, so turn it off for
1633 # debug builds.
1634 OPT="-g -Wall -Wstrict-prototypes"
1635 else
1636 OPT="-g -O3 -Wall -Wstrict-prototypes"
1637 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001638 *)
Fred Drake109d9862001-07-11 06:27:56 +00001639 OPT="-O3 -Wall -Wstrict-prototypes";;
1640 esac
1641 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001642 *)
1643 case $ac_sys_system in
1644 UnixWare*)
1645 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1646 *)
1647 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001648 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001649 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00001650 case $ac_sys_system in
1651 Darwin*)
1652 OPT="$OPT -no-cpp-precomp";;
1653 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001654fi
1655
Trent Mick635f6fb2000-08-23 21:33:05 +00001656# The current (beta) Monterey compiler dies with optimizations
1657case $ac_sys_system in
1658Monterey*) OPT="";;
1659esac
1660
Guido van Rossum563e7081996-09-10 18:20:48 +00001661if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001662then
1663 OPT="$OPT $ac_arch_flags"
1664fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00001665
Guido van Rossum91922671997-10-09 20:24:13 +00001666echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001667echo "configure:1668: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001668if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001669 echo $ac_n "(cached) $ac_c" 1>&6
1670else
1671 ac_save_cc="$CC"
1672CC="$CC -OPT:Olimit=0"
1673if test "$cross_compiling" = yes; then
1674 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1675else
1676 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001677#line 1678 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001678#include "confdefs.h"
1679int main() { return 0; }
1680EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001681if { (eval echo configure:1682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossum91922671997-10-09 20:24:13 +00001682then
1683 ac_cv_opt_olimit_ok=yes
1684else
1685 echo "configure: failed program was:" >&5
1686 cat conftest.$ac_ext >&5
1687 rm -fr conftest*
1688 ac_cv_opt_olimit_ok=no
1689fi
1690rm -fr conftest*
1691fi
1692
1693CC="$ac_save_cc"
1694fi
1695
1696echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001697if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001698 case $ac_sys_system in
1699 Darwin*) OPT="$OPT" ;;
1700 *) OPT="$OPT -OPT:Olimit=0";;
1701 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001702else
1703 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001704echo "configure:1705: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001705 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001706 echo $ac_n "(cached) $ac_c" 1>&6
1707else
1708 ac_save_cc="$CC"
1709 CC="$CC -Olimit 1500"
1710 if test "$cross_compiling" = yes; then
1711 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1712else
1713 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001714#line 1715 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001715#include "confdefs.h"
1716int main() { return 0; }
1717EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001718if { (eval echo configure:1719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001719then
1720 ac_cv_olimit_ok=yes
1721else
1722 echo "configure: failed program was:" >&5
1723 cat conftest.$ac_ext >&5
1724 rm -fr conftest*
1725 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001726fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001727rm -fr conftest*
1728fi
1729
1730 CC="$ac_save_cc"
1731fi
1732
1733 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1734 if test $ac_cv_olimit_ok = yes; then
1735 OPT="$OPT -Olimit 1500"
1736 fi
1737fi
1738
Martin v. Löwis130fb172001-07-19 11:00:41 +00001739# -Kpthread, if available, provides the right #defines
1740# and linker options to make pthread_create available
1741echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001742echo "configure:1743: checking whether $CC accepts -Kpthread" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00001743if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then
1744 echo $ac_n "(cached) $ac_c" 1>&6
1745else
1746 ac_save_cc="$CC"
1747CC="$CC -Kpthread"
1748cat > conftest.$ac_ext <<EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001749#line 1750 "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00001750#include "confdefs.h"
1751#include <pthread.h>
1752int main() {
1753pthread_create(0,0,0,0)
1754; return 0; }
1755EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001756if { (eval echo configure:1757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00001757 rm -rf conftest*
1758 ac_cv_kpthread=yes
1759else
1760 echo "configure: failed program was:" >&5
1761 cat conftest.$ac_ext >&5
1762 rm -rf conftest*
1763 ac_cv_kpthread=no
1764fi
1765rm -f conftest*
1766CC="$ac_save_cc"
1767fi
1768
1769
1770# GCC does not reject -Kpthread as an illegal option, it merely complains that
1771# it is unrecognized
1772if test "$GCC" = "yes"
1773then ac_cv_kpthread="no, we have gcc"
1774fi
1775echo "$ac_t""$ac_cv_kpthread" 1>&6
1776
Guido van Rossum84e7b241996-08-19 21:59:00 +00001777
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001778# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001779echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001780echo "configure:1781: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001781if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001782 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001783else
1784 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001785#line 1786 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001786#include "confdefs.h"
1787#include <stdlib.h>
1788#include <stdarg.h>
1789#include <string.h>
1790#include <float.h>
1791EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001792ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001793{ (eval echo configure:1794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001794ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001795if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001796 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001797 ac_cv_header_stdc=yes
1798else
1799 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001800 echo "configure: failed program was:" >&5
1801 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001802 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001803 ac_cv_header_stdc=no
1804fi
1805rm -f conftest*
1806
1807if test $ac_cv_header_stdc = yes; then
1808 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1809cat > conftest.$ac_ext <<EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001810#line 1811 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811#include "confdefs.h"
1812#include <string.h>
1813EOF
1814if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1815 egrep "memchr" >/dev/null 2>&1; then
1816 :
1817else
1818 rm -rf conftest*
1819 ac_cv_header_stdc=no
1820fi
1821rm -f conftest*
1822
1823fi
1824
1825if test $ac_cv_header_stdc = yes; then
1826 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1827cat > conftest.$ac_ext <<EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001828#line 1829 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001829#include "confdefs.h"
1830#include <stdlib.h>
1831EOF
1832if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1833 egrep "free" >/dev/null 2>&1; then
1834 :
1835else
1836 rm -rf conftest*
1837 ac_cv_header_stdc=no
1838fi
1839rm -f conftest*
1840
1841fi
1842
1843if test $ac_cv_header_stdc = yes; then
1844 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1845if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001846 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001847else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001848 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001849#line 1850 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001850#include "confdefs.h"
1851#include <ctype.h>
1852#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1853#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001854#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001855int main () { int i; for (i = 0; i < 256; i++)
1856if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1857exit (0); }
1858
1859EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00001860if { (eval echo configure:1861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00001861then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001862 :
1863else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001864 echo "configure: failed program was:" >&5
1865 cat conftest.$ac_ext >&5
1866 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001867 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001868fi
1869rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001870fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001871
1872fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001873fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001874
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001875echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001876if test $ac_cv_header_stdc = yes; then
1877 cat >> confdefs.h <<\EOF
1878#define STDC_HEADERS 1
1879EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001880
1881fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001882
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001883for ac_hdr in dlfcn.h fcntl.h limits.h langinfo.h locale.h \
1884ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00001885signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00001886sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00001887sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00001888sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00001889ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001890do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001891ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001892echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001893echo "configure:1894: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001894if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001895 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001896else
1897 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001898#line 1899 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001899#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001900#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001901EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001902ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001903{ (eval echo configure:1904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001904ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001905if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001906 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001907 eval "ac_cv_header_$ac_safe=yes"
1908else
1909 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001910 echo "configure: failed program was:" >&5
1911 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001912 rm -rf conftest*
1913 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001914fi
1915rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001916fi
1917if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001918 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001919 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001920 cat >> confdefs.h <<EOF
1921#define $ac_tr_hdr 1
1922EOF
1923
1924else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001925 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001926fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001927done
1928
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001929ac_header_dirent=no
1930for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1931do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001932ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001933echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001934echo "configure:1935: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001935if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001936 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001937else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001938 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001939#line 1940 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001940#include "confdefs.h"
1941#include <sys/types.h>
1942#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001943int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001944DIR *dirp = 0;
1945; return 0; }
1946EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001947if { (eval echo configure:1948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001948 rm -rf conftest*
1949 eval "ac_cv_header_dirent_$ac_safe=yes"
1950else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001951 echo "configure: failed program was:" >&5
1952 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001953 rm -rf conftest*
1954 eval "ac_cv_header_dirent_$ac_safe=no"
1955fi
1956rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001957fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001958if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001959 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001960 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001961 cat >> confdefs.h <<EOF
1962#define $ac_tr_hdr 1
1963EOF
1964 ac_header_dirent=$ac_hdr; break
1965else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001966 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001967fi
1968done
1969# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1970if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001971echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001972echo "configure:1973: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001973ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001974if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001975 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001976else
1977 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001978LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001979cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001980#line 1981 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001981#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001982/* Override any gcc2 internal prototype to avoid an error. */
1983/* We use char because int might match the return type of a gcc2
1984 builtin and then its argument prototype would still apply. */
1985char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001986
Guido van Rossumf78abae1997-01-21 22:02:36 +00001987int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001988opendir()
1989; return 0; }
1990EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001991if { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001992 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001993 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001994else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001995 echo "configure: failed program was:" >&5
1996 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001997 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001998 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001999fi
2000rm -f conftest*
2001LIBS="$ac_save_LIBS"
2002
2003fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002004if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002005 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002006 LIBS="$LIBS -ldir"
2007else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002008 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002009fi
2010
2011else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002012echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002013echo "configure:2014: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002014ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002015if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002016 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002017else
2018 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002019LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002020cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002021#line 2022 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002022#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002023/* Override any gcc2 internal prototype to avoid an error. */
2024/* We use char because int might match the return type of a gcc2
2025 builtin and then its argument prototype would still apply. */
2026char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002027
Guido van Rossumf78abae1997-01-21 22:02:36 +00002028int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002029opendir()
2030; return 0; }
2031EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002032if { (eval echo configure:2033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002033 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002034 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002035else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002036 echo "configure: failed program was:" >&5
2037 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002038 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002039 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002040fi
2041rm -f conftest*
2042LIBS="$ac_save_LIBS"
2043
2044fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002045if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002046 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002047 LIBS="$LIBS -lx"
2048else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002049 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002050fi
2051
2052fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002053
2054
2055# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00002056was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002057echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002058echo "configure:2059: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002059cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002060#line 2061 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002061#include "confdefs.h"
2062#include <time.h>
2063EOF
2064if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2065 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002066 rm -rf conftest*
2067 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002068else
2069 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002070 cat >> confdefs.h <<\EOF
2071#define clock_t long
2072EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002073
2074fi
2075rm -f conftest*
2076
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002077echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002078
Guido van Rossum84e7b241996-08-19 21:59:00 +00002079# Add some code to confdefs.h so that the test for off_t works on SCO
2080cat >> confdefs.h <<\EOF
2081#if defined(SCO_DS)
2082#undef _OFF_T
2083#endif
2084EOF
2085
Guido van Rossumef2255b2000-03-10 22:30:29 +00002086# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002087echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002088echo "configure:2089: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002089if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002090 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002091else
2092 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002093#line 2094 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002094#include "confdefs.h"
2095#include <sys/types.h>
2096#if STDC_HEADERS
2097#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002098#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002099#endif
2100EOF
2101if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002102 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002103 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002104 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002105else
2106 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002107 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002108fi
2109rm -f conftest*
2110
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002111fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002112echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2113if test $ac_cv_type_mode_t = no; then
2114 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002115#define mode_t int
2116EOF
2117
2118fi
2119
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002120echo $ac_n "checking for off_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002121echo "configure:2122: checking for off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002122if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002123 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002124else
2125 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002126#line 2127 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002127#include "confdefs.h"
2128#include <sys/types.h>
2129#if STDC_HEADERS
2130#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002131#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002132#endif
2133EOF
2134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002135 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002136 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002137 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002138else
2139 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002140 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002141fi
2142rm -f conftest*
2143
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002144fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002145echo "$ac_t""$ac_cv_type_off_t" 1>&6
2146if test $ac_cv_type_off_t = no; then
2147 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002148#define off_t long
2149EOF
2150
2151fi
2152
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002153echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002154echo "configure:2155: checking for pid_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002155if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002156 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002157else
2158 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002159#line 2160 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002160#include "confdefs.h"
2161#include <sys/types.h>
2162#if STDC_HEADERS
2163#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002164#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002165#endif
2166EOF
2167if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002168 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002169 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002170 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002171else
2172 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002173 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002174fi
2175rm -f conftest*
2176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002177fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002178echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2179if test $ac_cv_type_pid_t = no; then
2180 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002181#define pid_t int
2182EOF
2183
2184fi
2185
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002186echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002187echo "configure:2188: checking return type of signal handlers" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002188if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002189 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002190else
2191 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002192#line 2193 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002193#include "confdefs.h"
2194#include <sys/types.h>
2195#include <signal.h>
2196#ifdef signal
2197#undef signal
2198#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002199#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002200extern "C" void (*signal (int, void (*)(int)))(int);
2201#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002202void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002203#endif
2204
Guido van Rossumf78abae1997-01-21 22:02:36 +00002205int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002206int i;
2207; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002208EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002209if { (eval echo configure:2210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002210 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002211 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002212else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002213 echo "configure: failed program was:" >&5
2214 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002215 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002216 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002217fi
2218rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002219fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002220
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002221echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002222cat >> confdefs.h <<EOF
2223#define RETSIGTYPE $ac_cv_type_signal
2224EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002225
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002226
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002227echo $ac_n "checking for size_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002228echo "configure:2229: checking for size_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002229if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002230 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002231else
2232 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002233#line 2234 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002234#include "confdefs.h"
2235#include <sys/types.h>
2236#if STDC_HEADERS
2237#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002238#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002239#endif
2240EOF
2241if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002242 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002243 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002244 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002245else
2246 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002247 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002248fi
2249rm -f conftest*
2250
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002251fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002252echo "$ac_t""$ac_cv_type_size_t" 1>&6
2253if test $ac_cv_type_size_t = no; then
2254 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002255#define size_t unsigned
2256EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002257
2258fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002259
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002260echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002261echo "configure:2262: checking for uid_t in sys/types.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002262if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002263 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002264else
2265 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002266#line 2267 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002267#include "confdefs.h"
2268#include <sys/types.h>
2269EOF
2270if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2271 egrep "uid_t" >/dev/null 2>&1; then
2272 rm -rf conftest*
2273 ac_cv_type_uid_t=yes
2274else
2275 rm -rf conftest*
2276 ac_cv_type_uid_t=no
2277fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002278rm -f conftest*
2279
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002280fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002281
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002282echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002283if test $ac_cv_type_uid_t = no; then
2284 cat >> confdefs.h <<\EOF
2285#define uid_t int
2286EOF
2287
2288 cat >> confdefs.h <<\EOF
2289#define gid_t int
2290EOF
2291
2292fi
2293
Guido van Rossum627b2d71993-12-24 10:39:16 +00002294
Guido van Rossumef2255b2000-03-10 22:30:29 +00002295# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002296echo $ac_n "checking size of int""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002297echo "configure:2298: checking size of int" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002298if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002299 echo $ac_n "(cached) $ac_c" 1>&6
2300else
2301 if test "$cross_compiling" = yes; then
2302 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2303else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002304 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002305#line 2306 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002306#include "confdefs.h"
2307#include <stdio.h>
2308main()
2309{
2310 FILE *f=fopen("conftestval", "w");
2311 if (!f) exit(1);
2312 fprintf(f, "%d\n", sizeof(int));
2313 exit(0);
2314}
2315EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002316if { (eval echo configure:2317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00002317then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002318 ac_cv_sizeof_int=`cat conftestval`
2319else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002320 echo "configure: failed program was:" >&5
2321 cat conftest.$ac_ext >&5
2322 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002323 ac_cv_sizeof_int=0
2324fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002325rm -fr conftest*
2326fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002327
2328fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002329echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2330cat >> confdefs.h <<EOF
2331#define SIZEOF_INT $ac_cv_sizeof_int
2332EOF
2333
2334
2335echo $ac_n "checking size of long""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002336echo "configure:2337: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002337if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002338 echo $ac_n "(cached) $ac_c" 1>&6
2339else
2340 if test "$cross_compiling" = yes; then
2341 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2342else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002343 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002344#line 2345 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002345#include "confdefs.h"
2346#include <stdio.h>
2347main()
2348{
2349 FILE *f=fopen("conftestval", "w");
2350 if (!f) exit(1);
2351 fprintf(f, "%d\n", sizeof(long));
2352 exit(0);
2353}
2354EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002355if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00002356then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002357 ac_cv_sizeof_long=`cat conftestval`
2358else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002359 echo "configure: failed program was:" >&5
2360 cat conftest.$ac_ext >&5
2361 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002362 ac_cv_sizeof_long=0
2363fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002364rm -fr conftest*
2365fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002366
2367fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002368echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2369cat >> confdefs.h <<EOF
2370#define SIZEOF_LONG $ac_cv_sizeof_long
2371EOF
2372
2373
Guido van Rossumad678af1998-10-02 14:42:15 +00002374echo $ac_n "checking size of void *""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002375echo "configure:2376: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002376if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002377 echo $ac_n "(cached) $ac_c" 1>&6
2378else
2379 if test "$cross_compiling" = yes; then
2380 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2381else
2382 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002383#line 2384 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002384#include "confdefs.h"
2385#include <stdio.h>
2386main()
2387{
2388 FILE *f=fopen("conftestval", "w");
2389 if (!f) exit(1);
2390 fprintf(f, "%d\n", sizeof(void *));
2391 exit(0);
2392}
2393EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002394if { (eval echo configure:2395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumad678af1998-10-02 14:42:15 +00002395then
2396 ac_cv_sizeof_void_p=`cat conftestval`
2397else
2398 echo "configure: failed program was:" >&5
2399 cat conftest.$ac_ext >&5
2400 rm -fr conftest*
2401 ac_cv_sizeof_void_p=0
2402fi
2403rm -fr conftest*
2404fi
2405
2406fi
2407echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2408cat >> confdefs.h <<EOF
2409#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2410EOF
2411
2412
Guido van Rossumef2255b2000-03-10 22:30:29 +00002413echo $ac_n "checking size of char""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002414echo "configure:2415: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002415if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002416 echo $ac_n "(cached) $ac_c" 1>&6
2417else
2418 if test "$cross_compiling" = yes; then
2419 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2420else
2421 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002422#line 2423 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002423#include "confdefs.h"
2424#include <stdio.h>
2425main()
2426{
2427 FILE *f=fopen("conftestval", "w");
2428 if (!f) exit(1);
2429 fprintf(f, "%d\n", sizeof(char));
2430 exit(0);
2431}
2432EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002433if { (eval echo configure:2434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002434then
2435 ac_cv_sizeof_char=`cat conftestval`
2436else
2437 echo "configure: failed program was:" >&5
2438 cat conftest.$ac_ext >&5
2439 rm -fr conftest*
2440 ac_cv_sizeof_char=0
2441fi
2442rm -fr conftest*
2443fi
2444
2445fi
2446echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2447cat >> confdefs.h <<EOF
2448#define SIZEOF_CHAR $ac_cv_sizeof_char
2449EOF
2450
2451
2452echo $ac_n "checking size of short""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002453echo "configure:2454: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002454if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002455 echo $ac_n "(cached) $ac_c" 1>&6
2456else
2457 if test "$cross_compiling" = yes; then
2458 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2459else
2460 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002461#line 2462 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002462#include "confdefs.h"
2463#include <stdio.h>
2464main()
2465{
2466 FILE *f=fopen("conftestval", "w");
2467 if (!f) exit(1);
2468 fprintf(f, "%d\n", sizeof(short));
2469 exit(0);
2470}
2471EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002472if { (eval echo configure:2473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002473then
2474 ac_cv_sizeof_short=`cat conftestval`
2475else
2476 echo "configure: failed program was:" >&5
2477 cat conftest.$ac_ext >&5
2478 rm -fr conftest*
2479 ac_cv_sizeof_short=0
2480fi
2481rm -fr conftest*
2482fi
2483
2484fi
2485echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2486cat >> confdefs.h <<EOF
2487#define SIZEOF_SHORT $ac_cv_sizeof_short
2488EOF
2489
2490
2491echo $ac_n "checking size of float""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002492echo "configure:2493: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002493if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002494 echo $ac_n "(cached) $ac_c" 1>&6
2495else
2496 if test "$cross_compiling" = yes; then
2497 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2498else
2499 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002500#line 2501 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002501#include "confdefs.h"
2502#include <stdio.h>
2503main()
2504{
2505 FILE *f=fopen("conftestval", "w");
2506 if (!f) exit(1);
2507 fprintf(f, "%d\n", sizeof(float));
2508 exit(0);
2509}
2510EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002511if { (eval echo configure:2512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002512then
2513 ac_cv_sizeof_float=`cat conftestval`
2514else
2515 echo "configure: failed program was:" >&5
2516 cat conftest.$ac_ext >&5
2517 rm -fr conftest*
2518 ac_cv_sizeof_float=0
2519fi
2520rm -fr conftest*
2521fi
2522
2523fi
2524echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2525cat >> confdefs.h <<EOF
2526#define SIZEOF_FLOAT $ac_cv_sizeof_float
2527EOF
2528
2529
2530echo $ac_n "checking size of double""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002531echo "configure:2532: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002532if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002533 echo $ac_n "(cached) $ac_c" 1>&6
2534else
2535 if test "$cross_compiling" = yes; then
2536 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2537else
2538 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002539#line 2540 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002540#include "confdefs.h"
2541#include <stdio.h>
2542main()
2543{
2544 FILE *f=fopen("conftestval", "w");
2545 if (!f) exit(1);
2546 fprintf(f, "%d\n", sizeof(double));
2547 exit(0);
2548}
2549EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002550if { (eval echo configure:2551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002551then
2552 ac_cv_sizeof_double=`cat conftestval`
2553else
2554 echo "configure: failed program was:" >&5
2555 cat conftest.$ac_ext >&5
2556 rm -fr conftest*
2557 ac_cv_sizeof_double=0
2558fi
2559rm -fr conftest*
2560fi
2561
2562fi
2563echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2564cat >> confdefs.h <<EOF
2565#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2566EOF
2567
2568
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002569echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002570echo "configure:2571: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002571if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002572 echo $ac_n "(cached) $ac_c" 1>&6
2573else
2574 if test "$cross_compiling" = yes; then
2575 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2576else
2577 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002578#line 2579 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002579#include "confdefs.h"
2580#include <stdio.h>
2581main()
2582{
2583 FILE *f=fopen("conftestval", "w");
2584 if (!f) exit(1);
2585 fprintf(f, "%d\n", sizeof(fpos_t));
2586 exit(0);
2587}
2588EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002589if { (eval echo configure:2590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002590then
2591 ac_cv_sizeof_fpos_t=`cat conftestval`
2592else
2593 echo "configure: failed program was:" >&5
2594 cat conftest.$ac_ext >&5
2595 rm -fr conftest*
2596 ac_cv_sizeof_fpos_t=0
2597fi
2598rm -fr conftest*
2599fi
2600
2601fi
2602echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2603cat >> confdefs.h <<EOF
2604#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2605EOF
2606
2607
Guido van Rossum0a516c91994-09-12 10:58:40 +00002608
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002609echo $ac_n "checking for long long support""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002610echo "configure:2611: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002611have_long_long=no
2612cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002613#line 2614 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002614#include "confdefs.h"
2615
2616int main() {
2617long long x; x = (long long)0;
2618; return 0; }
2619EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002620if { (eval echo configure:2621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002621 rm -rf conftest*
2622 cat >> confdefs.h <<\EOF
2623#define HAVE_LONG_LONG 1
2624EOF
2625 have_long_long=yes
2626else
2627 echo "configure: failed program was:" >&5
2628 cat conftest.$ac_ext >&5
2629fi
2630rm -f conftest*
2631echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002632if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002633echo $ac_n "checking size of long long""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002634echo "configure:2635: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002635if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002636 echo $ac_n "(cached) $ac_c" 1>&6
2637else
2638 if test "$cross_compiling" = yes; then
2639 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2640else
2641 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002642#line 2643 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002643#include "confdefs.h"
2644#include <stdio.h>
2645main()
2646{
2647 FILE *f=fopen("conftestval", "w");
2648 if (!f) exit(1);
2649 fprintf(f, "%d\n", sizeof(long long));
2650 exit(0);
2651}
2652EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002653if { (eval echo configure:2654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002654then
2655 ac_cv_sizeof_long_long=`cat conftestval`
2656else
2657 echo "configure: failed program was:" >&5
2658 cat conftest.$ac_ext >&5
2659 rm -fr conftest*
2660 ac_cv_sizeof_long_long=0
2661fi
2662rm -fr conftest*
2663fi
2664
2665fi
2666echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2667cat >> confdefs.h <<EOF
2668#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2669EOF
2670
2671
2672fi
2673
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002674echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002675echo "configure:2676: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002676have_uintptr_t=no
2677cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002678#line 2679 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002679#include "confdefs.h"
2680
2681int main() {
2682uintptr_t x; x = (uintptr_t)0;
2683; return 0; }
2684EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002685if { (eval echo configure:2686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002686 rm -rf conftest*
2687 cat >> confdefs.h <<\EOF
2688#define HAVE_UINTPTR_T 1
2689EOF
2690 have_uintptr_t=yes
2691else
2692 echo "configure: failed program was:" >&5
2693 cat conftest.$ac_ext >&5
2694fi
2695rm -f conftest*
2696echo "$ac_t""$have_uintptr_t" 1>&6
2697if test "$have_uintptr_t" = yes ; then
2698echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002699echo "configure:2700: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002700if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002701 echo $ac_n "(cached) $ac_c" 1>&6
2702else
2703 if test "$cross_compiling" = yes; then
2704 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2705else
2706 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002707#line 2708 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002708#include "confdefs.h"
2709#include <stdio.h>
2710main()
2711{
2712 FILE *f=fopen("conftestval", "w");
2713 if (!f) exit(1);
2714 fprintf(f, "%d\n", sizeof(uintptr_t));
2715 exit(0);
2716}
2717EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002718if { (eval echo configure:2719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002719then
2720 ac_cv_sizeof_uintptr_t=`cat conftestval`
2721else
2722 echo "configure: failed program was:" >&5
2723 cat conftest.$ac_ext >&5
2724 rm -fr conftest*
2725 ac_cv_sizeof_uintptr_t=0
2726fi
2727rm -fr conftest*
2728fi
2729
2730fi
2731echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2732cat >> confdefs.h <<EOF
2733#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2734EOF
2735
2736
2737fi
2738
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002739# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2740echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002741echo "configure:2742: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002742if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002743 echo $ac_n "(cached) $ac_c" 1>&6
2744else
2745 if test "$cross_compiling" = yes; then
2746 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2747else
2748 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002749#line 2750 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002750#include "confdefs.h"
2751#include <stdio.h>
2752#include <sys/types.h>
2753main()
2754{
2755 FILE *f=fopen("conftestval", "w");
2756 if (!f) exit(1);
2757 fprintf(f, "%d\n", sizeof(off_t));
2758 exit(0);
2759}
2760EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002761if { (eval echo configure:2762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002762then
2763 ac_cv_sizeof_off_t=`cat conftestval`
2764else
2765 echo "configure: failed program was:" >&5
2766 cat conftest.$ac_ext >&5
2767 rm -fr conftest*
2768 ac_cv_sizeof_off_t=0
2769fi
2770rm -fr conftest*
2771fi
2772
2773
2774fi
2775
2776echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2777cat >> confdefs.h <<EOF
2778#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2779EOF
2780
2781
2782echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002783echo "configure:2784: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002784if test "$have_long_long" = yes -a \
2785 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2786 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002787 cat >> confdefs.h <<\EOF
2788#define HAVE_LARGEFILE_SUPPORT 1
2789EOF
2790
2791 echo "$ac_t""yes" 1>&6
2792else
2793 echo "$ac_t""no" 1>&6
2794fi
2795
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002796# AC_CHECK_SIZEOF() doesn't include <time.h>.
2797echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002798echo "configure:2799: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002799if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002800 echo $ac_n "(cached) $ac_c" 1>&6
2801else
2802 if test "$cross_compiling" = yes; then
2803 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2804else
2805 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002806#line 2807 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002807#include "confdefs.h"
2808#include <stdio.h>
2809#include <time.h>
2810main()
2811{
2812 FILE *f=fopen("conftestval", "w");
2813 if (!f) exit(1);
2814 fprintf(f, "%d\n", sizeof(time_t));
2815 exit(0);
2816}
2817EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002818if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002819then
2820 ac_cv_sizeof_time_t=`cat conftestval`
2821else
2822 echo "configure: failed program was:" >&5
2823 cat conftest.$ac_ext >&5
2824 rm -fr conftest*
2825 ac_cv_sizeof_time_t=0
2826fi
2827rm -fr conftest*
2828fi
2829
2830
2831fi
2832
2833echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2834cat >> confdefs.h <<EOF
2835#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2836EOF
2837
2838
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002839
Trent Mick635f6fb2000-08-23 21:33:05 +00002840# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00002841ac_save_cc="$CC"
2842if test "$ac_cv_kpthread" = "yes"
2843then CC="$CC -Kpthread"
2844fi
Trent Mick635f6fb2000-08-23 21:33:05 +00002845echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002846echo "configure:2847: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002847have_pthread_t=no
2848cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002849#line 2850 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002850#include "confdefs.h"
2851#include <pthread.h>
2852int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002853pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002854; return 0; }
2855EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002856if { (eval echo configure:2857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002857 rm -rf conftest*
2858 have_pthread_t=yes
2859else
2860 echo "configure: failed program was:" >&5
2861 cat conftest.$ac_ext >&5
2862fi
2863rm -f conftest*
2864echo "$ac_t""$have_pthread_t" 1>&6
2865if test "$have_pthread_t" = yes ; then
2866 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2867 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002868echo "configure:2869: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002869 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002870 echo $ac_n "(cached) $ac_c" 1>&6
2871else
2872 if test "$cross_compiling" = yes; then
2873 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2874else
2875 cat > conftest.$ac_ext <<EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002876#line 2877 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002877#include "confdefs.h"
2878#include <stdio.h>
2879 #include <pthread.h>
2880 main()
2881 {
2882 FILE *f=fopen("conftestval", "w");
2883 if (!f) exit(1);
2884 fprintf(f, "%d\n", sizeof(pthread_t));
2885 exit(0);
2886 }
2887EOF
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00002888if { (eval echo configure:2889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Trent Mick635f6fb2000-08-23 21:33:05 +00002889then
2890 ac_cv_sizeof_pthread_t=`cat conftestval`
2891else
2892 echo "configure: failed program was:" >&5
2893 cat conftest.$ac_ext >&5
2894 rm -fr conftest*
2895 ac_cv_sizeof_pthread_t=0
2896fi
2897rm -fr conftest*
2898fi
2899
2900
2901fi
2902
2903 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2904 cat >> confdefs.h <<EOF
2905#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2906EOF
2907
2908fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00002909CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00002910
Jack Jansene578a632001-08-15 01:27:14 +00002911echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6
2912echo "configure:2913: checking for --enable-toolbox-glue" >&5
2913# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
2914if test "${enable_toolbox_glue+set}" = set; then
2915 enableval="$enable_toolbox_glue"
2916 :
2917fi
2918
2919
2920if test -z "$enable_toolbox_glue"
2921then
2922 case $ac_sys_system/$ac_sys_release in
2923 Darwin/*)
2924 enable_toolbox_glue="yes";;
2925 *)
2926 enable_toolbox_glue="no";;
2927 esac
2928fi
2929case "$enable_toolbox_glue" in
2930yes)
2931 extra_frameworks="-framework Carbon -framework Foundation"
2932 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00002933 extra_undefs="-u __dummy -u _PyMac_Error"
Jack Jansene578a632001-08-15 01:27:14 +00002934 cat >> confdefs.h <<\EOF
2935#define USE_TOOLBOX_OBJECT_GLUE 1
2936EOF
2937
2938 ;;
2939*)
2940 extra_frameworks=""
2941 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00002942 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00002943 ;;
2944esac
2945echo "$ac_t""$enable_toolbox_glue" 1>&6
2946
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002947
2948case $ac_sys_system/$ac_sys_release in
Guido van Rossum5839e582000-10-09 19:52:35 +00002949 Darwin/*)
2950 ns_undef_sym='_environ'
Jack Jansene578a632001-08-15 01:27:14 +00002951 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
2952 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
2953 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
2954 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002955esac
2956
Jack Jansene578a632001-08-15 01:27:14 +00002957echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00002958echo "configure:2959: checking for --enable-framework" >&5
Jack Jansene578a632001-08-15 01:27:14 +00002959if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002960then
Jack Jansenca06bc62001-08-03 15:32:23 +00002961 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002962 # -U __environ is needed since bundles don't have access
2963 # to crt0 when built but will always be linked against it
Jack Jansene578a632001-08-15 01:27:14 +00002964 # -F. is needed to allow linking to the framework while
2965 # in the build location.
2966
2967 LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002968 cat >> confdefs.h <<\EOF
2969#define WITH_NEXT_FRAMEWORK 1
2970EOF
2971
2972 echo "$ac_t""yes" 1>&6
2973else
2974 echo "$ac_t""no" 1>&6
2975fi
2976
Jack Jansene578a632001-08-15 01:27:14 +00002977echo $ac_n "checking for dyld""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00002978echo "configure:2979: checking for dyld" >&5
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002979case $ac_sys_system/$ac_sys_release in
2980 Darwin/*)
2981 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002982#define WITH_DYLD 1
2983EOF
2984
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002985 echo "$ac_t""always on for Darwin" 1>&6
2986 ;;
2987 *)
Jack Jansene578a632001-08-15 01:27:14 +00002988 echo "$ac_t""no" 1>&6
2989 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00002990esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002991
Guido van Rossum0a516c91994-09-12 10:58:40 +00002992# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002993
2994
2995
2996
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002997
Guido van Rossum0a516c91994-09-12 10:58:40 +00002998# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00002999# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003000echo $ac_n "checking SO""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003001echo "configure:3002: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003002if test -z "$SO"
3003then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003004 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003005 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003006 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003007 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003008 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003009fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003010echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003011# LDSHARED is the ld *command* used to create shared library
3012# -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003013# (Shared libraries in this instance are shared modules to be loaded into
3014# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003015echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003016echo "configure:3017: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003017if test -z "$LDSHARED"
3018then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003019 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003020 AIX*)
3021 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
3022 LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp"
3023 ;;
3024 BeOS*)
3025 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
3026 LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
3027 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003028 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003029 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003030 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a662000-05-26 12:22:54 +00003031 SunOS/5*)
3032 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003033 then LDSHARED='$(CC) -shared'
Greg Ward57c9a662000-05-26 12:22:54 +00003034 else LDSHARED="ld -G";
3035 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003036 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003037 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3038 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansene578a632001-08-15 01:27:14 +00003039 Darwin/*)
3040 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3041 if test "$enable_framework" ; then
3042 # Link against the framework. All externals should be defined.
3043 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3044 else
3045 # No framework. Ignore undefined symbols, assuming they come from Python
3046 LDSHARED="$LDSHARED -undefined suppress"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003047 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00003048 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003049 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003050 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003051 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00003052 NetBSD*)
3053 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3054 then
3055 LDSHARED="cc -shared"
3056 else
3057 LDSHARED="ld -Bshareable"
3058 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003059 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003060 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003061 then
3062 LDSHARED="cc -shared ${LDFLAGS}"
3063 else
3064 LDSHARED="ld -Bshareable ${LDFLAGS}"
3065 fi;;
Martin v. Löwisbec19582001-03-21 15:57:54 +00003066 UnixWare*)
3067 if test "$GCC" = "yes"
3068 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003069 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003070 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003071 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003072 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003073 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003074 *) LDSHARED="ld";;
3075 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003076fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003077echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003078BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003079# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003080# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003081echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003082echo "configure:3083: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003083if test -z "$CCSHARED"
3084then
Guido van Rossum07397971997-04-29 21:49:50 +00003085 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003086 SunOS*) if test "$GCC" = yes;
3087 then CCSHARED="-fPIC";
3088 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003089 hp*|HP*) if test "$GCC" = yes;
3090 then CCSHARED="-fpic";
3091 else CCSHARED="+z";
3092 fi;;
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003093 Linux*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003094 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003095 OpenBSD*) CCSHARED="-fpic";;
3096 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Martin v. Löwisbec19582001-03-21 15:57:54 +00003097 UnixWare*)
3098 if test "$GCC" = "yes"
3099 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003100 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003101 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003102 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003103 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003104 IRIX*/6*) case $CC in
3105 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003106 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003107 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003108 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003109 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003110fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003111echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003112# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003113# the python executable -- this is only needed for a few systems
3114echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003115echo "configure:3116: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003116if test -z "$LINKFORSHARED"
3117then
Guido van Rossum07397971997-04-29 21:49:50 +00003118 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003119 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003120 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00003121 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003122 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00003123 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003124 # -u libsys_s pulls in all symbols in libsys
Jack Jansene578a632001-08-15 01:27:14 +00003125 Darwin/*)
3126 # -u __dummy makes the linker aware of the objc runtime
3127 # in System.framework; otherwise, __objcInit (referenced in
3128 # crt1.o) gets erroneously defined as common, which breaks dynamic
3129 # loading of any modules which reference it in System.framework.
3130 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
3131 # not used by the core itself but which needs to be in the core so
3132 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00003133 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00003134 if test "$enable_framework"
3135 then
3136 LINKFORSHARED="$LINKFORSHARED -framework Python"
3137 fi
3138 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003139 UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003140 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003141 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003142 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003143 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3144 then
3145 LINKFORSHARED="-Wl,--export-dynamic"
3146 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003147 SunOS/5*) case $CC in
3148 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003149 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003150 then
3151 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003152 fi;;
3153 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003154 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003155fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003156echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003157
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003158
3159echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003160echo "configure:3161: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003161if test ! "$LIBRARY" = "$LDLIBRARY"
3162then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003163 case $ac_sys_system in
3164 CYGWIN*)
3165 # Cygwin needs CCSHARED when building extension DLLs
3166 # but not when building the interpreter DLL.
3167 CFLAGSFORSHARED='';;
3168 *)
3169 CFLAGSFORSHARED='$(CCSHARED)'
3170 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003171fi
3172echo "$ac_t""$CFLAGSFORSHARED" 1>&6
3173
Guido van Rossum627b2d71993-12-24 10:39:16 +00003174# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00003175echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003176echo "configure:3177: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003177ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003178if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003179 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003180else
3181 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003182LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003183cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003184#line 3185 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003185#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003186/* Override any gcc2 internal prototype to avoid an error. */
3187/* We use char because int might match the return type of a gcc2
3188 builtin and then its argument prototype would still apply. */
3189char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003190
Guido van Rossumf78abae1997-01-21 22:02:36 +00003191int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003192dlopen()
3193; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003194EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003195if { (eval echo configure:3196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003196 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003197 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003198else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003199 echo "configure: failed program was:" >&5
3200 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003201 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003202 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003203fi
3204rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003205LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003206
Guido van Rossum627b2d71993-12-24 10:39:16 +00003207fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003208if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003209 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003210 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3211 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003212 cat >> confdefs.h <<EOF
3213#define $ac_tr_lib 1
3214EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003215
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003216 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003217
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003218else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003219 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003220fi
3221 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00003222echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003223echo "configure:3224: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003224ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003225if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003226 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003227else
3228 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003229LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003230cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003231#line 3232 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003232#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003233/* Override any gcc2 internal prototype to avoid an error. */
3234/* We use char because int might match the return type of a gcc2
3235 builtin and then its argument prototype would still apply. */
3236char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003237
Guido van Rossumf78abae1997-01-21 22:02:36 +00003238int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003239shl_load()
3240; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003241EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003242if { (eval echo configure:3243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003243 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003244 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003245else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003246 echo "configure: failed program was:" >&5
3247 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003248 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003249 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003250fi
3251rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003252LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003253
Guido van Rossum627b2d71993-12-24 10:39:16 +00003254fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003255if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003256 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003257 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3258 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003259 cat >> confdefs.h <<EOF
3260#define $ac_tr_lib 1
3261EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003262
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003263 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003264
3265else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003266 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003267fi
3268 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003269
3270# checks for system dependent C++ extensions support
3271case "$ac_sys_system" in
3272 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003273echo "configure:3274: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003274 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003275#line 3276 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003276#include "confdefs.h"
3277#include "/usr/lpp/xlC/include/load.h"
3278int main() {
3279loadAndInit("", 0, "")
3280; return 0; }
3281EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003282if { (eval echo configure:3283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003283 rm -rf conftest*
3284 cat >> confdefs.h <<\EOF
3285#define AIX_GENUINE_CPLUSPLUS 1
3286EOF
3287
3288 echo "$ac_t""yes" 1>&6
3289else
3290 echo "configure: failed program was:" >&5
3291 cat conftest.$ac_ext >&5
3292 rm -rf conftest*
3293 echo "$ac_t""no" 1>&6
3294fi
3295rm -f conftest*;;
3296 *) ;;
3297esac
3298
Guido van Rossum70c7f481998-03-26 18:44:10 +00003299# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3300# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003301# BeOS' sockets are stashed in libnet.
3302case "$ac_sys_system" in
3303IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003304*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003305echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003306echo "configure:3307: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003307ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003308if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003309 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003310else
3311 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003312LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003313cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003314#line 3315 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003315#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003316/* Override any gcc2 internal prototype to avoid an error. */
3317/* We use char because int might match the return type of a gcc2
3318 builtin and then its argument prototype would still apply. */
3319char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003320
Guido van Rossumf78abae1997-01-21 22:02:36 +00003321int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003322t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003323; return 0; }
3324EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003325if { (eval echo configure:3326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003326 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003327 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003328else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003329 echo "configure: failed program was:" >&5
3330 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003331 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003332 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003333fi
3334rm -f conftest*
3335LIBS="$ac_save_LIBS"
3336
3337fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003338if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003339 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003340 LIBS="-lnsl $LIBS"
3341else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003342 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003343fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003344 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003345echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003346echo "configure:3347: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003347ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003348if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003349 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003350else
3351 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003352LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003353cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003354#line 3355 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003355#include "confdefs.h"
3356/* Override any gcc2 internal prototype to avoid an error. */
3357/* We use char because int might match the return type of a gcc2
3358 builtin and then its argument prototype would still apply. */
3359char socket();
3360
3361int main() {
3362socket()
3363; return 0; }
3364EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003365if { (eval echo configure:3366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003366 rm -rf conftest*
3367 eval "ac_cv_lib_$ac_lib_var=yes"
3368else
3369 echo "configure: failed program was:" >&5
3370 cat conftest.$ac_ext >&5
3371 rm -rf conftest*
3372 eval "ac_cv_lib_$ac_lib_var=no"
3373fi
3374rm -f conftest*
3375LIBS="$ac_save_LIBS"
3376
3377fi
3378if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3379 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003380 LIBS="-lsocket $LIBS"
3381else
3382 echo "$ac_t""no" 1>&6
3383fi
3384 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003385;;
3386esac
3387case "$ac_sys_system" in
3388BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003389echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003390echo "configure:3391: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003391ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003392if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003393 echo $ac_n "(cached) $ac_c" 1>&6
3394else
3395 ac_save_LIBS="$LIBS"
3396LIBS="-lnet $LIBS $LIBS"
3397cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003398#line 3399 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003399#include "confdefs.h"
3400/* Override any gcc2 internal prototype to avoid an error. */
3401/* We use char because int might match the return type of a gcc2
3402 builtin and then its argument prototype would still apply. */
3403char socket();
3404
3405int main() {
3406socket()
3407; return 0; }
3408EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003409if { (eval echo configure:3410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003410 rm -rf conftest*
3411 eval "ac_cv_lib_$ac_lib_var=yes"
3412else
3413 echo "configure: failed program was:" >&5
3414 cat conftest.$ac_ext >&5
3415 rm -rf conftest*
3416 eval "ac_cv_lib_$ac_lib_var=no"
3417fi
3418rm -f conftest*
3419LIBS="$ac_save_LIBS"
3420
3421fi
3422if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3423 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003424 LIBS="-lnet $LIBS"
3425else
3426 echo "$ac_t""no" 1>&6
3427fi
3428 # BeOS
3429;;
3430esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003431
Guido van Rossuma68acba1996-07-31 17:36:39 +00003432echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003433echo "configure:3434: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003434# Check whether --with-libs or --without-libs was given.
3435if test "${with_libs+set}" = set; then
3436 withval="$with_libs"
3437
3438echo "$ac_t""$withval" 1>&6
3439LIBS="$withval $LIBS"
3440
3441else
3442 echo "$ac_t""no" 1>&6
3443fi
3444
Guido van Rossum7f43da71994-08-01 12:15:30 +00003445
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003446# Determine if signalmodule should be used.
3447
3448
3449echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003450echo "configure:3451: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003451# Check whether --with-signal-module or --without-signal-module was given.
3452if test "${with_signal_module+set}" = set; then
3453 withval="$with_signal_module"
3454 :
3455fi
3456
3457
3458if test -z "$with_signal_module"
3459then with_signal_module="yes"
3460fi
3461echo "$ac_t""$with_signal_module" 1>&6
3462
3463if test "${with_signal_module}" = "yes"; then
3464 USE_SIGNAL_MODULE=""
3465 SIGNAL_OBJS=""
3466else
3467 USE_SIGNAL_MODULE="#"
3468 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3469fi
3470
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003471# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003472
Barry Warsawc0d24d82000-06-29 16:12:00 +00003473USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003474
Guido van Rossumec2f0731997-01-22 20:54:01 +00003475echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003476echo "configure:3477: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003477
3478# Check whether --with-dec-threads or --without-dec-threads was given.
3479if test "${with_dec_threads+set}" = set; then
3480 withval="$with_dec_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003481
3482echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003483LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003484if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003485 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003486fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003487else
3488 echo "$ac_t""no" 1>&6
3489fi
3490
3491
3492echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003493echo "configure:3494: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003494# Check whether --with-threads or --without-threads was given.
3495if test "${with_threads+set}" = set; then
3496 withval="$with_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003497 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003498fi
3499
3500
Barry Warsawc0d24d82000-06-29 16:12:00 +00003501# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003502# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003503if test "${with_thread+set}" = set; then
3504 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003505
3506with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003507fi
Barry Warsawc0d24d82000-06-29 16:12:00 +00003508
3509
3510if test -z "$with_threads"
3511then with_threads="yes"
3512fi
3513echo "$ac_t""$with_threads" 1>&6
3514
3515if test "$with_threads" = "no"
3516then
3517 USE_THREAD_MODULE="#"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003518elif test "$ac_cv_kpthread" = "yes"
3519then
3520 CC="$CC -Kpthread"
3521 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003522#define WITH_THREAD 1
3523EOF
3524
Martin v. Löwis130fb172001-07-19 11:00:41 +00003525 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003526#define _POSIX_THREADS 1
3527EOF
3528
Martin v. Löwis130fb172001-07-19 11:00:41 +00003529 LIBOBJS="$LIBOBJS thread.o"
3530else
3531 if test ! -z "$with_threads" -a -d "$with_threads"
3532 then LDFLAGS="$LDFLAGS -L$with_threads"
3533 fi
3534 if test ! -z "$withval" -a -d "$withval"
3535 then LDFLAGS="$LDFLAGS -L$withval"
3536 fi
3537 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003538#define _REENTRANT 1
3539EOF
3540
Martin v. Löwis130fb172001-07-19 11:00:41 +00003541 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003542echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003543echo "configure:3544: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003544if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003545 echo $ac_n "(cached) $ac_c" 1>&6
3546else
3547 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003548#line 3549 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003549#include "confdefs.h"
3550#include <mach/cthreads.h>
3551EOF
3552ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen591cbed2001-08-15 13:55:15 +00003553{ (eval echo configure:3554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003554ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003555if test -z "$ac_err"; then
3556 rm -rf conftest*
3557 eval "ac_cv_header_$ac_safe=yes"
3558else
3559 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003560 echo "configure: failed program was:" >&5
3561 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003562 rm -rf conftest*
3563 eval "ac_cv_header_$ac_safe=no"
3564fi
3565rm -f conftest*
3566fi
3567if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3568 echo "$ac_t""yes" 1>&6
3569 cat >> confdefs.h <<\EOF
3570#define WITH_THREAD 1
3571EOF
3572
Martin v. Löwis130fb172001-07-19 11:00:41 +00003573 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003574#define C_THREADS 1
3575EOF
3576
Martin v. Löwis130fb172001-07-19 11:00:41 +00003577 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003578else
3579 echo "$ac_t""no" 1>&6
3580
Martin v. Löwis130fb172001-07-19 11:00:41 +00003581 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003582echo "configure:3583: checking for --with-pth" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00003583 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003584if test "${with_pth+set}" = set; then
3585 withval="$with_pth"
3586
Martin v. Löwis130fb172001-07-19 11:00:41 +00003587 echo "$ac_t""$withval" 1>&6
3588 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003589#define WITH_THREAD 1
3590EOF
3591
Martin v. Löwis130fb172001-07-19 11:00:41 +00003592 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003593#define HAVE_PTH 1
3594EOF
3595
Martin v. Löwis130fb172001-07-19 11:00:41 +00003596 LIBS="-lpth $LIBS"
3597 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003598else
3599
Martin v. Löwis130fb172001-07-19 11:00:41 +00003600 echo "$ac_t""no" 1>&6
3601 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003602echo "configure:3603: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003603ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003604if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003605 echo $ac_n "(cached) $ac_c" 1>&6
3606else
3607 ac_save_LIBS="$LIBS"
3608LIBS="-lpthread $LIBS"
3609cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003610#line 3611 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003611#include "confdefs.h"
3612/* Override any gcc2 internal prototype to avoid an error. */
3613/* We use char because int might match the return type of a gcc2
3614 builtin and then its argument prototype would still apply. */
3615char pthread_create();
3616
3617int main() {
3618pthread_create()
3619; return 0; }
3620EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003621if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003622 rm -rf conftest*
3623 eval "ac_cv_lib_$ac_lib_var=yes"
3624else
3625 echo "configure: failed program was:" >&5
3626 cat conftest.$ac_ext >&5
3627 rm -rf conftest*
3628 eval "ac_cv_lib_$ac_lib_var=no"
3629fi
3630rm -f conftest*
3631LIBS="$ac_save_LIBS"
3632
3633fi
3634if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3635 echo "$ac_t""yes" 1>&6
3636 cat >> confdefs.h <<\EOF
3637#define WITH_THREAD 1
3638EOF
3639
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003640 case $ac_sys_system in
3641 Darwin*) ;;
3642 *) cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003643#define _POSIX_THREADS 1
3644EOF
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003645;;
3646 esac
Martin v. Löwis130fb172001-07-19 11:00:41 +00003647 LIBS="-lpthread $LIBS"
3648 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003649else
3650 echo "$ac_t""no" 1>&6
3651
Martin v. Löwis130fb172001-07-19 11:00:41 +00003652 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003653echo "configure:3654: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003654if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003655 echo $ac_n "(cached) $ac_c" 1>&6
3656else
3657 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003658#line 3659 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003659#include "confdefs.h"
3660/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003661 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003662#include <assert.h>
3663/* Override any gcc2 internal prototype to avoid an error. */
3664/* We use char because int might match the return type of a gcc2
3665 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003666char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003667
3668int main() {
3669
3670/* The GNU C library defines this for functions which it implements
3671 to always fail with ENOSYS. Some functions are actually named
3672 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003673#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003674choke me
3675#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003676pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003677#endif
3678
3679; return 0; }
3680EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003681if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003682 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003683 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003684else
3685 echo "configure: failed program was:" >&5
3686 cat conftest.$ac_ext >&5
3687 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003688 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003689fi
3690rm -f conftest*
3691fi
3692
Guido van Rossumea516321998-12-17 18:08:55 +00003693if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003694 echo "$ac_t""yes" 1>&6
3695 cat >> confdefs.h <<\EOF
3696#define WITH_THREAD 1
3697EOF
3698
Martin v. Löwis130fb172001-07-19 11:00:41 +00003699 case $ac_sys_system in
3700 Darwin*) ;;
3701 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003702#define _POSIX_THREADS 1
3703EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003704;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003705 esac
3706 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003707else
3708 echo "$ac_t""no" 1>&6
3709
Martin v. Löwis130fb172001-07-19 11:00:41 +00003710 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003711echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003712echo "configure:3713: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003713if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003714 echo $ac_n "(cached) $ac_c" 1>&6
3715else
3716 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003717#line 3718 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003718#include "confdefs.h"
3719#include <kernel/OS.h>
3720EOF
3721ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen591cbed2001-08-15 13:55:15 +00003722{ (eval echo configure:3723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003723ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003724if test -z "$ac_err"; then
3725 rm -rf conftest*
3726 eval "ac_cv_header_$ac_safe=yes"
3727else
3728 echo "$ac_err" >&5
3729 echo "configure: failed program was:" >&5
3730 cat conftest.$ac_ext >&5
3731 rm -rf conftest*
3732 eval "ac_cv_header_$ac_safe=no"
3733fi
3734rm -f conftest*
3735fi
3736if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3737 echo "$ac_t""yes" 1>&6
3738 cat >> confdefs.h <<\EOF
3739#define WITH_THREAD 1
3740EOF
3741
Martin v. Löwis130fb172001-07-19 11:00:41 +00003742 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003743#define BEOS_THREADS 1
3744EOF
3745
Martin v. Löwis130fb172001-07-19 11:00:41 +00003746 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003747else
3748 echo "$ac_t""no" 1>&6
3749
Martin v. Löwis130fb172001-07-19 11:00:41 +00003750 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003751echo "configure:3752: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003752ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003753if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003754 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003755else
3756 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003757LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003758cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003759#line 3760 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003760#include "confdefs.h"
3761/* Override any gcc2 internal prototype to avoid an error. */
3762/* We use char because int might match the return type of a gcc2
3763 builtin and then its argument prototype would still apply. */
3764char pthread_create();
3765
3766int main() {
3767pthread_create()
3768; return 0; }
3769EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003770if { (eval echo configure:3771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003771 rm -rf conftest*
3772 eval "ac_cv_lib_$ac_lib_var=yes"
3773else
3774 echo "configure: failed program was:" >&5
3775 cat conftest.$ac_ext >&5
3776 rm -rf conftest*
3777 eval "ac_cv_lib_$ac_lib_var=no"
3778fi
3779rm -f conftest*
3780LIBS="$ac_save_LIBS"
3781
3782fi
3783if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3784 echo "$ac_t""yes" 1>&6
3785 cat >> confdefs.h <<\EOF
3786#define WITH_THREAD 1
3787EOF
3788
Martin v. Löwis130fb172001-07-19 11:00:41 +00003789 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003790#define _POSIX_THREADS 1
3791EOF
3792
Martin v. Löwis130fb172001-07-19 11:00:41 +00003793 LIBS="$LIBS -lpthreads"
3794 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003795else
3796 echo "$ac_t""no" 1>&6
3797
Martin v. Löwis130fb172001-07-19 11:00:41 +00003798 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003799echo "configure:3800: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003800ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003801if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003802 echo $ac_n "(cached) $ac_c" 1>&6
3803else
3804 ac_save_LIBS="$LIBS"
3805LIBS="-lc_r $LIBS"
3806cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003807#line 3808 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003808#include "confdefs.h"
3809/* Override any gcc2 internal prototype to avoid an error. */
3810/* We use char because int might match the return type of a gcc2
3811 builtin and then its argument prototype would still apply. */
3812char pthread_create();
3813
3814int main() {
3815pthread_create()
3816; return 0; }
3817EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003818if { (eval echo configure:3819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003819 rm -rf conftest*
3820 eval "ac_cv_lib_$ac_lib_var=yes"
3821else
3822 echo "configure: failed program was:" >&5
3823 cat conftest.$ac_ext >&5
3824 rm -rf conftest*
3825 eval "ac_cv_lib_$ac_lib_var=no"
3826fi
3827rm -f conftest*
3828LIBS="$ac_save_LIBS"
3829
3830fi
3831if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3832 echo "$ac_t""yes" 1>&6
3833 cat >> confdefs.h <<\EOF
3834#define WITH_THREAD 1
3835EOF
3836
Martin v. Löwis130fb172001-07-19 11:00:41 +00003837 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003838#define _POSIX_THREADS 1
3839EOF
3840
Martin v. Löwis130fb172001-07-19 11:00:41 +00003841 LIBS="$LIBS -lc_r"
3842 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003843else
3844 echo "$ac_t""no" 1>&6
3845
Martin v. Löwis130fb172001-07-19 11:00:41 +00003846 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003847echo "configure:3848: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003848ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003849if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003850 echo $ac_n "(cached) $ac_c" 1>&6
3851else
3852 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003853LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003854cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003855#line 3856 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003856#include "confdefs.h"
3857/* Override any gcc2 internal prototype to avoid an error. */
3858/* We use char because int might match the return type of a gcc2
3859 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003860char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003861
3862int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003863__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003864; return 0; }
3865EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003866if { (eval echo configure:3867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003867 rm -rf conftest*
3868 eval "ac_cv_lib_$ac_lib_var=yes"
3869else
3870 echo "configure: failed program was:" >&5
3871 cat conftest.$ac_ext >&5
3872 rm -rf conftest*
3873 eval "ac_cv_lib_$ac_lib_var=no"
3874fi
3875rm -f conftest*
3876LIBS="$ac_save_LIBS"
3877
3878fi
3879if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3880 echo "$ac_t""yes" 1>&6
3881 cat >> confdefs.h <<\EOF
3882#define WITH_THREAD 1
3883EOF
3884
Martin v. Löwis130fb172001-07-19 11:00:41 +00003885 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003886#define _POSIX_THREADS 1
3887EOF
3888
Martin v. Löwis130fb172001-07-19 11:00:41 +00003889 LIBS="$LIBS -lthread"
3890 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003891else
3892 echo "$ac_t""no" 1>&6
3893
Martin v. Löwis130fb172001-07-19 11:00:41 +00003894 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003895echo "configure:3896: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003896ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
3897if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3898 echo $ac_n "(cached) $ac_c" 1>&6
3899else
3900 ac_save_LIBS="$LIBS"
3901LIBS="-lpthread $LIBS"
3902cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003903#line 3904 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003904#include "confdefs.h"
3905/* Override any gcc2 internal prototype to avoid an error. */
3906/* We use char because int might match the return type of a gcc2
3907 builtin and then its argument prototype would still apply. */
3908char __pthread_create_system();
3909
3910int main() {
3911__pthread_create_system()
3912; return 0; }
3913EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003914if { (eval echo configure:3915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003915 rm -rf conftest*
3916 eval "ac_cv_lib_$ac_lib_var=yes"
3917else
3918 echo "configure: failed program was:" >&5
3919 cat conftest.$ac_ext >&5
3920 rm -rf conftest*
3921 eval "ac_cv_lib_$ac_lib_var=no"
3922fi
3923rm -f conftest*
3924LIBS="$ac_save_LIBS"
3925
3926fi
3927if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3928 echo "$ac_t""yes" 1>&6
3929 cat >> confdefs.h <<\EOF
3930#define WITH_THREAD 1
3931EOF
3932
Martin v. Löwis130fb172001-07-19 11:00:41 +00003933 cat >> confdefs.h <<\EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003934#define _POSIX_THREADS 1
3935EOF
3936
Martin v. Löwis130fb172001-07-19 11:00:41 +00003937 LIBS="$LIBS -lpthread"
3938 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003939else
3940 echo "$ac_t""no" 1>&6
3941
Martin v. Löwis130fb172001-07-19 11:00:41 +00003942 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00003943echo "configure:3944: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003944ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003945if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003946 echo $ac_n "(cached) $ac_c" 1>&6
3947else
3948 ac_save_LIBS="$LIBS"
3949LIBS="-lcma $LIBS"
3950cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003951#line 3952 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003952#include "confdefs.h"
3953/* Override any gcc2 internal prototype to avoid an error. */
3954/* We use char because int might match the return type of a gcc2
3955 builtin and then its argument prototype would still apply. */
3956char pthread_create();
3957
3958int main() {
3959pthread_create()
3960; return 0; }
3961EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00003962if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003963 rm -rf conftest*
3964 eval "ac_cv_lib_$ac_lib_var=yes"
3965else
3966 echo "configure: failed program was:" >&5
3967 cat conftest.$ac_ext >&5
3968 rm -rf conftest*
3969 eval "ac_cv_lib_$ac_lib_var=no"
3970fi
3971rm -f conftest*
3972LIBS="$ac_save_LIBS"
3973
3974fi
3975if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3976 echo "$ac_t""yes" 1>&6
3977 cat >> confdefs.h <<\EOF
3978#define WITH_THREAD 1
3979EOF
3980
Martin v. Löwis130fb172001-07-19 11:00:41 +00003981 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003982#define _POSIX_THREADS 1
3983EOF
3984
Martin v. Löwis130fb172001-07-19 11:00:41 +00003985 LIBS="$LIBS -lcma"
3986 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003987else
3988 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003989
Martin v. Löwis130fb172001-07-19 11:00:41 +00003990 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003991fi
3992
Martin v. Löwis130fb172001-07-19 11:00:41 +00003993
Guido van Rossum627b2d71993-12-24 10:39:16 +00003994fi
3995
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003996fi
3997
Guido van Rossum0be3e491997-05-22 20:33:33 +00003998fi
3999
Guido van Rossum49545951997-12-02 19:28:29 +00004000fi
4001
Guido van Rossumb93a8621998-05-07 13:27:32 +00004002fi
4003
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004004fi
4005
Guido van Rossumad678af1998-10-02 14:42:15 +00004006fi
4007
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004008fi
4009
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004010fi
4011
Guido van Rossum0be3e491997-05-22 20:33:33 +00004012
Martin v. Löwis130fb172001-07-19 11:00:41 +00004013 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004014echo "configure:4015: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004015ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004016if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004017 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004018else
4019 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004020LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004021cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004022#line 4023 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004023#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004024/* Override any gcc2 internal prototype to avoid an error. */
4025/* We use char because int might match the return type of a gcc2
4026 builtin and then its argument prototype would still apply. */
4027char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004028
Guido van Rossumf78abae1997-01-21 22:02:36 +00004029int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004030usconfig()
4031; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004032EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004033if { (eval echo configure:4034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004034 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004035 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004036else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004037 echo "configure: failed program was:" >&5
4038 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004039 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004040 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004041fi
4042rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004043LIBS="$ac_save_LIBS"
4044
4045fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004046if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004047 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004048 cat >> confdefs.h <<\EOF
4049#define WITH_THREAD 1
4050EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004051
Martin v. Löwis130fb172001-07-19 11:00:41 +00004052 LIBS="$LIBS -lmpc"
4053 LIBOBJS="$LIBOBJS thread.o"
4054 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004055else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004056 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004057fi
4058
Martin v. Löwis130fb172001-07-19 11:00:41 +00004059 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004060echo "configure:4061: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004061ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004062if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004063 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004064else
4065 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004066LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004067cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004068#line 4069 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004069#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004070/* Override any gcc2 internal prototype to avoid an error. */
4071/* We use char because int might match the return type of a gcc2
4072 builtin and then its argument prototype would still apply. */
4073char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004074
Guido van Rossumf78abae1997-01-21 22:02:36 +00004075int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004076thr_create()
4077; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004078EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004079if { (eval echo configure:4080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004080 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004081 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004082else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004083 echo "configure: failed program was:" >&5
4084 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004085 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004086 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004087fi
4088rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004089LIBS="$ac_save_LIBS"
4090
4091fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004092if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004093 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004094 cat >> confdefs.h <<\EOF
4095#define WITH_THREAD 1
4096EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004097
Martin v. Löwis130fb172001-07-19 11:00:41 +00004098 LIBS="$LIBS -lthread"
4099 LIBOBJS="$LIBOBJS thread.o"
4100 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004101else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004102 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004103fi
4104
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004105
Martin v. Löwis130fb172001-07-19 11:00:41 +00004106 if test "$USE_THREAD_MODULE" != "#"
4107 then
4108 # If the above checks didn't disable threads, (at least) OSF1
4109 # needs this '-threads' argument during linking.
4110 case $ac_sys_system in
4111 OSF1) LDLAST=-threads;;
4112 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004113 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004114fi
4115
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004116# Check for enable-ipv6
4117echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004118echo "configure:4119: checking whether to enable ipv6" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004119# Check whether --enable-ipv6 or --disable-ipv6 was given.
4120if test "${enable_ipv6+set}" = set; then
4121 enableval="$enable_ipv6"
4122 case "$enableval" in
4123 no)
4124 echo "$ac_t""no" 1>&6
4125 ipv6=no
4126 ;;
4127 *) echo "$ac_t""yes" 1>&6
4128 cat >> confdefs.h <<\EOF
4129#define ENABLE_IPV6 1
4130EOF
4131
4132 ipv6=yes
4133 ;;
4134 esac
4135else
4136 if test "$cross_compiling" = yes; then
4137 echo "$ac_t""no" 1>&6
4138 ipv6=no
4139
4140else
4141 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004142#line 4143 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004143#include "confdefs.h"
4144 /* AF_INET6 available check */
4145#include <sys/types.h>
4146#include <sys/socket.h>
4147main()
4148{
4149 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
4150 exit(1);
4151 else
4152 exit(0);
4153}
4154
4155EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004156if { (eval echo configure:4157: \"$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 +00004157then
4158 echo "$ac_t""yes" 1>&6
4159 cat >> confdefs.h <<\EOF
4160#define ENABLE_IPV6 1
4161EOF
4162
4163 ipv6=yes
4164else
4165 echo "configure: failed program was:" >&5
4166 cat conftest.$ac_ext >&5
4167 rm -fr conftest*
4168 echo "$ac_t""no" 1>&6
4169 ipv6=no
4170fi
4171rm -fr conftest*
4172fi
4173
4174fi
4175
4176
4177ipv6type=unknown
4178ipv6lib=none
4179ipv6trylibc=no
4180
4181if test "$ipv6" = "yes"; then
4182 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004183echo "configure:4184: checking ipv6 stack type" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004184 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; do
4185 case $i in
4186 inria)
4187 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004188#line 4189 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004189#include "confdefs.h"
4190dnl
4191#include <netinet/in.h>
4192#ifdef IPV6_INRIA_VERSION
4193yes
4194#endif
4195EOF
4196if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4197 egrep "yes" >/dev/null 2>&1; then
4198 rm -rf conftest*
4199 ipv6type=$i;
4200 OPT="-DINET6 $OPT"
4201fi
4202rm -f conftest*
4203
4204 ;;
4205 kame)
4206 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004207#line 4208 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004208#include "confdefs.h"
4209dnl
4210#include <netinet/in.h>
4211#ifdef __KAME__
4212yes
4213#endif
4214EOF
4215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4216 egrep "yes" >/dev/null 2>&1; then
4217 rm -rf conftest*
4218 ipv6type=$i;
4219 ipv6lib=inet6
4220 ipv6libdir=/usr/local/v6/lib
4221 ipv6trylibc=yes
4222 OPT="-DINET6 $OPT"
4223fi
4224rm -f conftest*
4225
4226 ;;
4227 linux-glibc)
4228 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004229#line 4230 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004230#include "confdefs.h"
4231dnl
4232#include <features.h>
4233#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
4234yes
4235#endif
4236EOF
4237if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4238 egrep "yes" >/dev/null 2>&1; then
4239 rm -rf conftest*
4240 ipv6type=$i;
4241 ipv6trylibc=yes
4242 OPT="-DINET6 $OPT"
4243fi
4244rm -f conftest*
4245
4246 ;;
4247 linux-inet6)
4248 if test -d /usr/inet6; then
4249 ipv6type=$i
4250 ipv6lib=inet6
4251 ipv6libdir=/usr/inet6/lib
4252 OPT="-DINET6 -I/usr/inet6/include $OPT"
4253 fi
4254 ;;
4255 solaris)
4256 if test -f /etc/netconfig; then
4257 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
4258 ipv6type=$i
4259 ipv6trylibc=yes
4260 OPT="-DINET6 $OPT"
4261 fi
4262 fi
4263 ;;
4264 toshiba)
4265 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004266#line 4267 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004267#include "confdefs.h"
4268dnl
4269#include <sys/param.h>
4270#ifdef _TOSHIBA_INET6
4271yes
4272#endif
4273EOF
4274if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4275 egrep "yes" >/dev/null 2>&1; then
4276 rm -rf conftest*
4277 ipv6type=$i;
4278 ipv6lib=inet6;
4279 ipv6libdir=/usr/local/v6/lib;
4280 OPT="-DINET6 $OPT"
4281fi
4282rm -f conftest*
4283
4284 ;;
4285 v6d)
4286 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004287#line 4288 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004288#include "confdefs.h"
4289dnl
4290#include </usr/local/v6/include/sys/v6config.h>
4291#ifdef __V6D__
4292yes
4293#endif
4294EOF
4295if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4296 egrep "yes" >/dev/null 2>&1; then
4297 rm -rf conftest*
4298 ipv6type=$i;
4299 ipv6lib=v6;
4300 ipv6libdir=/usr/local/v6/lib;
4301 OPT="-I/usr/local/v6/include $OPT"
4302fi
4303rm -f conftest*
4304
4305 ;;
4306 zeta)
4307 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004308#line 4309 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004309#include "confdefs.h"
4310dnl
4311#include <sys/param.h>
4312#ifdef _ZETA_MINAMI_INET6
4313yes
4314#endif
4315EOF
4316if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4317 egrep "yes" >/dev/null 2>&1; then
4318 rm -rf conftest*
4319 ipv6type=$i;
4320 ipv6lib=inet6;
4321 ipv6libdir=/usr/local/v6/lib;
4322 OPT="-DINET6 $OPT"
4323fi
4324rm -f conftest*
4325
4326 ;;
4327 esac
4328 if test "$ipv6type" != "unknown"; then
4329 break
4330 fi
4331 done
4332 echo "$ac_t""$ipv6type" 1>&6
4333fi
4334
4335if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4336 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4337 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4338 echo "using lib$ipv6lib"
4339 else
4340 if test $ipv6trylibc = "yes"; then
4341 echo "using libc"
4342 else
4343 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4344 echo "You need to fetch lib$ipv6lib.a from appropriate"
4345 echo 'ipv6 kit and compile beforehand.'
4346 exit 1
4347 fi
4348 fi
4349fi
4350
Barry Warsawef82cd72000-06-30 16:21:01 +00004351# Check for GC support
4352
4353USE_GC_MODULE=""
4354echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004355echo "configure:4356: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004356# Check whether --with-cycle-gc or --without-cycle-gc was given.
4357if test "${with_cycle_gc+set}" = set; then
4358 withval="$with_cycle_gc"
4359 :
4360fi
4361
4362
4363if test -z "$with_cycle_gc"
4364then with_cycle_gc="yes"
4365fi
4366if test "$with_cycle_gc" = "no"
4367then
4368 USE_GC_MODULE="#"
4369else
4370 cat >> confdefs.h <<\EOF
4371#define WITH_CYCLE_GC 1
4372EOF
4373
4374fi
4375echo "$ac_t""$with_cycle_gc" 1>&6
4376
Neil Schemenauera35c6882001-02-27 04:45:05 +00004377# Check for Python-specific malloc support
4378echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004379echo "configure:4380: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004380# Check whether --with-pymalloc or --without-pymalloc was given.
4381if test "${with_pymalloc+set}" = set; then
4382 withval="$with_pymalloc"
4383
4384if test "$withval" != no
4385then cat >> confdefs.h <<\EOF
4386#define WITH_PYMALLOC 1
4387EOF
4388 echo "$ac_t""yes" 1>&6
4389else echo "$ac_t""no" 1>&6
4390fi
4391else
4392 echo "$ac_t""no" 1>&6
4393fi
4394
4395
Barry Warsawef82cd72000-06-30 16:21:01 +00004396# Check for --with-wctype-functions
4397echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004398echo "configure:4399: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004399# Check whether --with-wctype-functions or --without-wctype-functions was given.
4400if test "${with_wctype_functions+set}" = set; then
4401 withval="$with_wctype_functions"
4402
4403if test "$withval" != no
4404then cat >> confdefs.h <<\EOF
4405#define WANT_WCTYPE_FUNCTIONS 1
4406EOF
4407 echo "$ac_t""yes" 1>&6
4408else echo "$ac_t""no" 1>&6
4409fi
4410else
4411 echo "$ac_t""no" 1>&6
4412fi
4413
4414
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004415# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004416
4417DLINCLDIR=/
4418
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004419echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004420echo "configure:4421: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004421# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004422if test "${with_sgi_dl+set}" = set; then
4423 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004424
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004425echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004426cat >> confdefs.h <<\EOF
4427#define WITH_SGI_DL 1
4428EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004429
Guido van Rossume97ee181999-12-20 21:27:22 +00004430DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004431dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004432if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004433then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004434else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004435fi
4436DLINCLDIR=${dldir}
4437LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004438else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004439 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004440fi
4441
4442
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004443echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004444echo "configure:4445: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004445# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004446if test "${with_dl_dld+set}" = set; then
4447 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004448
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004449echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004450cat >> confdefs.h <<\EOF
4451#define WITH_DL_DLD 1
4452EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004453
Guido van Rossume97ee181999-12-20 21:27:22 +00004454DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004455dldir=`echo "$withval" | sed 's/,.*//'`
4456dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004457if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004458then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004459else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004460fi
4461DLINCLDIR=${dldir}
4462LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004463else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004464 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004465fi
4466
4467
Guido van Rossume97ee181999-12-20 21:27:22 +00004468# the dlopen() function means we might want to use dynload_shlib.o. some
4469# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004470for ac_func in dlopen
4471do
4472echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004473echo "configure:4474: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004474if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004475 echo $ac_n "(cached) $ac_c" 1>&6
4476else
4477 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004478#line 4479 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004479#include "confdefs.h"
4480/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004481 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004482#include <assert.h>
4483/* Override any gcc2 internal prototype to avoid an error. */
4484/* We use char because int might match the return type of a gcc2
4485 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004486char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004487
4488int main() {
4489
4490/* The GNU C library defines this for functions which it implements
4491 to always fail with ENOSYS. Some functions are actually named
4492 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004493#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004494choke me
4495#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004496$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004497#endif
4498
4499; return 0; }
4500EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004501if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004502 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004503 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004504else
4505 echo "configure: failed program was:" >&5
4506 cat conftest.$ac_ext >&5
4507 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004508 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004509fi
4510rm -f conftest*
4511fi
4512
Thomas Wouters3a584202000-08-05 23:28:51 +00004513if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004514 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004515 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4516 cat >> confdefs.h <<EOF
4517#define $ac_tr_func 1
4518EOF
4519
Guido van Rossume97ee181999-12-20 21:27:22 +00004520else
4521 echo "$ac_t""no" 1>&6
4522fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004523done
Guido van Rossume97ee181999-12-20 21:27:22 +00004524
4525
4526# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4527# loading of modules.
4528
4529echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004530echo "configure:4531: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004531if test -z "$DYNLOADFILE"
4532then
4533 case $ac_sys_system/$ac_sys_release in
4534 AIX*) DYNLOADFILE="dynload_aix.o";;
4535 BeOS*) DYNLOADFILE="dynload_beos.o";;
4536 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +00004537 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004538 *)
4539 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4540 # out any dynamic loading
4541 if test "$ac_cv_func_dlopen" = yes
4542 then DYNLOADFILE="dynload_shlib.o"
4543 else DYNLOADFILE="dynload_stub.o"
4544 fi
4545 ;;
4546 esac
4547fi
4548echo "$ac_t""$DYNLOADFILE" 1>&6
4549if test "$DYNLOADFILE" != "dynload_stub.o"
4550then
4551 cat >> confdefs.h <<\EOF
4552#define HAVE_DYNAMIC_LOADING 1
4553EOF
4554
4555fi
4556
Neil Schemenauer4e425612001-06-19 15:44:15 +00004557# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4558
4559
4560echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004561echo "configure:4562: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004562if test -z "$MACHDEP_OBJS"
4563then
Jack Jansene578a632001-08-15 01:27:14 +00004564 MACHDEP_OBJS=$extra_machdep_objs
4565else
4566 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00004567fi
Jack Jansene578a632001-08-15 01:27:14 +00004568echo "$ac_t""MACHDEP_OBJS" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004569
Guido van Rossum627b2d71993-12-24 10:39:16 +00004570# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00004571for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004572 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +00004573 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis864e9ff2001-08-04 22:32:03 +00004574 hstrerror inet_pton kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004575 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004576 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004577 select setegid seteuid setgid \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00004578 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00004579 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004580 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Woutersc2c12dc2001-07-11 14:45:34 +00004581 truncate uname waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00004582do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004583echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004584echo "configure:4585: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004585if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004586 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004587else
4588 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004589#line 4590 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004590#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004591/* System header to define __stub macros and hopefully few prototypes,
4592 which can conflict with char $ac_func(); below. */
4593#include <assert.h>
4594/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004595/* We use char because int might match the return type of a gcc2
4596 builtin and then its argument prototype would still apply. */
4597char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004598
Guido van Rossumf78abae1997-01-21 22:02:36 +00004599int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004600
Guido van Rossum627b2d71993-12-24 10:39:16 +00004601/* The GNU C library defines this for functions which it implements
4602 to always fail with ENOSYS. Some functions are actually named
4603 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004604#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004605choke me
4606#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004607$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004608#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004609
Guido van Rossum7f43da71994-08-01 12:15:30 +00004610; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004611EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004612if { (eval echo configure:4613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004613 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004614 eval "ac_cv_func_$ac_func=yes"
4615else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004616 echo "configure: failed program was:" >&5
4617 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004618 rm -rf conftest*
4619 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004620fi
4621rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004622fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004623
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004624if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004625 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004626 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004627 cat >> confdefs.h <<EOF
4628#define $ac_tr_func 1
4629EOF
4630
4631else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004632 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004633fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004634done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004635
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004636
Fred Drake8cef4cf2000-06-28 16:40:38 +00004637# check for openpty and forkpty
4638
4639for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004640do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004641echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004642echo "configure:4643: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004643if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004644 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004645else
4646 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004647#line 4648 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004648#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004649/* System header to define __stub macros and hopefully few prototypes,
4650 which can conflict with char $ac_func(); below. */
4651#include <assert.h>
4652/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004653/* We use char because int might match the return type of a gcc2
4654 builtin and then its argument prototype would still apply. */
4655char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004656
Guido van Rossumf78abae1997-01-21 22:02:36 +00004657int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004658
Guido van Rossum627b2d71993-12-24 10:39:16 +00004659/* The GNU C library defines this for functions which it implements
4660 to always fail with ENOSYS. Some functions are actually named
4661 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004662#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004663choke me
4664#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004665$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004666#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004667
Guido van Rossum7f43da71994-08-01 12:15:30 +00004668; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004669EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004670if { (eval echo configure:4671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004671 rm -rf conftest*
4672 eval "ac_cv_func_$ac_func=yes"
4673else
4674 echo "configure: failed program was:" >&5
4675 cat conftest.$ac_ext >&5
4676 rm -rf conftest*
4677 eval "ac_cv_func_$ac_func=no"
4678fi
4679rm -f conftest*
4680fi
4681
4682if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4683 echo "$ac_t""yes" 1>&6
4684 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4685 cat >> confdefs.h <<EOF
4686#define $ac_tr_func 1
4687EOF
4688
4689else
4690 echo "$ac_t""no" 1>&6
4691echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004692echo "configure:4693: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004693ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004694if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004695 echo $ac_n "(cached) $ac_c" 1>&6
4696else
4697 ac_save_LIBS="$LIBS"
4698LIBS="-lutil $LIBS"
4699cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004700#line 4701 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004701#include "confdefs.h"
4702/* Override any gcc2 internal prototype to avoid an error. */
4703/* We use char because int might match the return type of a gcc2
4704 builtin and then its argument prototype would still apply. */
4705char openpty();
4706
4707int main() {
4708openpty()
4709; return 0; }
4710EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004711if { (eval echo configure:4712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004712 rm -rf conftest*
4713 eval "ac_cv_lib_$ac_lib_var=yes"
4714else
4715 echo "configure: failed program was:" >&5
4716 cat conftest.$ac_ext >&5
4717 rm -rf conftest*
4718 eval "ac_cv_lib_$ac_lib_var=no"
4719fi
4720rm -f conftest*
4721LIBS="$ac_save_LIBS"
4722
4723fi
4724if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4725 echo "$ac_t""yes" 1>&6
4726 cat >> confdefs.h <<\EOF
4727#define HAVE_OPENPTY 1
4728EOF
4729 LIBS="$LIBS -lutil"
4730else
4731 echo "$ac_t""no" 1>&6
4732fi
4733
4734fi
4735done
4736
4737for ac_func in forkpty
4738do
4739echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004740echo "configure:4741: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004741if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004742 echo $ac_n "(cached) $ac_c" 1>&6
4743else
4744 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004745#line 4746 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004746#include "confdefs.h"
4747/* System header to define __stub macros and hopefully few prototypes,
4748 which can conflict with char $ac_func(); below. */
4749#include <assert.h>
4750/* Override any gcc2 internal prototype to avoid an error. */
4751/* We use char because int might match the return type of a gcc2
4752 builtin and then its argument prototype would still apply. */
4753char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004754
4755int main() {
4756
4757/* The GNU C library defines this for functions which it implements
4758 to always fail with ENOSYS. Some functions are actually named
4759 something starting with __ and the normal name is an alias. */
4760#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4761choke me
4762#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004763$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004764#endif
4765
4766; return 0; }
4767EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004768if { (eval echo configure:4769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004769 rm -rf conftest*
4770 eval "ac_cv_func_$ac_func=yes"
4771else
4772 echo "configure: failed program was:" >&5
4773 cat conftest.$ac_ext >&5
4774 rm -rf conftest*
4775 eval "ac_cv_func_$ac_func=no"
4776fi
4777rm -f conftest*
4778fi
4779
4780if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4781 echo "$ac_t""yes" 1>&6
4782 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4783 cat >> confdefs.h <<EOF
4784#define $ac_tr_func 1
4785EOF
4786
4787else
4788 echo "$ac_t""no" 1>&6
4789echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004790echo "configure:4791: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004791ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004792if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004793 echo $ac_n "(cached) $ac_c" 1>&6
4794else
4795 ac_save_LIBS="$LIBS"
4796LIBS="-lutil $LIBS"
4797cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004798#line 4799 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004799#include "confdefs.h"
4800/* Override any gcc2 internal prototype to avoid an error. */
4801/* We use char because int might match the return type of a gcc2
4802 builtin and then its argument prototype would still apply. */
4803char forkpty();
4804
4805int main() {
4806forkpty()
4807; return 0; }
4808EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004809if { (eval echo configure:4810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004810 rm -rf conftest*
4811 eval "ac_cv_lib_$ac_lib_var=yes"
4812else
4813 echo "configure: failed program was:" >&5
4814 cat conftest.$ac_ext >&5
4815 rm -rf conftest*
4816 eval "ac_cv_lib_$ac_lib_var=no"
4817fi
4818rm -f conftest*
4819LIBS="$ac_save_LIBS"
4820
4821fi
4822if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4823 echo "$ac_t""yes" 1>&6
4824 cat >> confdefs.h <<\EOF
4825#define HAVE_FORKPTY 1
4826EOF
4827 LIBS="$LIBS -lutil"
4828else
4829 echo "$ac_t""no" 1>&6
4830fi
4831
4832fi
4833done
4834
4835
4836# check for long file support functions
4837for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4838do
4839echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004840echo "configure:4841: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004841if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004842 echo $ac_n "(cached) $ac_c" 1>&6
4843else
4844 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004845#line 4846 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004846#include "confdefs.h"
4847/* System header to define __stub macros and hopefully few prototypes,
4848 which can conflict with char $ac_func(); below. */
4849#include <assert.h>
4850/* Override any gcc2 internal prototype to avoid an error. */
4851/* We use char because int might match the return type of a gcc2
4852 builtin and then its argument prototype would still apply. */
4853char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004854
4855int main() {
4856
4857/* The GNU C library defines this for functions which it implements
4858 to always fail with ENOSYS. Some functions are actually named
4859 something starting with __ and the normal name is an alias. */
4860#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4861choke me
4862#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004863$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004864#endif
4865
4866; return 0; }
4867EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004868if { (eval echo configure:4869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004869 rm -rf conftest*
4870 eval "ac_cv_func_$ac_func=yes"
4871else
4872 echo "configure: failed program was:" >&5
4873 cat conftest.$ac_ext >&5
4874 rm -rf conftest*
4875 eval "ac_cv_func_$ac_func=no"
4876fi
4877rm -f conftest*
4878fi
4879
4880if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4881 echo "$ac_t""yes" 1>&6
4882 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4883 cat >> confdefs.h <<EOF
4884#define $ac_tr_func 1
4885EOF
4886
4887else
4888 echo "$ac_t""no" 1>&6
4889fi
4890done
4891
4892
4893for ac_func in dup2 getcwd strdup strerror memmove
4894do
4895echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004896echo "configure:4897: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004897if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004898 echo $ac_n "(cached) $ac_c" 1>&6
4899else
4900 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004901#line 4902 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004902#include "confdefs.h"
4903/* System header to define __stub macros and hopefully few prototypes,
4904 which can conflict with char $ac_func(); below. */
4905#include <assert.h>
4906/* Override any gcc2 internal prototype to avoid an error. */
4907/* We use char because int might match the return type of a gcc2
4908 builtin and then its argument prototype would still apply. */
4909char $ac_func();
4910
4911int main() {
4912
4913/* The GNU C library defines this for functions which it implements
4914 to always fail with ENOSYS. Some functions are actually named
4915 something starting with __ and the normal name is an alias. */
4916#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4917choke me
4918#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004919$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004920#endif
4921
4922; return 0; }
4923EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004924if { (eval echo configure:4925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004925 rm -rf conftest*
4926 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004927else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004928 echo "configure: failed program was:" >&5
4929 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004930 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004931 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004932fi
4933rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004934fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004935
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004936if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004937 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004938 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4939 cat >> confdefs.h <<EOF
4940#define $ac_tr_func 1
4941EOF
4942
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004943else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004944 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004945LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004946fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004947done
4948
Guido van Rossumf78abae1997-01-21 22:02:36 +00004949
Thomas Wouters3a584202000-08-05 23:28:51 +00004950for ac_func in getpgrp
4951do
4952echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00004953echo "configure:4954: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004954if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004955 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004956else
4957 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004958#line 4959 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004959#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004960/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004961 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004962#include <assert.h>
4963/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004964/* We use char because int might match the return type of a gcc2
4965 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004966char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004967
Guido van Rossumf78abae1997-01-21 22:02:36 +00004968int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004969
Guido van Rossum627b2d71993-12-24 10:39:16 +00004970/* The GNU C library defines this for functions which it implements
4971 to always fail with ENOSYS. Some functions are actually named
4972 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004973#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004974choke me
4975#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004976$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004977#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004978
4979; return 0; }
4980EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00004981if { (eval echo configure:4982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004982 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004983 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004984else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004985 echo "configure: failed program was:" >&5
4986 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004987 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004988 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004989fi
4990rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004991fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004992
Thomas Wouters3a584202000-08-05 23:28:51 +00004993if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004994 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004995 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4996 cat >> confdefs.h <<EOF
4997#define $ac_tr_func 1
4998EOF
4999 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005000#line 5001 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005001#include "confdefs.h"
5002#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005003int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005004getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005005; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005006EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005007if { (eval echo configure:5008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005008 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005009 cat >> confdefs.h <<\EOF
5010#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005011EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005012
Guido van Rossumf78abae1997-01-21 22:02:36 +00005013else
5014 echo "configure: failed program was:" >&5
5015 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005016fi
5017rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005018else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005019 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005020fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005021done
Guido van Rossum627b2d71993-12-24 10:39:16 +00005022
Thomas Wouters3a584202000-08-05 23:28:51 +00005023for ac_func in setpgrp
5024do
5025echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005026echo "configure:5027: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005027if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005028 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005029else
5030 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005031#line 5032 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005032#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005033/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005034 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005035#include <assert.h>
5036/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005037/* We use char because int might match the return type of a gcc2
5038 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005039char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005040
Guido van Rossumf78abae1997-01-21 22:02:36 +00005041int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005042
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005043/* The GNU C library defines this for functions which it implements
5044 to always fail with ENOSYS. Some functions are actually named
5045 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005046#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005047choke me
5048#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005049$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005050#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005051
5052; return 0; }
5053EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005054if { (eval echo configure:5055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005055 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005056 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005057else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005058 echo "configure: failed program was:" >&5
5059 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005060 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005061 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005062fi
5063rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005064fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005065
Thomas Wouters3a584202000-08-05 23:28:51 +00005066if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005067 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005068 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5069 cat >> confdefs.h <<EOF
5070#define $ac_tr_func 1
5071EOF
5072 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005073#line 5074 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005074#include "confdefs.h"
5075#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005076int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005077setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005078; return 0; }
5079EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005080if { (eval echo configure:5081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005081 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005082 cat >> confdefs.h <<\EOF
5083#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005084EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005085
Guido van Rossumf78abae1997-01-21 22:02:36 +00005086else
5087 echo "configure: failed program was:" >&5
5088 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005089fi
5090rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005091else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005092 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005093fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005094done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005095
Thomas Wouters3a584202000-08-05 23:28:51 +00005096for ac_func in gettimeofday
5097do
5098echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005099echo "configure:5100: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005100if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005101 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005102else
5103 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005104#line 5105 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005105#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005106/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005107 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005108#include <assert.h>
5109/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005110/* We use char because int might match the return type of a gcc2
5111 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005112char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005113
Guido van Rossumf78abae1997-01-21 22:02:36 +00005114int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005115
5116/* The GNU C library defines this for functions which it implements
5117 to always fail with ENOSYS. Some functions are actually named
5118 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005119#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005120choke me
5121#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005122$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005123#endif
5124
5125; return 0; }
5126EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005127if { (eval echo configure:5128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005128 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005129 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005130else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005131 echo "configure: failed program was:" >&5
5132 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005133 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005134 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005135fi
5136rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005137fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005138
Thomas Wouters3a584202000-08-05 23:28:51 +00005139if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005140 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005141 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5142 cat >> confdefs.h <<EOF
5143#define $ac_tr_func 1
5144EOF
5145 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005146#line 5147 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005147#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005148#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005149int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005150gettimeofday((struct timeval*)0,(struct timezone*)0);
5151; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005152EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005153if { (eval echo configure:5154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005154 :
5155else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005156 echo "configure: failed program was:" >&5
5157 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005158 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005159 cat >> confdefs.h <<\EOF
5160#define GETTIMEOFDAY_NO_TZ 1
5161EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005162
5163fi
5164rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005165else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005166 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005167fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005168done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005169
5170
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005171for ac_func in getaddrinfo
5172do
5173echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005174echo "configure:5175: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005175if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5176 echo $ac_n "(cached) $ac_c" 1>&6
5177else
5178 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005179#line 5180 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005180#include "confdefs.h"
5181/* System header to define __stub macros and hopefully few prototypes,
5182 which can conflict with char $ac_func(); below. */
5183#include <assert.h>
5184/* Override any gcc2 internal prototype to avoid an error. */
5185/* We use char because int might match the return type of a gcc2
5186 builtin and then its argument prototype would still apply. */
5187char $ac_func();
5188
5189int main() {
5190
5191/* The GNU C library defines this for functions which it implements
5192 to always fail with ENOSYS. Some functions are actually named
5193 something starting with __ and the normal name is an alias. */
5194#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5195choke me
5196#else
5197$ac_func();
5198#endif
5199
5200; return 0; }
5201EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005202if { (eval echo configure:5203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005203 rm -rf conftest*
5204 eval "ac_cv_func_$ac_func=yes"
5205else
5206 echo "configure: failed program was:" >&5
5207 cat conftest.$ac_ext >&5
5208 rm -rf conftest*
5209 eval "ac_cv_func_$ac_func=no"
5210fi
5211rm -f conftest*
5212fi
5213
5214if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5215 echo "$ac_t""yes" 1>&6
5216 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5217 cat >> confdefs.h <<EOF
5218#define $ac_tr_func 1
5219EOF
5220 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005221echo "configure:5222: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005222if test "$cross_compiling" = yes; then
5223 echo "$ac_t""buggy" 1>&6
5224buggygetaddrinfo=yes
5225else
5226 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005227#line 5228 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005228#include "confdefs.h"
5229
5230#include <sys/types.h>
5231#include <netdb.h>
5232#include <string.h>
5233#include <sys/socket.h>
5234#include <netinet/in.h>
5235
5236main()
5237{
5238 int passive, gaierr, inet4 = 0, inet6 = 0;
5239 struct addrinfo hints, *ai, *aitop;
5240 char straddr[INET6_ADDRSTRLEN], strport[16];
5241
5242 for (passive = 0; passive <= 1; passive++) {
5243 memset(&hints, 0, sizeof(hints));
5244 hints.ai_family = AF_UNSPEC;
5245 hints.ai_flags = passive ? AI_PASSIVE : 0;
5246 hints.ai_socktype = SOCK_STREAM;
5247 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5248 (void)gai_strerror(gaierr);
5249 goto bad;
5250 }
5251 for (ai = aitop; ai; ai = ai->ai_next) {
5252 if (ai->ai_addr == NULL ||
5253 ai->ai_addrlen == 0 ||
5254 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5255 straddr, sizeof(straddr), strport, sizeof(strport),
5256 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5257 goto bad;
5258 }
5259 switch (ai->ai_family) {
5260 case AF_INET:
5261 if (strcmp(strport, "54321") != 0) {
5262 goto bad;
5263 }
5264 if (passive) {
5265 if (strcmp(straddr, "0.0.0.0") != 0) {
5266 goto bad;
5267 }
5268 } else {
5269 if (strcmp(straddr, "127.0.0.1") != 0) {
5270 goto bad;
5271 }
5272 }
5273 inet4++;
5274 break;
5275 case AF_INET6:
5276 if (strcmp(strport, "54321") != 0) {
5277 goto bad;
5278 }
5279 if (passive) {
5280 if (strcmp(straddr, "::") != 0) {
5281 goto bad;
5282 }
5283 } else {
5284 if (strcmp(straddr, "::1") != 0) {
5285 goto bad;
5286 }
5287 }
5288 inet6++;
5289 break;
5290 case AF_UNSPEC:
5291 goto bad;
5292 break;
5293 default:
5294 /* another family support? */
5295 break;
5296 }
5297 }
5298 }
5299
5300 if (!(inet4 == 0 || inet4 == 2))
5301 goto bad;
5302 if (!(inet6 == 0 || inet6 == 2))
5303 goto bad;
5304
5305 if (aitop)
5306 freeaddrinfo(aitop);
5307 exit(0);
5308
5309 bad:
5310 if (aitop)
5311 freeaddrinfo(aitop);
5312 exit(1);
5313}
5314
5315EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005316if { (eval echo configure:5317: \"$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 +00005317then
5318 echo "$ac_t""good" 1>&6
5319buggygetaddrinfo=no
5320else
5321 echo "configure: failed program was:" >&5
5322 cat conftest.$ac_ext >&5
5323 rm -fr conftest*
5324 echo "$ac_t""buggy" 1>&6
5325buggygetaddrinfo=yes
5326fi
5327rm -fr conftest*
5328fi
5329
5330else
5331 echo "$ac_t""no" 1>&6
5332buggygetaddrinfo=yes
5333fi
5334done
5335
5336
5337if test "$buggygetaddrinfo" = "yes"; then
5338 if test "$ipv6" = "yes"; then
5339 echo 'Fatal: You must get working getaddrinfo() function.'
5340 echo ' or you can specify "--disable-ipv6"'.
5341 exit 1
5342 fi
5343fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005344for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005345do
5346echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005347echo "configure:5348: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005348if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5349 echo $ac_n "(cached) $ac_c" 1>&6
5350else
5351 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005352#line 5353 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005353#include "confdefs.h"
5354/* System header to define __stub macros and hopefully few prototypes,
5355 which can conflict with char $ac_func(); below. */
5356#include <assert.h>
5357/* Override any gcc2 internal prototype to avoid an error. */
5358/* We use char because int might match the return type of a gcc2
5359 builtin and then its argument prototype would still apply. */
5360char $ac_func();
5361
5362int main() {
5363
5364/* The GNU C library defines this for functions which it implements
5365 to always fail with ENOSYS. Some functions are actually named
5366 something starting with __ and the normal name is an alias. */
5367#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5368choke me
5369#else
5370$ac_func();
5371#endif
5372
5373; return 0; }
5374EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005375if { (eval echo configure:5376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005376 rm -rf conftest*
5377 eval "ac_cv_func_$ac_func=yes"
5378else
5379 echo "configure: failed program was:" >&5
5380 cat conftest.$ac_ext >&5
5381 rm -rf conftest*
5382 eval "ac_cv_func_$ac_func=no"
5383fi
5384rm -f conftest*
5385fi
5386
5387if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5388 echo "$ac_t""yes" 1>&6
5389 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5390 cat >> confdefs.h <<EOF
5391#define $ac_tr_func 1
5392EOF
5393
5394else
5395 echo "$ac_t""no" 1>&6
5396fi
5397done
5398
5399
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005400# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005401echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005402echo "configure:5403: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005403if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005404 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005405else
5406 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005407#line 5408 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005408#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005409#include <sys/types.h>
5410#include <sys/time.h>
5411#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005412int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005413struct tm *tp;
5414; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005415EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005416if { (eval echo configure:5417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005417 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005418 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005419else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005420 echo "configure: failed program was:" >&5
5421 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005422 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005423 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005424fi
5425rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005426fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005427
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005428echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005429if test $ac_cv_header_time = yes; then
5430 cat >> confdefs.h <<\EOF
5431#define TIME_WITH_SYS_TIME 1
5432EOF
5433
5434fi
5435
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005436echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005437echo "configure:5438: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005438if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005439 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005440else
5441 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005442#line 5443 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005443#include "confdefs.h"
5444#include <sys/types.h>
5445#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005446int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005447struct tm *tp; tp->tm_sec;
5448; return 0; }
5449EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005450if { (eval echo configure:5451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005451 rm -rf conftest*
5452 ac_cv_struct_tm=time.h
5453else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005454 echo "configure: failed program was:" >&5
5455 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005456 rm -rf conftest*
5457 ac_cv_struct_tm=sys/time.h
5458fi
5459rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005460fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005461
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005462echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005463if test $ac_cv_struct_tm = sys/time.h; then
5464 cat >> confdefs.h <<\EOF
5465#define TM_IN_SYS_TIME 1
5466EOF
5467
5468fi
5469
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005470echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005471echo "configure:5472: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005472if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005473 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005474else
5475 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005476#line 5477 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005477#include "confdefs.h"
5478#include <sys/types.h>
5479#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005480int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005481struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005482; return 0; }
5483EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005484if { (eval echo configure:5485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005485 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005486 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005487else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005488 echo "configure: failed program was:" >&5
5489 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005490 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005491 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005492fi
5493rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005494fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005495
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005496echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5497if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005498 cat >> confdefs.h <<\EOF
5499#define HAVE_TM_ZONE 1
5500EOF
5501
5502else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005503 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005504echo "configure:5505: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005505if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005506 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005507else
5508 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005509#line 5510 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005510#include "confdefs.h"
5511#include <time.h>
5512#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005513extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005514#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00005515int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005516atoi(*tzname);
5517; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005518EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005519if { (eval echo configure:5520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005520 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005521 ac_cv_var_tzname=yes
5522else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005523 echo "configure: failed program was:" >&5
5524 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005525 rm -rf conftest*
5526 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005527fi
5528rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005529fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005530
5531echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005532 if test $ac_cv_var_tzname = yes; then
5533 cat >> confdefs.h <<\EOF
5534#define HAVE_TZNAME 1
5535EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005536
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005537 fi
5538fi
5539
5540
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005541echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005542echo "configure:5543: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005543if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005544 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005545else
5546 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005547#line 5548 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005548#include "confdefs.h"
5549#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005550int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005551return altzone;
5552; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005553EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005554if { (eval echo configure:5555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005555 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005556 ac_cv_header_time_altzone=yes
5557else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005558 echo "configure: failed program was:" >&5
5559 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005560 rm -rf conftest*
5561 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005562fi
5563rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005564fi
5565
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005566echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005567if test $ac_cv_header_time_altzone = yes; then
5568 cat >> confdefs.h <<\EOF
5569#define HAVE_ALTZONE 1
5570EOF
5571
5572fi
5573
Guido van Rossumda88dad1995-01-26 00:46:29 +00005574was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005575echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005576echo "configure:5577: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005577cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005578#line 5579 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005579#include "confdefs.h"
5580
5581#include <sys/types.h>
5582#include <sys/select.h>
5583#include <sys/time.h>
5584
Guido van Rossumf78abae1997-01-21 22:02:36 +00005585int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005586;
5587; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005588EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005589if { (eval echo configure:5590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005590 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005591 cat >> confdefs.h <<\EOF
5592#define SYS_SELECT_WITH_SYS_TIME 1
5593EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005594 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005595else
5596 echo "configure: failed program was:" >&5
5597 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005598fi
5599rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005600echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005601
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005602echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005603echo "configure:5604: checking for addrinfo" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005604if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
5605 echo $ac_n "(cached) $ac_c" 1>&6
5606else
5607 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005608#line 5609 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005609#include "confdefs.h"
5610
5611# include <netdb.h>
5612int main() {
5613struct addrinfo a
5614; return 0; }
5615EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005616if { (eval echo configure:5617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005617 rm -rf conftest*
5618 ac_cv_struct_addrinfo=yes
5619else
5620 echo "configure: failed program was:" >&5
5621 cat conftest.$ac_ext >&5
5622 rm -rf conftest*
5623 ac_cv_struct_addrinfo=no
5624fi
5625rm -f conftest*
5626fi
5627
5628echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
5629if test $ac_cv_struct_addrinfo = yes; then
5630 cat >> confdefs.h <<\EOF
5631#define HAVE_ADDRINFO 1
5632EOF
5633
5634fi
5635
5636echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005637echo "configure:5638: checking for sockaddr_storage" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005638if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
5639 echo $ac_n "(cached) $ac_c" 1>&6
5640else
5641 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005642#line 5643 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005643#include "confdefs.h"
5644
5645# include <sys/types.h>
5646# include <sys/socket.h>
5647int main() {
5648struct sockaddr_storage s
5649; return 0; }
5650EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005651if { (eval echo configure:5652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005652 rm -rf conftest*
5653 ac_cv_struct_sockaddr_storage=yes
5654else
5655 echo "configure: failed program was:" >&5
5656 cat conftest.$ac_ext >&5
5657 rm -rf conftest*
5658 ac_cv_struct_sockaddr_storage=no
5659fi
5660rm -f conftest*
5661fi
5662
5663echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
5664if test $ac_cv_struct_sockaddr_storage = yes; then
5665 cat >> confdefs.h <<\EOF
5666#define HAVE_SOCKADDR_STORAGE 1
5667EOF
5668
5669fi
5670
Guido van Rossum627b2d71993-12-24 10:39:16 +00005671# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00005672
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005673echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005674echo "configure:5675: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005675if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005676 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005677else
5678 if test "$GCC" = yes; then
5679 # GCC predefines this symbol on systems where it applies.
5680cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005681#line 5682 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005682#include "confdefs.h"
5683#ifdef __CHAR_UNSIGNED__
5684 yes
5685#endif
5686
5687EOF
5688if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5689 egrep "yes" >/dev/null 2>&1; then
5690 rm -rf conftest*
5691 ac_cv_c_char_unsigned=yes
5692else
5693 rm -rf conftest*
5694 ac_cv_c_char_unsigned=no
5695fi
5696rm -f conftest*
5697
5698else
5699if test "$cross_compiling" = yes; then
5700 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5701else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005702 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005703#line 5704 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005704#include "confdefs.h"
5705/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005706#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00005707#define volatile
5708#endif
5709main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00005710 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005711}
5712EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005713if { (eval echo configure:5714: \"$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 +00005714then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005715 ac_cv_c_char_unsigned=yes
5716else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005717 echo "configure: failed program was:" >&5
5718 cat conftest.$ac_ext >&5
5719 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005720 ac_cv_c_char_unsigned=no
5721fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005722rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005723fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005724
5725fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005726fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005727
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005728echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005729if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5730 cat >> confdefs.h <<\EOF
5731#define __CHAR_UNSIGNED__ 1
5732EOF
5733
5734fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005735
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005736echo $ac_n "checking for working const""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005737echo "configure:5738: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005738if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005739 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005740else
5741 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005742#line 5743 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005743#include "confdefs.h"
5744
Guido van Rossumf78abae1997-01-21 22:02:36 +00005745int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005746
5747/* Ultrix mips cc rejects this. */
Martin v. Löwis9db2f572001-07-23 01:30:10 +00005748typedef int charset[2]; const charset x;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005749/* SunOS 4.1.1 cc rejects this. */
5750char const *const *ccp;
5751char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005752/* NEC SVR4.0.2 mips cc rejects this. */
5753struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005754static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005755/* AIX XL C 1.02.0.0 rejects this.
5756 It does not let you subtract one const X* pointer from another in an arm
5757 of an if-expression whose if-part is not a constant expression */
5758const char *g = "string";
5759ccp = &g + (g ? g-g : 0);
5760/* HPUX 7.0 cc rejects these. */
5761++ccp;
5762p = (char**) ccp;
5763ccp = (char const *const *) p;
5764{ /* SCO 3.2v4 cc rejects this. */
5765 char *t;
5766 char const *s = 0 ? (char *) 0 : (char const *) 0;
5767
5768 *t++ = 0;
5769}
5770{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005771 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005772 const int *foo = &x[0];
5773 ++foo;
5774}
5775{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5776 typedef const int *iptr;
5777 iptr p = 0;
5778 ++p;
5779}
5780{ /* AIX XL C 1.02.0.0 rejects this saying
5781 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5782 struct s { int j; const int *ap[3]; };
5783 struct s *b; b->j = 5;
5784}
5785{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5786 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005787}
5788
5789; return 0; }
5790EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005791if { (eval echo configure:5792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005792 rm -rf conftest*
5793 ac_cv_c_const=yes
5794else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005795 echo "configure: failed program was:" >&5
5796 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005797 rm -rf conftest*
5798 ac_cv_c_const=no
5799fi
5800rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005801fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005802
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005803echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005804if test $ac_cv_c_const = no; then
5805 cat >> confdefs.h <<\EOF
5806#define const
5807EOF
5808
5809fi
5810
5811
Guido van Rossumda88dad1995-01-26 00:46:29 +00005812works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005813echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005814echo "configure:5815: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005815cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005816#line 5817 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005817#include "confdefs.h"
5818
Guido van Rossumf78abae1997-01-21 22:02:36 +00005819int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005820volatile int x; x = 0;
5821; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005822EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005823if { (eval echo configure:5824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005824 rm -rf conftest*
5825 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005826else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005827 echo "configure: failed program was:" >&5
5828 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005829 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005830 cat >> confdefs.h <<\EOF
5831#define volatile
5832EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005833
5834fi
5835rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005836echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005837
Guido van Rossumda88dad1995-01-26 00:46:29 +00005838works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005839echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005840echo "configure:5841: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005841cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005842#line 5843 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005843#include "confdefs.h"
5844
Guido van Rossumf78abae1997-01-21 22:02:36 +00005845int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005846signed char c;
5847; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005848EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005849if { (eval echo configure:5850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005850 rm -rf conftest*
5851 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005852else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005853 echo "configure: failed program was:" >&5
5854 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005855 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005856 cat >> confdefs.h <<\EOF
5857#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00005858EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005859
5860fi
5861rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005862echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005863
Guido van Rossumda88dad1995-01-26 00:46:29 +00005864have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005865echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005866echo "configure:5867: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005867cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005868#line 5869 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005869#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005870int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005871int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005872return foo(10);
5873; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005874EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005875if { (eval echo configure:5876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005876 rm -rf conftest*
5877 cat >> confdefs.h <<\EOF
5878#define HAVE_PROTOTYPES 1
5879EOF
5880 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005881else
5882 echo "configure: failed program was:" >&5
5883 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005884fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005885rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005886echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005887
Guido van Rossumda88dad1995-01-26 00:46:29 +00005888works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005889echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005890echo "configure:5891: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005891cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005892#line 5893 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005893#include "confdefs.h"
5894
5895#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00005896int foo(int x, ...) {
5897 va_list va;
5898 va_start(va, x);
5899 va_arg(va, int);
5900 va_arg(va, char *);
5901 va_arg(va, double);
5902 return 0;
5903}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005904
Guido van Rossumf78abae1997-01-21 22:02:36 +00005905int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005906return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005907; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005908EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005909if { (eval echo configure:5910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005910 rm -rf conftest*
5911 cat >> confdefs.h <<\EOF
5912#define HAVE_STDARG_PROTOTYPES 1
5913EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005914 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005915else
5916 echo "configure: failed program was:" >&5
5917 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005918fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005919rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005920echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005921
Guido van Rossumda88dad1995-01-26 00:46:29 +00005922if test "$have_prototypes" = yes; then
5923bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005924echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005925echo "configure:5926: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005926cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005927#line 5928 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005928#include "confdefs.h"
5929#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005930int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005931char **t;execve("@",t,t);
5932; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005933EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005934if { (eval echo configure:5935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005935 :
5936else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005937 echo "configure: failed program was:" >&5
5938 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005939 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005940 cat >> confdefs.h <<\EOF
5941#define BAD_EXEC_PROTOTYPES 1
5942EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005943 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005944fi
5945rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005946echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005947fi
5948
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005949# check if sockaddr has sa_len member
5950echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005951echo "configure:5952: checking if sockaddr has sa_len member" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005952cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005953#line 5954 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005954#include "confdefs.h"
5955#include <sys/types.h>
5956#include <sys/socket.h>
5957int main() {
5958struct sockaddr x;
5959x.sa_len = 0;
5960; return 0; }
5961EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005962if { (eval echo configure:5963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005963 rm -rf conftest*
5964 echo "$ac_t""yes" 1>&6
5965 cat >> confdefs.h <<\EOF
5966#define HAVE_SOCKADDR_SA_LEN 1
5967EOF
5968
5969else
5970 echo "configure: failed program was:" >&5
5971 cat conftest.$ac_ext >&5
5972 rm -rf conftest*
5973 echo "$ac_t""no" 1>&6
5974fi
5975rm -f conftest*
5976
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005977echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00005978echo "configure:5979: checking for bad static forward" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00005979if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
5980 echo $ac_n "(cached) $ac_c" 1>&6
5981else
5982 if test "$cross_compiling" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005983 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5984else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005985 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00005986#line 5987 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005987#include "confdefs.h"
5988
5989struct s { int a; int b; };
5990static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005991int foobar() {
5992 static int random;
5993 random = (int) &foo;
5994 return random;
5995}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005996static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005997main() {
5998 exit(!((int)&foo == foobar()));
5999}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006000EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006001if { (eval echo configure:6002: \"$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 +00006002then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006003 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006004else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006005 echo "configure: failed program was:" >&5
6006 cat conftest.$ac_ext >&5
6007 rm -fr conftest*
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006008 ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006009fi
6010rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00006011fi
6012
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006013fi
6014
6015echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
6016if test "$ac_cv_bad_static_forward" = yes
6017then
6018 cat >> confdefs.h <<\EOF
6019#define BAD_STATIC_FORWARD 1
6020EOF
6021
6022fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006023
Guido van Rossumda88dad1995-01-26 00:46:29 +00006024va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006025echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00006026echo "configure:6027: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006027cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006028#line 6029 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006029#include "confdefs.h"
6030
6031#ifdef HAVE_STDARG_PROTOTYPES
6032#include <stdarg.h>
6033#else
6034#include <varargs.h>
6035#endif
6036
Guido van Rossumf78abae1997-01-21 22:02:36 +00006037int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006038va_list list1, list2; list1 = list2;
6039; return 0; }
6040EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006041if { (eval echo configure:6042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006042 :
6043else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006044 echo "configure: failed program was:" >&5
6045 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006046 rm -rf conftest*
6047 cat >> confdefs.h <<\EOF
6048#define VA_LIST_IS_ARRAY 1
6049EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006050 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006051fi
6052rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006053echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006054
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006055# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
6056echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00006057echo "configure:6058: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006058if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006059 echo $ac_n "(cached) $ac_c" 1>&6
6060else
6061 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006062#line 6063 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006063#include "confdefs.h"
6064/* System header to define __stub macros and hopefully few prototypes,
6065 which can conflict with char gethostbyname_r(); below. */
6066#include <assert.h>
6067/* Override any gcc2 internal prototype to avoid an error. */
6068/* We use char because int might match the return type of a gcc2
6069 builtin and then its argument prototype would still apply. */
6070char gethostbyname_r();
6071
6072int main() {
6073
6074/* The GNU C library defines this for functions which it implements
6075 to always fail with ENOSYS. Some functions are actually named
6076 something starting with __ and the normal name is an alias. */
6077#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6078choke me
6079#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006080gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006081#endif
6082
6083; return 0; }
6084EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006085if { (eval echo configure:6086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006086 rm -rf conftest*
6087 eval "ac_cv_func_gethostbyname_r=yes"
6088else
6089 echo "configure: failed program was:" >&5
6090 cat conftest.$ac_ext >&5
6091 rm -rf conftest*
6092 eval "ac_cv_func_gethostbyname_r=no"
6093fi
6094rm -f conftest*
6095fi
6096
6097if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6098 echo "$ac_t""yes" 1>&6
6099
6100 cat >> confdefs.h <<\EOF
6101#define HAVE_GETHOSTBYNAME_R 1
6102EOF
6103
6104 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00006105echo "configure:6106: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006106 OLD_CFLAGS=$CFLAGS
6107 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
6108 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006109#line 6110 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006110#include "confdefs.h"
6111
6112# include <netdb.h>
6113
6114int main() {
6115
6116 char *name;
6117 struct hostent *he, *res;
6118 char buffer[2048];
6119 int buflen = 2048;
6120 int h_errnop;
6121
6122 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
6123
6124; return 0; }
6125EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006126if { (eval echo configure:6127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006127 rm -rf conftest*
6128
6129 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006130#define HAVE_GETHOSTBYNAME_R 1
6131EOF
6132
6133 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006134#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6135EOF
6136
6137 echo "$ac_t""yes" 1>&6
6138
6139else
6140 echo "configure: failed program was:" >&5
6141 cat conftest.$ac_ext >&5
6142 rm -rf conftest*
6143
6144 echo "$ac_t""no" 1>&6
6145 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00006146echo "configure:6147: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006147 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006148#line 6149 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006149#include "confdefs.h"
6150
6151# include <netdb.h>
6152
6153int main() {
6154
6155 char *name;
6156 struct hostent *he;
6157 char buffer[2048];
6158 int buflen = 2048;
6159 int h_errnop;
6160
6161 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
6162
6163; return 0; }
6164EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006165if { (eval echo configure:6166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006166 rm -rf conftest*
6167
6168 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006169#define HAVE_GETHOSTBYNAME_R 1
6170EOF
6171
6172 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006173#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6174EOF
6175
6176 echo "$ac_t""yes" 1>&6
6177
6178else
6179 echo "configure: failed program was:" >&5
6180 cat conftest.$ac_ext >&5
6181 rm -rf conftest*
6182
6183 echo "$ac_t""no" 1>&6
6184 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00006185echo "configure:6186: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006186 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006187#line 6188 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006188#include "confdefs.h"
6189
6190# include <netdb.h>
6191
6192int main() {
6193
6194 char *name;
6195 struct hostent *he;
6196 struct hostent_data data;
6197
6198 (void) gethostbyname_r(name, he, &data);
6199
6200; return 0; }
6201EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006202if { (eval echo configure:6203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006203 rm -rf conftest*
6204
6205 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006206#define HAVE_GETHOSTBYNAME_R 1
6207EOF
6208
6209 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006210#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6211EOF
6212
6213 echo "$ac_t""yes" 1>&6
6214
6215else
6216 echo "configure: failed program was:" >&5
6217 cat conftest.$ac_ext >&5
6218 rm -rf conftest*
6219
6220 echo "$ac_t""no" 1>&6
6221
6222fi
6223rm -f conftest*
6224
6225fi
6226rm -f conftest*
6227
6228fi
6229rm -f conftest*
6230 CFLAGS=$OLD_CFLAGS
6231
6232else
6233 echo "$ac_t""no" 1>&6
6234
Thomas Wouters3a584202000-08-05 23:28:51 +00006235 for ac_func in gethostbyname
6236do
6237echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00006238echo "configure:6239: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006239if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006240 echo $ac_n "(cached) $ac_c" 1>&6
6241else
6242 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006243#line 6244 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006244#include "confdefs.h"
6245/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00006246 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006247#include <assert.h>
6248/* Override any gcc2 internal prototype to avoid an error. */
6249/* We use char because int might match the return type of a gcc2
6250 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006251char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006252
6253int main() {
6254
6255/* The GNU C library defines this for functions which it implements
6256 to always fail with ENOSYS. Some functions are actually named
6257 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006258#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006259choke me
6260#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006261$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006262#endif
6263
6264; return 0; }
6265EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006266if { (eval echo configure:6267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006267 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006268 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006269else
6270 echo "configure: failed program was:" >&5
6271 cat conftest.$ac_ext >&5
6272 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006273 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006274fi
6275rm -f conftest*
6276fi
6277
Thomas Wouters3a584202000-08-05 23:28:51 +00006278if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006279 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00006280 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6281 cat >> confdefs.h <<EOF
6282#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006283EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00006284
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006285else
6286 echo "$ac_t""no" 1>&6
6287fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006288done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006289
6290
6291fi
6292
6293
6294
6295
6296
6297
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006298
Guido van Rossum627b2d71993-12-24 10:39:16 +00006299# checks for system services
6300# (none yet)
6301
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006302# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006303echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00006304echo "configure:6305: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006305if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006306 echo $ac_n "(cached) $ac_c" 1>&6
6307else
6308 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006309#line 6310 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006310#include "confdefs.h"
6311/* System header to define __stub macros and hopefully few prototypes,
6312 which can conflict with char __fpu_control(); below. */
6313#include <assert.h>
6314/* Override any gcc2 internal prototype to avoid an error. */
6315/* We use char because int might match the return type of a gcc2
6316 builtin and then its argument prototype would still apply. */
6317char __fpu_control();
6318
6319int main() {
6320
6321/* The GNU C library defines this for functions which it implements
6322 to always fail with ENOSYS. Some functions are actually named
6323 something starting with __ and the normal name is an alias. */
6324#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6325choke me
6326#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006327__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006328#endif
6329
6330; return 0; }
6331EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006332if { (eval echo configure:6333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006333 rm -rf conftest*
6334 eval "ac_cv_func___fpu_control=yes"
6335else
6336 echo "configure: failed program was:" >&5
6337 cat conftest.$ac_ext >&5
6338 rm -rf conftest*
6339 eval "ac_cv_func___fpu_control=no"
6340fi
6341rm -f conftest*
6342fi
6343
6344if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6345 echo "$ac_t""yes" 1>&6
6346 :
6347else
6348 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006349echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00006350echo "configure:6351: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00006351ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006352if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006353 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006354else
6355 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006356LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006357cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006358#line 6359 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006359#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006360/* Override any gcc2 internal prototype to avoid an error. */
6361/* We use char because int might match the return type of a gcc2
6362 builtin and then its argument prototype would still apply. */
6363char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00006364
Guido van Rossumf78abae1997-01-21 22:02:36 +00006365int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006366__fpu_control()
6367; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006368EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006369if { (eval echo configure:6370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006370 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006371 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006372else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006373 echo "configure: failed program was:" >&5
6374 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006375 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006376 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006377fi
6378rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006379LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006380
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006381fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006382if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006383 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006384 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6385 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006386 cat >> confdefs.h <<EOF
6387#define $ac_tr_lib 1
6388EOF
6389
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006390 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006391
6392else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006393 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006394fi
6395
6396
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006397fi
6398
6399
Guido van Rossum7f253911997-05-09 02:42:48 +00006400# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00006401echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00006402echo "configure:6403: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006403# Check whether --with-fpectl or --without-fpectl was given.
6404if test "${with_fpectl+set}" = set; then
6405 withval="$with_fpectl"
6406
6407if test "$withval" != no
6408then cat >> confdefs.h <<\EOF
6409#define WANT_SIGFPE_HANDLER 1
6410EOF
6411 echo "$ac_t""yes" 1>&6
6412else echo "$ac_t""no" 1>&6
6413fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006414else
6415 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006416fi
6417
6418
Guido van Rossum7f43da71994-08-01 12:15:30 +00006419# check for --with-libm=...
6420
Guido van Rossum563e7081996-09-10 18:20:48 +00006421case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006422Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006423BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006424*) LIBM=-lm
6425esac
Guido van Rossum7f253911997-05-09 02:42:48 +00006426echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00006427echo "configure:6428: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006428# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006429if test "${with_libm+set}" = set; then
6430 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006431
Guido van Rossum7f253911997-05-09 02:42:48 +00006432if test "$withval" = no
6433then LIBM=
6434 echo "$ac_t""force LIBM empty" 1>&6
6435elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006436then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006437 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006438else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006439fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006440else
6441 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006442fi
6443
6444
6445# check for --with-libc=...
6446
Guido van Rossum7f253911997-05-09 02:42:48 +00006447echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00006448echo "configure:6449: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006449# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006450if test "${with_libc+set}" = set; then
6451 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006452
Guido van Rossum7f253911997-05-09 02:42:48 +00006453if test "$withval" = no
6454then LIBC=
6455 echo "$ac_t""force LIBC empty" 1>&6
6456elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006457then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006458 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006459else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006460fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006461else
6462 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006463fi
6464
6465
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006466# check for hypot() in math library
6467LIBS_SAVE=$LIBS
6468LIBS="$LIBS $LIBM"
6469for ac_func in hypot
6470do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006471echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00006472echo "configure:6473: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006473if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006474 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006475else
6476 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006477#line 6478 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006478#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006479/* System header to define __stub macros and hopefully few prototypes,
6480 which can conflict with char $ac_func(); below. */
6481#include <assert.h>
6482/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006483/* We use char because int might match the return type of a gcc2
6484 builtin and then its argument prototype would still apply. */
6485char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006486
Guido van Rossumf78abae1997-01-21 22:02:36 +00006487int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006488
6489/* The GNU C library defines this for functions which it implements
6490 to always fail with ENOSYS. Some functions are actually named
6491 something starting with __ and the normal name is an alias. */
6492#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6493choke me
6494#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006495$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006496#endif
6497
6498; return 0; }
6499EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006500if { (eval echo configure:6501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006501 rm -rf conftest*
6502 eval "ac_cv_func_$ac_func=yes"
6503else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006504 echo "configure: failed program was:" >&5
6505 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006506 rm -rf conftest*
6507 eval "ac_cv_func_$ac_func=no"
6508fi
6509rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006510fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00006511
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006512if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6513 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006514 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6515 cat >> confdefs.h <<EOF
6516#define $ac_tr_func 1
6517EOF
6518
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006519else
6520 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006521LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006522fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006523done
6524
Guido van Rossumf78abae1997-01-21 22:02:36 +00006525
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006526LIBS=$LIBS_SAVE
6527
Guido van Rossumad713701997-07-10 22:42:38 +00006528# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00006529echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00006530echo "configure:6531: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006531if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00006532 echo $ac_n "(cached) $ac_c" 1>&6
6533else
6534 if test "$cross_compiling" = yes; then
6535 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6536else
6537 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006538#line 6539 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006539#include "confdefs.h"
6540#include <stdio.h>
6541#ifdef HAVE_STDLIB
6542#include <stdlib.h>
6543#else
6544char *malloc(), *realloc();
6545int *free();
6546#endif
6547main() {
6548 char *p;
6549 p = malloc(0);
6550 if (p == NULL) exit(1);
6551 p = realloc(p, 0);
6552 if (p == NULL) exit(1);
6553 free(p);
6554 exit(0);
6555}
6556EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006557if { (eval echo configure:6558: \"$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 +00006558then
6559 ac_cv_malloc_zero=nonnull
6560else
6561 echo "configure: failed program was:" >&5
6562 cat conftest.$ac_ext >&5
6563 rm -fr conftest*
6564 ac_cv_malloc_zero=null
6565fi
6566rm -fr conftest*
6567fi
6568
6569fi
6570
6571echo "$ac_t""$ac_cv_malloc_zero" 1>&6
6572if test "$ac_cv_malloc_zero" = null
6573then
6574 cat >> confdefs.h <<\EOF
6575#define MALLOC_ZERO_RETURNS_NULL 1
6576EOF
6577
6578fi
6579
Guido van Rossumef2255b2000-03-10 22:30:29 +00006580# check for wchar.h
6581ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6582echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00006583echo "configure:6584: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006584if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006585 echo $ac_n "(cached) $ac_c" 1>&6
6586else
6587 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006588#line 6589 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006589#include "confdefs.h"
6590#include <wchar.h>
6591EOF
6592ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen591cbed2001-08-15 13:55:15 +00006593{ (eval echo configure:6594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006594ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6595if test -z "$ac_err"; then
6596 rm -rf conftest*
6597 eval "ac_cv_header_$ac_safe=yes"
6598else
6599 echo "$ac_err" >&5
6600 echo "configure: failed program was:" >&5
6601 cat conftest.$ac_ext >&5
6602 rm -rf conftest*
6603 eval "ac_cv_header_$ac_safe=no"
6604fi
6605rm -f conftest*
6606fi
6607if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6608 echo "$ac_t""yes" 1>&6
6609 cat >> confdefs.h <<\EOF
6610#define HAVE_WCHAR_H 1
6611EOF
6612 wchar_h="yes"
6613else
6614 echo "$ac_t""no" 1>&6
6615wchar_h="no"
6616
6617fi
6618
6619
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006620# determine wchar_t size
6621if test "$wchar_h" = yes
6622then
6623 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00006624echo "configure:6625: checking size of wchar_t" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006625if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
6626 echo $ac_n "(cached) $ac_c" 1>&6
6627else
6628 if test "$cross_compiling" = yes; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006629 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6630else
6631 cat > conftest.$ac_ext <<EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006632#line 6633 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006633#include "confdefs.h"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006634#include <stdio.h>
6635main()
6636{
6637 FILE *f=fopen("conftestval", "w");
6638 if (!f) exit(1);
6639 fprintf(f, "%d\n", sizeof(wchar_t));
Guido van Rossumef2255b2000-03-10 22:30:29 +00006640 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00006641}
Guido van Rossumef2255b2000-03-10 22:30:29 +00006642EOF
Jack Jansen591cbed2001-08-15 13:55:15 +00006643if { (eval echo configure:6644: \"$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 +00006644then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006645 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006646else
6647 echo "configure: failed program was:" >&5
6648 cat conftest.$ac_ext >&5
6649 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006650 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00006651fi
6652rm -fr conftest*
6653fi
6654
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006655fi
6656echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
6657cat >> confdefs.h <<EOF
6658#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
6659EOF
6660
6661
6662fi
6663
6664echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Jack Jansen591cbed2001-08-15 13:55:15 +00006665echo "configure:6666: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006666# Check whether --enable-unicode or --disable-unicode was given.
6667if test "${enable_unicode+set}" = set; then
6668 enableval="$enable_unicode"
6669 :
6670else
6671 enable_unicode=yes
6672fi
6673
6674
6675if test $enable_unicode = yes
6676then
Martin v. Löwisfd917792001-06-27 20:22:04 +00006677 # Without any arguments, Py_UNICODE defaults to two-byte mode
6678 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006679fi
6680
6681case "$enable_unicode" in
6682ucs2) unicode_size="2"
6683 cat >> confdefs.h <<\EOF
6684#define Py_UNICODE_SIZE 2
6685EOF
6686
6687 ;;
6688ucs4) unicode_size="4"
6689 cat >> confdefs.h <<\EOF
6690#define Py_UNICODE_SIZE 4
6691EOF
6692
6693 ;;
6694esac
6695
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006696
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006697if test "$enable_unicode" = "no"
6698then
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006699 UNICODE_OBJS=""
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006700 echo "$ac_t""not used" 1>&6
6701else
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006702 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006703 cat >> confdefs.h <<\EOF
6704#define Py_USING_UNICODE 1
6705EOF
6706
6707 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
6708 then
6709 PY_UNICODE_TYPE="wchar_t"
6710 cat >> confdefs.h <<\EOF
6711#define HAVE_USABLE_WCHAR_T 1
6712EOF
6713
6714 cat >> confdefs.h <<\EOF
6715#define PY_UNICODE_TYPE wchar_t
6716EOF
6717
6718 elif test "$ac_cv_sizeof_short" = "$unicode_size"
6719 then
6720 PY_UNICODE_TYPE="unsigned short"
6721 cat >> confdefs.h <<\EOF
6722#define PY_UNICODE_TYPE unsigned short
6723EOF
6724
6725 elif test "$ac_cv_sizeof_long" = "$unicode_size"
6726 then
6727 PY_UNICODE_TYPE="unsigned long"
6728 cat >> confdefs.h <<\EOF
6729#define PY_UNICODE_TYPE unsigned long
6730EOF
6731
6732 else
6733 PY_UNICODE_TYPE="no type found"
6734 fi
6735 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
6736fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006737
6738# check for endianness
6739echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006740echo "configure:6741: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006741if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006742 echo $ac_n "(cached) $ac_c" 1>&6
6743else
6744 ac_cv_c_bigendian=unknown
6745# See if sys/param.h defines the BYTE_ORDER macro.
6746cat > conftest.$ac_ext <<EOF
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006747#line 6748 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006748#include "confdefs.h"
6749#include <sys/types.h>
6750#include <sys/param.h>
6751int main() {
6752
6753#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6754 bogus endian macros
6755#endif
6756; return 0; }
6757EOF
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006758if { (eval echo configure:6759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006759 rm -rf conftest*
6760 # It does; now see whether it defined to BIG_ENDIAN or not.
6761cat > conftest.$ac_ext <<EOF
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006762#line 6763 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006763#include "confdefs.h"
6764#include <sys/types.h>
6765#include <sys/param.h>
6766int main() {
6767
6768#if BYTE_ORDER != BIG_ENDIAN
6769 not big endian
6770#endif
6771; return 0; }
6772EOF
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006773if { (eval echo configure:6774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006774 rm -rf conftest*
6775 ac_cv_c_bigendian=yes
6776else
6777 echo "configure: failed program was:" >&5
6778 cat conftest.$ac_ext >&5
6779 rm -rf conftest*
6780 ac_cv_c_bigendian=no
6781fi
6782rm -f conftest*
6783else
6784 echo "configure: failed program was:" >&5
6785 cat conftest.$ac_ext >&5
6786fi
6787rm -f conftest*
6788if test $ac_cv_c_bigendian = unknown; then
6789if test "$cross_compiling" = yes; then
6790 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6791else
6792 cat > conftest.$ac_ext <<EOF
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006793#line 6794 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006794#include "confdefs.h"
6795main () {
6796 /* Are we little or big endian? From Harbison&Steele. */
6797 union
6798 {
6799 long l;
6800 char c[sizeof (long)];
6801 } u;
6802 u.l = 1;
6803 exit (u.c[sizeof (long) - 1] == 1);
6804}
6805EOF
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006806if { (eval echo configure:6807: \"$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 +00006807then
6808 ac_cv_c_bigendian=no
6809else
6810 echo "configure: failed program was:" >&5
6811 cat conftest.$ac_ext >&5
6812 rm -fr conftest*
6813 ac_cv_c_bigendian=yes
6814fi
6815rm -fr conftest*
6816fi
6817
6818fi
6819fi
6820
6821echo "$ac_t""$ac_cv_c_bigendian" 1>&6
6822if test $ac_cv_c_bigendian = yes; then
6823 cat >> confdefs.h <<\EOF
6824#define WORDS_BIGENDIAN 1
6825EOF
6826
6827fi
6828
6829
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006830# Check whether right shifting a negative integer extends the sign bit
6831# or fills with zeros (like the Cray J90, according to Tim Peters).
6832echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006833echo "configure:6834: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006834if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00006835 echo $ac_n "(cached) $ac_c" 1>&6
6836else
6837
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006838if test "$cross_compiling" = yes; then
6839 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6840else
6841 cat > conftest.$ac_ext <<EOF
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006842#line 6843 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006843#include "confdefs.h"
6844
6845int main()
6846{
Vladimir Marangozova6180282000-07-12 05:05:06 +00006847 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006848}
6849
6850EOF
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006851if { (eval echo configure:6852: \"$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 +00006852then
6853 ac_cv_rshift_extends_sign=yes
6854else
6855 echo "configure: failed program was:" >&5
6856 cat conftest.$ac_ext >&5
6857 rm -fr conftest*
6858 ac_cv_rshift_extends_sign=no
6859fi
6860rm -fr conftest*
6861fi
6862
6863fi
6864
6865echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
6866if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006867then
6868 cat >> confdefs.h <<\EOF
6869#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
6870EOF
6871
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006872fi
6873
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006874# check for getc_unlocked and related locking functions
6875echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006876echo "configure:6877: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006877if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
6878 echo $ac_n "(cached) $ac_c" 1>&6
6879else
6880
6881cat > conftest.$ac_ext <<EOF
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006882#line 6883 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006883#include "confdefs.h"
6884#include <stdio.h>
6885int main() {
6886
6887 FILE *f = fopen("/dev/null", "r");
6888 flockfile(f);
6889 getc_unlocked(f);
6890 funlockfile(f);
6891
6892; return 0; }
6893EOF
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006894if { (eval echo configure:6895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006895 rm -rf conftest*
6896 ac_cv_have_getc_unlocked=yes
6897else
6898 echo "configure: failed program was:" >&5
6899 cat conftest.$ac_ext >&5
6900 rm -rf conftest*
6901 ac_cv_have_getc_unlocked=no
6902fi
6903rm -f conftest*
6904fi
6905
6906echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
6907if test "$ac_cv_have_getc_unlocked" = yes
6908then
6909 cat >> confdefs.h <<\EOF
6910#define HAVE_GETC_UNLOCKED 1
6911EOF
6912
6913fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006914
Guido van Rossum353ae582001-07-10 16:45:32 +00006915# check for readline 4.2
6916echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006917echo "configure:6918: checking for rl_completion_matches in -lreadline" >&5
Guido van Rossum353ae582001-07-10 16:45:32 +00006918ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
6919if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6920 echo $ac_n "(cached) $ac_c" 1>&6
6921else
6922 ac_save_LIBS="$LIBS"
6923LIBS="-lreadline -ltermcap $LIBS"
6924cat > conftest.$ac_ext <<EOF
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006925#line 6926 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00006926#include "confdefs.h"
6927/* Override any gcc2 internal prototype to avoid an error. */
6928/* We use char because int might match the return type of a gcc2
6929 builtin and then its argument prototype would still apply. */
6930char rl_completion_matches();
6931
6932int main() {
6933rl_completion_matches()
6934; return 0; }
6935EOF
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006936if { (eval echo configure:6937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum353ae582001-07-10 16:45:32 +00006937 rm -rf conftest*
6938 eval "ac_cv_lib_$ac_lib_var=yes"
6939else
6940 echo "configure: failed program was:" >&5
6941 cat conftest.$ac_ext >&5
6942 rm -rf conftest*
6943 eval "ac_cv_lib_$ac_lib_var=no"
6944fi
6945rm -f conftest*
6946LIBS="$ac_save_LIBS"
6947
6948fi
6949if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6950 echo "$ac_t""yes" 1>&6
6951 cat >> confdefs.h <<\EOF
6952#define HAVE_RL_COMPLETION_MATCHES 1
6953EOF
6954
6955else
6956 echo "$ac_t""no" 1>&6
6957fi
6958
6959
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006960echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006961echo "configure:6962: checking for broken nice()" >&5
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006962if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
6963 echo $ac_n "(cached) $ac_c" 1>&6
6964else
6965
6966if test "$cross_compiling" = yes; then
6967 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6968else
6969 cat > conftest.$ac_ext <<EOF
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006970#line 6971 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00006971#include "confdefs.h"
6972
6973int main()
6974{
6975 int val1 = nice(1);
6976 if (val1 != -1 && val1 == nice(2))
6977 exit(0);
6978 exit(1);
6979}
6980
6981EOF
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006982if { (eval echo configure:6983: \"$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 +00006983then
6984 ac_cv_broken_nice=yes
6985else
6986 echo "configure: failed program was:" >&5
6987 cat conftest.$ac_ext >&5
6988 rm -fr conftest*
6989 ac_cv_broken_nice=no
6990fi
6991rm -fr conftest*
6992fi
6993
6994fi
6995
6996echo "$ac_t""$ac_cv_broken_nice" 1>&6
6997if test "$ac_cv_broken_nice" = yes
6998then
6999 cat >> confdefs.h <<\EOF
7000#define HAVE_BROKEN_NICE 1
7001EOF
7002
7003fi
7004
Guido van Rossum95713eb2000-05-18 20:53:31 +00007005# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
7006# Add sys/socket.h to confdefs.h
7007cat >> confdefs.h <<\EOF
7008#ifdef HAVE_SYS_SOCKET_H
7009#include <sys/socket.h>
7010#endif
7011EOF
7012echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007013echo "configure:7014: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007014if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00007015 echo $ac_n "(cached) $ac_c" 1>&6
7016else
7017 cat > conftest.$ac_ext <<EOF
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007018#line 7019 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00007019#include "confdefs.h"
7020#include <sys/types.h>
7021#if STDC_HEADERS
7022#include <stdlib.h>
7023#include <stddef.h>
7024#endif
7025EOF
7026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7027 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7028 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007029 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00007030else
7031 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007032 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00007033fi
7034rm -f conftest*
7035
7036fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007037echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7038if test $ac_cv_type_socklen_t = no; then
7039 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00007040#define socklen_t int
7041EOF
7042
7043fi
7044
7045
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00007046# Add Python/ prefix to LIBOBJS
7047libobjs=$LIBOBJS
7048LIBOBJS=
7049for obj in $libobjs; do
7050 LIBOBJS="$LIBOBJS Python/$obj"
7051done
7052
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007053#AC_MSG_CHECKING(for Modules/Setup)
7054#if test ! -f Modules/Setup ; then
7055# if test ! -d Modules ; then
7056# mkdir Modules
7057# fi
7058# cp "$srcdir/Modules/Setup.dist" Modules/Setup
7059# AC_MSG_RESULT(creating)
7060#else
7061# AC_MSG_RESULT(already exists)
7062#fi
7063
7064
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007065SRCDIRS="Parser Grammar Objects Python Modules"
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007066echo $ac_n "checking for build directories""... $ac_c" 1>&6
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007067echo "configure:7068: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007068for dir in $SRCDIRS; do
7069 if test ! -d $dir; then
7070 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007071 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007072done
7073echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007074
Guido van Rossum627b2d71993-12-24 10:39:16 +00007075# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007076trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007077cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007078# This file is a shell script that caches the results of configure
7079# tests run on this system so they can be shared between configure
7080# scripts and configure runs. It is not useful on other systems.
7081# If it contains results you don't want to keep, you may remove or edit it.
7082#
7083# By default, configure uses ./config.cache as the cache file,
7084# creating it if it does not exist already. You can give configure
7085# the --cache-file=FILE option to use a different cache file; that is
7086# what configure does when it calls configure scripts in
7087# subdirectories, so they share the cache.
7088# Giving --cache-file=/dev/null disables caching, for debugging configure.
7089# config.status only pays attention to the cache file if you give it the
7090# --recheck option to rerun configure.
7091#
7092EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007093# The following way of writing the cache mishandles newlines in values,
7094# but we know of no workaround that is simple, portable, and efficient.
7095# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007096# Ultrix sh set writes to stderr and can't be redirected directly,
7097# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007098(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007099 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007100 *ac_space=\ *)
7101 # `set' does not quote correctly, so add quotes (double-quote substitution
7102 # turns \\\\ into \\, and sed turns \\ into \).
7103 sed -n \
7104 -e "s/'/'\\\\''/g" \
7105 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7106 ;;
7107 *)
7108 # `set' quotes correctly as required by POSIX, so do not add quotes.
7109 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7110 ;;
7111 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007112if cmp -s $cache_file confcache; then
7113 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007114else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007115 if test -w $cache_file; then
7116 echo "updating cache $cache_file"
7117 cat confcache > $cache_file
7118 else
7119 echo "not updating unwritable cache $cache_file"
7120 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007121fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007122rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007123
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007124trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007125
7126test "x$prefix" = xNONE && prefix=$ac_default_prefix
7127# Let make expand exec_prefix.
7128test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007129
Guido van Rossum7f43da71994-08-01 12:15:30 +00007130# Any assignment to VPATH causes Sun make to only execute
7131# the first set of double-colon rules, so remove it if not needed.
7132# If there is a colon in the path, we need to keep it.
7133if test "x$srcdir" = x.; then
7134 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7135fi
7136
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007137trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00007138
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007139DEFS=-DHAVE_CONFIG_H
7140
7141# Without the "./", some shells look in PATH for config.status.
7142: ${CONFIG_STATUS=./config.status}
7143
7144echo creating $CONFIG_STATUS
7145rm -f $CONFIG_STATUS
7146cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007147#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007148# Generated automatically by configure.
7149# Run this file to recreate the current configuration.
7150# This directory was configured as follows,
7151# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7152#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007153# $0 $ac_configure_args
7154#
7155# Compiler output produced by configure, useful for debugging
7156# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007157
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007158ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007159for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00007160do
Guido van Rossum7f43da71994-08-01 12:15:30 +00007161 case "\$ac_option" in
7162 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007163 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7164 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00007165 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007166 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007167 exit 0 ;;
7168 -help | --help | --hel | --he | --h)
7169 echo "\$ac_cs_usage"; exit 0 ;;
7170 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00007171 esac
7172done
7173
Guido van Rossum7f43da71994-08-01 12:15:30 +00007174ac_given_srcdir=$srcdir
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007175ac_given_INSTALL="$INSTALL"
Guido van Rossum627b2d71993-12-24 10:39:16 +00007176
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007177trap '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 +00007178EOF
7179cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007181# Protect against being on the right side of a sed subst in config.status.
7182sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7183 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007184$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00007185$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007186s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007187s%@CFLAGS@%$CFLAGS%g
7188s%@CPPFLAGS@%$CPPFLAGS%g
7189s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007190s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007191s%@DEFS@%$DEFS%g
7192s%@LDFLAGS@%$LDFLAGS%g
7193s%@LIBS@%$LIBS%g
7194s%@exec_prefix@%$exec_prefix%g
7195s%@prefix@%$prefix%g
7196s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007197s%@bindir@%$bindir%g
7198s%@sbindir@%$sbindir%g
7199s%@libexecdir@%$libexecdir%g
7200s%@datadir@%$datadir%g
7201s%@sysconfdir@%$sysconfdir%g
7202s%@sharedstatedir@%$sharedstatedir%g
7203s%@localstatedir@%$localstatedir%g
7204s%@libdir@%$libdir%g
7205s%@includedir@%$includedir%g
7206s%@oldincludedir@%$oldincludedir%g
7207s%@infodir@%$infodir%g
7208s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00007209s%@VERSION@%$VERSION%g
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00007210s%@CONFIG_ARGS@%$CONFIG_ARGS%g
Jack Jansene578a632001-08-15 01:27:14 +00007211s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g
7212s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g
7213s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g
7214s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00007215s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00007216s%@SGI_ABI@%$SGI_ABI%g
Martin v. Löwis22352952000-12-13 17:37:02 +00007217s%@CXX@%$CXX%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007218s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007219s%@CC@%$CC%g
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00007220s%@CPP@%$CPP%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007221s%@EXEEXT@%$EXEEXT%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007222s%@LIBRARY@%$LIBRARY%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007223s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007224s%@DLLLIBRARY@%$DLLLIBRARY%g
Jack Jansene578a632001-08-15 01:27:14 +00007225s%@BLDLIBRARY@%$BLDLIBRARY%g
7226s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00007227s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007228s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007229s%@AR@%$AR%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007230s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007231s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007232s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007233s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00007234s%@OPT@%$OPT%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007235s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007236s%@SO@%$SO%g
7237s%@LDSHARED@%$LDSHARED%g
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007238s%@BLDSHARED@%$BLDSHARED%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007239s%@CCSHARED@%$CCSHARED%g
7240s%@LINKFORSHARED@%$LINKFORSHARED%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007241s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007242s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7243s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
Guido van Rossum009f7871997-12-04 00:51:42 +00007244s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00007245s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00007246s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007247s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00007248s%@DYNLOADFILE@%$DYNLOADFILE%g
Neil Schemenauer4e425612001-06-19 15:44:15 +00007249s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007250s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007251s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7252s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7253s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00007254s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007255s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007256s%@LIBM@%$LIBM%g
7257s%@LIBC@%$LIBC%g
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007258s%@UNICODE_OBJS@%$UNICODE_OBJS%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007259s%@SRCDIRS@%$SRCDIRS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007260
7261CEOF
7262EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007263
7264cat >> $CONFIG_STATUS <<\EOF
7265
7266# Split the substitutions into bite-sized pieces for seds with
7267# small command number limits, like on Digital OSF/1 and HP-UX.
7268ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7269ac_file=1 # Number of current file.
7270ac_beg=1 # First line for current file.
7271ac_end=$ac_max_sed_cmds # Line after last line for current file.
7272ac_more_lines=:
7273ac_sed_cmds=""
7274while $ac_more_lines; do
7275 if test $ac_beg -gt 1; then
7276 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7277 else
7278 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7279 fi
7280 if test ! -s conftest.s$ac_file; then
7281 ac_more_lines=false
7282 rm -f conftest.s$ac_file
7283 else
7284 if test -z "$ac_sed_cmds"; then
7285 ac_sed_cmds="sed -f conftest.s$ac_file"
7286 else
7287 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7288 fi
7289 ac_file=`expr $ac_file + 1`
7290 ac_beg=$ac_end
7291 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7292 fi
7293done
7294if test -z "$ac_sed_cmds"; then
7295 ac_sed_cmds=cat
7296fi
7297EOF
7298
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007299cat >> $CONFIG_STATUS <<EOF
7300
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007301CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007302EOF
7303cat >> $CONFIG_STATUS <<\EOF
7304for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007305 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007306 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007307 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007308 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7309 *) ac_file_in="${ac_file}.in" ;;
7310 esac
7311
Guido van Rossumf78abae1997-01-21 22:02:36 +00007312 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007313
7314 # Remove last slash and all that follows it. Not all systems have dirname.
7315 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7316 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7317 # The file is in a subdirectory.
7318 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007319 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007320 # A "../" for each directory in $ac_dir_suffix.
7321 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7322 else
7323 ac_dir_suffix= ac_dots=
7324 fi
7325
7326 case "$ac_given_srcdir" in
7327 .) srcdir=.
7328 if test -z "$ac_dots"; then top_srcdir=.
7329 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7330 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7331 *) # Relative path.
7332 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7333 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7334 esac
7335
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007336 case "$ac_given_INSTALL" in
7337 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7338 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7339 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007340
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007341 echo creating "$ac_file"
7342 rm -f "$ac_file"
7343 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7344 case "$ac_file" in
7345 *Makefile*) ac_comsub="1i\\
7346# $configure_input" ;;
7347 *) ac_comsub= ;;
7348 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007349
7350 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 +00007351 sed -e "$ac_comsub
7352s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007353s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007354s%@top_srcdir@%$top_srcdir%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007355s%@INSTALL@%$INSTALL%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00007356" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00007357fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00007358rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007359
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007360# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7361# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007362#
7363# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007364ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7365ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007366ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007367ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007368# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007369ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7370ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007371ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007372ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007373# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007374ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7375ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007376ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007377ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007378
Guido van Rossumf78abae1997-01-21 22:02:36 +00007379if test "${CONFIG_HEADERS+set}" != set; then
7380EOF
7381cat >> $CONFIG_STATUS <<EOF
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007382 CONFIG_HEADERS="pyconfig.h"
Guido van Rossumf78abae1997-01-21 22:02:36 +00007383EOF
7384cat >> $CONFIG_STATUS <<\EOF
7385fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007386for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007387 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007388 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007389 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007390 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7391 *) ac_file_in="${ac_file}.in" ;;
7392 esac
7393
Guido van Rossum7f43da71994-08-01 12:15:30 +00007394 echo creating $ac_file
7395
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007396 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00007397 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7398 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007399
7400EOF
7401
7402# Transform confdefs.h into a sed script conftest.vals that substitutes
7403# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007404# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007405# Protect against being in an unquoted here document in config.status.
7406rm -f conftest.vals
7407cat > conftest.hdr <<\EOF
7408s/[\\&%]/\\&/g
7409s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007410s%#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 +00007411s%ac_d%ac_u%gp
7412s%ac_u%ac_e%gp
7413EOF
7414sed -n -f conftest.hdr confdefs.h > conftest.vals
7415rm -f conftest.hdr
7416
7417# This sed command replaces #undef with comments. This is necessary, for
7418# example, in the case of _POSIX_SOURCE, which is predefined and required
7419# on some systems where configure will not decide to define it.
7420cat >> conftest.vals <<\EOF
7421s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7422EOF
7423
7424# Break up conftest.vals because some shells have a limit on
7425# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007426
7427rm -f conftest.tail
7428while :
7429do
7430 ac_lines=`grep -c . conftest.vals`
7431 # grep -c gives empty output for an empty file on some AIX systems.
7432 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7433 # Write a limited-size here document to conftest.frag.
7434 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7435 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7436 echo 'CEOF
7437 sed -f conftest.frag conftest.in > conftest.out
7438 rm -f conftest.in
7439 mv conftest.out conftest.in
7440' >> $CONFIG_STATUS
7441 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7442 rm -f conftest.vals
7443 mv conftest.tail conftest.vals
7444done
7445rm -f conftest.vals
7446
7447cat >> $CONFIG_STATUS <<\EOF
7448 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00007449 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007450 cat conftest.in >> conftest.h
7451 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00007452 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00007453 echo "$ac_file is unchanged"
7454 rm -f conftest.h
7455 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007456 # Remove last slash and all that follows it. Not all systems have dirname.
7457 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7458 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7459 # The file is in a subdirectory.
7460 test ! -d "$ac_dir" && mkdir "$ac_dir"
7461 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00007462 rm -f $ac_file
7463 mv conftest.h $ac_file
7464 fi
7465fi; done
7466
Guido van Rossumf78abae1997-01-21 22:02:36 +00007467EOF
7468cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007469
Guido van Rossumf78abae1997-01-21 22:02:36 +00007470EOF
7471cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007472
7473exit 0
7474EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007475chmod +x $CONFIG_STATUS
7476rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007477test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00007478
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007479
7480echo "creating Setup"
7481if test ! -f Modules/Setup
7482then
7483 cp $srcdir/Modules/Setup.dist Modules/Setup
7484fi
7485
7486echo "creating Setup.local"
7487if test ! -f Modules/Setup.local
7488then
7489 echo "# Edit this file for local setup changes" >Modules/Setup.local
7490fi
7491
7492echo "creating Makefile"
7493$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
7494 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00007495 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007496mv config.c Modules