blob: 3ad37273e4ef5b0f2bf2158e1ec2a4ffb50e8a19 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Guido van Rossuma6535fd2001-10-18 19:44:10 +00003# From configure.in Revision: 1.272
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 case $enableval in
587 yes)
588 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +0000589 esac
590 case $enableval in
591 no)
592 PYTHONFRAMEWORK=
593 PYTHONFRAMEWORKDIR=no-framework
594 PYTHONFRAMEWORKPREFIX=
595 PYTHONFRAMEWORKINSTALLDIR=
596 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +0000597 ;;
598 *)
Jack Jansen127e56e2001-09-11 14:41:54 +0000599 PYTHONFRAMEWORK=Python
600 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +0000601 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +0000602 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
603 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +0000604 esac
Guido van Rossum563e7081996-09-10 18:20:48 +0000605
606else
Jack Jansene578a632001-08-15 01:27:14 +0000607
608 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +0000609 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +0000610 PYTHONFRAMEWORKPREFIX=
611 PYTHONFRAMEWORKINSTALLDIR=
612 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000613
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000614fi
615
Guido van Rossum91922671997-10-09 20:24:13 +0000616
Jack Jansene578a632001-08-15 01:27:14 +0000617
618
619
620
621##AC_ARG_WITH(dyld,
622##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
623##
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000624# Set name for machine-dependent library files
625
626echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000627echo "configure:628: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000628if test -z "$MACHDEP"
629then
Guido van Rossum563e7081996-09-10 18:20:48 +0000630 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +0000631 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000632 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000633 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000634 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000635 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000636 ac_md_system=`echo $ac_sys_system |
637 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
638 ac_md_release=`echo $ac_sys_release |
639 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000640 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000641
Guido van Rossum07397971997-04-29 21:49:50 +0000642 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000643 cygwin*) MACHDEP="cygwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +0000644 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000645 esac
646fi
Guido van Rossum91922671997-10-09 20:24:13 +0000647
648#
649# SGI compilers allow the specification of the both the ABI and the
650# ISA on the command line. Depending on the values of these switches,
651# different and often incompatable code will be generated.
652#
653# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
654# thus supply support for various ABI/ISA combinations. The MACHDEP
655# variable is also adjusted.
656#
657
658if test ! -z "$SGI_ABI"
659then
660 CC="cc $SGI_ABI"
661 LDFLAGS="$SGI_ABI $LDFLAGS"
662 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
663fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000664echo "$ac_t""$MACHDEP" 1>&6
665
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000667echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000668echo "configure:669: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000669# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000670if test "${with_gcc+set}" = set; then
671 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000672
673 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000674 no) CC=cc
675 without_gcc=yes;;
676 yes) CC=gcc
677 without_gcc=no;;
678 *) CC=$withval
679 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000680 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000681else
Guido van Rossume77438c1995-09-13 18:59:59 +0000682
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000683 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000684 AIX*) CC=cc_r
685 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000686 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000687 case $BE_HOST_CPU in
688 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000689 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000690 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000691 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 +0000692 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000693 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000694 ;;
695 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000696 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000697 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000698 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000699 ;;
700 *)
Fred Drake5790be12000-10-09 17:06:13 +0000701 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000702 ;;
703 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000704 AR="\$(srcdir)/Modules/ar_beos"
705 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000706 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000707 Monterey*)
708 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +0000709 without_gcc=;;
710 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000711 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000712fi
713
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000714echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000715
Guido van Rossum95012191999-12-16 17:50:52 +0000716
717
Fred Drakea1a84e72001-03-06 05:52:16 +0000718MAINOBJ=python.o
Guido van Rossum95012191999-12-16 17:50:52 +0000719echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000720echo "configure:721: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000721# Check whether --with-cxx or --without-cxx was given.
722if test "${with_cxx+set}" = set; then
723 withval="$with_cxx"
724
Martin v. Löwis22352952000-12-13 17:37:02 +0000725 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000726 case $withval in
727 no) CXX=
728 with_cxx=no;;
729 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +0000730 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +0000731 with_cxx=$withval;;
732 esac
733else
734
735 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000736 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000737
738fi
739
740echo "$ac_t""$with_cxx" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000741
742
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000743
744
Martin v. Löwis22352952000-12-13 17:37:02 +0000745if test "$check_cxx" = "yes"
746then
747 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
748do
749# Extract the first word of "$ac_prog", so it can be a program name with args.
750set dummy $ac_prog; ac_word=$2
751echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000752echo "configure:753: checking for $ac_word" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000753if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
754 echo $ac_n "(cached) $ac_c" 1>&6
755else
756 if test -n "$CXX"; then
757 ac_cv_prog_CXX="$CXX" # Let the user override the test.
758else
759 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
760 ac_dummy="$PATH"
761 for ac_dir in $ac_dummy; do
762 test -z "$ac_dir" && ac_dir=.
763 if test -f $ac_dir/$ac_word; then
764 ac_cv_prog_CXX="$ac_prog"
765 break
766 fi
767 done
768 IFS="$ac_save_ifs"
769fi
770fi
771CXX="$ac_cv_prog_CXX"
772if test -n "$CXX"; then
773 echo "$ac_t""$CXX" 1>&6
774else
775 echo "$ac_t""no" 1>&6
776fi
777
778test -n "$CXX" && break
779done
780test -n "$CXX" || CXX="notfound"
781
782 if test "$CXX" = "notfound"
783 then
784 CXX=
785 else
786 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000787echo "configure:788: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000788
789ac_ext=C
790# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
791ac_cpp='$CXXCPP $CPPFLAGS'
792ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
793ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
794cross_compiling=$ac_cv_prog_cxx_cross
795
796cat > conftest.$ac_ext << EOF
797
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000798#line 799 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000799#include "confdefs.h"
800
801int main(){return(0);}
802EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000803if { (eval echo configure:804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis22352952000-12-13 17:37:02 +0000804 ac_cv_prog_cxx_works=yes
805 # If we can't run a trivial program, we are probably using a cross compiler.
806 if (./conftest; exit) 2>/dev/null; then
807 ac_cv_prog_cxx_cross=no
808 else
809 ac_cv_prog_cxx_cross=yes
810 fi
811else
812 echo "configure: failed program was:" >&5
813 cat conftest.$ac_ext >&5
814 ac_cv_prog_cxx_works=no
815fi
816rm -fr conftest*
817ac_ext=c
818# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
819ac_cpp='$CPP $CPPFLAGS'
820ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
821ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
822cross_compiling=$ac_cv_prog_cc_cross
823
824echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
825if test $ac_cv_prog_cxx_works = no; then
826 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
827fi
828echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000829echo "configure:830: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000830echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
831cross_compiling=$ac_cv_prog_cxx_cross
832
833 fi
834fi
835
Guido van Rossum8b131c51995-03-09 14:10:13 +0000836# If the user switches compilers, we can't believe the cache
837if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
838then
839 { echo "configure: error: cached CC is different -- throw away $cache_file
840(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
841fi
842
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843# Extract the first word of "gcc", so it can be a program name with args.
844set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000845echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000846echo "configure:847: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000847if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000848 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849else
850 if test -n "$CC"; then
851 ac_cv_prog_CC="$CC" # Let the user override the test.
852else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000853 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
854 ac_dummy="$PATH"
855 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856 test -z "$ac_dir" && ac_dir=.
857 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000859 break
860 fi
861 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000863fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864fi
865CC="$ac_cv_prog_CC"
866if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000867 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000869 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000871
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000872if test -z "$CC"; then
873 # Extract the first word of "cc", so it can be a program name with args.
874set dummy cc; ac_word=$2
875echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000876echo "configure:877: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000877if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878 echo $ac_n "(cached) $ac_c" 1>&6
879else
880 if test -n "$CC"; then
881 ac_cv_prog_CC="$CC" # Let the user override the test.
882else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000883 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000884 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000885 ac_dummy="$PATH"
886 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000887 test -z "$ac_dir" && ac_dir=.
888 if test -f $ac_dir/$ac_word; then
889 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
890 ac_prog_rejected=yes
891 continue
892 fi
893 ac_cv_prog_CC="cc"
894 break
895 fi
896 done
897 IFS="$ac_save_ifs"
898if test $ac_prog_rejected = yes; then
899 # We found a bogon in the path, so make sure we never use it.
900 set dummy $ac_cv_prog_CC
901 shift
902 if test $# -gt 0; then
903 # We chose a different compiler from the bogus one.
904 # However, it has the same basename, so the bogon will be chosen
905 # first if we set CC to just the basename; use the full file name.
906 shift
907 set dummy "$ac_dir/$ac_word" "$@"
908 shift
909 ac_cv_prog_CC="$@"
910 fi
911fi
912fi
913fi
914CC="$ac_cv_prog_CC"
915if test -n "$CC"; then
916 echo "$ac_t""$CC" 1>&6
917else
918 echo "$ac_t""no" 1>&6
919fi
920
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000921 if test -z "$CC"; then
922 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000923 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000924 # Extract the first word of "cl", so it can be a program name with args.
925set dummy cl; ac_word=$2
926echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000927echo "configure:928: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000928if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000929 echo $ac_n "(cached) $ac_c" 1>&6
930else
931 if test -n "$CC"; then
932 ac_cv_prog_CC="$CC" # Let the user override the test.
933else
934 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
935 ac_dummy="$PATH"
936 for ac_dir in $ac_dummy; do
937 test -z "$ac_dir" && ac_dir=.
938 if test -f $ac_dir/$ac_word; then
939 ac_cv_prog_CC="cl"
940 break
941 fi
942 done
943 IFS="$ac_save_ifs"
944fi
945fi
946CC="$ac_cv_prog_CC"
947if test -n "$CC"; then
948 echo "$ac_t""$CC" 1>&6
949else
950 echo "$ac_t""no" 1>&6
951fi
952 ;;
953 esac
954 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
956fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000958echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000959echo "configure:960: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000960
961ac_ext=c
962# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
963ac_cpp='$CPP $CPPFLAGS'
964ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000965ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000966cross_compiling=$ac_cv_prog_cc_cross
967
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000968cat > conftest.$ac_ext << EOF
969
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000970#line 971 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000971#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000972
Guido van Rossumf78abae1997-01-21 22:02:36 +0000973main(){return(0);}
974EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000975if { (eval echo configure:976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000976 ac_cv_prog_cc_works=yes
977 # If we can't run a trivial program, we are probably using a cross compiler.
978 if (./conftest; exit) 2>/dev/null; then
979 ac_cv_prog_cc_cross=no
980 else
981 ac_cv_prog_cc_cross=yes
982 fi
983else
984 echo "configure: failed program was:" >&5
985 cat conftest.$ac_ext >&5
986 ac_cv_prog_cc_works=no
987fi
988rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000989ac_ext=c
990# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
991ac_cpp='$CPP $CPPFLAGS'
992ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
993ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
994cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000995
996echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
997if test $ac_cv_prog_cc_works = no; then
998 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
999fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001000echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001001echo "configure:1002: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001002echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1003cross_compiling=$ac_cv_prog_cc_cross
1004
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001005echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001006echo "configure:1007: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001007if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001008 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009else
1010 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001011#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001012 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001013#endif
1014EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001015if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001016 ac_cv_prog_gcc=yes
1017else
1018 ac_cv_prog_gcc=no
1019fi
1020fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001022echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001023
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001024if test $ac_cv_prog_gcc = yes; then
1025 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001026else
1027 GCC=
1028fi
1029
1030ac_test_CFLAGS="${CFLAGS+set}"
1031ac_save_CFLAGS="$CFLAGS"
1032CFLAGS=
1033echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001034echo "configure:1035: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001035if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001036 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037else
1038 echo 'void f(){}' > conftest.c
1039if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001040 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001042 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001043fi
1044rm -f conftest*
1045
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001046fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
Guido van Rossumf78abae1997-01-21 22:02:36 +00001048echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001049if test "$ac_test_CFLAGS" = set; then
1050 CFLAGS="$ac_save_CFLAGS"
1051elif test $ac_cv_prog_cc_g = yes; then
1052 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001053 CFLAGS="-g -O2"
1054 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001055 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001056 fi
1057else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001058 if test "$GCC" = yes; then
1059 CFLAGS="-O2"
1060 else
1061 CFLAGS=
1062 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001063fi
1064
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001065
1066# checks for UNIX variants that set C preprocessor variables
1067echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001068echo "configure:1069: checking how to run the C preprocessor" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001069# On Suns, sometimes $CPP names a directory.
1070if test -n "$CPP" && test -d "$CPP"; then
1071 CPP=
1072fi
1073if test -z "$CPP"; then
1074if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1075 echo $ac_n "(cached) $ac_c" 1>&6
1076else
1077 # This must be in double quotes, not single quotes, because CPP may get
1078 # substituted into the Makefile and "${CC-cc}" will confuse make.
1079 CPP="${CC-cc} -E"
1080 # On the NeXT, cc -E runs the code through the compiler's parser,
1081 # not just through cpp.
1082 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001083#line 1084 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001084#include "confdefs.h"
1085#include <assert.h>
1086Syntax Error
1087EOF
1088ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001089{ (eval echo configure:1090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001090ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1091if test -z "$ac_err"; then
1092 :
1093else
1094 echo "$ac_err" >&5
1095 echo "configure: failed program was:" >&5
1096 cat conftest.$ac_ext >&5
1097 rm -rf conftest*
1098 CPP="${CC-cc} -E -traditional-cpp"
1099 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001100#line 1101 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001101#include "confdefs.h"
1102#include <assert.h>
1103Syntax Error
1104EOF
1105ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001106{ (eval echo configure:1107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001107ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1108if test -z "$ac_err"; then
1109 :
1110else
1111 echo "$ac_err" >&5
1112 echo "configure: failed program was:" >&5
1113 cat conftest.$ac_ext >&5
1114 rm -rf conftest*
1115 CPP="${CC-cc} -nologo -E"
1116 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001117#line 1118 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001118#include "confdefs.h"
1119#include <assert.h>
1120Syntax Error
1121EOF
1122ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001123{ (eval echo configure:1124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001124ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1125if test -z "$ac_err"; then
1126 :
1127else
1128 echo "$ac_err" >&5
1129 echo "configure: failed program was:" >&5
1130 cat conftest.$ac_ext >&5
1131 rm -rf conftest*
1132 CPP=/lib/cpp
1133fi
1134rm -f conftest*
1135fi
1136rm -f conftest*
1137fi
1138rm -f conftest*
1139 ac_cv_prog_CPP="$CPP"
1140fi
1141 CPP="$ac_cv_prog_CPP"
1142else
1143 ac_cv_prog_CPP="$CPP"
1144fi
1145echo "$ac_t""$CPP" 1>&6
1146
1147echo $ac_n "checking for AIX""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001148echo "configure:1149: checking for AIX" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001149cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001150#line 1151 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001151#include "confdefs.h"
1152#ifdef _AIX
1153 yes
1154#endif
1155
1156EOF
1157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1158 egrep "yes" >/dev/null 2>&1; then
1159 rm -rf conftest*
1160 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1161#define _ALL_SOURCE 1
1162EOF
1163
1164else
1165 rm -rf conftest*
1166 echo "$ac_t""no" 1>&6
1167fi
1168rm -f conftest*
1169
1170
1171ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1172echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001173echo "configure:1174: checking for minix/config.h" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001174if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1175 echo $ac_n "(cached) $ac_c" 1>&6
1176else
1177 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001178#line 1179 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001179#include "confdefs.h"
1180#include <minix/config.h>
1181EOF
1182ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001183{ (eval echo configure:1184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001184ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1185if test -z "$ac_err"; then
1186 rm -rf conftest*
1187 eval "ac_cv_header_$ac_safe=yes"
1188else
1189 echo "$ac_err" >&5
1190 echo "configure: failed program was:" >&5
1191 cat conftest.$ac_ext >&5
1192 rm -rf conftest*
1193 eval "ac_cv_header_$ac_safe=no"
1194fi
1195rm -f conftest*
1196fi
1197if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1198 echo "$ac_t""yes" 1>&6
1199 MINIX=yes
1200else
1201 echo "$ac_t""no" 1>&6
1202MINIX=
1203fi
1204
1205if test "$MINIX" = yes; then
1206 cat >> confdefs.h <<\EOF
1207#define _POSIX_SOURCE 1
1208EOF
1209
1210 cat >> confdefs.h <<\EOF
1211#define _POSIX_1_SOURCE 2
1212EOF
1213
1214 cat >> confdefs.h <<\EOF
1215#define _MINIX 1
1216EOF
1217
1218fi
1219
1220
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001221echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001222echo "configure:1223: checking for Cygwin environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001223if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1224 echo $ac_n "(cached) $ac_c" 1>&6
1225else
1226 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001227#line 1228 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001228#include "confdefs.h"
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001229
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001230int main() {
1231
1232#ifndef __CYGWIN__
1233#define __CYGWIN__ __CYGWIN32__
1234#endif
1235return __CYGWIN__;
1236; return 0; }
1237EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001238if { (eval echo configure:1239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001239 rm -rf conftest*
1240 ac_cv_cygwin=yes
1241else
1242 echo "configure: failed program was:" >&5
1243 cat conftest.$ac_ext >&5
1244 rm -rf conftest*
1245 ac_cv_cygwin=no
1246fi
1247rm -f conftest*
1248rm -f conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001249fi
1250
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001251echo "$ac_t""$ac_cv_cygwin" 1>&6
1252CYGWIN=
1253test "$ac_cv_cygwin" = yes && CYGWIN=yes
1254echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001255echo "configure:1256: checking for mingw32 environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001256if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1257 echo $ac_n "(cached) $ac_c" 1>&6
1258else
1259 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001260#line 1261 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001261#include "confdefs.h"
1262
1263int main() {
1264return __MINGW32__;
1265; return 0; }
1266EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001267if { (eval echo configure:1268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001268 rm -rf conftest*
1269 ac_cv_mingw32=yes
1270else
1271 echo "configure: failed program was:" >&5
1272 cat conftest.$ac_ext >&5
1273 rm -rf conftest*
1274 ac_cv_mingw32=no
1275fi
1276rm -f conftest*
1277rm -f conftest*
1278fi
1279
1280echo "$ac_t""$ac_cv_mingw32" 1>&6
1281MINGW32=
1282test "$ac_cv_mingw32" = yes && MINGW32=yes
1283
1284
1285echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001286echo "configure:1287: checking for executable suffix" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001287if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1288 echo $ac_n "(cached) $ac_c" 1>&6
1289else
1290 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1291 ac_cv_exeext=.exe
1292else
1293 rm -f conftest*
1294 echo 'int main () { return 0; }' > conftest.$ac_ext
1295 ac_cv_exeext=
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001296 if { (eval echo configure:1297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001297 for file in conftest.*; do
1298 case $file in
1299 *.c | *.o | *.obj) ;;
1300 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1301 esac
1302 done
1303 else
1304 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1305 fi
1306 rm -f conftest*
1307 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1308fi
1309fi
1310
1311EXEEXT=""
1312test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1313echo "$ac_t""${ac_cv_exeext}" 1>&6
1314ac_exeext=$EXEEXT
1315
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001316echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001317echo "configure:1318: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001318# Check whether --with-suffix or --without-suffix was given.
1319if test "${with_suffix+set}" = set; then
1320 withval="$with_suffix"
1321
1322 case $withval in
1323 no) EXEEXT=;;
1324 yes) EXEEXT=.exe;;
1325 *) EXEEXT=$withval;;
1326 esac
1327fi
1328
1329echo "$ac_t""$EXEEXT" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001330# Test whether we're running on a non-case-sensitive system, in which
1331# case we give a warning if no ext is given
1332if test -d "python" -a -z "$EXEEXT"
1333then
1334 echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2
1335fi
Guido van Rossumff555e32000-09-22 15:38:21 +00001336
Guido van Rossumdd997f71998-10-07 19:58:26 +00001337case $MACHDEP in
1338bsdos*)
1339 case $CC in
1340 gcc) CC="$CC -D_HAVE_BSDI";;
1341 esac;;
1342esac
1343
Guido van Rossum24b1e751997-08-21 02:29:16 +00001344case $ac_sys_system in
1345hp*|HP*)
1346 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001347 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001348 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001349Monterey*)
1350 case $CC in
1351 cc) CC="$CC -Wl,-Bexport";;
1352 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001353SunOS*)
1354 # Some functions have a prototype only with that define, e.g. confstr
1355 cat >> confdefs.h <<\EOF
1356#define __EXTENSIONS__ 1
1357EOF
1358
1359 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001360esac
1361
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001362
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001363
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001364echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001365echo "configure:1366: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001366if test -z "$LIBRARY"
1367then
1368 LIBRARY='libpython$(VERSION).a'
1369fi
1370echo "$ac_t""$LIBRARY" 1>&6
1371
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001372# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00001373# name of the library into which to insert object files). BLDLIBRARY is also
1374# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
1375# is blank as the main program is not linked directly against LDLIBRARY.
1376# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
1377# systems without shared libraries, LDLIBRARY is the same as LIBRARY
1378# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
1379# DLLLIBRARY is the shared (i.e., DLL) library.
1380#
1381
1382
Guido van Rossumaef734b2001-01-10 21:09:12 +00001383
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001384
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001385LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00001386BLDLIBRARY='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00001387DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00001388LDLIBRARYDIR=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001389
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001390# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001391# If CXX is set, and if it is needed to link a main function that was
1392# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
1393# python might then depend on the C++ runtime
Fred Drake5790be12000-10-09 17:06:13 +00001394# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001395# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001396
1397echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001398echo "configure:1399: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001399if test -z "$LINKCC"
1400then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001401 if test -z "$CXX"; then
1402 LINKCC="\$(PURIFY) \$(CC)"
1403 else
1404 echo 'int main(){return 0;}' > conftest.$ac_ext
1405 $CXX -c conftest.$ac_ext 2>&5
1406 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
1407 && test -s conftest$ac_exeext && ./conftest$ac_exeext
1408 then
1409 LINKCC="\$(PURIFY) \$(CC)"
1410 else
1411 LINKCC="\$(PURIFY) \$(CXX)"
1412 fi
1413 rm -fr conftest*
1414 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001415 case $ac_sys_system in
1416 AIX*)
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001417 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $(LINKCC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001418 dgux*)
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001419 LINKCC="LD_RUN_PATH=$libdir $(LINKCC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001420 Monterey64*)
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001421 LINKCC="$(LINKCC) -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001422 esac
1423fi
1424echo "$ac_t""$LINKCC" 1>&6
1425
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001426echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001427echo "configure:1428: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001428
1429# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001430case $MACHDEP in
1431dguxR4)
1432 LDLIBRARY='libpython$(VERSION).so'
1433 OPT="$OPT -pic"
1434 ;;
1435beos*)
1436 LDLIBRARY='libpython$(VERSION).so'
1437 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001438cygwin*)
1439 LDLIBRARY='libpython$(VERSION).dll.a'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001440 DLLLIBRARY='libpython$(VERSION).dll'
Guido van Rossumaef734b2001-01-10 21:09:12 +00001441 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001442esac
Jack Jansene578a632001-08-15 01:27:14 +00001443
Guido van Rossumb8552162001-09-05 14:58:11 +00001444# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
1445# library that we build, but we do not want to link against it (we
1446# will find it with a -framework option). For this reason there is an
1447# extra variable BLDLIBRARY against which Python and the extension
1448# modules are linked, BLDLIBRARY. This is normally the same as
1449# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00001450if test "$enable_framework"
1451then
1452 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
1453 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
1454 BLDLIBRARY=''
1455else
1456 BLDLIBRARY='$(LDLIBRARY)'
1457fi
1458
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001459echo "$ac_t""$LDLIBRARY" 1>&6
1460
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001461# Extract the first word of "ranlib", so it can be a program name with args.
1462set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001463echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001464echo "configure:1465: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001465if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001466 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001467else
1468 if test -n "$RANLIB"; then
1469 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1470else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001471 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1472 ac_dummy="$PATH"
1473 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001474 test -z "$ac_dir" && ac_dir=.
1475 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001476 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001477 break
1478 fi
1479 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001480 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001481 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001482fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001483fi
1484RANLIB="$ac_cv_prog_RANLIB"
1485if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001486 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001487else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001488 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001489fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001490
1491
Guido van Rossum7f43da71994-08-01 12:15:30 +00001492for ac_prog in ar aal
1493do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001494# Extract the first word of "$ac_prog", so it can be a program name with args.
1495set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001496echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001497echo "configure:1498: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001498if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001499 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001500else
1501 if test -n "$AR"; then
1502 ac_cv_prog_AR="$AR" # Let the user override the test.
1503else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001504 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1505 ac_dummy="$PATH"
1506 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001507 test -z "$ac_dir" && ac_dir=.
1508 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001509 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001510 break
1511 fi
1512 done
1513 IFS="$ac_save_ifs"
1514fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001515fi
1516AR="$ac_cv_prog_AR"
1517if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001518 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001519else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001520 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001521fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001522
1523test -n "$AR" && break
1524done
1525test -n "$AR" || AR="ar"
1526
Neil Schemenauera42c8272001-03-31 00:01:55 +00001527
1528case $MACHDEP in
1529bsdos*)
1530 # install -d does not work on BSDI
1531 if test -z "$INSTALL"
1532 then
1533 INSTALL="${srcdir}/install-sh -c"
1534 fi
1535esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001536ac_aux_dir=
1537for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1538 if test -f $ac_dir/install-sh; then
1539 ac_aux_dir=$ac_dir
1540 ac_install_sh="$ac_aux_dir/install-sh -c"
1541 break
1542 elif test -f $ac_dir/install.sh; then
1543 ac_aux_dir=$ac_dir
1544 ac_install_sh="$ac_aux_dir/install.sh -c"
1545 break
1546 fi
1547done
1548if test -z "$ac_aux_dir"; then
1549 { 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 +00001550fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001551ac_config_guess=$ac_aux_dir/config.guess
1552ac_config_sub=$ac_aux_dir/config.sub
1553ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1554
1555# Find a good install program. We prefer a C program (faster),
1556# so one script is as good as another. But avoid the broken or
1557# incompatible versions:
1558# SysV /etc/install, /usr/sbin/install
1559# SunOS /usr/etc/install
1560# IRIX /sbin/install
1561# AIX /bin/install
1562# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1563# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1564# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1565# ./install, which can be erroneously created by make from ./install.sh.
1566echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001567echo "configure:1568: checking for a BSD compatible install" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001568if test -z "$INSTALL"; then
1569if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1570 echo $ac_n "(cached) $ac_c" 1>&6
1571else
1572 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1573 for ac_dir in $PATH; do
1574 # Account for people who put trailing slashes in PATH elements.
1575 case "$ac_dir/" in
1576 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1577 *)
1578 # OSF1 and SCO ODT 3.0 have their own names for install.
1579 # Don't use installbsd from OSF since it installs stuff as root
1580 # by default.
1581 for ac_prog in ginstall scoinst install; do
1582 if test -f $ac_dir/$ac_prog; then
1583 if test $ac_prog = install &&
1584 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1585 # AIX install. It has an incompatible calling convention.
1586 :
1587 else
1588 ac_cv_path_install="$ac_dir/$ac_prog -c"
1589 break 2
1590 fi
1591 fi
1592 done
1593 ;;
1594 esac
1595 done
1596 IFS="$ac_save_IFS"
1597
1598fi
1599 if test "${ac_cv_path_install+set}" = set; then
1600 INSTALL="$ac_cv_path_install"
1601 else
1602 # As a last resort, use the slow shell script. We don't cache a
1603 # path for INSTALL within a source directory, because that will
1604 # break other packages using the cache if that directory is
1605 # removed, or if the path is relative.
1606 INSTALL="$ac_install_sh"
1607 fi
1608fi
1609echo "$ac_t""$INSTALL" 1>&6
1610
1611# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1612# It thinks the first close brace ends the variable substitution.
1613test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1614
1615test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1616
1617test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1618
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001619
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001620# Not every filesystem supports hard links
1621
1622if test -z "$LN" ; then
1623 case $ac_sys_system in
1624 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001625 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001626 *) LN=ln;;
1627 esac
1628fi
1629
Fred Drake109d9862001-07-11 06:27:56 +00001630# Check for --with-pydebug
1631echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001632echo "configure:1633: checking for --with-pydebug" >&5
Fred Drake109d9862001-07-11 06:27:56 +00001633# Check whether --with-pydebug or --without-pydebug was given.
1634if test "${with_pydebug+set}" = set; then
1635 withval="$with_pydebug"
1636
1637if test "$withval" != no
1638then cat >> confdefs.h <<\EOF
1639#define Py_DEBUG 1
1640EOF
1641 echo "$ac_t""yes" 1>&6; Py_DEBUG='true'
1642else echo "$ac_t""no" 1>&6; Py_DEBUG='false'
1643fi
1644else
1645 echo "$ac_t""no" 1>&6
1646fi
1647
1648
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001649# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001650
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001651if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001652then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001653 case $GCC in
1654 yes)
1655 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001656 yes)
Fred Drake109d9862001-07-11 06:27:56 +00001657 if test "$Py_DEBUG" = 'true' ; then
1658 # Optimization messes up debuggers, so turn it off for
1659 # debug builds.
1660 OPT="-g -Wall -Wstrict-prototypes"
1661 else
1662 OPT="-g -O3 -Wall -Wstrict-prototypes"
1663 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001664 *)
Fred Drake109d9862001-07-11 06:27:56 +00001665 OPT="-O3 -Wall -Wstrict-prototypes";;
1666 esac
1667 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001668 *)
1669 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00001670 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001671 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1672 *)
1673 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001674 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001675 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00001676 case $ac_sys_system in
1677 Darwin*)
1678 OPT="$OPT -no-cpp-precomp";;
1679 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001680fi
1681
Trent Mick635f6fb2000-08-23 21:33:05 +00001682# The current (beta) Monterey compiler dies with optimizations
1683case $ac_sys_system in
1684Monterey*) OPT="";;
1685esac
1686
Guido van Rossum563e7081996-09-10 18:20:48 +00001687if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001688then
1689 OPT="$OPT $ac_arch_flags"
1690fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00001691
Guido van Rossum91922671997-10-09 20:24:13 +00001692echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001693echo "configure:1694: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001694if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001695 echo $ac_n "(cached) $ac_c" 1>&6
1696else
1697 ac_save_cc="$CC"
1698CC="$CC -OPT:Olimit=0"
1699if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001700 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00001701else
1702 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001703#line 1704 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001704#include "confdefs.h"
1705int main() { return 0; }
1706EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001707if { (eval echo configure:1708: \"$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 +00001708then
1709 ac_cv_opt_olimit_ok=yes
1710else
1711 echo "configure: failed program was:" >&5
1712 cat conftest.$ac_ext >&5
1713 rm -fr conftest*
1714 ac_cv_opt_olimit_ok=no
1715fi
1716rm -fr conftest*
1717fi
1718
1719CC="$ac_save_cc"
1720fi
1721
1722echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001723if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001724 case $ac_sys_system in
1725 Darwin*) OPT="$OPT" ;;
1726 *) OPT="$OPT -OPT:Olimit=0";;
1727 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001728else
1729 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001730echo "configure:1731: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001731 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001732 echo $ac_n "(cached) $ac_c" 1>&6
1733else
1734 ac_save_cc="$CC"
1735 CC="$CC -Olimit 1500"
1736 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001737 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001738else
1739 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001740#line 1741 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001741#include "confdefs.h"
1742int main() { return 0; }
1743EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001744if { (eval echo configure:1745: \"$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 +00001745then
1746 ac_cv_olimit_ok=yes
1747else
1748 echo "configure: failed program was:" >&5
1749 cat conftest.$ac_ext >&5
1750 rm -fr conftest*
1751 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001752fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001753rm -fr conftest*
1754fi
1755
1756 CC="$ac_save_cc"
1757fi
1758
1759 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1760 if test $ac_cv_olimit_ok = yes; then
1761 OPT="$OPT -Olimit 1500"
1762 fi
1763fi
1764
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001765# On some compilers, pthreads are available without further options
1766# (e.g. MacOS X). On some of these systems, the compiler will not
1767# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
1768# So we have to see first whether pthreads are available without
1769# options before we can check whether -Kpthread improves anything.
1770echo $ac_n "checking whether pthreads are available without options""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001771echo "configure:1772: checking whether pthreads are available without options" >&5
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001772if eval "test \"`echo '$''{'ac_cv_pthread_is_default'+set}'`\" = set"; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00001773 echo $ac_n "(cached) $ac_c" 1>&6
1774else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001775 if test "$cross_compiling" = yes; then
1776 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001777else
1778 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001779#line 1780 "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00001780#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001781
Martin v. Löwis130fb172001-07-19 11:00:41 +00001782#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001783
1784void* routine(void* p){return NULL;}
1785
1786int main(){
1787 pthread_t p;
1788 if(pthread_create(&p,NULL,routine,NULL)!=0)
1789 return 1;
1790 return 0;
1791}
1792
Martin v. Löwis130fb172001-07-19 11:00:41 +00001793EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001794if { (eval echo configure:1795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001795then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001796 ac_cv_pthread_is_default=yes
1797else
1798 echo "configure: failed program was:" >&5
1799 cat conftest.$ac_ext >&5
1800 rm -fr conftest*
1801 ac_cv_pthread_is_default=no
1802fi
1803rm -fr conftest*
1804fi
1805
1806
1807fi
1808
1809echo "$ac_t""$ac_cv_pthread_is_default" 1>&6
1810
1811
1812if test $ac_cv_pthread_is_default = yes
1813then
1814 ac_cv_kpthread=no
1815else
1816# -Kpthread, if available, provides the right #defines
1817# and linker options to make pthread_create available
1818# Some compilers won't report that they do not support -Kpthread,
1819# so we need to run a program to see whether it really made the
1820# function available.
1821echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001822echo "configure:1823: checking whether $CC accepts -Kpthread" >&5
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001823if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then
1824 echo $ac_n "(cached) $ac_c" 1>&6
1825else
1826 ac_save_cc="$CC"
1827CC="$CC -Kpthread"
1828if test "$cross_compiling" = yes; then
1829 ac_cv_kpthread=no
1830else
1831 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001832#line 1833 "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001833#include "confdefs.h"
1834
1835#include <pthread.h>
1836
1837void* routine(void* p){return NULL;}
1838
1839int main(){
1840 pthread_t p;
1841 if(pthread_create(&p,NULL,routine,NULL)!=0)
1842 return 1;
1843 return 0;
1844}
1845
1846EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001847if { (eval echo configure:1848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001848then
Martin v. Löwis130fb172001-07-19 11:00:41 +00001849 ac_cv_kpthread=yes
1850else
1851 echo "configure: failed program was:" >&5
1852 cat conftest.$ac_ext >&5
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001853 rm -fr conftest*
Martin v. Löwis130fb172001-07-19 11:00:41 +00001854 ac_cv_kpthread=no
1855fi
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001856rm -fr conftest*
1857fi
1858
Martin v. Löwis130fb172001-07-19 11:00:41 +00001859CC="$ac_save_cc"
1860fi
1861
Martin v. Löwis130fb172001-07-19 11:00:41 +00001862echo "$ac_t""$ac_cv_kpthread" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001863fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00001864
Guido van Rossum84e7b241996-08-19 21:59:00 +00001865
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001866# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001867echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001868echo "configure:1869: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001869if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001870 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001871else
1872 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001873#line 1874 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001874#include "confdefs.h"
1875#include <stdlib.h>
1876#include <stdarg.h>
1877#include <string.h>
1878#include <float.h>
1879EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001880ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001881{ (eval echo configure:1882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001882ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001883if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001884 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001885 ac_cv_header_stdc=yes
1886else
1887 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001888 echo "configure: failed program was:" >&5
1889 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001890 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001891 ac_cv_header_stdc=no
1892fi
1893rm -f conftest*
1894
1895if test $ac_cv_header_stdc = yes; then
1896 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1897cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001898#line 1899 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001899#include "confdefs.h"
1900#include <string.h>
1901EOF
1902if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1903 egrep "memchr" >/dev/null 2>&1; then
1904 :
1905else
1906 rm -rf conftest*
1907 ac_cv_header_stdc=no
1908fi
1909rm -f conftest*
1910
1911fi
1912
1913if test $ac_cv_header_stdc = yes; then
1914 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1915cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001916#line 1917 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001917#include "confdefs.h"
1918#include <stdlib.h>
1919EOF
1920if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1921 egrep "free" >/dev/null 2>&1; then
1922 :
1923else
1924 rm -rf conftest*
1925 ac_cv_header_stdc=no
1926fi
1927rm -f conftest*
1928
1929fi
1930
1931if test $ac_cv_header_stdc = yes; then
1932 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1933if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001934 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001935else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001936 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001937#line 1938 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001938#include "confdefs.h"
1939#include <ctype.h>
1940#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1941#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001942#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001943int main () { int i; for (i = 0; i < 256; i++)
1944if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1945exit (0); }
1946
1947EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001948if { (eval echo configure:1949: \"$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 +00001949then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001950 :
1951else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001952 echo "configure: failed program was:" >&5
1953 cat conftest.$ac_ext >&5
1954 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001955 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001956fi
1957rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001958fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001959
1960fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001961fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001962
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001963echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001964if test $ac_cv_header_stdc = yes; then
1965 cat >> confdefs.h <<\EOF
1966#define STDC_HEADERS 1
1967EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001968
1969fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001970
Guido van Rossuma6535fd2001-10-18 19:44:10 +00001971for ac_hdr in dlfcn.h fcntl.h grp.h limits.h langinfo.h locale.h \
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001972ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00001973signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00001974sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00001975sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwis69532332001-10-13 09:12:41 +00001976sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00001977ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001978do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001979ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001980echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001981echo "configure:1982: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001982if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001983 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001984else
1985 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001986#line 1987 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001987#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001988#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001989EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001990ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001991{ (eval echo configure:1992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001992ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001993if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001994 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001995 eval "ac_cv_header_$ac_safe=yes"
1996else
1997 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001998 echo "configure: failed program was:" >&5
1999 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002000 rm -rf conftest*
2001 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002002fi
2003rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002004fi
2005if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002006 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002007 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002008 cat >> confdefs.h <<EOF
2009#define $ac_tr_hdr 1
2010EOF
2011
2012else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002013 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002014fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002015done
2016
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002017ac_header_dirent=no
2018for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2019do
Guido van Rossumf78abae1997-01-21 22:02:36 +00002020ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002021echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002022echo "configure:2023: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002023if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002024 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002025else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002026 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002027#line 2028 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002028#include "confdefs.h"
2029#include <sys/types.h>
2030#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002031int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002032DIR *dirp = 0;
2033; return 0; }
2034EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002035if { (eval echo configure:2036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002036 rm -rf conftest*
2037 eval "ac_cv_header_dirent_$ac_safe=yes"
2038else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002039 echo "configure: failed program was:" >&5
2040 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002041 rm -rf conftest*
2042 eval "ac_cv_header_dirent_$ac_safe=no"
2043fi
2044rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002045fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002046if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002047 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002048 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002049 cat >> confdefs.h <<EOF
2050#define $ac_tr_hdr 1
2051EOF
2052 ac_header_dirent=$ac_hdr; break
2053else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002054 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002055fi
2056done
2057# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2058if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002059echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002060echo "configure:2061: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002061ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002062if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002063 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002064else
2065 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002066LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002067cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002068#line 2069 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002069#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002070/* Override any gcc2 internal prototype to avoid an error. */
2071/* We use char because int might match the return type of a gcc2
2072 builtin and then its argument prototype would still apply. */
2073char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002074
Guido van Rossumf78abae1997-01-21 22:02:36 +00002075int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002076opendir()
2077; return 0; }
2078EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002079if { (eval echo configure:2080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002080 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002081 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002082else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002083 echo "configure: failed program was:" >&5
2084 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002085 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002086 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002087fi
2088rm -f conftest*
2089LIBS="$ac_save_LIBS"
2090
2091fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002092if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002093 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002094 LIBS="$LIBS -ldir"
2095else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002096 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002097fi
2098
2099else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002100echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002101echo "configure:2102: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002102ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002103if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002104 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002105else
2106 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002107LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002108cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002109#line 2110 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002110#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002111/* Override any gcc2 internal prototype to avoid an error. */
2112/* We use char because int might match the return type of a gcc2
2113 builtin and then its argument prototype would still apply. */
2114char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002115
Guido van Rossumf78abae1997-01-21 22:02:36 +00002116int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002117opendir()
2118; return 0; }
2119EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002120if { (eval echo configure:2121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002121 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002122 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002123else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002124 echo "configure: failed program was:" >&5
2125 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002126 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002127 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002128fi
2129rm -f conftest*
2130LIBS="$ac_save_LIBS"
2131
2132fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002133if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002134 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002135 LIBS="$LIBS -lx"
2136else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002137 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002138fi
2139
2140fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002141
2142
2143# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00002144was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002145echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002146echo "configure:2147: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002147cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002148#line 2149 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002149#include "confdefs.h"
2150#include <time.h>
2151EOF
2152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2153 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002154 rm -rf conftest*
2155 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002156else
2157 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002158 cat >> confdefs.h <<\EOF
2159#define clock_t long
2160EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002161
2162fi
2163rm -f conftest*
2164
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002165echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002166
Guido van Rossum810cc512001-09-09 23:51:39 +00002167# Two defines needed to enable largefile support on various platforms
2168# These may affect some typedefs
2169cat >> confdefs.h <<\EOF
2170#define _LARGEFILE_SOURCE 1
2171EOF
2172
2173cat >> confdefs.h <<\EOF
2174#define _FILE_OFFSET_BITS 64
2175EOF
2176
2177
Guido van Rossum84e7b241996-08-19 21:59:00 +00002178# Add some code to confdefs.h so that the test for off_t works on SCO
2179cat >> confdefs.h <<\EOF
2180#if defined(SCO_DS)
2181#undef _OFF_T
2182#endif
2183EOF
2184
Guido van Rossumef2255b2000-03-10 22:30:29 +00002185# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002186echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002187echo "configure:2188: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002188if eval "test \"`echo '$''{'ac_cv_type_mode_t'+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öwisb7da67a2001-10-18 15:35:38 +00002192#line 2193 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002193#include "confdefs.h"
2194#include <sys/types.h>
2195#if STDC_HEADERS
2196#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002197#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002198#endif
2199EOF
2200if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002201 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 +00002202 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002203 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002204else
2205 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002206 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002207fi
2208rm -f conftest*
2209
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002210fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002211echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2212if test $ac_cv_type_mode_t = no; then
2213 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002214#define mode_t int
2215EOF
2216
2217fi
2218
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002219echo $ac_n "checking for off_t""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002220echo "configure:2221: checking for off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002221if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002222 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002223else
2224 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002225#line 2226 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002226#include "confdefs.h"
2227#include <sys/types.h>
2228#if STDC_HEADERS
2229#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002230#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002231#endif
2232EOF
2233if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002234 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 +00002235 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002236 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002237else
2238 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002239 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002240fi
2241rm -f conftest*
2242
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002243fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002244echo "$ac_t""$ac_cv_type_off_t" 1>&6
2245if test $ac_cv_type_off_t = no; then
2246 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002247#define off_t long
2248EOF
2249
2250fi
2251
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002252echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002253echo "configure:2254: checking for pid_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002254if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002255 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002256else
2257 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002258#line 2259 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002259#include "confdefs.h"
2260#include <sys/types.h>
2261#if STDC_HEADERS
2262#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002263#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002264#endif
2265EOF
2266if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002267 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 +00002268 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002269 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002270else
2271 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002272 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002273fi
2274rm -f conftest*
2275
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002276fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002277echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2278if test $ac_cv_type_pid_t = no; then
2279 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002280#define pid_t int
2281EOF
2282
2283fi
2284
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002285echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002286echo "configure:2287: checking return type of signal handlers" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002287if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002288 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002289else
2290 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002291#line 2292 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002292#include "confdefs.h"
2293#include <sys/types.h>
2294#include <signal.h>
2295#ifdef signal
2296#undef signal
2297#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002298#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002299extern "C" void (*signal (int, void (*)(int)))(int);
2300#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002301void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002302#endif
2303
Guido van Rossumf78abae1997-01-21 22:02:36 +00002304int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002305int i;
2306; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002307EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002308if { (eval echo configure:2309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002309 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002310 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002311else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002312 echo "configure: failed program was:" >&5
2313 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002314 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002315 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002316fi
2317rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002318fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002319
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002320echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002321cat >> confdefs.h <<EOF
2322#define RETSIGTYPE $ac_cv_type_signal
2323EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002324
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002325
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002326echo $ac_n "checking for size_t""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002327echo "configure:2328: checking for size_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002328if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002329 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002330else
2331 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002332#line 2333 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002333#include "confdefs.h"
2334#include <sys/types.h>
2335#if STDC_HEADERS
2336#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002337#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002338#endif
2339EOF
2340if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002341 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 +00002342 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002343 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002344else
2345 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002346 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002347fi
2348rm -f conftest*
2349
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002350fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002351echo "$ac_t""$ac_cv_type_size_t" 1>&6
2352if test $ac_cv_type_size_t = no; then
2353 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002354#define size_t unsigned
2355EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002356
2357fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002358
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002359echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002360echo "configure:2361: checking for uid_t in sys/types.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002361if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002362 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002363else
2364 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002365#line 2366 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002366#include "confdefs.h"
2367#include <sys/types.h>
2368EOF
2369if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2370 egrep "uid_t" >/dev/null 2>&1; then
2371 rm -rf conftest*
2372 ac_cv_type_uid_t=yes
2373else
2374 rm -rf conftest*
2375 ac_cv_type_uid_t=no
2376fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002377rm -f conftest*
2378
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002379fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002380
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002381echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002382if test $ac_cv_type_uid_t = no; then
2383 cat >> confdefs.h <<\EOF
2384#define uid_t int
2385EOF
2386
2387 cat >> confdefs.h <<\EOF
2388#define gid_t int
2389EOF
2390
2391fi
2392
Guido van Rossum627b2d71993-12-24 10:39:16 +00002393
Guido van Rossumef2255b2000-03-10 22:30:29 +00002394# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002395echo $ac_n "checking size of int""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002396echo "configure:2397: checking size of int" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002397if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002398 echo $ac_n "(cached) $ac_c" 1>&6
2399else
2400 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002401 ac_cv_sizeof_int=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002402else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002403 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002404#line 2405 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002405#include "confdefs.h"
2406#include <stdio.h>
2407main()
2408{
2409 FILE *f=fopen("conftestval", "w");
2410 if (!f) exit(1);
2411 fprintf(f, "%d\n", sizeof(int));
2412 exit(0);
2413}
2414EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002415if { (eval echo configure:2416: \"$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 +00002416then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002417 ac_cv_sizeof_int=`cat conftestval`
2418else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002419 echo "configure: failed program was:" >&5
2420 cat conftest.$ac_ext >&5
2421 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002422 ac_cv_sizeof_int=0
2423fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002424rm -fr conftest*
2425fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002426
2427fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002428echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2429cat >> confdefs.h <<EOF
2430#define SIZEOF_INT $ac_cv_sizeof_int
2431EOF
2432
2433
2434echo $ac_n "checking size of long""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002435echo "configure:2436: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002436if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002437 echo $ac_n "(cached) $ac_c" 1>&6
2438else
2439 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002440 ac_cv_sizeof_long=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002441else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002442 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002443#line 2444 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002444#include "confdefs.h"
2445#include <stdio.h>
2446main()
2447{
2448 FILE *f=fopen("conftestval", "w");
2449 if (!f) exit(1);
2450 fprintf(f, "%d\n", sizeof(long));
2451 exit(0);
2452}
2453EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002454if { (eval echo configure:2455: \"$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 +00002455then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002456 ac_cv_sizeof_long=`cat conftestval`
2457else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002458 echo "configure: failed program was:" >&5
2459 cat conftest.$ac_ext >&5
2460 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002461 ac_cv_sizeof_long=0
2462fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002463rm -fr conftest*
2464fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002465
2466fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002467echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2468cat >> confdefs.h <<EOF
2469#define SIZEOF_LONG $ac_cv_sizeof_long
2470EOF
2471
2472
Guido van Rossumad678af1998-10-02 14:42:15 +00002473echo $ac_n "checking size of void *""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002474echo "configure:2475: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002475if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002476 echo $ac_n "(cached) $ac_c" 1>&6
2477else
2478 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002479 ac_cv_sizeof_void_p=4
Guido van Rossumad678af1998-10-02 14:42:15 +00002480else
2481 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002482#line 2483 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002483#include "confdefs.h"
2484#include <stdio.h>
2485main()
2486{
2487 FILE *f=fopen("conftestval", "w");
2488 if (!f) exit(1);
2489 fprintf(f, "%d\n", sizeof(void *));
2490 exit(0);
2491}
2492EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002493if { (eval echo configure:2494: \"$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 +00002494then
2495 ac_cv_sizeof_void_p=`cat conftestval`
2496else
2497 echo "configure: failed program was:" >&5
2498 cat conftest.$ac_ext >&5
2499 rm -fr conftest*
2500 ac_cv_sizeof_void_p=0
2501fi
2502rm -fr conftest*
2503fi
2504
2505fi
2506echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2507cat >> confdefs.h <<EOF
2508#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2509EOF
2510
2511
Guido van Rossumef2255b2000-03-10 22:30:29 +00002512echo $ac_n "checking size of char""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002513echo "configure:2514: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002514if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002515 echo $ac_n "(cached) $ac_c" 1>&6
2516else
2517 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002518 ac_cv_sizeof_char=1
Guido van Rossumef2255b2000-03-10 22:30:29 +00002519else
2520 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002521#line 2522 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002522#include "confdefs.h"
2523#include <stdio.h>
2524main()
2525{
2526 FILE *f=fopen("conftestval", "w");
2527 if (!f) exit(1);
2528 fprintf(f, "%d\n", sizeof(char));
2529 exit(0);
2530}
2531EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002532if { (eval echo configure:2533: \"$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 +00002533then
2534 ac_cv_sizeof_char=`cat conftestval`
2535else
2536 echo "configure: failed program was:" >&5
2537 cat conftest.$ac_ext >&5
2538 rm -fr conftest*
2539 ac_cv_sizeof_char=0
2540fi
2541rm -fr conftest*
2542fi
2543
2544fi
2545echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2546cat >> confdefs.h <<EOF
2547#define SIZEOF_CHAR $ac_cv_sizeof_char
2548EOF
2549
2550
2551echo $ac_n "checking size of short""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002552echo "configure:2553: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002553if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002554 echo $ac_n "(cached) $ac_c" 1>&6
2555else
2556 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002557 ac_cv_sizeof_short=2
Guido van Rossumef2255b2000-03-10 22:30:29 +00002558else
2559 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002560#line 2561 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002561#include "confdefs.h"
2562#include <stdio.h>
2563main()
2564{
2565 FILE *f=fopen("conftestval", "w");
2566 if (!f) exit(1);
2567 fprintf(f, "%d\n", sizeof(short));
2568 exit(0);
2569}
2570EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002571if { (eval echo configure:2572: \"$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 +00002572then
2573 ac_cv_sizeof_short=`cat conftestval`
2574else
2575 echo "configure: failed program was:" >&5
2576 cat conftest.$ac_ext >&5
2577 rm -fr conftest*
2578 ac_cv_sizeof_short=0
2579fi
2580rm -fr conftest*
2581fi
2582
2583fi
2584echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2585cat >> confdefs.h <<EOF
2586#define SIZEOF_SHORT $ac_cv_sizeof_short
2587EOF
2588
2589
2590echo $ac_n "checking size of float""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002591echo "configure:2592: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002592if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002593 echo $ac_n "(cached) $ac_c" 1>&6
2594else
2595 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002596 ac_cv_sizeof_float=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00002597else
2598 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002599#line 2600 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002600#include "confdefs.h"
2601#include <stdio.h>
2602main()
2603{
2604 FILE *f=fopen("conftestval", "w");
2605 if (!f) exit(1);
2606 fprintf(f, "%d\n", sizeof(float));
2607 exit(0);
2608}
2609EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002610if { (eval echo configure:2611: \"$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 +00002611then
2612 ac_cv_sizeof_float=`cat conftestval`
2613else
2614 echo "configure: failed program was:" >&5
2615 cat conftest.$ac_ext >&5
2616 rm -fr conftest*
2617 ac_cv_sizeof_float=0
2618fi
2619rm -fr conftest*
2620fi
2621
2622fi
2623echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2624cat >> confdefs.h <<EOF
2625#define SIZEOF_FLOAT $ac_cv_sizeof_float
2626EOF
2627
2628
2629echo $ac_n "checking size of double""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002630echo "configure:2631: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002631if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002632 echo $ac_n "(cached) $ac_c" 1>&6
2633else
2634 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002635 ac_cv_sizeof_double=8
Guido van Rossumef2255b2000-03-10 22:30:29 +00002636else
2637 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002638#line 2639 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002639#include "confdefs.h"
2640#include <stdio.h>
2641main()
2642{
2643 FILE *f=fopen("conftestval", "w");
2644 if (!f) exit(1);
2645 fprintf(f, "%d\n", sizeof(double));
2646 exit(0);
2647}
2648EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002649if { (eval echo configure:2650: \"$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 +00002650then
2651 ac_cv_sizeof_double=`cat conftestval`
2652else
2653 echo "configure: failed program was:" >&5
2654 cat conftest.$ac_ext >&5
2655 rm -fr conftest*
2656 ac_cv_sizeof_double=0
2657fi
2658rm -fr conftest*
2659fi
2660
2661fi
2662echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2663cat >> confdefs.h <<EOF
2664#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2665EOF
2666
2667
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002668echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002669echo "configure:2670: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002670if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002671 echo $ac_n "(cached) $ac_c" 1>&6
2672else
2673 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002674 ac_cv_sizeof_fpos_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002675else
2676 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002677#line 2678 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002678#include "confdefs.h"
2679#include <stdio.h>
2680main()
2681{
2682 FILE *f=fopen("conftestval", "w");
2683 if (!f) exit(1);
2684 fprintf(f, "%d\n", sizeof(fpos_t));
2685 exit(0);
2686}
2687EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002688if { (eval echo configure:2689: \"$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 +00002689then
2690 ac_cv_sizeof_fpos_t=`cat conftestval`
2691else
2692 echo "configure: failed program was:" >&5
2693 cat conftest.$ac_ext >&5
2694 rm -fr conftest*
2695 ac_cv_sizeof_fpos_t=0
2696fi
2697rm -fr conftest*
2698fi
2699
2700fi
2701echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2702cat >> confdefs.h <<EOF
2703#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2704EOF
2705
2706
Guido van Rossum0a516c91994-09-12 10:58:40 +00002707
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002708echo $ac_n "checking for long long support""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002709echo "configure:2710: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002710have_long_long=no
2711cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002712#line 2713 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002713#include "confdefs.h"
2714
2715int main() {
2716long long x; x = (long long)0;
2717; return 0; }
2718EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002719if { (eval echo configure:2720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002720 rm -rf conftest*
2721 cat >> confdefs.h <<\EOF
2722#define HAVE_LONG_LONG 1
2723EOF
2724 have_long_long=yes
2725else
2726 echo "configure: failed program was:" >&5
2727 cat conftest.$ac_ext >&5
2728fi
2729rm -f conftest*
2730echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002731if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002732echo $ac_n "checking size of long long""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002733echo "configure:2734: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002734if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002735 echo $ac_n "(cached) $ac_c" 1>&6
2736else
2737 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002738 ac_cv_sizeof_long_long=8
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002739else
2740 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002741#line 2742 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002742#include "confdefs.h"
2743#include <stdio.h>
2744main()
2745{
2746 FILE *f=fopen("conftestval", "w");
2747 if (!f) exit(1);
2748 fprintf(f, "%d\n", sizeof(long long));
2749 exit(0);
2750}
2751EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002752if { (eval echo configure:2753: \"$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 +00002753then
2754 ac_cv_sizeof_long_long=`cat conftestval`
2755else
2756 echo "configure: failed program was:" >&5
2757 cat conftest.$ac_ext >&5
2758 rm -fr conftest*
2759 ac_cv_sizeof_long_long=0
2760fi
2761rm -fr conftest*
2762fi
2763
2764fi
2765echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2766cat >> confdefs.h <<EOF
2767#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2768EOF
2769
2770
2771fi
2772
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002773echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002774echo "configure:2775: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002775have_uintptr_t=no
2776cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002777#line 2778 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002778#include "confdefs.h"
2779
2780int main() {
2781uintptr_t x; x = (uintptr_t)0;
2782; return 0; }
2783EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002784if { (eval echo configure:2785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002785 rm -rf conftest*
2786 cat >> confdefs.h <<\EOF
2787#define HAVE_UINTPTR_T 1
2788EOF
2789 have_uintptr_t=yes
2790else
2791 echo "configure: failed program was:" >&5
2792 cat conftest.$ac_ext >&5
2793fi
2794rm -f conftest*
2795echo "$ac_t""$have_uintptr_t" 1>&6
2796if test "$have_uintptr_t" = yes ; then
2797echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002798echo "configure:2799: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002799if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002800 echo $ac_n "(cached) $ac_c" 1>&6
2801else
2802 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002803 ac_cv_sizeof_uintptr_t=4
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002804else
2805 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002806#line 2807 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002807#include "confdefs.h"
2808#include <stdio.h>
2809main()
2810{
2811 FILE *f=fopen("conftestval", "w");
2812 if (!f) exit(1);
2813 fprintf(f, "%d\n", sizeof(uintptr_t));
2814 exit(0);
2815}
2816EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002817if { (eval echo configure:2818: \"$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 +00002818then
2819 ac_cv_sizeof_uintptr_t=`cat conftestval`
2820else
2821 echo "configure: failed program was:" >&5
2822 cat conftest.$ac_ext >&5
2823 rm -fr conftest*
2824 ac_cv_sizeof_uintptr_t=0
2825fi
2826rm -fr conftest*
2827fi
2828
2829fi
2830echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2831cat >> confdefs.h <<EOF
2832#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2833EOF
2834
2835
2836fi
2837
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002838# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2839echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002840echo "configure:2841: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002841if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002842 echo $ac_n "(cached) $ac_c" 1>&6
2843else
2844 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002845 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002846else
2847 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002848#line 2849 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002849#include "confdefs.h"
2850#include <stdio.h>
2851#include <sys/types.h>
2852main()
2853{
2854 FILE *f=fopen("conftestval", "w");
2855 if (!f) exit(1);
2856 fprintf(f, "%d\n", sizeof(off_t));
2857 exit(0);
2858}
2859EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002860if { (eval echo configure:2861: \"$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 +00002861then
2862 ac_cv_sizeof_off_t=`cat conftestval`
2863else
2864 echo "configure: failed program was:" >&5
2865 cat conftest.$ac_ext >&5
2866 rm -fr conftest*
2867 ac_cv_sizeof_off_t=0
2868fi
2869rm -fr conftest*
2870fi
2871
2872
2873fi
2874
2875echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2876cat >> confdefs.h <<EOF
2877#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2878EOF
2879
2880
2881echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002882echo "configure:2883: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002883if test "$have_long_long" = yes -a \
2884 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2885 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002886 cat >> confdefs.h <<\EOF
2887#define HAVE_LARGEFILE_SUPPORT 1
2888EOF
2889
2890 echo "$ac_t""yes" 1>&6
2891else
2892 echo "$ac_t""no" 1>&6
2893fi
2894
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002895# AC_CHECK_SIZEOF() doesn't include <time.h>.
2896echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002897echo "configure:2898: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002898if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002899 echo $ac_n "(cached) $ac_c" 1>&6
2900else
2901 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002902 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002903else
2904 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002905#line 2906 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002906#include "confdefs.h"
2907#include <stdio.h>
2908#include <time.h>
2909main()
2910{
2911 FILE *f=fopen("conftestval", "w");
2912 if (!f) exit(1);
2913 fprintf(f, "%d\n", sizeof(time_t));
2914 exit(0);
2915}
2916EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002917if { (eval echo configure:2918: \"$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 +00002918then
2919 ac_cv_sizeof_time_t=`cat conftestval`
2920else
2921 echo "configure: failed program was:" >&5
2922 cat conftest.$ac_ext >&5
2923 rm -fr conftest*
2924 ac_cv_sizeof_time_t=0
2925fi
2926rm -fr conftest*
2927fi
2928
2929
2930fi
2931
2932echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2933cat >> confdefs.h <<EOF
2934#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2935EOF
2936
2937
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002938
Trent Mick635f6fb2000-08-23 21:33:05 +00002939# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00002940ac_save_cc="$CC"
2941if test "$ac_cv_kpthread" = "yes"
2942then CC="$CC -Kpthread"
2943fi
Trent Mick635f6fb2000-08-23 21:33:05 +00002944echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002945echo "configure:2946: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002946have_pthread_t=no
2947cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002948#line 2949 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002949#include "confdefs.h"
2950#include <pthread.h>
2951int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002952pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002953; return 0; }
2954EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002955if { (eval echo configure:2956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002956 rm -rf conftest*
2957 have_pthread_t=yes
2958else
2959 echo "configure: failed program was:" >&5
2960 cat conftest.$ac_ext >&5
2961fi
2962rm -f conftest*
2963echo "$ac_t""$have_pthread_t" 1>&6
2964if test "$have_pthread_t" = yes ; then
2965 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2966 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002967echo "configure:2968: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002968 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002969 echo $ac_n "(cached) $ac_c" 1>&6
2970else
2971 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002972 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00002973else
2974 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002975#line 2976 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002976#include "confdefs.h"
2977#include <stdio.h>
2978 #include <pthread.h>
2979 main()
2980 {
2981 FILE *f=fopen("conftestval", "w");
2982 if (!f) exit(1);
2983 fprintf(f, "%d\n", sizeof(pthread_t));
2984 exit(0);
2985 }
2986EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00002987if { (eval echo configure:2988: \"$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 +00002988then
2989 ac_cv_sizeof_pthread_t=`cat conftestval`
2990else
2991 echo "configure: failed program was:" >&5
2992 cat conftest.$ac_ext >&5
2993 rm -fr conftest*
2994 ac_cv_sizeof_pthread_t=0
2995fi
2996rm -fr conftest*
2997fi
2998
2999
3000fi
3001
3002 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
3003 cat >> confdefs.h <<EOF
3004#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
3005EOF
3006
3007fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00003008CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00003009
Jack Jansene578a632001-08-15 01:27:14 +00003010echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003011echo "configure:3012: checking for --enable-toolbox-glue" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003012# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
3013if test "${enable_toolbox_glue+set}" = set; then
3014 enableval="$enable_toolbox_glue"
3015 :
3016fi
3017
3018
3019if test -z "$enable_toolbox_glue"
3020then
3021 case $ac_sys_system/$ac_sys_release in
3022 Darwin/*)
3023 enable_toolbox_glue="yes";;
3024 *)
3025 enable_toolbox_glue="no";;
3026 esac
3027fi
3028case "$enable_toolbox_glue" in
3029yes)
3030 extra_frameworks="-framework Carbon -framework Foundation"
3031 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00003032 extra_undefs="-u __dummy -u _PyMac_Error"
Jack Jansene578a632001-08-15 01:27:14 +00003033 cat >> confdefs.h <<\EOF
3034#define USE_TOOLBOX_OBJECT_GLUE 1
3035EOF
3036
3037 ;;
3038*)
3039 extra_frameworks=""
3040 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00003041 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00003042 ;;
3043esac
3044echo "$ac_t""$enable_toolbox_glue" 1>&6
3045
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003046
3047case $ac_sys_system/$ac_sys_release in
Jack Jansena3891ea2001-09-07 14:25:12 +00003048 Darwin/1.4*)
3049 ns_undef_sym='_environ'
3050 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
3051 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
3052 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3053 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00003054 Darwin/*)
3055 ns_undef_sym='_environ'
Jack Jansene578a632001-08-15 01:27:14 +00003056 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
3057 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
3058 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3059 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003060esac
3061
Jack Jansene578a632001-08-15 01:27:14 +00003062echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003063echo "configure:3064: checking for --enable-framework" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003064if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003065then
Jack Jansenca06bc62001-08-03 15:32:23 +00003066 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003067 # -U __environ is needed since bundles don't have access
3068 # to crt0 when built but will always be linked against it
Jack Jansene578a632001-08-15 01:27:14 +00003069 # -F. is needed to allow linking to the framework while
3070 # in the build location.
3071
Jack Jansena3891ea2001-09-07 14:25:12 +00003072 case $ac_sys_system/$ac_sys_release in
3073 Darwin/1.4*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
3074 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
3075 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003076 cat >> confdefs.h <<\EOF
3077#define WITH_NEXT_FRAMEWORK 1
3078EOF
3079
3080 echo "$ac_t""yes" 1>&6
3081else
3082 echo "$ac_t""no" 1>&6
3083fi
3084
Jack Jansene578a632001-08-15 01:27:14 +00003085echo $ac_n "checking for dyld""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003086echo "configure:3087: checking for dyld" >&5
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003087case $ac_sys_system/$ac_sys_release in
3088 Darwin/*)
3089 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003090#define WITH_DYLD 1
3091EOF
3092
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003093 echo "$ac_t""always on for Darwin" 1>&6
3094 ;;
3095 *)
Jack Jansene578a632001-08-15 01:27:14 +00003096 echo "$ac_t""no" 1>&6
3097 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003098esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003099
Guido van Rossum0a516c91994-09-12 10:58:40 +00003100# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00003101
3102
3103
3104
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003105
Guido van Rossum0a516c91994-09-12 10:58:40 +00003106# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00003107# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003108echo $ac_n "checking SO""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003109echo "configure:3110: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003110if test -z "$SO"
3111then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003112 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003113 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003114 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003115 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003116 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003117fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003118echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003119# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003120# -- "ld" on SunOS 4.x.x, "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003121# (Shared libraries in this instance are shared modules to be loaded into
3122# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003123echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003124echo "configure:3125: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003125if test -z "$LDSHARED"
3126then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003127 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003128 AIX*)
3129 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00003130 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003131 ;;
3132 BeOS*)
3133 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00003134 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003135 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003136 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003137 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003138 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a662000-05-26 12:22:54 +00003139 SunOS/5*)
3140 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003141 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003142 else LDSHARED="$(CC) -G";
Greg Ward57c9a662000-05-26 12:22:54 +00003143 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003144 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003145 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3146 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansena3891ea2001-09-07 14:25:12 +00003147 Darwin/1.4*)
3148 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3149 if test "$enable_framework" ; then
3150 # Link against the framework. All externals should be defined.
3151 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3152 else
3153 # No framework. Ignore undefined symbols, assuming they come from Python
3154 LDSHARED="$LDSHARED -flat_namespace -undefined suppress"
3155 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00003156 Darwin/*)
3157 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3158 if test "$enable_framework" ; then
3159 # Link against the framework. All externals should be defined.
3160 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3161 else
3162 # No framework. Ignore undefined symbols, assuming they come from Python
3163 LDSHARED="$LDSHARED -undefined suppress"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003164 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00003165 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003166 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003167 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003168 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003169 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003170 then
3171 LDSHARED="cc -shared ${LDFLAGS}"
3172 else
3173 LDSHARED="ld -Bshareable ${LDFLAGS}"
3174 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003175 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003176 if test "$GCC" = "yes"
3177 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003178 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003179 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003180 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003181 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003182 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003183 *) LDSHARED="ld";;
3184 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003185fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003186echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003187BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003188# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003189# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003190echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003191echo "configure:3192: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003192if test -z "$CCSHARED"
3193then
Guido van Rossum07397971997-04-29 21:49:50 +00003194 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003195 SunOS*) if test "$GCC" = yes;
3196 then CCSHARED="-fPIC";
3197 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003198 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00003199 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00003200 else CCSHARED="+z";
3201 fi;;
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003202 Linux*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003203 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003204 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003205 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003206 if test "$GCC" = "yes"
3207 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003208 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003209 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003210 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003211 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003212 IRIX*/6*) case $CC in
3213 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003214 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003215 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003216 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003217 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003218fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003219echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003220# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003221# the python executable -- this is only needed for a few systems
3222echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003223echo "configure:3224: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003224if test -z "$LINKFORSHARED"
3225then
Guido van Rossum07397971997-04-29 21:49:50 +00003226 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003227 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003228 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00003229 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003230 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00003231 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003232 # -u libsys_s pulls in all symbols in libsys
Jack Jansene578a632001-08-15 01:27:14 +00003233 Darwin/*)
3234 # -u __dummy makes the linker aware of the objc runtime
3235 # in System.framework; otherwise, __objcInit (referenced in
3236 # crt1.o) gets erroneously defined as common, which breaks dynamic
3237 # loading of any modules which reference it in System.framework.
3238 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
3239 # not used by the core itself but which needs to be in the core so
3240 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00003241 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00003242 if test "$enable_framework"
3243 then
3244 LINKFORSHARED="$LINKFORSHARED -framework Python"
3245 fi
3246 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003247 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003248 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003249 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003250 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003251 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3252 then
3253 LINKFORSHARED="-Wl,--export-dynamic"
3254 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003255 SunOS/5*) case $CC in
3256 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003257 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003258 then
3259 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003260 fi;;
3261 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003262 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003263fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003264echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003265
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003266
3267echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003268echo "configure:3269: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003269if test ! "$LIBRARY" = "$LDLIBRARY"
3270then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003271 case $ac_sys_system in
3272 CYGWIN*)
3273 # Cygwin needs CCSHARED when building extension DLLs
3274 # but not when building the interpreter DLL.
3275 CFLAGSFORSHARED='';;
3276 *)
3277 CFLAGSFORSHARED='$(CCSHARED)'
3278 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003279fi
3280echo "$ac_t""$CFLAGSFORSHARED" 1>&6
3281
Guido van Rossum627b2d71993-12-24 10:39:16 +00003282# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00003283echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003284echo "configure:3285: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003285ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003286if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003287 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003288else
3289 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003290LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003291cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003292#line 3293 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003293#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003294/* Override any gcc2 internal prototype to avoid an error. */
3295/* We use char because int might match the return type of a gcc2
3296 builtin and then its argument prototype would still apply. */
3297char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003298
Guido van Rossumf78abae1997-01-21 22:02:36 +00003299int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003300dlopen()
3301; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003302EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003303if { (eval echo configure:3304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003304 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003305 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003306else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003307 echo "configure: failed program was:" >&5
3308 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003309 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003310 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003311fi
3312rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003313LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003314
Guido van Rossum627b2d71993-12-24 10:39:16 +00003315fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003316if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003317 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003318 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3319 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003320 cat >> confdefs.h <<EOF
3321#define $ac_tr_lib 1
3322EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003323
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003324 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003325
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003326else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003327 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003328fi
3329 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00003330echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003331echo "configure:3332: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003332ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003333if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003334 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003335else
3336 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003337LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003338cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003339#line 3340 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003340#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003341/* Override any gcc2 internal prototype to avoid an error. */
3342/* We use char because int might match the return type of a gcc2
3343 builtin and then its argument prototype would still apply. */
3344char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003345
Guido van Rossumf78abae1997-01-21 22:02:36 +00003346int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003347shl_load()
3348; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003349EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003350if { (eval echo configure:3351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003351 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003352 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003353else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003354 echo "configure: failed program was:" >&5
3355 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003356 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003357 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003358fi
3359rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003360LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003361
Guido van Rossum627b2d71993-12-24 10:39:16 +00003362fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003363if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003364 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003365 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3366 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003367 cat >> confdefs.h <<EOF
3368#define $ac_tr_lib 1
3369EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003370
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003371 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003372
3373else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003374 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003375fi
3376 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003377
3378# checks for system dependent C++ extensions support
3379case "$ac_sys_system" in
3380 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003381echo "configure:3382: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003382 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003383#line 3384 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003384#include "confdefs.h"
3385#include "/usr/lpp/xlC/include/load.h"
3386int main() {
3387loadAndInit("", 0, "")
3388; return 0; }
3389EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003390if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003391 rm -rf conftest*
3392 cat >> confdefs.h <<\EOF
3393#define AIX_GENUINE_CPLUSPLUS 1
3394EOF
3395
3396 echo "$ac_t""yes" 1>&6
3397else
3398 echo "configure: failed program was:" >&5
3399 cat conftest.$ac_ext >&5
3400 rm -rf conftest*
3401 echo "$ac_t""no" 1>&6
3402fi
3403rm -f conftest*;;
3404 *) ;;
3405esac
3406
Guido van Rossum70c7f481998-03-26 18:44:10 +00003407# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3408# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003409# BeOS' sockets are stashed in libnet.
3410case "$ac_sys_system" in
3411IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003412*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003413echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003414echo "configure:3415: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003415ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003416if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003417 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003418else
3419 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003420LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003421cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003422#line 3423 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003423#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003424/* Override any gcc2 internal prototype to avoid an error. */
3425/* We use char because int might match the return type of a gcc2
3426 builtin and then its argument prototype would still apply. */
3427char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003428
Guido van Rossumf78abae1997-01-21 22:02:36 +00003429int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003430t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003431; return 0; }
3432EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003433if { (eval echo configure:3434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003434 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003435 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003436else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003437 echo "configure: failed program was:" >&5
3438 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003439 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003440 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003441fi
3442rm -f conftest*
3443LIBS="$ac_save_LIBS"
3444
3445fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003446if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003447 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003448 LIBS="-lnsl $LIBS"
3449else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003450 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003451fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003452 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003453echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003454echo "configure:3455: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003455ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003456if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003457 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003458else
3459 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003460LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003461cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003462#line 3463 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003463#include "confdefs.h"
3464/* Override any gcc2 internal prototype to avoid an error. */
3465/* We use char because int might match the return type of a gcc2
3466 builtin and then its argument prototype would still apply. */
3467char socket();
3468
3469int main() {
3470socket()
3471; return 0; }
3472EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003473if { (eval echo configure:3474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003474 rm -rf conftest*
3475 eval "ac_cv_lib_$ac_lib_var=yes"
3476else
3477 echo "configure: failed program was:" >&5
3478 cat conftest.$ac_ext >&5
3479 rm -rf conftest*
3480 eval "ac_cv_lib_$ac_lib_var=no"
3481fi
3482rm -f conftest*
3483LIBS="$ac_save_LIBS"
3484
3485fi
3486if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3487 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003488 LIBS="-lsocket $LIBS"
3489else
3490 echo "$ac_t""no" 1>&6
3491fi
3492 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003493;;
3494esac
3495case "$ac_sys_system" in
3496BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003497echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003498echo "configure:3499: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003499ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003500if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003501 echo $ac_n "(cached) $ac_c" 1>&6
3502else
3503 ac_save_LIBS="$LIBS"
3504LIBS="-lnet $LIBS $LIBS"
3505cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003506#line 3507 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003507#include "confdefs.h"
3508/* Override any gcc2 internal prototype to avoid an error. */
3509/* We use char because int might match the return type of a gcc2
3510 builtin and then its argument prototype would still apply. */
3511char socket();
3512
3513int main() {
3514socket()
3515; return 0; }
3516EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003517if { (eval echo configure:3518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003518 rm -rf conftest*
3519 eval "ac_cv_lib_$ac_lib_var=yes"
3520else
3521 echo "configure: failed program was:" >&5
3522 cat conftest.$ac_ext >&5
3523 rm -rf conftest*
3524 eval "ac_cv_lib_$ac_lib_var=no"
3525fi
3526rm -f conftest*
3527LIBS="$ac_save_LIBS"
3528
3529fi
3530if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3531 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003532 LIBS="-lnet $LIBS"
3533else
3534 echo "$ac_t""no" 1>&6
3535fi
3536 # BeOS
3537;;
3538esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003539
Guido van Rossuma68acba1996-07-31 17:36:39 +00003540echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003541echo "configure:3542: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003542# Check whether --with-libs or --without-libs was given.
3543if test "${with_libs+set}" = set; then
3544 withval="$with_libs"
3545
3546echo "$ac_t""$withval" 1>&6
3547LIBS="$withval $LIBS"
3548
3549else
3550 echo "$ac_t""no" 1>&6
3551fi
3552
Guido van Rossum7f43da71994-08-01 12:15:30 +00003553
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003554# Determine if signalmodule should be used.
3555
3556
3557echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003558echo "configure:3559: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003559# Check whether --with-signal-module or --without-signal-module was given.
3560if test "${with_signal_module+set}" = set; then
3561 withval="$with_signal_module"
3562 :
3563fi
3564
3565
3566if test -z "$with_signal_module"
3567then with_signal_module="yes"
3568fi
3569echo "$ac_t""$with_signal_module" 1>&6
3570
3571if test "${with_signal_module}" = "yes"; then
3572 USE_SIGNAL_MODULE=""
3573 SIGNAL_OBJS=""
3574else
3575 USE_SIGNAL_MODULE="#"
3576 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3577fi
3578
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003579# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003580
Barry Warsawc0d24d82000-06-29 16:12:00 +00003581USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003582
Guido van Rossumec2f0731997-01-22 20:54:01 +00003583echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003584echo "configure:3585: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003585
3586# Check whether --with-dec-threads or --without-dec-threads was given.
3587if test "${with_dec_threads+set}" = set; then
3588 withval="$with_dec_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003589
3590echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003591LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003592if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003593 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003594fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003595else
3596 echo "$ac_t""no" 1>&6
3597fi
3598
3599
3600echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003601echo "configure:3602: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003602# Check whether --with-threads or --without-threads was given.
3603if test "${with_threads+set}" = set; then
3604 withval="$with_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003605 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003606fi
3607
3608
Barry Warsawc0d24d82000-06-29 16:12:00 +00003609# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003610# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003611if test "${with_thread+set}" = set; then
3612 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003613
3614with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003615fi
Barry Warsawc0d24d82000-06-29 16:12:00 +00003616
3617
3618if test -z "$with_threads"
3619then with_threads="yes"
3620fi
3621echo "$ac_t""$with_threads" 1>&6
3622
3623if test "$with_threads" = "no"
3624then
3625 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003626elif test "$ac_cv_pthread_is_default" = yes
3627then
3628 cat >> confdefs.h <<\EOF
3629#define WITH_THREAD 1
3630EOF
3631
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003632 # Defining _REENTRANT on system with POSIX threads should not hurt.
3633 cat >> confdefs.h <<\EOF
3634#define _REENTRANT 1
3635EOF
3636
3637 posix_threads=yes
3638 LIBOBJS="$LIBOBJS thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003639elif test "$ac_cv_kpthread" = "yes"
3640then
3641 CC="$CC -Kpthread"
3642 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003643#define WITH_THREAD 1
3644EOF
3645
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003646 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003647 LIBOBJS="$LIBOBJS thread.o"
3648else
3649 if test ! -z "$with_threads" -a -d "$with_threads"
3650 then LDFLAGS="$LDFLAGS -L$with_threads"
3651 fi
3652 if test ! -z "$withval" -a -d "$withval"
3653 then LDFLAGS="$LDFLAGS -L$withval"
3654 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003655
3656 # According to the POSIX spec, a pthreads implementation must
3657 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
3658 echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003659echo "configure:3660: checking for _POSIX_THREADS in unistd.h" >&5
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003660 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003661#line 3662 "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003662#include "confdefs.h"
3663#include <unistd.h>
3664 #ifdef _POSIX_THREADS
3665 yes
3666 #endif
3667
3668EOF
3669if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3670 egrep "yes" >/dev/null 2>&1; then
3671 rm -rf conftest*
3672 unistd_defines_pthreads=yes
3673else
3674 rm -rf conftest*
3675 unistd_defines_pthreads=no
3676fi
3677rm -f conftest*
3678
3679 echo "$ac_t""$unistd_defines_pthreads" 1>&6
3680
Martin v. Löwis130fb172001-07-19 11:00:41 +00003681 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003682#define _REENTRANT 1
3683EOF
3684
Martin v. Löwis130fb172001-07-19 11:00:41 +00003685 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003686echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003687echo "configure:3688: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003688if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003689 echo $ac_n "(cached) $ac_c" 1>&6
3690else
3691 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003692#line 3693 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003693#include "confdefs.h"
3694#include <mach/cthreads.h>
3695EOF
3696ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003697{ (eval echo configure:3698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003698ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003699if test -z "$ac_err"; then
3700 rm -rf conftest*
3701 eval "ac_cv_header_$ac_safe=yes"
3702else
3703 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003704 echo "configure: failed program was:" >&5
3705 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003706 rm -rf conftest*
3707 eval "ac_cv_header_$ac_safe=no"
3708fi
3709rm -f conftest*
3710fi
3711if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3712 echo "$ac_t""yes" 1>&6
3713 cat >> confdefs.h <<\EOF
3714#define WITH_THREAD 1
3715EOF
3716
Martin v. Löwis130fb172001-07-19 11:00:41 +00003717 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003718#define C_THREADS 1
3719EOF
3720
Martin v. Löwis130fb172001-07-19 11:00:41 +00003721 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003722else
3723 echo "$ac_t""no" 1>&6
3724
Martin v. Löwis130fb172001-07-19 11:00:41 +00003725 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003726echo "configure:3727: checking for --with-pth" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00003727 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003728if test "${with_pth+set}" = set; then
3729 withval="$with_pth"
3730
Martin v. Löwis130fb172001-07-19 11:00:41 +00003731 echo "$ac_t""$withval" 1>&6
3732 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003733#define WITH_THREAD 1
3734EOF
3735
Martin v. Löwis130fb172001-07-19 11:00:41 +00003736 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003737#define HAVE_PTH 1
3738EOF
3739
Martin v. Löwis130fb172001-07-19 11:00:41 +00003740 LIBS="-lpth $LIBS"
3741 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003742else
3743
Martin v. Löwis130fb172001-07-19 11:00:41 +00003744 echo "$ac_t""no" 1>&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003745
3746 # Just looking for pthread_create in libpthread is not enough:
3747 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
3748 # So we really have to include pthread.h, and then link.
3749 _libs=$LIBS
3750 LIBS="$LIBS -lpthread"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003751 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003752echo "configure:3753: checking for pthread_create in -lpthread" >&5
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003753 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003754#line 3755 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003755#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003756#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00003757
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003758void * start_routine (void *arg) { exit (0); }
Guido van Rossum02a1c402000-02-25 19:26:31 +00003759int main() {
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003760
3761pthread_create (NULL, NULL, start_routine, NULL)
Guido van Rossum02a1c402000-02-25 19:26:31 +00003762; return 0; }
3763EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003764if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003765 rm -rf conftest*
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003766
3767 echo "$ac_t""yes" 1>&6
3768 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003769#define WITH_THREAD 1
3770EOF
3771
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003772 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003773 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003774else
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003775 echo "configure: failed program was:" >&5
3776 cat conftest.$ac_ext >&5
3777 rm -rf conftest*
3778
3779 LIBS=$_libs
Martin v. Löwis130fb172001-07-19 11:00:41 +00003780 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003781echo "configure:3782: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003782if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003783 echo $ac_n "(cached) $ac_c" 1>&6
3784else
3785 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003786#line 3787 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003787#include "confdefs.h"
3788/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003789 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003790#include <assert.h>
3791/* Override any gcc2 internal prototype to avoid an error. */
3792/* We use char because int might match the return type of a gcc2
3793 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003794char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003795
3796int main() {
3797
3798/* The GNU C library defines this for functions which it implements
3799 to always fail with ENOSYS. Some functions are actually named
3800 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003801#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003802choke me
3803#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003804pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003805#endif
3806
3807; return 0; }
3808EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003809if { (eval echo configure:3810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003810 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003811 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003812else
3813 echo "configure: failed program was:" >&5
3814 cat conftest.$ac_ext >&5
3815 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003816 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003817fi
3818rm -f conftest*
3819fi
3820
Guido van Rossumea516321998-12-17 18:08:55 +00003821if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003822 echo "$ac_t""yes" 1>&6
3823 cat >> confdefs.h <<\EOF
3824#define WITH_THREAD 1
3825EOF
3826
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003827 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003828 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003829else
3830 echo "$ac_t""no" 1>&6
3831
Martin v. Löwis130fb172001-07-19 11:00:41 +00003832 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003833echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003834echo "configure:3835: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003835if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003836 echo $ac_n "(cached) $ac_c" 1>&6
3837else
3838 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003839#line 3840 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003840#include "confdefs.h"
3841#include <kernel/OS.h>
3842EOF
3843ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003844{ (eval echo configure:3845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003845ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003846if test -z "$ac_err"; then
3847 rm -rf conftest*
3848 eval "ac_cv_header_$ac_safe=yes"
3849else
3850 echo "$ac_err" >&5
3851 echo "configure: failed program was:" >&5
3852 cat conftest.$ac_ext >&5
3853 rm -rf conftest*
3854 eval "ac_cv_header_$ac_safe=no"
3855fi
3856rm -f conftest*
3857fi
3858if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3859 echo "$ac_t""yes" 1>&6
3860 cat >> confdefs.h <<\EOF
3861#define WITH_THREAD 1
3862EOF
3863
Martin v. Löwis130fb172001-07-19 11:00:41 +00003864 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003865#define BEOS_THREADS 1
3866EOF
3867
Martin v. Löwis130fb172001-07-19 11:00:41 +00003868 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003869else
3870 echo "$ac_t""no" 1>&6
3871
Martin v. Löwis130fb172001-07-19 11:00:41 +00003872 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003873echo "configure:3874: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003874ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003875if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003876 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003877else
3878 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003879LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003880cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003881#line 3882 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003882#include "confdefs.h"
3883/* Override any gcc2 internal prototype to avoid an error. */
3884/* We use char because int might match the return type of a gcc2
3885 builtin and then its argument prototype would still apply. */
3886char pthread_create();
3887
3888int main() {
3889pthread_create()
3890; return 0; }
3891EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003892if { (eval echo configure:3893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003893 rm -rf conftest*
3894 eval "ac_cv_lib_$ac_lib_var=yes"
3895else
3896 echo "configure: failed program was:" >&5
3897 cat conftest.$ac_ext >&5
3898 rm -rf conftest*
3899 eval "ac_cv_lib_$ac_lib_var=no"
3900fi
3901rm -f conftest*
3902LIBS="$ac_save_LIBS"
3903
3904fi
3905if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3906 echo "$ac_t""yes" 1>&6
3907 cat >> confdefs.h <<\EOF
3908#define WITH_THREAD 1
3909EOF
3910
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003911 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003912 LIBS="$LIBS -lpthreads"
3913 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003914else
3915 echo "$ac_t""no" 1>&6
3916
Martin v. Löwis130fb172001-07-19 11:00:41 +00003917 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003918echo "configure:3919: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003919ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003920if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003921 echo $ac_n "(cached) $ac_c" 1>&6
3922else
3923 ac_save_LIBS="$LIBS"
3924LIBS="-lc_r $LIBS"
3925cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003926#line 3927 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003927#include "confdefs.h"
3928/* Override any gcc2 internal prototype to avoid an error. */
3929/* We use char because int might match the return type of a gcc2
3930 builtin and then its argument prototype would still apply. */
3931char pthread_create();
3932
3933int main() {
3934pthread_create()
3935; return 0; }
3936EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003937if { (eval echo configure:3938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003938 rm -rf conftest*
3939 eval "ac_cv_lib_$ac_lib_var=yes"
3940else
3941 echo "configure: failed program was:" >&5
3942 cat conftest.$ac_ext >&5
3943 rm -rf conftest*
3944 eval "ac_cv_lib_$ac_lib_var=no"
3945fi
3946rm -f conftest*
3947LIBS="$ac_save_LIBS"
3948
3949fi
3950if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3951 echo "$ac_t""yes" 1>&6
3952 cat >> confdefs.h <<\EOF
3953#define WITH_THREAD 1
3954EOF
3955
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003956 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003957 LIBS="$LIBS -lc_r"
3958 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003959else
3960 echo "$ac_t""no" 1>&6
3961
Martin v. Löwis130fb172001-07-19 11:00:41 +00003962 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003963echo "configure:3964: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003964ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003965if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003966 echo $ac_n "(cached) $ac_c" 1>&6
3967else
3968 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003969LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003970cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003971#line 3972 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003972#include "confdefs.h"
3973/* Override any gcc2 internal prototype to avoid an error. */
3974/* We use char because int might match the return type of a gcc2
3975 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003976char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003977
3978int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003979__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003980; return 0; }
3981EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003982if { (eval echo configure:3983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003983 rm -rf conftest*
3984 eval "ac_cv_lib_$ac_lib_var=yes"
3985else
3986 echo "configure: failed program was:" >&5
3987 cat conftest.$ac_ext >&5
3988 rm -rf conftest*
3989 eval "ac_cv_lib_$ac_lib_var=no"
3990fi
3991rm -f conftest*
3992LIBS="$ac_save_LIBS"
3993
3994fi
3995if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3996 echo "$ac_t""yes" 1>&6
3997 cat >> confdefs.h <<\EOF
3998#define WITH_THREAD 1
3999EOF
4000
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004001 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004002 LIBS="$LIBS -lthread"
4003 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00004004else
4005 echo "$ac_t""no" 1>&6
4006
Martin v. Löwis130fb172001-07-19 11:00:41 +00004007 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004008echo "configure:4009: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004009ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
4010if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4011 echo $ac_n "(cached) $ac_c" 1>&6
4012else
4013 ac_save_LIBS="$LIBS"
4014LIBS="-lpthread $LIBS"
4015cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004016#line 4017 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004017#include "confdefs.h"
4018/* Override any gcc2 internal prototype to avoid an error. */
4019/* We use char because int might match the return type of a gcc2
4020 builtin and then its argument prototype would still apply. */
4021char __pthread_create_system();
4022
4023int main() {
4024__pthread_create_system()
4025; return 0; }
4026EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004027if { (eval echo configure:4028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004028 rm -rf conftest*
4029 eval "ac_cv_lib_$ac_lib_var=yes"
4030else
4031 echo "configure: failed program was:" >&5
4032 cat conftest.$ac_ext >&5
4033 rm -rf conftest*
4034 eval "ac_cv_lib_$ac_lib_var=no"
4035fi
4036rm -f conftest*
4037LIBS="$ac_save_LIBS"
4038
4039fi
4040if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4041 echo "$ac_t""yes" 1>&6
4042 cat >> confdefs.h <<\EOF
4043#define WITH_THREAD 1
4044EOF
4045
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004046 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004047 LIBS="$LIBS -lpthread"
4048 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004049else
4050 echo "$ac_t""no" 1>&6
4051
Martin v. Löwis130fb172001-07-19 11:00:41 +00004052 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004053echo "configure:4054: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00004054ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004055if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00004056 echo $ac_n "(cached) $ac_c" 1>&6
4057else
4058 ac_save_LIBS="$LIBS"
4059LIBS="-lcma $LIBS"
4060cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004061#line 4062 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004062#include "confdefs.h"
4063/* Override any gcc2 internal prototype to avoid an error. */
4064/* We use char because int might match the return type of a gcc2
4065 builtin and then its argument prototype would still apply. */
4066char pthread_create();
4067
4068int main() {
4069pthread_create()
4070; return 0; }
4071EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004072if { (eval echo configure:4073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00004073 rm -rf conftest*
4074 eval "ac_cv_lib_$ac_lib_var=yes"
4075else
4076 echo "configure: failed program was:" >&5
4077 cat conftest.$ac_ext >&5
4078 rm -rf conftest*
4079 eval "ac_cv_lib_$ac_lib_var=no"
4080fi
4081rm -f conftest*
4082LIBS="$ac_save_LIBS"
4083
4084fi
4085if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4086 echo "$ac_t""yes" 1>&6
4087 cat >> confdefs.h <<\EOF
4088#define WITH_THREAD 1
4089EOF
4090
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004091 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004092 LIBS="$LIBS -lcma"
4093 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004094else
4095 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00004096
Martin v. Löwis130fb172001-07-19 11:00:41 +00004097 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00004098fi
4099
Martin v. Löwis130fb172001-07-19 11:00:41 +00004100
Guido van Rossum627b2d71993-12-24 10:39:16 +00004101fi
4102
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004103fi
4104
Guido van Rossum0be3e491997-05-22 20:33:33 +00004105fi
4106
Guido van Rossum49545951997-12-02 19:28:29 +00004107fi
4108
Guido van Rossumb93a8621998-05-07 13:27:32 +00004109fi
4110
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004111fi
4112
Guido van Rossumad678af1998-10-02 14:42:15 +00004113fi
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00004114rm -f conftest*
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004115fi
4116
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004117fi
4118
Guido van Rossum0be3e491997-05-22 20:33:33 +00004119
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004120 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004121 if test "$unistd_defines_pthreads" = "no"; then
4122 cat >> confdefs.h <<\EOF
4123#define _POSIX_THREADS 1
4124EOF
4125
4126 fi
4127
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004128 echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004129echo "configure:4130: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004130 if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then
4131 echo $ac_n "(cached) $ac_c" 1>&6
4132else
4133 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004134 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004135else
4136 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004137#line 4138 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004138#include "confdefs.h"
4139#include <pthread.h>
4140 void *foo(void *parm) {
4141 return NULL;
4142 }
4143 main() {
4144 pthread_attr_t attr;
4145 if (pthread_attr_init(&attr)) exit(-1);
4146 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
4147 if (pthread_create(NULL, &attr, foo, NULL)) exit(-1);
4148 exit(0);
4149 }
4150EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004151if { (eval echo configure:4152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004152then
4153 ac_cv_pthread_system_supported=yes
4154else
4155 echo "configure: failed program was:" >&5
4156 cat conftest.$ac_ext >&5
4157 rm -fr conftest*
4158 ac_cv_pthread_system_supported=no
4159fi
4160rm -fr conftest*
4161fi
4162
4163
4164fi
4165
4166 echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6
4167 if test "$ac_cv_pthread_system_supported" = "yes"; then
4168 cat >> confdefs.h <<\EOF
4169#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
4170EOF
4171
4172 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004173 for ac_func in pthread_sigmask
4174do
4175echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004176echo "configure:4177: checking for $ac_func" >&5
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004177if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4178 echo $ac_n "(cached) $ac_c" 1>&6
4179else
4180 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004181#line 4182 "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004182#include "confdefs.h"
4183/* System header to define __stub macros and hopefully few prototypes,
4184 which can conflict with char $ac_func(); below. */
4185#include <assert.h>
4186/* Override any gcc2 internal prototype to avoid an error. */
4187/* We use char because int might match the return type of a gcc2
4188 builtin and then its argument prototype would still apply. */
4189char $ac_func();
4190
4191int main() {
4192
4193/* The GNU C library defines this for functions which it implements
4194 to always fail with ENOSYS. Some functions are actually named
4195 something starting with __ and the normal name is an alias. */
4196#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4197choke me
4198#else
4199$ac_func();
4200#endif
4201
4202; return 0; }
4203EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004204if { (eval echo configure:4205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004205 rm -rf conftest*
4206 eval "ac_cv_func_$ac_func=yes"
4207else
4208 echo "configure: failed program was:" >&5
4209 cat conftest.$ac_ext >&5
4210 rm -rf conftest*
4211 eval "ac_cv_func_$ac_func=no"
4212fi
4213rm -f conftest*
4214fi
4215
4216if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4217 echo "$ac_t""yes" 1>&6
4218 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4219 cat >> confdefs.h <<EOF
4220#define $ac_tr_func 1
4221EOF
4222
4223else
4224 echo "$ac_t""no" 1>&6
4225fi
4226done
4227
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004228 fi
4229
Martin v. Löwis130fb172001-07-19 11:00:41 +00004230 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004231echo "configure:4232: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004232ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004233if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004234 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004235else
4236 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004237LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004238cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004239#line 4240 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004240#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004241/* Override any gcc2 internal prototype to avoid an error. */
4242/* We use char because int might match the return type of a gcc2
4243 builtin and then its argument prototype would still apply. */
4244char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004245
Guido van Rossumf78abae1997-01-21 22:02:36 +00004246int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004247usconfig()
4248; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004249EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004250if { (eval echo configure:4251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004251 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004252 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004253else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004254 echo "configure: failed program was:" >&5
4255 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004257 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004258fi
4259rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004260LIBS="$ac_save_LIBS"
4261
4262fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004263if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004264 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265 cat >> confdefs.h <<\EOF
4266#define WITH_THREAD 1
4267EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004268
Martin v. Löwis130fb172001-07-19 11:00:41 +00004269 LIBS="$LIBS -lmpc"
4270 LIBOBJS="$LIBOBJS thread.o"
4271 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004272else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004273 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004274fi
4275
Martin v. Löwis130fb172001-07-19 11:00:41 +00004276 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004277echo "configure:4278: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004278ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004279if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004280 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004281else
4282 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004283LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004284cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004285#line 4286 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004286#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004287/* Override any gcc2 internal prototype to avoid an error. */
4288/* We use char because int might match the return type of a gcc2
4289 builtin and then its argument prototype would still apply. */
4290char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004291
Guido van Rossumf78abae1997-01-21 22:02:36 +00004292int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004293thr_create()
4294; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004295EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004296if { (eval echo configure:4297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004297 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004298 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004299else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004300 echo "configure: failed program was:" >&5
4301 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004302 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004303 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004304fi
4305rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004306LIBS="$ac_save_LIBS"
4307
4308fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004309if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004310 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004311 cat >> confdefs.h <<\EOF
4312#define WITH_THREAD 1
4313EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004314
Martin v. Löwis130fb172001-07-19 11:00:41 +00004315 LIBS="$LIBS -lthread"
4316 LIBOBJS="$LIBOBJS thread.o"
4317 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004318else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004319 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004320fi
4321
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004322
Martin v. Löwis130fb172001-07-19 11:00:41 +00004323 if test "$USE_THREAD_MODULE" != "#"
4324 then
4325 # If the above checks didn't disable threads, (at least) OSF1
4326 # needs this '-threads' argument during linking.
4327 case $ac_sys_system in
4328 OSF1) LDLAST=-threads;;
4329 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004330 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004331fi
4332
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004333# Check for enable-ipv6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004334echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004335echo "configure:4336: checking if --enable-ipv6 is specified" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004336# Check whether --enable-ipv6 or --disable-ipv6 was given.
4337if test "${enable_ipv6+set}" = set; then
4338 enableval="$enable_ipv6"
4339 case "$enableval" in
4340 no)
4341 echo "$ac_t""no" 1>&6
4342 ipv6=no
4343 ;;
4344 *) echo "$ac_t""yes" 1>&6
4345 cat >> confdefs.h <<\EOF
4346#define ENABLE_IPV6 1
4347EOF
4348
4349 ipv6=yes
4350 ;;
4351 esac
4352else
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004353
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004354 if test "$cross_compiling" = yes; then
4355 echo "$ac_t""no" 1>&6
4356 ipv6=no
4357
4358else
4359 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004360#line 4361 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004361#include "confdefs.h"
4362 /* AF_INET6 available check */
4363#include <sys/types.h>
4364#include <sys/socket.h>
4365main()
4366{
4367 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
4368 exit(1);
4369 else
4370 exit(0);
4371}
4372
4373EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004374if { (eval echo configure:4375: \"$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 +00004375then
4376 echo "$ac_t""yes" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004377 ipv6=yes
4378else
4379 echo "configure: failed program was:" >&5
4380 cat conftest.$ac_ext >&5
4381 rm -fr conftest*
4382 echo "$ac_t""no" 1>&6
4383 ipv6=no
4384fi
4385rm -fr conftest*
4386fi
4387
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004388
4389if test "$ipv6" = "yes"; then
4390 echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004391echo "configure:4392: checking if RFC2553 API is available" >&5
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004392 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004393#line 4394 "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004394#include "confdefs.h"
4395#include <sys/types.h>
4396#include <netinet/in.h>
4397int main() {
4398struct sockaddr_in6 x;
4399x.sin6_scope_id;
4400; return 0; }
4401EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004402if { (eval echo configure:4403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004403 rm -rf conftest*
4404 echo "$ac_t""yes" 1>&6
4405 ipv6=yes
4406else
4407 echo "configure: failed program was:" >&5
4408 cat conftest.$ac_ext >&5
4409 rm -rf conftest*
4410 echo "$ac_t""no" 1>&6
4411 ipv6=no
4412fi
4413rm -f conftest*
4414fi
4415
4416if test "$ipv6" = "yes"; then
4417 cat >> confdefs.h <<\EOF
4418#define ENABLE_IPV6 1
4419EOF
4420
4421fi
4422
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004423fi
4424
4425
4426ipv6type=unknown
4427ipv6lib=none
4428ipv6trylibc=no
4429
4430if test "$ipv6" = "yes"; then
4431 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004432echo "configure:4433: checking ipv6 stack type" >&5
Guido van Rossumb8552162001-09-05 14:58:11 +00004433 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
4434 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004435 case $i in
4436 inria)
4437 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004438#line 4439 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004439#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004440
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004441#include <netinet/in.h>
4442#ifdef IPV6_INRIA_VERSION
4443yes
4444#endif
4445EOF
4446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4447 egrep "yes" >/dev/null 2>&1; then
4448 rm -rf conftest*
4449 ipv6type=$i;
4450 OPT="-DINET6 $OPT"
4451fi
4452rm -f conftest*
4453
4454 ;;
4455 kame)
4456 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004457#line 4458 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004458#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004459
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004460#include <netinet/in.h>
4461#ifdef __KAME__
4462yes
4463#endif
4464EOF
4465if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4466 egrep "yes" >/dev/null 2>&1; then
4467 rm -rf conftest*
4468 ipv6type=$i;
4469 ipv6lib=inet6
4470 ipv6libdir=/usr/local/v6/lib
4471 ipv6trylibc=yes
4472 OPT="-DINET6 $OPT"
4473fi
4474rm -f conftest*
4475
4476 ;;
4477 linux-glibc)
4478 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004479#line 4480 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004480#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004481
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004482#include <features.h>
4483#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
4484yes
4485#endif
4486EOF
4487if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4488 egrep "yes" >/dev/null 2>&1; then
4489 rm -rf conftest*
4490 ipv6type=$i;
4491 ipv6trylibc=yes
4492 OPT="-DINET6 $OPT"
4493fi
4494rm -f conftest*
4495
4496 ;;
4497 linux-inet6)
4498 if test -d /usr/inet6; then
4499 ipv6type=$i
4500 ipv6lib=inet6
4501 ipv6libdir=/usr/inet6/lib
4502 OPT="-DINET6 -I/usr/inet6/include $OPT"
4503 fi
4504 ;;
4505 solaris)
4506 if test -f /etc/netconfig; then
4507 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
4508 ipv6type=$i
4509 ipv6trylibc=yes
4510 OPT="-DINET6 $OPT"
4511 fi
4512 fi
4513 ;;
4514 toshiba)
4515 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004516#line 4517 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004517#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004518
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004519#include <sys/param.h>
4520#ifdef _TOSHIBA_INET6
4521yes
4522#endif
4523EOF
4524if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4525 egrep "yes" >/dev/null 2>&1; then
4526 rm -rf conftest*
4527 ipv6type=$i;
4528 ipv6lib=inet6;
4529 ipv6libdir=/usr/local/v6/lib;
4530 OPT="-DINET6 $OPT"
4531fi
4532rm -f conftest*
4533
4534 ;;
4535 v6d)
4536 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004537#line 4538 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004538#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004539
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004540#include </usr/local/v6/include/sys/v6config.h>
4541#ifdef __V6D__
4542yes
4543#endif
4544EOF
4545if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4546 egrep "yes" >/dev/null 2>&1; then
4547 rm -rf conftest*
4548 ipv6type=$i;
4549 ipv6lib=v6;
4550 ipv6libdir=/usr/local/v6/lib;
4551 OPT="-I/usr/local/v6/include $OPT"
4552fi
4553rm -f conftest*
4554
4555 ;;
4556 zeta)
4557 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004558#line 4559 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004559#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004560
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004561#include <sys/param.h>
4562#ifdef _ZETA_MINAMI_INET6
4563yes
4564#endif
4565EOF
4566if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4567 egrep "yes" >/dev/null 2>&1; then
4568 rm -rf conftest*
4569 ipv6type=$i;
4570 ipv6lib=inet6;
4571 ipv6libdir=/usr/local/v6/lib;
4572 OPT="-DINET6 $OPT"
4573fi
4574rm -f conftest*
4575
4576 ;;
4577 esac
4578 if test "$ipv6type" != "unknown"; then
4579 break
4580 fi
4581 done
4582 echo "$ac_t""$ipv6type" 1>&6
4583fi
4584
4585if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4586 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4587 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4588 echo "using lib$ipv6lib"
4589 else
4590 if test $ipv6trylibc = "yes"; then
4591 echo "using libc"
4592 else
4593 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4594 echo "You need to fetch lib$ipv6lib.a from appropriate"
4595 echo 'ipv6 kit and compile beforehand.'
4596 exit 1
4597 fi
4598 fi
4599fi
4600
Barry Warsawef82cd72000-06-30 16:21:01 +00004601# Check for GC support
Barry Warsawef82cd72000-06-30 16:21:01 +00004602echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004603echo "configure:4604: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004604# Check whether --with-cycle-gc or --without-cycle-gc was given.
4605if test "${with_cycle_gc+set}" = set; then
4606 withval="$with_cycle_gc"
4607 :
4608fi
4609
4610
4611if test -z "$with_cycle_gc"
4612then with_cycle_gc="yes"
4613fi
Neil Schemenauercf229462001-08-29 23:58:47 +00004614if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +00004615then
Barry Warsawef82cd72000-06-30 16:21:01 +00004616 cat >> confdefs.h <<\EOF
4617#define WITH_CYCLE_GC 1
4618EOF
4619
4620fi
4621echo "$ac_t""$with_cycle_gc" 1>&6
4622
Neil Schemenauera35c6882001-02-27 04:45:05 +00004623# Check for Python-specific malloc support
4624echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004625echo "configure:4626: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004626# Check whether --with-pymalloc or --without-pymalloc was given.
4627if test "${with_pymalloc+set}" = set; then
4628 withval="$with_pymalloc"
4629
4630if test "$withval" != no
4631then cat >> confdefs.h <<\EOF
4632#define WITH_PYMALLOC 1
4633EOF
4634 echo "$ac_t""yes" 1>&6
4635else echo "$ac_t""no" 1>&6
4636fi
4637else
4638 echo "$ac_t""no" 1>&6
4639fi
4640
4641
Barry Warsawef82cd72000-06-30 16:21:01 +00004642# Check for --with-wctype-functions
4643echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004644echo "configure:4645: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004645# Check whether --with-wctype-functions or --without-wctype-functions was given.
4646if test "${with_wctype_functions+set}" = set; then
4647 withval="$with_wctype_functions"
4648
4649if test "$withval" != no
4650then cat >> confdefs.h <<\EOF
4651#define WANT_WCTYPE_FUNCTIONS 1
4652EOF
4653 echo "$ac_t""yes" 1>&6
4654else echo "$ac_t""no" 1>&6
4655fi
4656else
4657 echo "$ac_t""no" 1>&6
4658fi
4659
4660
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004661# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004662
Guido van Rossum98935bf2001-09-05 19:13:16 +00004663DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004664
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004665echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004666echo "configure:4667: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004667# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004668if test "${with_sgi_dl+set}" = set; then
4669 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004670
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004671echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004672cat >> confdefs.h <<\EOF
4673#define WITH_SGI_DL 1
4674EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004675
Guido van Rossume97ee181999-12-20 21:27:22 +00004676DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004677dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004678if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004679then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004680else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004681fi
4682DLINCLDIR=${dldir}
4683LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004684else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004685 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004686fi
4687
4688
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004689echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004690echo "configure:4691: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004691# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004692if test "${with_dl_dld+set}" = set; then
4693 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004694
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004695echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004696cat >> confdefs.h <<\EOF
4697#define WITH_DL_DLD 1
4698EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004699
Guido van Rossume97ee181999-12-20 21:27:22 +00004700DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004701dldir=`echo "$withval" | sed 's/,.*//'`
4702dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004703if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004704then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004705else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004706fi
4707DLINCLDIR=${dldir}
4708LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004709else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004710 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004711fi
4712
4713
Guido van Rossume97ee181999-12-20 21:27:22 +00004714# the dlopen() function means we might want to use dynload_shlib.o. some
4715# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004716for ac_func in dlopen
4717do
4718echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004719echo "configure:4720: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004720if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004721 echo $ac_n "(cached) $ac_c" 1>&6
4722else
4723 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004724#line 4725 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004725#include "confdefs.h"
4726/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004727 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004728#include <assert.h>
4729/* Override any gcc2 internal prototype to avoid an error. */
4730/* We use char because int might match the return type of a gcc2
4731 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004732char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004733
4734int main() {
4735
4736/* The GNU C library defines this for functions which it implements
4737 to always fail with ENOSYS. Some functions are actually named
4738 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004739#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004740choke me
4741#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004742$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004743#endif
4744
4745; return 0; }
4746EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004747if { (eval echo configure:4748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004748 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004749 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004750else
4751 echo "configure: failed program was:" >&5
4752 cat conftest.$ac_ext >&5
4753 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004754 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004755fi
4756rm -f conftest*
4757fi
4758
Thomas Wouters3a584202000-08-05 23:28:51 +00004759if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004760 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004761 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4762 cat >> confdefs.h <<EOF
4763#define $ac_tr_func 1
4764EOF
4765
Guido van Rossume97ee181999-12-20 21:27:22 +00004766else
4767 echo "$ac_t""no" 1>&6
4768fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004769done
Guido van Rossume97ee181999-12-20 21:27:22 +00004770
4771
4772# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4773# loading of modules.
4774
4775echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004776echo "configure:4777: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004777if test -z "$DYNLOADFILE"
4778then
4779 case $ac_sys_system/$ac_sys_release in
4780 AIX*) DYNLOADFILE="dynload_aix.o";;
4781 BeOS*) DYNLOADFILE="dynload_beos.o";;
4782 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +00004783 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004784 *)
4785 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4786 # out any dynamic loading
4787 if test "$ac_cv_func_dlopen" = yes
4788 then DYNLOADFILE="dynload_shlib.o"
4789 else DYNLOADFILE="dynload_stub.o"
4790 fi
4791 ;;
4792 esac
4793fi
4794echo "$ac_t""$DYNLOADFILE" 1>&6
4795if test "$DYNLOADFILE" != "dynload_stub.o"
4796then
4797 cat >> confdefs.h <<\EOF
4798#define HAVE_DYNAMIC_LOADING 1
4799EOF
4800
4801fi
4802
Neil Schemenauer4e425612001-06-19 15:44:15 +00004803# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4804
4805
4806echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004807echo "configure:4808: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004808if test -z "$MACHDEP_OBJS"
4809then
Jack Jansene578a632001-08-15 01:27:14 +00004810 MACHDEP_OBJS=$extra_machdep_objs
4811else
4812 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00004813fi
Jack Jansene578a632001-08-15 01:27:14 +00004814echo "$ac_t""MACHDEP_OBJS" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004815
Guido van Rossum627b2d71993-12-24 10:39:16 +00004816# checks for library functions
Martin v. Löwis244edc82001-10-04 22:44:26 +00004817for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004818 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +00004819 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis864e9ff2001-08-04 22:32:03 +00004820 hstrerror inet_pton kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004821 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004822 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +00004823 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00004824 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00004825 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004826 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Woutersc2c12dc2001-07-11 14:45:34 +00004827 truncate uname waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00004828do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004829echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004830echo "configure:4831: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004831if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004832 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004833else
4834 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004835#line 4836 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004836#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004837/* System header to define __stub macros and hopefully few prototypes,
4838 which can conflict with char $ac_func(); below. */
4839#include <assert.h>
4840/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004841/* We use char because int might match the return type of a gcc2
4842 builtin and then its argument prototype would still apply. */
4843char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004844
Guido van Rossumf78abae1997-01-21 22:02:36 +00004845int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004846
Guido van Rossum627b2d71993-12-24 10:39:16 +00004847/* The GNU C library defines this for functions which it implements
4848 to always fail with ENOSYS. Some functions are actually named
4849 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004850#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004851choke me
4852#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004853$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004854#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004855
Guido van Rossum7f43da71994-08-01 12:15:30 +00004856; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004857EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004858if { (eval echo configure:4859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004859 rm -rf conftest*
4860 eval "ac_cv_func_$ac_func=yes"
4861else
4862 echo "configure: failed program was:" >&5
4863 cat conftest.$ac_ext >&5
4864 rm -rf conftest*
4865 eval "ac_cv_func_$ac_func=no"
4866fi
4867rm -f conftest*
4868fi
4869
4870if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4871 echo "$ac_t""yes" 1>&6
4872 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4873 cat >> confdefs.h <<EOF
4874#define $ac_tr_func 1
4875EOF
4876
4877else
4878 echo "$ac_t""no" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004879fi
4880done
4881
4882
4883# check for openpty and forkpty
4884
4885for ac_func in openpty
4886do
4887echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004888echo "configure:4889: checking for $ac_func" >&5
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004889if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4890 echo $ac_n "(cached) $ac_c" 1>&6
4891else
4892 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004893#line 4894 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004894#include "confdefs.h"
4895/* System header to define __stub macros and hopefully few prototypes,
4896 which can conflict with char $ac_func(); below. */
4897#include <assert.h>
4898/* Override any gcc2 internal prototype to avoid an error. */
4899/* We use char because int might match the return type of a gcc2
4900 builtin and then its argument prototype would still apply. */
4901char $ac_func();
4902
4903int main() {
4904
4905/* The GNU C library defines this for functions which it implements
4906 to always fail with ENOSYS. Some functions are actually named
4907 something starting with __ and the normal name is an alias. */
4908#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4909choke me
4910#else
4911$ac_func();
4912#endif
4913
4914; return 0; }
4915EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004916if { (eval echo configure:4917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004917 rm -rf conftest*
4918 eval "ac_cv_func_$ac_func=yes"
4919else
4920 echo "configure: failed program was:" >&5
4921 cat conftest.$ac_ext >&5
4922 rm -rf conftest*
4923 eval "ac_cv_func_$ac_func=no"
4924fi
4925rm -f conftest*
4926fi
4927
4928if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4929 echo "$ac_t""yes" 1>&6
4930 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4931 cat >> confdefs.h <<EOF
4932#define $ac_tr_func 1
4933EOF
4934
4935else
4936 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004937echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004938echo "configure:4939: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004939ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004940if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004941 echo $ac_n "(cached) $ac_c" 1>&6
4942else
4943 ac_save_LIBS="$LIBS"
4944LIBS="-lutil $LIBS"
4945cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004946#line 4947 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004947#include "confdefs.h"
4948/* Override any gcc2 internal prototype to avoid an error. */
4949/* We use char because int might match the return type of a gcc2
4950 builtin and then its argument prototype would still apply. */
4951char openpty();
4952
4953int main() {
4954openpty()
4955; return 0; }
4956EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004957if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004958 rm -rf conftest*
4959 eval "ac_cv_lib_$ac_lib_var=yes"
4960else
4961 echo "configure: failed program was:" >&5
4962 cat conftest.$ac_ext >&5
4963 rm -rf conftest*
4964 eval "ac_cv_lib_$ac_lib_var=no"
4965fi
4966rm -f conftest*
4967LIBS="$ac_save_LIBS"
4968
4969fi
4970if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4971 echo "$ac_t""yes" 1>&6
4972 cat >> confdefs.h <<\EOF
4973#define HAVE_OPENPTY 1
4974EOF
4975 LIBS="$LIBS -lutil"
4976else
4977 echo "$ac_t""no" 1>&6
4978fi
4979
4980fi
4981done
4982
4983for ac_func in forkpty
4984do
4985echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004986echo "configure:4987: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004987if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004988 echo $ac_n "(cached) $ac_c" 1>&6
4989else
4990 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004991#line 4992 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004992#include "confdefs.h"
4993/* System header to define __stub macros and hopefully few prototypes,
4994 which can conflict with char $ac_func(); below. */
4995#include <assert.h>
4996/* Override any gcc2 internal prototype to avoid an error. */
4997/* We use char because int might match the return type of a gcc2
4998 builtin and then its argument prototype would still apply. */
4999char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005000
5001int main() {
5002
5003/* The GNU C library defines this for functions which it implements
5004 to always fail with ENOSYS. Some functions are actually named
5005 something starting with __ and the normal name is an alias. */
5006#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5007choke me
5008#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005009$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005010#endif
5011
5012; return 0; }
5013EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005014if { (eval echo configure:5015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00005015 rm -rf conftest*
5016 eval "ac_cv_func_$ac_func=yes"
5017else
5018 echo "configure: failed program was:" >&5
5019 cat conftest.$ac_ext >&5
5020 rm -rf conftest*
5021 eval "ac_cv_func_$ac_func=no"
5022fi
5023rm -f conftest*
5024fi
5025
5026if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5027 echo "$ac_t""yes" 1>&6
5028 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5029 cat >> confdefs.h <<EOF
5030#define $ac_tr_func 1
5031EOF
5032
5033else
5034 echo "$ac_t""no" 1>&6
5035echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005036echo "configure:5037: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00005037ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005038if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00005039 echo $ac_n "(cached) $ac_c" 1>&6
5040else
5041 ac_save_LIBS="$LIBS"
5042LIBS="-lutil $LIBS"
5043cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005044#line 5045 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005045#include "confdefs.h"
5046/* Override any gcc2 internal prototype to avoid an error. */
5047/* We use char because int might match the return type of a gcc2
5048 builtin and then its argument prototype would still apply. */
5049char forkpty();
5050
5051int main() {
5052forkpty()
5053; return 0; }
5054EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005055if { (eval echo configure:5056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00005056 rm -rf conftest*
5057 eval "ac_cv_lib_$ac_lib_var=yes"
5058else
5059 echo "configure: failed program was:" >&5
5060 cat conftest.$ac_ext >&5
5061 rm -rf conftest*
5062 eval "ac_cv_lib_$ac_lib_var=no"
5063fi
5064rm -f conftest*
5065LIBS="$ac_save_LIBS"
5066
5067fi
5068if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5069 echo "$ac_t""yes" 1>&6
5070 cat >> confdefs.h <<\EOF
5071#define HAVE_FORKPTY 1
5072EOF
5073 LIBS="$LIBS -lutil"
5074else
5075 echo "$ac_t""no" 1>&6
5076fi
5077
5078fi
5079done
5080
5081
5082# check for long file support functions
5083for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
5084do
5085echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005086echo "configure:5087: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005087if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00005088 echo $ac_n "(cached) $ac_c" 1>&6
5089else
5090 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005091#line 5092 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005092#include "confdefs.h"
5093/* System header to define __stub macros and hopefully few prototypes,
5094 which can conflict with char $ac_func(); below. */
5095#include <assert.h>
5096/* Override any gcc2 internal prototype to avoid an error. */
5097/* We use char because int might match the return type of a gcc2
5098 builtin and then its argument prototype would still apply. */
5099char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005100
5101int main() {
5102
5103/* The GNU C library defines this for functions which it implements
5104 to always fail with ENOSYS. Some functions are actually named
5105 something starting with __ and the normal name is an alias. */
5106#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5107choke me
5108#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005109$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005110#endif
5111
5112; return 0; }
5113EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005114if { (eval echo configure:5115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005115 rm -rf conftest*
5116 eval "ac_cv_func_$ac_func=yes"
5117else
5118 echo "configure: failed program was:" >&5
5119 cat conftest.$ac_ext >&5
5120 rm -rf conftest*
5121 eval "ac_cv_func_$ac_func=no"
5122fi
5123rm -f conftest*
5124fi
5125
5126if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5127 echo "$ac_t""yes" 1>&6
5128 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5129 cat >> confdefs.h <<EOF
5130#define $ac_tr_func 1
5131EOF
5132
5133else
5134 echo "$ac_t""no" 1>&6
5135fi
5136done
5137
5138
5139for ac_func in dup2 getcwd strdup strerror memmove
5140do
5141echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005142echo "configure:5143: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005143if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005144 echo $ac_n "(cached) $ac_c" 1>&6
5145else
5146 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005147#line 5148 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005148#include "confdefs.h"
5149/* System header to define __stub macros and hopefully few prototypes,
5150 which can conflict with char $ac_func(); below. */
5151#include <assert.h>
5152/* Override any gcc2 internal prototype to avoid an error. */
5153/* We use char because int might match the return type of a gcc2
5154 builtin and then its argument prototype would still apply. */
5155char $ac_func();
5156
5157int main() {
5158
5159/* The GNU C library defines this for functions which it implements
5160 to always fail with ENOSYS. Some functions are actually named
5161 something starting with __ and the normal name is an alias. */
5162#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5163choke me
5164#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005165$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005166#endif
5167
5168; return 0; }
5169EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005170if { (eval echo configure:5171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005171 rm -rf conftest*
5172 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005173else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005174 echo "configure: failed program was:" >&5
5175 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005176 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005177 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005178fi
5179rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005180fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005181
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005182if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005183 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005184 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5185 cat >> confdefs.h <<EOF
5186#define $ac_tr_func 1
5187EOF
5188
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005189else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005190 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005191LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005192fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005193done
5194
Guido van Rossumf78abae1997-01-21 22:02:36 +00005195
Thomas Wouters3a584202000-08-05 23:28:51 +00005196for ac_func in getpgrp
5197do
5198echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005199echo "configure:5200: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005200if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005201 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005202else
5203 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005204#line 5205 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005205#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005206/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005207 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005208#include <assert.h>
5209/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005210/* We use char because int might match the return type of a gcc2
5211 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005212char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005213
Guido van Rossumf78abae1997-01-21 22:02:36 +00005214int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005215
Guido van Rossum627b2d71993-12-24 10:39:16 +00005216/* The GNU C library defines this for functions which it implements
5217 to always fail with ENOSYS. Some functions are actually named
5218 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005219#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00005220choke me
5221#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005222$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005223#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005224
5225; return 0; }
5226EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005227if { (eval echo configure:5228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005228 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005229 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005230else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005231 echo "configure: failed program was:" >&5
5232 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005233 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005234 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005235fi
5236rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005237fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005238
Thomas Wouters3a584202000-08-05 23:28:51 +00005239if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005240 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005241 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5242 cat >> confdefs.h <<EOF
5243#define $ac_tr_func 1
5244EOF
5245 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005246#line 5247 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005247#include "confdefs.h"
5248#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005249int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005250getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005251; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005252EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005253if { (eval echo configure:5254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005254 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005255 cat >> confdefs.h <<\EOF
5256#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005257EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005258
Guido van Rossumf78abae1997-01-21 22:02:36 +00005259else
5260 echo "configure: failed program was:" >&5
5261 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005262fi
5263rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005264else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005265 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005266fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005267done
Guido van Rossum627b2d71993-12-24 10:39:16 +00005268
Thomas Wouters3a584202000-08-05 23:28:51 +00005269for ac_func in setpgrp
5270do
5271echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005272echo "configure:5273: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005273if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005274 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005275else
5276 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005277#line 5278 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005278#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005279/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005280 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005281#include <assert.h>
5282/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005283/* We use char because int might match the return type of a gcc2
5284 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005285char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005286
Guido van Rossumf78abae1997-01-21 22:02:36 +00005287int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005288
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005289/* The GNU C library defines this for functions which it implements
5290 to always fail with ENOSYS. Some functions are actually named
5291 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005292#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005293choke me
5294#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005295$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005296#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005297
5298; return 0; }
5299EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005300if { (eval echo configure:5301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005301 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005302 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005303else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005304 echo "configure: failed program was:" >&5
5305 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005306 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005307 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005308fi
5309rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005310fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005311
Thomas Wouters3a584202000-08-05 23:28:51 +00005312if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005313 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005314 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5315 cat >> confdefs.h <<EOF
5316#define $ac_tr_func 1
5317EOF
5318 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005319#line 5320 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005320#include "confdefs.h"
5321#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005322int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005323setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005324; return 0; }
5325EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005326if { (eval echo configure:5327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005327 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005328 cat >> confdefs.h <<\EOF
5329#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005330EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005331
Guido van Rossumf78abae1997-01-21 22:02:36 +00005332else
5333 echo "configure: failed program was:" >&5
5334 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005335fi
5336rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005337else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005338 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005339fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005340done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005341
Thomas Wouters3a584202000-08-05 23:28:51 +00005342for ac_func in gettimeofday
5343do
5344echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005345echo "configure:5346: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005346if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005347 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005348else
5349 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005350#line 5351 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005351#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005352/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005353 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005354#include <assert.h>
5355/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005356/* We use char because int might match the return type of a gcc2
5357 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005358char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005359
Guido van Rossumf78abae1997-01-21 22:02:36 +00005360int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005361
5362/* The GNU C library defines this for functions which it implements
5363 to always fail with ENOSYS. Some functions are actually named
5364 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005365#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005366choke me
5367#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005368$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005369#endif
5370
5371; return 0; }
5372EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005373if { (eval echo configure:5374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005374 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005375 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005376else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005377 echo "configure: failed program was:" >&5
5378 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005379 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005380 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005381fi
5382rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005383fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005384
Thomas Wouters3a584202000-08-05 23:28:51 +00005385if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005386 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005387 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5388 cat >> confdefs.h <<EOF
5389#define $ac_tr_func 1
5390EOF
5391 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005392#line 5393 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005393#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005394#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005395int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005396gettimeofday((struct timeval*)0,(struct timezone*)0);
5397; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005398EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005399if { (eval echo configure:5400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005400 :
5401else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005402 echo "configure: failed program was:" >&5
5403 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005404 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005405 cat >> confdefs.h <<\EOF
5406#define GETTIMEOFDAY_NO_TZ 1
5407EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005408
5409fi
5410rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005411else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005412 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005413fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005414done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005415
5416
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005417for ac_func in getaddrinfo
5418do
5419echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005420echo "configure:5421: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005421if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5422 echo $ac_n "(cached) $ac_c" 1>&6
5423else
5424 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005425#line 5426 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005426#include "confdefs.h"
5427/* System header to define __stub macros and hopefully few prototypes,
5428 which can conflict with char $ac_func(); below. */
5429#include <assert.h>
5430/* Override any gcc2 internal prototype to avoid an error. */
5431/* We use char because int might match the return type of a gcc2
5432 builtin and then its argument prototype would still apply. */
5433char $ac_func();
5434
5435int main() {
5436
5437/* The GNU C library defines this for functions which it implements
5438 to always fail with ENOSYS. Some functions are actually named
5439 something starting with __ and the normal name is an alias. */
5440#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5441choke me
5442#else
5443$ac_func();
5444#endif
5445
5446; return 0; }
5447EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005448if { (eval echo configure:5449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005449 rm -rf conftest*
5450 eval "ac_cv_func_$ac_func=yes"
5451else
5452 echo "configure: failed program was:" >&5
5453 cat conftest.$ac_ext >&5
5454 rm -rf conftest*
5455 eval "ac_cv_func_$ac_func=no"
5456fi
5457rm -f conftest*
5458fi
5459
5460if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5461 echo "$ac_t""yes" 1>&6
5462 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5463 cat >> confdefs.h <<EOF
5464#define $ac_tr_func 1
5465EOF
5466 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005467echo "configure:5468: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005468if test "$cross_compiling" = yes; then
5469 echo "$ac_t""buggy" 1>&6
5470buggygetaddrinfo=yes
5471else
5472 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005473#line 5474 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005474#include "confdefs.h"
5475
5476#include <sys/types.h>
5477#include <netdb.h>
5478#include <string.h>
5479#include <sys/socket.h>
5480#include <netinet/in.h>
5481
5482main()
5483{
5484 int passive, gaierr, inet4 = 0, inet6 = 0;
5485 struct addrinfo hints, *ai, *aitop;
5486 char straddr[INET6_ADDRSTRLEN], strport[16];
5487
5488 for (passive = 0; passive <= 1; passive++) {
5489 memset(&hints, 0, sizeof(hints));
5490 hints.ai_family = AF_UNSPEC;
5491 hints.ai_flags = passive ? AI_PASSIVE : 0;
5492 hints.ai_socktype = SOCK_STREAM;
5493 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5494 (void)gai_strerror(gaierr);
5495 goto bad;
5496 }
5497 for (ai = aitop; ai; ai = ai->ai_next) {
5498 if (ai->ai_addr == NULL ||
5499 ai->ai_addrlen == 0 ||
5500 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5501 straddr, sizeof(straddr), strport, sizeof(strport),
5502 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5503 goto bad;
5504 }
5505 switch (ai->ai_family) {
5506 case AF_INET:
5507 if (strcmp(strport, "54321") != 0) {
5508 goto bad;
5509 }
5510 if (passive) {
5511 if (strcmp(straddr, "0.0.0.0") != 0) {
5512 goto bad;
5513 }
5514 } else {
5515 if (strcmp(straddr, "127.0.0.1") != 0) {
5516 goto bad;
5517 }
5518 }
5519 inet4++;
5520 break;
5521 case AF_INET6:
5522 if (strcmp(strport, "54321") != 0) {
5523 goto bad;
5524 }
5525 if (passive) {
5526 if (strcmp(straddr, "::") != 0) {
5527 goto bad;
5528 }
5529 } else {
5530 if (strcmp(straddr, "::1") != 0) {
5531 goto bad;
5532 }
5533 }
5534 inet6++;
5535 break;
5536 case AF_UNSPEC:
5537 goto bad;
5538 break;
5539 default:
5540 /* another family support? */
5541 break;
5542 }
5543 }
5544 }
5545
5546 if (!(inet4 == 0 || inet4 == 2))
5547 goto bad;
5548 if (!(inet6 == 0 || inet6 == 2))
5549 goto bad;
5550
5551 if (aitop)
5552 freeaddrinfo(aitop);
5553 exit(0);
5554
5555 bad:
5556 if (aitop)
5557 freeaddrinfo(aitop);
5558 exit(1);
5559}
5560
5561EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005562if { (eval echo configure:5563: \"$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 +00005563then
5564 echo "$ac_t""good" 1>&6
5565buggygetaddrinfo=no
5566else
5567 echo "configure: failed program was:" >&5
5568 cat conftest.$ac_ext >&5
5569 rm -fr conftest*
5570 echo "$ac_t""buggy" 1>&6
5571buggygetaddrinfo=yes
5572fi
5573rm -fr conftest*
5574fi
5575
5576else
5577 echo "$ac_t""no" 1>&6
5578buggygetaddrinfo=yes
5579fi
5580done
5581
5582
5583if test "$buggygetaddrinfo" = "yes"; then
5584 if test "$ipv6" = "yes"; then
5585 echo 'Fatal: You must get working getaddrinfo() function.'
5586 echo ' or you can specify "--disable-ipv6"'.
5587 exit 1
5588 fi
5589fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005590for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005591do
5592echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005593echo "configure:5594: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005594if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5595 echo $ac_n "(cached) $ac_c" 1>&6
5596else
5597 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005598#line 5599 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005599#include "confdefs.h"
5600/* System header to define __stub macros and hopefully few prototypes,
5601 which can conflict with char $ac_func(); below. */
5602#include <assert.h>
5603/* Override any gcc2 internal prototype to avoid an error. */
5604/* We use char because int might match the return type of a gcc2
5605 builtin and then its argument prototype would still apply. */
5606char $ac_func();
5607
5608int main() {
5609
5610/* The GNU C library defines this for functions which it implements
5611 to always fail with ENOSYS. Some functions are actually named
5612 something starting with __ and the normal name is an alias. */
5613#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5614choke me
5615#else
5616$ac_func();
5617#endif
5618
5619; return 0; }
5620EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005621if { (eval echo configure:5622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005622 rm -rf conftest*
5623 eval "ac_cv_func_$ac_func=yes"
5624else
5625 echo "configure: failed program was:" >&5
5626 cat conftest.$ac_ext >&5
5627 rm -rf conftest*
5628 eval "ac_cv_func_$ac_func=no"
5629fi
5630rm -f conftest*
5631fi
5632
5633if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5634 echo "$ac_t""yes" 1>&6
5635 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5636 cat >> confdefs.h <<EOF
5637#define $ac_tr_func 1
5638EOF
5639
5640else
5641 echo "$ac_t""no" 1>&6
5642fi
5643done
5644
5645
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005646# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005647echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005648echo "configure:5649: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005649if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005650 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005651else
5652 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005653#line 5654 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005654#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005655#include <sys/types.h>
5656#include <sys/time.h>
5657#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005658int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005659struct tm *tp;
5660; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005661EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005662if { (eval echo configure:5663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005663 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005664 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005665else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005666 echo "configure: failed program was:" >&5
5667 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005668 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005669 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005670fi
5671rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005672fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005673
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005674echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005675if test $ac_cv_header_time = yes; then
5676 cat >> confdefs.h <<\EOF
5677#define TIME_WITH_SYS_TIME 1
5678EOF
5679
5680fi
5681
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005682echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005683echo "configure:5684: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005684if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005685 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005686else
5687 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005688#line 5689 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005689#include "confdefs.h"
5690#include <sys/types.h>
5691#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005692int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005693struct tm *tp; tp->tm_sec;
5694; return 0; }
5695EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005696if { (eval echo configure:5697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005697 rm -rf conftest*
5698 ac_cv_struct_tm=time.h
5699else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005700 echo "configure: failed program was:" >&5
5701 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005702 rm -rf conftest*
5703 ac_cv_struct_tm=sys/time.h
5704fi
5705rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005706fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005707
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005708echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005709if test $ac_cv_struct_tm = sys/time.h; then
5710 cat >> confdefs.h <<\EOF
5711#define TM_IN_SYS_TIME 1
5712EOF
5713
5714fi
5715
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005716echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005717echo "configure:5718: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005718if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005719 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005720else
5721 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005722#line 5723 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005723#include "confdefs.h"
5724#include <sys/types.h>
5725#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005726int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005727struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005728; return 0; }
5729EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005730if { (eval echo configure:5731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005731 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005732 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005733else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005734 echo "configure: failed program was:" >&5
5735 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005736 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005737 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005738fi
5739rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005740fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005741
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005742echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5743if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005744 cat >> confdefs.h <<\EOF
5745#define HAVE_TM_ZONE 1
5746EOF
5747
5748else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005749 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005750echo "configure:5751: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005751if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005752 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005753else
5754 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005755#line 5756 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005756#include "confdefs.h"
5757#include <time.h>
5758#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005759extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005760#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00005761int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005762atoi(*tzname);
5763; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005764EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005765if { (eval echo configure:5766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005766 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005767 ac_cv_var_tzname=yes
5768else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005769 echo "configure: failed program was:" >&5
5770 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005771 rm -rf conftest*
5772 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005773fi
5774rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005775fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005776
5777echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005778 if test $ac_cv_var_tzname = yes; then
5779 cat >> confdefs.h <<\EOF
5780#define HAVE_TZNAME 1
5781EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005782
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005783 fi
5784fi
5785
5786
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005787echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005788echo "configure:5789: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005789if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005790 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005791else
5792 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005793#line 5794 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005794#include "confdefs.h"
5795#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005796int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005797return altzone;
5798; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005799EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005800if { (eval echo configure:5801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005801 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005802 ac_cv_header_time_altzone=yes
5803else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005804 echo "configure: failed program was:" >&5
5805 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005806 rm -rf conftest*
5807 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005808fi
5809rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005810fi
5811
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005812echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005813if test $ac_cv_header_time_altzone = yes; then
5814 cat >> confdefs.h <<\EOF
5815#define HAVE_ALTZONE 1
5816EOF
5817
5818fi
5819
Guido van Rossumda88dad1995-01-26 00:46:29 +00005820was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005821echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005822echo "configure:5823: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005823cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005824#line 5825 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005825#include "confdefs.h"
5826
5827#include <sys/types.h>
5828#include <sys/select.h>
5829#include <sys/time.h>
5830
Guido van Rossumf78abae1997-01-21 22:02:36 +00005831int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005832;
5833; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005834EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005835if { (eval echo configure:5836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005836 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005837 cat >> confdefs.h <<\EOF
5838#define SYS_SELECT_WITH_SYS_TIME 1
5839EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005840 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005841else
5842 echo "configure: failed program was:" >&5
5843 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005844fi
5845rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005846echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005847
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005848echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005849echo "configure:5850: checking for addrinfo" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005850if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
5851 echo $ac_n "(cached) $ac_c" 1>&6
5852else
5853 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005854#line 5855 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005855#include "confdefs.h"
5856
5857# include <netdb.h>
5858int main() {
5859struct addrinfo a
5860; return 0; }
5861EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005862if { (eval echo configure:5863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005863 rm -rf conftest*
5864 ac_cv_struct_addrinfo=yes
5865else
5866 echo "configure: failed program was:" >&5
5867 cat conftest.$ac_ext >&5
5868 rm -rf conftest*
5869 ac_cv_struct_addrinfo=no
5870fi
5871rm -f conftest*
5872fi
5873
5874echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
5875if test $ac_cv_struct_addrinfo = yes; then
5876 cat >> confdefs.h <<\EOF
5877#define HAVE_ADDRINFO 1
5878EOF
5879
5880fi
5881
5882echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005883echo "configure:5884: checking for sockaddr_storage" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005884if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
5885 echo $ac_n "(cached) $ac_c" 1>&6
5886else
5887 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005888#line 5889 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005889#include "confdefs.h"
5890
5891# include <sys/types.h>
5892# include <sys/socket.h>
5893int main() {
5894struct sockaddr_storage s
5895; return 0; }
5896EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005897if { (eval echo configure:5898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005898 rm -rf conftest*
5899 ac_cv_struct_sockaddr_storage=yes
5900else
5901 echo "configure: failed program was:" >&5
5902 cat conftest.$ac_ext >&5
5903 rm -rf conftest*
5904 ac_cv_struct_sockaddr_storage=no
5905fi
5906rm -f conftest*
5907fi
5908
5909echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
5910if test $ac_cv_struct_sockaddr_storage = yes; then
5911 cat >> confdefs.h <<\EOF
5912#define HAVE_SOCKADDR_STORAGE 1
5913EOF
5914
5915fi
5916
Guido van Rossum627b2d71993-12-24 10:39:16 +00005917# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00005918
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005919echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005920echo "configure:5921: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005921if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005922 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005923else
5924 if test "$GCC" = yes; then
5925 # GCC predefines this symbol on systems where it applies.
5926cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005927#line 5928 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005928#include "confdefs.h"
5929#ifdef __CHAR_UNSIGNED__
5930 yes
5931#endif
5932
5933EOF
5934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5935 egrep "yes" >/dev/null 2>&1; then
5936 rm -rf conftest*
5937 ac_cv_c_char_unsigned=yes
5938else
5939 rm -rf conftest*
5940 ac_cv_c_char_unsigned=no
5941fi
5942rm -f conftest*
5943
5944else
5945if test "$cross_compiling" = yes; then
5946 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5947else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005948 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005949#line 5950 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005950#include "confdefs.h"
5951/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005952#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00005953#define volatile
5954#endif
5955main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00005956 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005957}
5958EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005959if { (eval echo configure:5960: \"$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 +00005960then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005961 ac_cv_c_char_unsigned=yes
5962else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005963 echo "configure: failed program was:" >&5
5964 cat conftest.$ac_ext >&5
5965 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005966 ac_cv_c_char_unsigned=no
5967fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005968rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005969fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005970
5971fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005972fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005973
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005974echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005975if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5976 cat >> confdefs.h <<\EOF
5977#define __CHAR_UNSIGNED__ 1
5978EOF
5979
5980fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005981
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005982echo $ac_n "checking for working const""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005983echo "configure:5984: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005984if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005985 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005986else
5987 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00005988#line 5989 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005989#include "confdefs.h"
5990
Guido van Rossumf78abae1997-01-21 22:02:36 +00005991int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005992
5993/* Ultrix mips cc rejects this. */
Martin v. Löwis9db2f572001-07-23 01:30:10 +00005994typedef int charset[2]; const charset x;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005995/* SunOS 4.1.1 cc rejects this. */
5996char const *const *ccp;
5997char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005998/* NEC SVR4.0.2 mips cc rejects this. */
5999struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006000static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00006001/* AIX XL C 1.02.0.0 rejects this.
6002 It does not let you subtract one const X* pointer from another in an arm
6003 of an if-expression whose if-part is not a constant expression */
6004const char *g = "string";
6005ccp = &g + (g ? g-g : 0);
6006/* HPUX 7.0 cc rejects these. */
6007++ccp;
6008p = (char**) ccp;
6009ccp = (char const *const *) p;
6010{ /* SCO 3.2v4 cc rejects this. */
6011 char *t;
6012 char const *s = 0 ? (char *) 0 : (char const *) 0;
6013
6014 *t++ = 0;
6015}
6016{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006017 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00006018 const int *foo = &x[0];
6019 ++foo;
6020}
6021{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6022 typedef const int *iptr;
6023 iptr p = 0;
6024 ++p;
6025}
6026{ /* AIX XL C 1.02.0.0 rejects this saying
6027 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6028 struct s { int j; const int *ap[3]; };
6029 struct s *b; b->j = 5;
6030}
6031{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6032 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006033}
6034
6035; return 0; }
6036EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006037if { (eval echo configure:6038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006038 rm -rf conftest*
6039 ac_cv_c_const=yes
6040else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006041 echo "configure: failed program was:" >&5
6042 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006043 rm -rf conftest*
6044 ac_cv_c_const=no
6045fi
6046rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006047fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006048
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006049echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006050if test $ac_cv_c_const = no; then
6051 cat >> confdefs.h <<\EOF
6052#define const
6053EOF
6054
6055fi
6056
6057
Guido van Rossumda88dad1995-01-26 00:46:29 +00006058works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006059echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006060echo "configure:6061: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006061cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006062#line 6063 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006063#include "confdefs.h"
6064
Guido van Rossumf78abae1997-01-21 22:02:36 +00006065int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006066volatile int x; x = 0;
6067; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006068EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006069if { (eval echo configure:6070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006070 rm -rf conftest*
6071 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006072else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006073 echo "configure: failed program was:" >&5
6074 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006075 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006076 cat >> confdefs.h <<\EOF
6077#define volatile
6078EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006079
6080fi
6081rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006082echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006083
Guido van Rossumda88dad1995-01-26 00:46:29 +00006084works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006085echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006086echo "configure:6087: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006087cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006088#line 6089 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006089#include "confdefs.h"
6090
Guido van Rossumf78abae1997-01-21 22:02:36 +00006091int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006092signed char c;
6093; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006094EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006095if { (eval echo configure:6096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006096 rm -rf conftest*
6097 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006098else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006099 echo "configure: failed program was:" >&5
6100 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006101 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006102 cat >> confdefs.h <<\EOF
6103#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00006104EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006105
6106fi
6107rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006108echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006109
Guido van Rossumda88dad1995-01-26 00:46:29 +00006110have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006111echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006112echo "configure:6113: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006113cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006114#line 6115 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006115#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006116int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00006117int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006118return foo(10);
6119; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006120EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006121if { (eval echo configure:6122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006122 rm -rf conftest*
6123 cat >> confdefs.h <<\EOF
6124#define HAVE_PROTOTYPES 1
6125EOF
6126 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006127else
6128 echo "configure: failed program was:" >&5
6129 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006130fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006131rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006132echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006133
Guido van Rossumda88dad1995-01-26 00:46:29 +00006134works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006135echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006136echo "configure:6137: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006137cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006138#line 6139 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006139#include "confdefs.h"
6140
6141#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00006142int foo(int x, ...) {
6143 va_list va;
6144 va_start(va, x);
6145 va_arg(va, int);
6146 va_arg(va, char *);
6147 va_arg(va, double);
6148 return 0;
6149}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006150
Guido van Rossumf78abae1997-01-21 22:02:36 +00006151int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00006152return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006153; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006154EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006155if { (eval echo configure:6156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006156 rm -rf conftest*
6157 cat >> confdefs.h <<\EOF
6158#define HAVE_STDARG_PROTOTYPES 1
6159EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006160 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006161else
6162 echo "configure: failed program was:" >&5
6163 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006164fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006165rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006166echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006167
Guido van Rossumda88dad1995-01-26 00:46:29 +00006168if test "$have_prototypes" = yes; then
6169bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006170echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006171echo "configure:6172: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006172cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006173#line 6174 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006174#include "confdefs.h"
6175#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00006176int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006177char **t;execve("@",t,t);
6178; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006179EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006180if { (eval echo configure:6181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006181 :
6182else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006183 echo "configure: failed program was:" >&5
6184 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006185 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006186 cat >> confdefs.h <<\EOF
6187#define BAD_EXEC_PROTOTYPES 1
6188EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006189 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006190fi
6191rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006192echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006193fi
6194
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006195# check if sockaddr has sa_len member
6196echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006197echo "configure:6198: checking if sockaddr has sa_len member" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006198cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006199#line 6200 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006200#include "confdefs.h"
6201#include <sys/types.h>
6202#include <sys/socket.h>
6203int main() {
6204struct sockaddr x;
6205x.sa_len = 0;
6206; return 0; }
6207EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006208if { (eval echo configure:6209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006209 rm -rf conftest*
6210 echo "$ac_t""yes" 1>&6
6211 cat >> confdefs.h <<\EOF
6212#define HAVE_SOCKADDR_SA_LEN 1
6213EOF
6214
6215else
6216 echo "configure: failed program was:" >&5
6217 cat conftest.$ac_ext >&5
6218 rm -rf conftest*
6219 echo "$ac_t""no" 1>&6
6220fi
6221rm -f conftest*
6222
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006223echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006224echo "configure:6225: checking for bad static forward" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006225if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
6226 echo $ac_n "(cached) $ac_c" 1>&6
6227else
6228 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006229 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006230else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006231 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006232#line 6233 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006233#include "confdefs.h"
6234
6235struct s { int a; int b; };
6236static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006237int foobar() {
6238 static int random;
6239 random = (int) &foo;
6240 return random;
6241}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006242static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006243main() {
6244 exit(!((int)&foo == foobar()));
6245}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006246EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006247if { (eval echo configure:6248: \"$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 +00006248then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006249 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006250else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006251 echo "configure: failed program was:" >&5
6252 cat conftest.$ac_ext >&5
6253 rm -fr conftest*
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006254 ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006255fi
6256rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00006257fi
6258
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006259fi
6260
6261echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
6262if test "$ac_cv_bad_static_forward" = yes
6263then
6264 cat >> confdefs.h <<\EOF
6265#define BAD_STATIC_FORWARD 1
6266EOF
6267
6268fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006269
Guido van Rossumda88dad1995-01-26 00:46:29 +00006270va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006271echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006272echo "configure:6273: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006273cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006274#line 6275 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006275#include "confdefs.h"
6276
6277#ifdef HAVE_STDARG_PROTOTYPES
6278#include <stdarg.h>
6279#else
6280#include <varargs.h>
6281#endif
6282
Guido van Rossumf78abae1997-01-21 22:02:36 +00006283int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006284va_list list1, list2; list1 = list2;
6285; return 0; }
6286EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006287if { (eval echo configure:6288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006288 :
6289else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006290 echo "configure: failed program was:" >&5
6291 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006292 rm -rf conftest*
6293 cat >> confdefs.h <<\EOF
6294#define VA_LIST_IS_ARRAY 1
6295EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006296 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006297fi
6298rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006299echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006300
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006301# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
6302echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006303echo "configure:6304: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006304if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006305 echo $ac_n "(cached) $ac_c" 1>&6
6306else
6307 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006308#line 6309 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006309#include "confdefs.h"
6310/* System header to define __stub macros and hopefully few prototypes,
6311 which can conflict with char gethostbyname_r(); below. */
6312#include <assert.h>
6313/* Override any gcc2 internal prototype to avoid an error. */
6314/* We use char because int might match the return type of a gcc2
6315 builtin and then its argument prototype would still apply. */
6316char gethostbyname_r();
6317
6318int main() {
6319
6320/* The GNU C library defines this for functions which it implements
6321 to always fail with ENOSYS. Some functions are actually named
6322 something starting with __ and the normal name is an alias. */
6323#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6324choke me
6325#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006326gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006327#endif
6328
6329; return 0; }
6330EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006331if { (eval echo configure:6332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006332 rm -rf conftest*
6333 eval "ac_cv_func_gethostbyname_r=yes"
6334else
6335 echo "configure: failed program was:" >&5
6336 cat conftest.$ac_ext >&5
6337 rm -rf conftest*
6338 eval "ac_cv_func_gethostbyname_r=no"
6339fi
6340rm -f conftest*
6341fi
6342
6343if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6344 echo "$ac_t""yes" 1>&6
6345
6346 cat >> confdefs.h <<\EOF
6347#define HAVE_GETHOSTBYNAME_R 1
6348EOF
6349
6350 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006351echo "configure:6352: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006352 OLD_CFLAGS=$CFLAGS
6353 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
6354 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006355#line 6356 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006356#include "confdefs.h"
6357
6358# include <netdb.h>
6359
6360int main() {
6361
6362 char *name;
6363 struct hostent *he, *res;
6364 char buffer[2048];
6365 int buflen = 2048;
6366 int h_errnop;
6367
6368 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
6369
6370; return 0; }
6371EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006372if { (eval echo configure:6373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006373 rm -rf conftest*
6374
6375 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006376#define HAVE_GETHOSTBYNAME_R 1
6377EOF
6378
6379 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006380#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6381EOF
6382
6383 echo "$ac_t""yes" 1>&6
6384
6385else
6386 echo "configure: failed program was:" >&5
6387 cat conftest.$ac_ext >&5
6388 rm -rf conftest*
6389
6390 echo "$ac_t""no" 1>&6
6391 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006392echo "configure:6393: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006393 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006394#line 6395 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006395#include "confdefs.h"
6396
6397# include <netdb.h>
6398
6399int main() {
6400
6401 char *name;
6402 struct hostent *he;
6403 char buffer[2048];
6404 int buflen = 2048;
6405 int h_errnop;
6406
6407 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
6408
6409; return 0; }
6410EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006411if { (eval echo configure:6412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006412 rm -rf conftest*
6413
6414 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006415#define HAVE_GETHOSTBYNAME_R 1
6416EOF
6417
6418 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006419#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6420EOF
6421
6422 echo "$ac_t""yes" 1>&6
6423
6424else
6425 echo "configure: failed program was:" >&5
6426 cat conftest.$ac_ext >&5
6427 rm -rf conftest*
6428
6429 echo "$ac_t""no" 1>&6
6430 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006431echo "configure:6432: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006432 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006433#line 6434 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006434#include "confdefs.h"
6435
6436# include <netdb.h>
6437
6438int main() {
6439
6440 char *name;
6441 struct hostent *he;
6442 struct hostent_data data;
6443
6444 (void) gethostbyname_r(name, he, &data);
6445
6446; return 0; }
6447EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006448if { (eval echo configure:6449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006449 rm -rf conftest*
6450
6451 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006452#define HAVE_GETHOSTBYNAME_R 1
6453EOF
6454
6455 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006456#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6457EOF
6458
6459 echo "$ac_t""yes" 1>&6
6460
6461else
6462 echo "configure: failed program was:" >&5
6463 cat conftest.$ac_ext >&5
6464 rm -rf conftest*
6465
6466 echo "$ac_t""no" 1>&6
6467
6468fi
6469rm -f conftest*
6470
6471fi
6472rm -f conftest*
6473
6474fi
6475rm -f conftest*
6476 CFLAGS=$OLD_CFLAGS
6477
6478else
6479 echo "$ac_t""no" 1>&6
6480
Thomas Wouters3a584202000-08-05 23:28:51 +00006481 for ac_func in gethostbyname
6482do
6483echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006484echo "configure:6485: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006485if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006486 echo $ac_n "(cached) $ac_c" 1>&6
6487else
6488 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006489#line 6490 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006490#include "confdefs.h"
6491/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00006492 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006493#include <assert.h>
6494/* Override any gcc2 internal prototype to avoid an error. */
6495/* We use char because int might match the return type of a gcc2
6496 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006497char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006498
6499int main() {
6500
6501/* The GNU C library defines this for functions which it implements
6502 to always fail with ENOSYS. Some functions are actually named
6503 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006504#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006505choke me
6506#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006507$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006508#endif
6509
6510; return 0; }
6511EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006512if { (eval echo configure:6513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006513 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006514 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006515else
6516 echo "configure: failed program was:" >&5
6517 cat conftest.$ac_ext >&5
6518 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006519 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006520fi
6521rm -f conftest*
6522fi
6523
Thomas Wouters3a584202000-08-05 23:28:51 +00006524if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006525 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00006526 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6527 cat >> confdefs.h <<EOF
6528#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006529EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00006530
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006531else
6532 echo "$ac_t""no" 1>&6
6533fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006534done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006535
6536
6537fi
6538
6539
6540
6541
6542
6543
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006544
Guido van Rossum627b2d71993-12-24 10:39:16 +00006545# checks for system services
6546# (none yet)
6547
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006548# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006549echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006550echo "configure:6551: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006551if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006552 echo $ac_n "(cached) $ac_c" 1>&6
6553else
6554 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006555#line 6556 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006556#include "confdefs.h"
6557/* System header to define __stub macros and hopefully few prototypes,
6558 which can conflict with char __fpu_control(); below. */
6559#include <assert.h>
6560/* Override any gcc2 internal prototype to avoid an error. */
6561/* We use char because int might match the return type of a gcc2
6562 builtin and then its argument prototype would still apply. */
6563char __fpu_control();
6564
6565int main() {
6566
6567/* The GNU C library defines this for functions which it implements
6568 to always fail with ENOSYS. Some functions are actually named
6569 something starting with __ and the normal name is an alias. */
6570#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6571choke me
6572#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006573__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006574#endif
6575
6576; return 0; }
6577EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006578if { (eval echo configure:6579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006579 rm -rf conftest*
6580 eval "ac_cv_func___fpu_control=yes"
6581else
6582 echo "configure: failed program was:" >&5
6583 cat conftest.$ac_ext >&5
6584 rm -rf conftest*
6585 eval "ac_cv_func___fpu_control=no"
6586fi
6587rm -f conftest*
6588fi
6589
6590if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6591 echo "$ac_t""yes" 1>&6
6592 :
6593else
6594 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006595echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006596echo "configure:6597: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00006597ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006598if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006599 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006600else
6601 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006602LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006603cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006604#line 6605 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006605#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006606/* Override any gcc2 internal prototype to avoid an error. */
6607/* We use char because int might match the return type of a gcc2
6608 builtin and then its argument prototype would still apply. */
6609char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00006610
Guido van Rossumf78abae1997-01-21 22:02:36 +00006611int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006612__fpu_control()
6613; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006614EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006615if { (eval echo configure:6616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006616 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006617 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006618else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006619 echo "configure: failed program was:" >&5
6620 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006621 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006622 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006623fi
6624rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006625LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006626
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006627fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006628if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006629 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006630 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6631 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006632 cat >> confdefs.h <<EOF
6633#define $ac_tr_lib 1
6634EOF
6635
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006636 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006637
6638else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006639 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006640fi
6641
6642
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006643fi
6644
6645
Guido van Rossum7f253911997-05-09 02:42:48 +00006646# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00006647echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006648echo "configure:6649: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006649# Check whether --with-fpectl or --without-fpectl was given.
6650if test "${with_fpectl+set}" = set; then
6651 withval="$with_fpectl"
6652
6653if test "$withval" != no
6654then cat >> confdefs.h <<\EOF
6655#define WANT_SIGFPE_HANDLER 1
6656EOF
6657 echo "$ac_t""yes" 1>&6
6658else echo "$ac_t""no" 1>&6
6659fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006660else
6661 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006662fi
6663
6664
Guido van Rossum7f43da71994-08-01 12:15:30 +00006665# check for --with-libm=...
6666
Guido van Rossum563e7081996-09-10 18:20:48 +00006667case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006668Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006669BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006670*) LIBM=-lm
6671esac
Guido van Rossum7f253911997-05-09 02:42:48 +00006672echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006673echo "configure:6674: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006674# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006675if test "${with_libm+set}" = set; then
6676 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006677
Guido van Rossum7f253911997-05-09 02:42:48 +00006678if test "$withval" = no
6679then LIBM=
6680 echo "$ac_t""force LIBM empty" 1>&6
6681elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006682then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006683 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006684else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006685fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006686else
6687 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006688fi
6689
6690
6691# check for --with-libc=...
6692
Guido van Rossum7f253911997-05-09 02:42:48 +00006693echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006694echo "configure:6695: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006695# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006696if test "${with_libc+set}" = set; then
6697 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006698
Guido van Rossum7f253911997-05-09 02:42:48 +00006699if test "$withval" = no
6700then LIBC=
6701 echo "$ac_t""force LIBC empty" 1>&6
6702elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006703then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006704 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006705else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006706fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006707else
6708 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006709fi
6710
6711
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006712# check for hypot() in math library
6713LIBS_SAVE=$LIBS
6714LIBS="$LIBS $LIBM"
6715for ac_func in hypot
6716do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006717echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006718echo "configure:6719: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006719if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006720 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006721else
6722 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006723#line 6724 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006724#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006725/* System header to define __stub macros and hopefully few prototypes,
6726 which can conflict with char $ac_func(); below. */
6727#include <assert.h>
6728/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006729/* We use char because int might match the return type of a gcc2
6730 builtin and then its argument prototype would still apply. */
6731char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006732
Guido van Rossumf78abae1997-01-21 22:02:36 +00006733int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006734
6735/* The GNU C library defines this for functions which it implements
6736 to always fail with ENOSYS. Some functions are actually named
6737 something starting with __ and the normal name is an alias. */
6738#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6739choke me
6740#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006741$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006742#endif
6743
6744; return 0; }
6745EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006746if { (eval echo configure:6747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006747 rm -rf conftest*
6748 eval "ac_cv_func_$ac_func=yes"
6749else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006750 echo "configure: failed program was:" >&5
6751 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006752 rm -rf conftest*
6753 eval "ac_cv_func_$ac_func=no"
6754fi
6755rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006756fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00006757
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006758if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6759 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006760 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6761 cat >> confdefs.h <<EOF
6762#define $ac_tr_func 1
6763EOF
6764
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006765else
6766 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006767LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006768fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006769done
6770
Guido van Rossumf78abae1997-01-21 22:02:36 +00006771
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006772LIBS=$LIBS_SAVE
6773
Guido van Rossumad713701997-07-10 22:42:38 +00006774# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00006775echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006776echo "configure:6777: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006777if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00006778 echo $ac_n "(cached) $ac_c" 1>&6
6779else
6780 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006781 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +00006782else
6783 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006784#line 6785 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006785#include "confdefs.h"
6786#include <stdio.h>
6787#ifdef HAVE_STDLIB
6788#include <stdlib.h>
6789#else
6790char *malloc(), *realloc();
6791int *free();
6792#endif
6793main() {
6794 char *p;
6795 p = malloc(0);
6796 if (p == NULL) exit(1);
6797 p = realloc(p, 0);
6798 if (p == NULL) exit(1);
6799 free(p);
6800 exit(0);
6801}
6802EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006803if { (eval echo configure:6804: \"$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 +00006804then
6805 ac_cv_malloc_zero=nonnull
6806else
6807 echo "configure: failed program was:" >&5
6808 cat conftest.$ac_ext >&5
6809 rm -fr conftest*
6810 ac_cv_malloc_zero=null
6811fi
6812rm -fr conftest*
6813fi
6814
6815fi
Guido van Rossum3065c942001-09-17 04:03:14 +00006816 # XXX arm cross-compile?
Guido van Rossumad713701997-07-10 22:42:38 +00006817echo "$ac_t""$ac_cv_malloc_zero" 1>&6
6818if test "$ac_cv_malloc_zero" = null
6819then
6820 cat >> confdefs.h <<\EOF
6821#define MALLOC_ZERO_RETURNS_NULL 1
6822EOF
6823
6824fi
6825
Guido van Rossumef2255b2000-03-10 22:30:29 +00006826# check for wchar.h
6827ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6828echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006829echo "configure:6830: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006830if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006831 echo $ac_n "(cached) $ac_c" 1>&6
6832else
6833 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006834#line 6835 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006835#include "confdefs.h"
6836#include <wchar.h>
6837EOF
6838ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006839{ (eval echo configure:6840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006840ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6841if test -z "$ac_err"; then
6842 rm -rf conftest*
6843 eval "ac_cv_header_$ac_safe=yes"
6844else
6845 echo "$ac_err" >&5
6846 echo "configure: failed program was:" >&5
6847 cat conftest.$ac_ext >&5
6848 rm -rf conftest*
6849 eval "ac_cv_header_$ac_safe=no"
6850fi
6851rm -f conftest*
6852fi
6853if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6854 echo "$ac_t""yes" 1>&6
6855 cat >> confdefs.h <<\EOF
6856#define HAVE_WCHAR_H 1
6857EOF
6858 wchar_h="yes"
6859else
6860 echo "$ac_t""no" 1>&6
6861wchar_h="no"
6862
6863fi
6864
6865
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006866# determine wchar_t size
6867if test "$wchar_h" = yes
6868then
6869 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006870echo "configure:6871: checking size of wchar_t" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006871if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
6872 echo $ac_n "(cached) $ac_c" 1>&6
6873else
6874 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006875 ac_cv_sizeof_wchar_t=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00006876else
6877 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006878#line 6879 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006879#include "confdefs.h"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006880#include <stdio.h>
6881main()
6882{
6883 FILE *f=fopen("conftestval", "w");
6884 if (!f) exit(1);
6885 fprintf(f, "%d\n", sizeof(wchar_t));
Guido van Rossumef2255b2000-03-10 22:30:29 +00006886 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00006887}
Guido van Rossumef2255b2000-03-10 22:30:29 +00006888EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006889if { (eval echo configure:6890: \"$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 +00006890then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006891 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006892else
6893 echo "configure: failed program was:" >&5
6894 cat conftest.$ac_ext >&5
6895 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006896 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00006897fi
6898rm -fr conftest*
6899fi
6900
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006901fi
6902echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
6903cat >> confdefs.h <<EOF
6904#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
6905EOF
6906
6907
6908fi
6909
6910echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006911echo "configure:6912: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006912# Check whether --enable-unicode or --disable-unicode was given.
6913if test "${enable_unicode+set}" = set; then
6914 enableval="$enable_unicode"
6915 :
6916else
6917 enable_unicode=yes
6918fi
6919
6920
6921if test $enable_unicode = yes
6922then
Martin v. Löwisfd917792001-06-27 20:22:04 +00006923 # Without any arguments, Py_UNICODE defaults to two-byte mode
6924 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006925fi
6926
6927case "$enable_unicode" in
6928ucs2) unicode_size="2"
6929 cat >> confdefs.h <<\EOF
6930#define Py_UNICODE_SIZE 2
6931EOF
6932
6933 ;;
6934ucs4) unicode_size="4"
6935 cat >> confdefs.h <<\EOF
6936#define Py_UNICODE_SIZE 4
6937EOF
6938
6939 ;;
6940esac
6941
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006942
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006943if test "$enable_unicode" = "no"
6944then
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006945 UNICODE_OBJS=""
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006946 echo "$ac_t""not used" 1>&6
6947else
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006948 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006949 cat >> confdefs.h <<\EOF
6950#define Py_USING_UNICODE 1
6951EOF
6952
6953 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
6954 then
6955 PY_UNICODE_TYPE="wchar_t"
6956 cat >> confdefs.h <<\EOF
6957#define HAVE_USABLE_WCHAR_T 1
6958EOF
6959
6960 cat >> confdefs.h <<\EOF
6961#define PY_UNICODE_TYPE wchar_t
6962EOF
6963
6964 elif test "$ac_cv_sizeof_short" = "$unicode_size"
6965 then
6966 PY_UNICODE_TYPE="unsigned short"
6967 cat >> confdefs.h <<\EOF
6968#define PY_UNICODE_TYPE unsigned short
6969EOF
6970
6971 elif test "$ac_cv_sizeof_long" = "$unicode_size"
6972 then
6973 PY_UNICODE_TYPE="unsigned long"
6974 cat >> confdefs.h <<\EOF
6975#define PY_UNICODE_TYPE unsigned long
6976EOF
6977
6978 else
6979 PY_UNICODE_TYPE="no type found"
6980 fi
6981 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
6982fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006983
6984# check for endianness
6985echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006986echo "configure:6987: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006987if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006988 echo $ac_n "(cached) $ac_c" 1>&6
6989else
6990 ac_cv_c_bigendian=unknown
6991# See if sys/param.h defines the BYTE_ORDER macro.
6992cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00006993#line 6994 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006994#include "confdefs.h"
6995#include <sys/types.h>
6996#include <sys/param.h>
6997int main() {
6998
6999#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
7000 bogus endian macros
7001#endif
7002; return 0; }
7003EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007004if { (eval echo configure:7005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00007005 rm -rf conftest*
7006 # It does; now see whether it defined to BIG_ENDIAN or not.
7007cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007008#line 7009 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007009#include "confdefs.h"
7010#include <sys/types.h>
7011#include <sys/param.h>
7012int main() {
7013
7014#if BYTE_ORDER != BIG_ENDIAN
7015 not big endian
7016#endif
7017; return 0; }
7018EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007019if { (eval echo configure:7020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00007020 rm -rf conftest*
7021 ac_cv_c_bigendian=yes
7022else
7023 echo "configure: failed program was:" >&5
7024 cat conftest.$ac_ext >&5
7025 rm -rf conftest*
7026 ac_cv_c_bigendian=no
7027fi
7028rm -f conftest*
7029else
7030 echo "configure: failed program was:" >&5
7031 cat conftest.$ac_ext >&5
7032fi
7033rm -f conftest*
7034if test $ac_cv_c_bigendian = unknown; then
7035if test "$cross_compiling" = yes; then
7036 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
7037else
7038 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007039#line 7040 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007040#include "confdefs.h"
7041main () {
7042 /* Are we little or big endian? From Harbison&Steele. */
7043 union
7044 {
7045 long l;
7046 char c[sizeof (long)];
7047 } u;
7048 u.l = 1;
7049 exit (u.c[sizeof (long) - 1] == 1);
7050}
7051EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007052if { (eval echo configure:7053: \"$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 +00007053then
7054 ac_cv_c_bigendian=no
7055else
7056 echo "configure: failed program was:" >&5
7057 cat conftest.$ac_ext >&5
7058 rm -fr conftest*
7059 ac_cv_c_bigendian=yes
7060fi
7061rm -fr conftest*
7062fi
7063
7064fi
7065fi
7066
7067echo "$ac_t""$ac_cv_c_bigendian" 1>&6
7068if test $ac_cv_c_bigendian = yes; then
7069 cat >> confdefs.h <<\EOF
7070#define WORDS_BIGENDIAN 1
7071EOF
7072
7073fi
7074
7075
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007076# Check whether right shifting a negative integer extends the sign bit
7077# or fills with zeros (like the Cray J90, according to Tim Peters).
7078echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007079echo "configure:7080: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007080if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00007081 echo $ac_n "(cached) $ac_c" 1>&6
7082else
7083
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007084if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007085 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007086else
7087 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007088#line 7089 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007089#include "confdefs.h"
7090
7091int main()
7092{
Vladimir Marangozova6180282000-07-12 05:05:06 +00007093 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007094}
7095
7096EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007097if { (eval echo configure:7098: \"$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 +00007098then
7099 ac_cv_rshift_extends_sign=yes
7100else
7101 echo "configure: failed program was:" >&5
7102 cat conftest.$ac_ext >&5
7103 rm -fr conftest*
7104 ac_cv_rshift_extends_sign=no
7105fi
7106rm -fr conftest*
7107fi
7108
7109fi
7110
7111echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
7112if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007113then
7114 cat >> confdefs.h <<\EOF
7115#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
7116EOF
7117
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007118fi
7119
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007120# check for getc_unlocked and related locking functions
7121echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007122echo "configure:7123: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007123if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
7124 echo $ac_n "(cached) $ac_c" 1>&6
7125else
7126
7127cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007128#line 7129 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007129#include "confdefs.h"
7130#include <stdio.h>
7131int main() {
7132
7133 FILE *f = fopen("/dev/null", "r");
7134 flockfile(f);
7135 getc_unlocked(f);
7136 funlockfile(f);
7137
7138; return 0; }
7139EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007140if { (eval echo configure:7141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007141 rm -rf conftest*
7142 ac_cv_have_getc_unlocked=yes
7143else
7144 echo "configure: failed program was:" >&5
7145 cat conftest.$ac_ext >&5
7146 rm -rf conftest*
7147 ac_cv_have_getc_unlocked=no
7148fi
7149rm -f conftest*
7150fi
7151
7152echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
7153if test "$ac_cv_have_getc_unlocked" = yes
7154then
7155 cat >> confdefs.h <<\EOF
7156#define HAVE_GETC_UNLOCKED 1
7157EOF
7158
7159fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007160
Martin v. Löwis0daad592001-09-30 21:09:59 +00007161# check for readline 4.0
7162echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007163echo "configure:7164: checking for rl_pre_input_hook in -lreadline" >&5
Martin v. Löwis0daad592001-09-30 21:09:59 +00007164ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'`
Guido van Rossum353ae582001-07-10 16:45:32 +00007165if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7166 echo $ac_n "(cached) $ac_c" 1>&6
7167else
7168 ac_save_LIBS="$LIBS"
7169LIBS="-lreadline -ltermcap $LIBS"
7170cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007171#line 7172 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00007172#include "confdefs.h"
7173/* Override any gcc2 internal prototype to avoid an error. */
7174/* We use char because int might match the return type of a gcc2
7175 builtin and then its argument prototype would still apply. */
Martin v. Löwis0daad592001-09-30 21:09:59 +00007176char rl_pre_input_hook();
7177
7178int main() {
7179rl_pre_input_hook()
7180; return 0; }
7181EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007182if { (eval echo configure:7183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis0daad592001-09-30 21:09:59 +00007183 rm -rf conftest*
7184 eval "ac_cv_lib_$ac_lib_var=yes"
7185else
7186 echo "configure: failed program was:" >&5
7187 cat conftest.$ac_ext >&5
7188 rm -rf conftest*
7189 eval "ac_cv_lib_$ac_lib_var=no"
7190fi
7191rm -f conftest*
7192LIBS="$ac_save_LIBS"
7193
7194fi
7195if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7196 echo "$ac_t""yes" 1>&6
7197 cat >> confdefs.h <<\EOF
7198#define HAVE_RL_PRE_INPUT_HOOK 1
7199EOF
7200
7201else
7202 echo "$ac_t""no" 1>&6
7203fi
7204
7205
7206# check for readline 4.2
7207echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007208echo "configure:7209: checking for rl_completion_matches in -lreadline" >&5
Martin v. Löwis0daad592001-09-30 21:09:59 +00007209ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
7210if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7211 echo $ac_n "(cached) $ac_c" 1>&6
7212else
7213 ac_save_LIBS="$LIBS"
7214LIBS="-lreadline -ltermcap $LIBS"
7215cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007216#line 7217 "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007217#include "confdefs.h"
7218/* Override any gcc2 internal prototype to avoid an error. */
7219/* We use char because int might match the return type of a gcc2
7220 builtin and then its argument prototype would still apply. */
Guido van Rossum353ae582001-07-10 16:45:32 +00007221char rl_completion_matches();
7222
7223int main() {
7224rl_completion_matches()
7225; return 0; }
7226EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007227if { (eval echo configure:7228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum353ae582001-07-10 16:45:32 +00007228 rm -rf conftest*
7229 eval "ac_cv_lib_$ac_lib_var=yes"
7230else
7231 echo "configure: failed program was:" >&5
7232 cat conftest.$ac_ext >&5
7233 rm -rf conftest*
7234 eval "ac_cv_lib_$ac_lib_var=no"
7235fi
7236rm -f conftest*
7237LIBS="$ac_save_LIBS"
7238
7239fi
7240if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7241 echo "$ac_t""yes" 1>&6
7242 cat >> confdefs.h <<\EOF
7243#define HAVE_RL_COMPLETION_MATCHES 1
7244EOF
7245
7246else
7247 echo "$ac_t""no" 1>&6
7248fi
7249
7250
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007251echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007252echo "configure:7253: checking for broken nice()" >&5
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007253if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
7254 echo $ac_n "(cached) $ac_c" 1>&6
7255else
7256
7257if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007258 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007259else
7260 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007261#line 7262 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007262#include "confdefs.h"
7263
7264int main()
7265{
7266 int val1 = nice(1);
7267 if (val1 != -1 && val1 == nice(2))
7268 exit(0);
7269 exit(1);
7270}
7271
7272EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007273if { (eval echo configure:7274: \"$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 +00007274then
7275 ac_cv_broken_nice=yes
7276else
7277 echo "configure: failed program was:" >&5
7278 cat conftest.$ac_ext >&5
7279 rm -fr conftest*
7280 ac_cv_broken_nice=no
7281fi
7282rm -fr conftest*
7283fi
7284
7285fi
7286
7287echo "$ac_t""$ac_cv_broken_nice" 1>&6
7288if test "$ac_cv_broken_nice" = yes
7289then
7290 cat >> confdefs.h <<\EOF
7291#define HAVE_BROKEN_NICE 1
7292EOF
7293
7294fi
7295
Guido van Rossum95713eb2000-05-18 20:53:31 +00007296# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
7297# Add sys/socket.h to confdefs.h
7298cat >> confdefs.h <<\EOF
7299#ifdef HAVE_SYS_SOCKET_H
7300#include <sys/socket.h>
7301#endif
7302EOF
7303echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007304echo "configure:7305: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007305if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00007306 echo $ac_n "(cached) $ac_c" 1>&6
7307else
7308 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007309#line 7310 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00007310#include "confdefs.h"
7311#include <sys/types.h>
7312#if STDC_HEADERS
7313#include <stdlib.h>
7314#include <stddef.h>
7315#endif
7316EOF
7317if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7318 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7319 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007320 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00007321else
7322 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007323 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00007324fi
7325rm -f conftest*
7326
7327fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007328echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7329if test $ac_cv_type_socklen_t = no; then
7330 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00007331#define socklen_t int
7332EOF
7333
7334fi
7335
7336
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00007337# Add Python/ prefix to LIBOBJS
7338libobjs=$LIBOBJS
7339LIBOBJS=
7340for obj in $libobjs; do
7341 LIBOBJS="$LIBOBJS Python/$obj"
7342done
7343
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007344#AC_MSG_CHECKING(for Modules/Setup)
7345#if test ! -f Modules/Setup ; then
7346# if test ! -d Modules ; then
7347# mkdir Modules
7348# fi
7349# cp "$srcdir/Modules/Setup.dist" Modules/Setup
7350# AC_MSG_RESULT(creating)
7351#else
7352# AC_MSG_RESULT(already exists)
7353#fi
7354
7355
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007356SRCDIRS="Parser Grammar Objects Python Modules"
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007357echo $ac_n "checking for build directories""... $ac_c" 1>&6
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00007358echo "configure:7359: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007359for dir in $SRCDIRS; do
7360 if test ! -d $dir; then
7361 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007362 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007363done
7364echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007365
Guido van Rossum627b2d71993-12-24 10:39:16 +00007366# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007367trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007368cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007369# This file is a shell script that caches the results of configure
7370# tests run on this system so they can be shared between configure
7371# scripts and configure runs. It is not useful on other systems.
7372# If it contains results you don't want to keep, you may remove or edit it.
7373#
7374# By default, configure uses ./config.cache as the cache file,
7375# creating it if it does not exist already. You can give configure
7376# the --cache-file=FILE option to use a different cache file; that is
7377# what configure does when it calls configure scripts in
7378# subdirectories, so they share the cache.
7379# Giving --cache-file=/dev/null disables caching, for debugging configure.
7380# config.status only pays attention to the cache file if you give it the
7381# --recheck option to rerun configure.
7382#
7383EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007384# The following way of writing the cache mishandles newlines in values,
7385# but we know of no workaround that is simple, portable, and efficient.
7386# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007387# Ultrix sh set writes to stderr and can't be redirected directly,
7388# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007389(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007390 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007391 *ac_space=\ *)
7392 # `set' does not quote correctly, so add quotes (double-quote substitution
7393 # turns \\\\ into \\, and sed turns \\ into \).
7394 sed -n \
7395 -e "s/'/'\\\\''/g" \
7396 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7397 ;;
7398 *)
7399 # `set' quotes correctly as required by POSIX, so do not add quotes.
7400 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7401 ;;
7402 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007403if cmp -s $cache_file confcache; then
7404 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007405else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007406 if test -w $cache_file; then
7407 echo "updating cache $cache_file"
7408 cat confcache > $cache_file
7409 else
7410 echo "not updating unwritable cache $cache_file"
7411 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007412fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007413rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007414
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007415trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007416
7417test "x$prefix" = xNONE && prefix=$ac_default_prefix
7418# Let make expand exec_prefix.
7419test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007420
Guido van Rossum7f43da71994-08-01 12:15:30 +00007421# Any assignment to VPATH causes Sun make to only execute
7422# the first set of double-colon rules, so remove it if not needed.
7423# If there is a colon in the path, we need to keep it.
7424if test "x$srcdir" = x.; then
7425 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7426fi
7427
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007428trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00007429
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007430DEFS=-DHAVE_CONFIG_H
7431
7432# Without the "./", some shells look in PATH for config.status.
7433: ${CONFIG_STATUS=./config.status}
7434
7435echo creating $CONFIG_STATUS
7436rm -f $CONFIG_STATUS
7437cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007438#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007439# Generated automatically by configure.
7440# Run this file to recreate the current configuration.
7441# This directory was configured as follows,
7442# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7443#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007444# $0 $ac_configure_args
7445#
7446# Compiler output produced by configure, useful for debugging
7447# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007448
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007449ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007450for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00007451do
Guido van Rossum7f43da71994-08-01 12:15:30 +00007452 case "\$ac_option" in
7453 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007454 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7455 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00007456 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007457 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007458 exit 0 ;;
7459 -help | --help | --hel | --he | --h)
7460 echo "\$ac_cs_usage"; exit 0 ;;
7461 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00007462 esac
7463done
7464
Guido van Rossum7f43da71994-08-01 12:15:30 +00007465ac_given_srcdir=$srcdir
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007466ac_given_INSTALL="$INSTALL"
Guido van Rossum627b2d71993-12-24 10:39:16 +00007467
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007468trap '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 +00007469EOF
7470cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007471
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007472# Protect against being on the right side of a sed subst in config.status.
7473sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7474 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007475$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00007476$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007477s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007478s%@CFLAGS@%$CFLAGS%g
7479s%@CPPFLAGS@%$CPPFLAGS%g
7480s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007481s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007482s%@DEFS@%$DEFS%g
7483s%@LDFLAGS@%$LDFLAGS%g
7484s%@LIBS@%$LIBS%g
7485s%@exec_prefix@%$exec_prefix%g
7486s%@prefix@%$prefix%g
7487s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007488s%@bindir@%$bindir%g
7489s%@sbindir@%$sbindir%g
7490s%@libexecdir@%$libexecdir%g
7491s%@datadir@%$datadir%g
7492s%@sysconfdir@%$sysconfdir%g
7493s%@sharedstatedir@%$sharedstatedir%g
7494s%@localstatedir@%$localstatedir%g
7495s%@libdir@%$libdir%g
7496s%@includedir@%$includedir%g
7497s%@oldincludedir@%$oldincludedir%g
7498s%@infodir@%$infodir%g
7499s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00007500s%@VERSION@%$VERSION%g
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00007501s%@CONFIG_ARGS@%$CONFIG_ARGS%g
Jack Jansene578a632001-08-15 01:27:14 +00007502s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g
7503s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g
7504s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g
7505s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00007506s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00007507s%@SGI_ABI@%$SGI_ABI%g
Martin v. Löwis22352952000-12-13 17:37:02 +00007508s%@CXX@%$CXX%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007509s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007510s%@CC@%$CC%g
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00007511s%@CPP@%$CPP%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007512s%@EXEEXT@%$EXEEXT%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007513s%@LIBRARY@%$LIBRARY%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007514s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007515s%@DLLLIBRARY@%$DLLLIBRARY%g
Jack Jansene578a632001-08-15 01:27:14 +00007516s%@BLDLIBRARY@%$BLDLIBRARY%g
7517s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00007518s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007519s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007520s%@AR@%$AR%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007521s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007522s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007523s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007524s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00007525s%@OPT@%$OPT%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007526s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007527s%@SO@%$SO%g
7528s%@LDSHARED@%$LDSHARED%g
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007529s%@BLDSHARED@%$BLDSHARED%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007530s%@CCSHARED@%$CCSHARED%g
7531s%@LINKFORSHARED@%$LINKFORSHARED%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007532s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007533s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7534s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
Guido van Rossum009f7871997-12-04 00:51:42 +00007535s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00007536s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007537s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00007538s%@DYNLOADFILE@%$DYNLOADFILE%g
Neil Schemenauer4e425612001-06-19 15:44:15 +00007539s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007540s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007541s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7542s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7543s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00007544s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007545s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007546s%@LIBM@%$LIBM%g
7547s%@LIBC@%$LIBC%g
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007548s%@UNICODE_OBJS@%$UNICODE_OBJS%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007549s%@SRCDIRS@%$SRCDIRS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007550
7551CEOF
7552EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007553
7554cat >> $CONFIG_STATUS <<\EOF
7555
7556# Split the substitutions into bite-sized pieces for seds with
7557# small command number limits, like on Digital OSF/1 and HP-UX.
7558ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7559ac_file=1 # Number of current file.
7560ac_beg=1 # First line for current file.
7561ac_end=$ac_max_sed_cmds # Line after last line for current file.
7562ac_more_lines=:
7563ac_sed_cmds=""
7564while $ac_more_lines; do
7565 if test $ac_beg -gt 1; then
7566 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7567 else
7568 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7569 fi
7570 if test ! -s conftest.s$ac_file; then
7571 ac_more_lines=false
7572 rm -f conftest.s$ac_file
7573 else
7574 if test -z "$ac_sed_cmds"; then
7575 ac_sed_cmds="sed -f conftest.s$ac_file"
7576 else
7577 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7578 fi
7579 ac_file=`expr $ac_file + 1`
7580 ac_beg=$ac_end
7581 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7582 fi
7583done
7584if test -z "$ac_sed_cmds"; then
7585 ac_sed_cmds=cat
7586fi
7587EOF
7588
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007589cat >> $CONFIG_STATUS <<EOF
7590
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007591CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007592EOF
7593cat >> $CONFIG_STATUS <<\EOF
7594for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007595 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007596 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007597 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007598 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7599 *) ac_file_in="${ac_file}.in" ;;
7600 esac
7601
Guido van Rossumf78abae1997-01-21 22:02:36 +00007602 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007603
7604 # Remove last slash and all that follows it. Not all systems have dirname.
7605 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7606 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7607 # The file is in a subdirectory.
7608 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007609 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007610 # A "../" for each directory in $ac_dir_suffix.
7611 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7612 else
7613 ac_dir_suffix= ac_dots=
7614 fi
7615
7616 case "$ac_given_srcdir" in
7617 .) srcdir=.
7618 if test -z "$ac_dots"; then top_srcdir=.
7619 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7620 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7621 *) # Relative path.
7622 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7623 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7624 esac
7625
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007626 case "$ac_given_INSTALL" in
7627 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7628 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7629 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007630
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007631 echo creating "$ac_file"
7632 rm -f "$ac_file"
7633 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7634 case "$ac_file" in
7635 *Makefile*) ac_comsub="1i\\
7636# $configure_input" ;;
7637 *) ac_comsub= ;;
7638 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007639
7640 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 +00007641 sed -e "$ac_comsub
7642s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007643s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007644s%@top_srcdir@%$top_srcdir%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007645s%@INSTALL@%$INSTALL%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00007646" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00007647fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00007648rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007649
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007650# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7651# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007652#
7653# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007654ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7655ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007656ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007657ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007658# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007659ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7660ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007661ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007662ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007663# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007664ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7665ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007666ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007667ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007668
Guido van Rossumf78abae1997-01-21 22:02:36 +00007669if test "${CONFIG_HEADERS+set}" != set; then
7670EOF
7671cat >> $CONFIG_STATUS <<EOF
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007672 CONFIG_HEADERS="pyconfig.h"
Guido van Rossumf78abae1997-01-21 22:02:36 +00007673EOF
7674cat >> $CONFIG_STATUS <<\EOF
7675fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007676for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007677 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007678 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007679 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007680 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7681 *) ac_file_in="${ac_file}.in" ;;
7682 esac
7683
Guido van Rossum7f43da71994-08-01 12:15:30 +00007684 echo creating $ac_file
7685
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007686 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00007687 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7688 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007689
7690EOF
7691
7692# Transform confdefs.h into a sed script conftest.vals that substitutes
7693# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007694# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007695# Protect against being in an unquoted here document in config.status.
7696rm -f conftest.vals
7697cat > conftest.hdr <<\EOF
7698s/[\\&%]/\\&/g
7699s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007700s%#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 +00007701s%ac_d%ac_u%gp
7702s%ac_u%ac_e%gp
7703EOF
7704sed -n -f conftest.hdr confdefs.h > conftest.vals
7705rm -f conftest.hdr
7706
7707# This sed command replaces #undef with comments. This is necessary, for
7708# example, in the case of _POSIX_SOURCE, which is predefined and required
7709# on some systems where configure will not decide to define it.
7710cat >> conftest.vals <<\EOF
7711s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7712EOF
7713
7714# Break up conftest.vals because some shells have a limit on
7715# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007716
7717rm -f conftest.tail
7718while :
7719do
7720 ac_lines=`grep -c . conftest.vals`
7721 # grep -c gives empty output for an empty file on some AIX systems.
7722 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7723 # Write a limited-size here document to conftest.frag.
7724 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7725 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7726 echo 'CEOF
7727 sed -f conftest.frag conftest.in > conftest.out
7728 rm -f conftest.in
7729 mv conftest.out conftest.in
7730' >> $CONFIG_STATUS
7731 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7732 rm -f conftest.vals
7733 mv conftest.tail conftest.vals
7734done
7735rm -f conftest.vals
7736
7737cat >> $CONFIG_STATUS <<\EOF
7738 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00007739 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007740 cat conftest.in >> conftest.h
7741 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00007742 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00007743 echo "$ac_file is unchanged"
7744 rm -f conftest.h
7745 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007746 # Remove last slash and all that follows it. Not all systems have dirname.
7747 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7748 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7749 # The file is in a subdirectory.
7750 test ! -d "$ac_dir" && mkdir "$ac_dir"
7751 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00007752 rm -f $ac_file
7753 mv conftest.h $ac_file
7754 fi
7755fi; done
7756
Guido van Rossumf78abae1997-01-21 22:02:36 +00007757EOF
7758cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007759
Guido van Rossumf78abae1997-01-21 22:02:36 +00007760EOF
7761cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007762
7763exit 0
7764EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007765chmod +x $CONFIG_STATUS
7766rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007767test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00007768
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007769
7770echo "creating Setup"
7771if test ! -f Modules/Setup
7772then
7773 cp $srcdir/Modules/Setup.dist Modules/Setup
7774fi
7775
7776echo "creating Setup.local"
7777if test ! -f Modules/Setup.local
7778then
7779 echo "# Edit this file for local setup changes" >Modules/Setup.local
7780fi
7781
7782echo "creating Makefile"
7783$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
7784 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00007785 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007786mv config.c Modules